Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/18/15 10:08:58 (9 years ago)
Author:
ascheibe
Message:

#2388 merged hive statistics branch into trunk

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/history/historyCtrl.js

    r12583 r12878  
    22    var module = appStatusPlugin.getAngularModule();
    33    module.controller('app.status.historyCtrl',
    4         ['$scope', '$interval', 'app.status.data.service',
    5         function ($scope, $interval, dataService) {
     4        ['$scope', '$interval', 'app.status.data.service', '$log',
     5        function ($scope, $interval, dataService, $log) {
    66            $scope.chartOptions = {
    77                grid: {
     
    4040            };
    4141
    42 
    4342            $scope.fromDate = new Date();
    4443            $scope.toDate = new Date();
     
    5251                { id: 2, name: 'Yesterday' },
    5352                { id: 3, name: 'Last 7 Days' },
    54                 { id: 4, name: 'Last 30 Days' }
     53                { id: 4, name: 'Last 30 Days' },
     54                { id: 5, name: 'Last 6 Months' },
     55                { id: 6, name: 'Last Year' }
    5556            ];
    5657            $scope.changeQuickSelection = function (quickSelection) {
     
    7273                    case 4:
    7374                        $scope.fromDate = new Date(today.valueOf() - (30 * oneDayInMs));
     75                        $scope.toDate = new Date(today.valueOf());
     76                        break;
     77                    case 5:
     78                        var month = today.getMonth() - 6;
     79                        if (month < 0) {
     80                            month += 12;
     81                        }
     82                        $scope.fromDate = new Date(today.valueOf());
     83                        $scope.fromDate.setMonth(month);
     84                        $scope.toDate = new Date(today.valueOf());
     85                        break;
     86                    case 6:
     87                        $scope.fromDate = new Date(today.valueOf());
     88                        $scope.fromDate.setFullYear(today.getFullYear()-1);
    7489                        $scope.toDate = new Date(today.valueOf());
    7590                        break;
     
    113128                    for (var i = 0; i < noOfStatus; ++i) {
    114129                        var curStatus = status[i];
    115                         var cpuData = Math.round(curStatus.CpuUtilizationStatus.ActiveCpuUtilization);
     130                        var cpuData = Math.round(curStatus.CpuUtilizationStatus.TotalCpuUtilization);
    116131                        cpuSeries.push([curStatus.Timestamp, cpuData]);
    117                         coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.ActiveCores]);
    118                         coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus.CalculatingCores]);
    119                         memorySeries[0].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.ActiveMemory / 1024)]);
     132                        coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.TotalCores]);
     133                        coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus.UsedCores]);
     134                        memorySeries[0].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.TotalMemory / 1024)]);
    120135                        memorySeries[1].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.UsedMemory / 1024)]);
    121136                    }
     
    129144                        { data: memorySeries[1], label: "&nbsp;Used Memory", color: "LightPink" }
    130145                    ];
    131 
    132146                });
    133147            };
Note: See TracChangeset for help on using the changeset viewer.