Changeset 12551 for branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js
- Timestamp:
- 06/30/15 13:12:07 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
-
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js
r12525 r12551 117 117 $scope.cpu.knobData = Math.round(status.CpuUtilizationStatus.ActiveCpuUtilization); 118 118 $scope.core.knobData = Math.round(status.CoreStatus.CalculatingCores / status.CoreStatus.ActiveCores * 100); 119 $scope.memory.knobData = Math.round(status.MemoryStatus. UsedMemory / status.MemoryStatus.ActiveMemory * 100);119 $scope.memory.knobData = Math.round(status.MemoryStatus.CalculatingMemory / status.MemoryStatus.ActiveMemory * 100); 120 120 // chart series 121 121 var cpuSeries = $scope.cpu.series[0].data.splice(0); … … 141 141 cpuSeries.push([$scope.status.Timestamp, $scope.cpu.knobData]); 142 142 143 // charts are currently filled with old total/used data144 // start temporary145 var usedCores = status.CoreStatus.TotalCores - status.CoreStatus.FreeCores;146 var usedMemory = status.MemoryStatus.TotalMemory - status.MemoryStatus.FreeMemory;147 // end temporary148 143 coreSeries[0].push([$scope.status.Timestamp, status.CoreStatus.TotalCores]); 149 coreSeries[1].push([$scope.status.Timestamp, usedCores]);144 coreSeries[1].push([$scope.status.Timestamp, status.CoreStatus.UsedCores]); 150 145 memorySeries[0].push([$scope.status.Timestamp, Math.round(status.MemoryStatus.TotalMemory / 1024)]); 151 memorySeries[1].push([$scope.status.Timestamp, Math.round( usedMemory / 1024)]);146 memorySeries[1].push([$scope.status.Timestamp, Math.round(status.MemoryStatus.UsedMemory / 1024)]); 152 147 $scope.cpu.series = [{ data: cpuSeries, label: " CPU Utilization", color: "#f7921d" }]; 153 148 $scope.core.series = [ … … 174 169 for (var i = 0; i < noOfStatus; ++i) { 175 170 var curStatus = status[i]; 176 var cpuData = Math.round(curStatus.CpuUtilizationStatus. ActiveCpuUtilization);171 var cpuData = Math.round(curStatus.CpuUtilizationStatus.TotalCpuUtilization); 177 172 cpuSeries.push([curStatus.Timestamp, cpuData]); 178 coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus. ActiveCores]);179 coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus. CalculatingCores]);180 memorySeries[0].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus. ActiveMemory / 1024)]);173 coreSeries[0].push([curStatus.Timestamp, curStatus.CoreStatus.TotalCores]); 174 coreSeries[1].push([curStatus.Timestamp, curStatus.CoreStatus.UsedCores]); 175 memorySeries[0].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.TotalMemory / 1024)]); 181 176 memorySeries[1].push([curStatus.Timestamp, Math.round(curStatus.MemoryStatus.UsedMemory / 1024)]); 182 177 } … … 202 197 }] 203 198 ); 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 213 199 })();
Note: See TracChangeset
for help on using the changeset viewer.