<commit_before>angular.module('Ventolone', [
  'ngRoute'
  ,'ngGoogleCharts'
  ,'Ventolone.resources'
  ,'ngRouting'
])

  .config(function(routingProvider) {
    var resolve = {
      anemometer: function (Anemometer, $route, $routeParams) {
        return Anemometer.get({
          id:$route.current.pathParams.anemometerId
        }).$promise
      }
    }

    routingProvider
      .withResolve(resolve)
      .build([{
        model:'anemometer'
      }])
      .when('/anemometers/:anemometerId/upload',{
        templateUrl: 'views/anemometer/upload.html',
        controller:  'UploadController',
        resolve:     resolve
      })
      .when('/',{
        redirectTo:'/anemometers'
      })
  })
  .run( function($rootScope, routing) {
    $rootScope.h = routing.helpers
    $rootScope.h.anemometerUploadPath  = function(anemometerId){
      return $rootScope.h.anemometerPath(anemometerId)  + '/upload'
    }
    $rootScope.h.anemometerUploadRoute = function(anemometerId){
      return $rootScope.h.anemometerRoute(anemometerId) + '/upload'
    }
 })

.controller('NewAnemometerCtrl' , function ($scope, Anemometer, $location) {
  $scope.anemometer = {}
  $scope.submit = function  () {
    Anemometer.save($scope.anemometer).$promise.then(function (response) {
      $location.path($scope.h.anemometerRoute(response.id))
    })
  }
})
.controller('EditAnemometerCtrl', function ($scope, Anemometer, anemometer, $routeParams) {
  $scope.anemometer = anemometer
  $scope.submit = function  () {
    Anemometer.save($scope.anemometer)
  }
})
.controller('AnemometerListCtrl', function ($scope, Anemometer, $route) {
  Anemometer.query().$promise.then(function (anemometers) {
    $scope.anemometers = anemometers
  })

  $scope.delete = function(anemometer){
    Anemometer.delete({
      id:anemometer._id,
      rev:anemometer._rev
    },function () {
      $route.reload()
    })
  }
})
.controller('AnemometerCtrl', function ($scope, anemometer, $routeParams, Sample , chartReady , $q, $interpolate, $filter) {
  $scope.anemometer = anemometer

  $scope.options = {
      month: 2,
      day: 3,
      half_day: 4,
      hour: 5,
      half_hour:6,
      ten_minute: 7,
      minutes: 8
    }

    $scope.plants = [
      "MFEREKE",
      "BOOOHHHH"
    ]

    $scope.dataFrequency = 4
    $scope.plant = $scope.plants[1]

    // $scope.timeSpan = {
    //   from: '2014-01-01'
    //   , to: '2014-12-31'
    // }

    $scope.timeSpan = {
      from: '2013-08-15'
      , to: '2013-09-15'
    }<commit_msg>removed unused code<commit_after>angular.module('Ventolone', [
  'ngRoute'
  ,'ngGoogleCharts'
  ,'Ventolone.resources'
  ,'ngRouting'
])

  .config(function(routingProvider) {
    var resolve = {
      anemometer: function (Anemometer, $route, $routeParams) {
        return Anemometer.get({
          id:$route.current.pathParams.anemometerId
        }).$promise
      }
    }

    routingProvider
      .withResolve(resolve)
      .build([{
        model:'anemometer'
      }])
      .when('/anemometers/:anemometerId/upload',{
        templateUrl: 'views/anemometer/upload.html',
        controller:  'UploadController',
        resolve:     resolve
      })
      .when('/',{
        redirectTo:'/anemometers'
      })
  })
  .run( function($rootScope, routing) {
    $rootScope.h = routing.helpers
    $rootScope.h.anemometerUploadPath  = function(anemometerId){
      return $rootScope.h.anemometerPath(anemometerId)  + '/upload'
    }
    $rootScope.h.anemometerUploadRoute = function(anemometerId){
      return $rootScope.h.anemometerRoute(anemometerId) + '/upload'
    }
 })

.controller('NewAnemometerCtrl' , function ($scope, Anemometer, $location) {
  $scope.anemometer = {}
  $scope.submit = function  () {
    Anemometer.save($scope.anemometer).$promise.then(function (response) {
      $location.path($scope.h.anemometerRoute(response.id))
    })
  }
})
.controller('EditAnemometerCtrl', function ($scope, Anemometer, anemometer, $routeParams) {
  $scope.anemometer = anemometer
  $scope.submit = function  () {
    Anemometer.save($scope.anemometer)
  }
})
.controller('AnemometerListCtrl', function ($scope, Anemometer, $route) {
  Anemometer.query().$promise.then(function (anemometers) {
    $scope.anemometers = anemometers
  })

  $scope.delete = function(anemometer){
    Anemometer.delete({
      id:anemometer._id,
      rev:anemometer._rev
    },function () {
      $route.reload()
    })
  }
})
.controller('AnemometerCtrl', function ($scope, anemometer, $routeParams, Sample , chartReady , $q, $interpolate, $filter) {
  $scope.anemometer = anemometer

  $scope.options = {
      month: 2,
      day: 3,
      half_day: 4,
      hour: 5,
      half_hour:6,
      ten_minute: 7,
      minutes: 8
    }

    $scope.dataFrequency = 4
    $scope.plant = $scope.plants[1]

    $scope.timeSpan = {
      from: '2013-08-15'
      , to: '2013-09-15'
    }
{'fraction_non_alphanumeric': 0.15095879232966136, 'fraction_numerical': 0.01346389228886169, 'mean_word_length': 2.872827804107425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '593690', 'n_tokens_mistral': 1760, 'n_tokens_neox': 1682, 'n_words': 246}