Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/15 11:16:48 (9 years ago)
Author:
dglaser
Message:

#2394:

HeuristicLab.Services.WebApp.Status-3.3:

  • changed the DataController to return memory in kb instead of gb
  • fixed the memory rounding error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js

    r12445 r12521  
    148148                    coreSeries[0].push([$scope.status.Timestamp, status.CoreStatus.TotalCores]);
    149149                    coreSeries[1].push([$scope.status.Timestamp, usedCores]);
    150                     memorySeries[0].push([$scope.status.Timestamp, status.MemoryStatus.TotalMemory]);
    151                     memorySeries[1].push([$scope.status.Timestamp, usedMemory]);
     150                    memorySeries[0].push([$scope.status.Timestamp, Math.round(status.MemoryStatus.TotalMemory / 1024)]);
     151                    memorySeries[1].push([$scope.status.Timestamp, Math.round(usedMemory / 1024)]);
    152152                    $scope.cpu.series = [{ data: cpuSeries, label: " CPU Utilization", color: "#f7921d" }];
    153153                    $scope.core.series = [
     
    170170                    var noOfStatus = status.length;
    171171                    var cpuSeries = [];
    172                     var coreSeries = [[],[]];
    173                     var memorySeries = [[],[]];
     172                    var coreSeries = [[], []];
     173                    var memorySeries = [[], []];
    174174                    for (var i = 0; i < noOfStatus; ++i) {
    175175                        var curStatus = status[i];
     
    178178                        coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.ActiveCores]);
    179179                        coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus.CalculatingCores]);
    180                         memorySeries[0].push([curStatus.Timestamp, curStatus.MemoryStatus.ActiveMemory]);
    181                         memorySeries[1].push([curStatus.Timestamp, curStatus.MemoryStatus.UsedMemory]);
     180                        memorySeries[0].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.ActiveMemory / 1024)]);
     181                        memorySeries[1].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.UsedMemory / 1024)]);
    182182                    }
    183183                    $scope.cpu.series = [{ data: cpuSeries, label: "&nbsp;CPU Utilization", color: "#f7921d" }];
     
    202202        }]
    203203    );
     204
     205    module.filter('toGB', function () {
     206        return function (text, length, end) {
     207            if (text == null || text == '') text = '0';
     208            text = Math.round(parseInt(text) / 1024);
     209            return text + ' GB';
     210        };
     211    });
     212
    204213})();
Note: See TracChangeset for help on using the changeset viewer.