Skip to content

Commit

Permalink
Fixed: Stats time period didnt react
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Jan 29, 2017
1 parent ee4ddb7 commit 38ac513
Show file tree
Hide file tree
Showing 8 changed files with 6,812 additions and 31,344 deletions.
13,586 changes: 6,793 additions & 6,793 deletions static/css/alllibs.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/css/alllibs.css.map

Large diffs are not rendered by default.

24,532 changes: 0 additions & 24,532 deletions static/js/alllibs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/alllibs.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions static/js/nzbhydra.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/js/nzbhydra.js.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions ui-src/js/nzbhydra.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
agGrid.initialiseAgGridWithAngular1(angular);

var nzbhydraapp = angular.module('nzbhydraApp', ['angular-loading-bar', 'cgBusy', 'ui.bootstrap', 'ipCookie', 'angular-growl', 'angular.filter', 'filters', 'ui.router', 'blockUI', 'mgcrea.ngStrap', 'angularUtils.directives.dirPagination', 'nvd3', 'formly', 'formlyBootstrap', 'frapontillo.bootstrap-switch', 'ui.select', 'ngSanitize', 'checklist-model', 'ngAria', 'ngMessages', 'ui.router.title', 'satellizer', 'LocalStorageModule', 'angular.filter', 'ngFileUpload', 'agGrid', 'ngCookies']);
var nzbhydraapp = angular.module('nzbhydraApp', ['angular-loading-bar', 'cgBusy', 'ui.bootstrap', 'ipCookie', 'angular-growl', 'angular.filter', 'filters', 'ui.router', 'blockUI', 'mgcrea.ngStrap', 'angularUtils.directives.dirPagination', 'nvd3', 'formly', 'formlyBootstrap', 'frapontillo.bootstrap-switch', 'ui.select', 'ngSanitize', 'checklist-model', 'ngAria', 'ngMessages', 'ui.router.title', 'LocalStorageModule', 'angular.filter', 'ngFileUpload', 'ngCookies']);

angular.module('nzbhydraApp').config(function ($stateProvider, $urlRouterProvider, $locationProvider, blockUIConfig, $urlMatcherFactoryProvider, localStorageServiceProvider, bootstrapped) {

Expand Down
12 changes: 7 additions & 5 deletions ui-src/js/stats-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function StatsController($scope, $filter, StatsService, blockUI) {
opened: false
};


function updateStats() {
blockUI.start("Updating stats...");
var after = $scope.afterDate != null ? Math.floor($scope.afterDate.getTime() / 1000) : null;
Expand All @@ -45,16 +44,19 @@ function StatsController($scope, $filter, StatsService, blockUI) {
}

$scope.$watch('beforeDate', function () {
if (!initializingBefore) {
updateStats();
if (initializingBefore) {
initializingBefore = false;
} else {
updateStats();
}
});


$scope.$watch('afterDate', function () {
if (!initializingAfter) {
updateStats();
if (initializingAfter) {
initializingAfter = false;
} else {
updateStats();
}
});

Expand Down

0 comments on commit 38ac513

Please sign in to comment.