##// END OF EJS Templates
dashboard: reintroduce scope.destroy()
ergo -
Show More
@@ -8859,10 +8859,12 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
8859 8859 $location.search('timespan', vm.timeSpan.key);
8860 8860 $location.search('graphtype', vm.graphType.selected);
8861 8861 stateHolder.resource = vm.resource;
8862
8862 8863 if (vm.resource){
8863 8864 $cookies.putObject('resource', vm.resource,
8864 8865 {expires:new Date(3000, 1, 1)});
8865 8866 }
8867 vm.refreshData();
8866 8868 };
8867 8869
8868 8870 vm.refreshData = function () {
@@ -8878,7 +8880,7 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
8878 8880 vm.refreshData();
8879 8881 };
8880 8882
8881 var intervalId = $interval(function () {
8883 vm.intervalId = $interval(function () {
8882 8884 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
8883 8885 // don't do anything if window is unfocused
8884 8886 if(document.hidden === true){
@@ -9065,6 +9067,10 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
9065 9067 );
9066 9068 };
9067 9069
9070 $scope.$on('$destroy',function(){
9071 $interval.cancel(vm.intervalId);
9072 });
9073
9068 9074 if (stateHolder.AeUser.applications.length){
9069 9075 vm.show_dashboard = true;
9070 9076 vm.determineStartState();
@@ -444,10 +444,12 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
444 444 $location.search('timespan', vm.timeSpan.key);
445 445 $location.search('graphtype', vm.graphType.selected);
446 446 stateHolder.resource = vm.resource;
447
447 448 if (vm.resource){
448 449 $cookies.putObject('resource', vm.resource,
449 450 {expires:new Date(3000, 1, 1)});
450 451 }
452 vm.refreshData();
451 453 };
452 454
453 455 vm.refreshData = function () {
@@ -463,7 +465,7 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
463 465 vm.refreshData();
464 466 };
465 467
466 var intervalId = $interval(function () {
468 vm.intervalId = $interval(function () {
467 469 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
468 470 // don't do anything if window is unfocused
469 471 if(document.hidden === true){
@@ -650,6 +652,10 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
650 652 );
651 653 };
652 654
655 $scope.$on('$destroy',function(){
656 $interval.cancel(vm.intervalId);
657 });
658
653 659 if (stateHolder.AeUser.applications.length){
654 660 vm.show_dashboard = true;
655 661 vm.determineStartState();
General Comments 0
You need to be logged in to leave comments. Login now