From 8853cd1dc862f779cfadc7c16aa7e0a339ab0a1d Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 9 Nov 2010 15:05:33 -0800 Subject: [PATCH] bug 6983: Host page - statistics tab - add CPU Allocated, Memory Total, Memory Allocated, Memory Used. --- ui/jsp/host.jsp | 43 +++++++++++++++++++++++++++++++++++ ui/scripts/cloud.core.host.js | 12 ++++++++++ 2 files changed, 55 insertions(+) diff --git a/ui/jsp/host.jsp b/ui/jsp/host.jsp index 2e214977148..f0ea3d0ea40 100644 --- a/ui/jsp/host.jsp +++ b/ui/jsp/host.jsp @@ -211,6 +211,49 @@ +
+
+
+ CPU Allocated:
+
+
+
+
+
+
+ +
+
+
+ Memory Total:
+
+
+
+
+
+
+ +
+
+
+ Memory Allocated:
+
+
+
+
+
+
+ +
+
+
+ Memory Used:
+
+
+
+
+
+
diff --git a/ui/scripts/cloud.core.host.js b/ui/scripts/cloud.core.host.js index 282a106ace2..99bfb62f1d7 100644 --- a/ui/scripts/cloud.core.host.js +++ b/ui/scripts/cloud.core.host.js @@ -178,6 +178,18 @@ function hostJsonToStatisticsTab() { if(jsonObj.cpuused!=null) drawBarChart($barChartContainer, jsonObj.cpuused); + var cpuAllocated = ((jsonObj.cpuallocated==null)? "":jsonObj.cpuallocated); + $thisTab.find("#cpuallocated").text(cpuAllocated); + + var memoryTotal = ((jsonObj.cpuallocated==null)? "":convertBytes(jsonObj.memorytotal)); + $thisTab.find("#memorytotal").text(memoryTotal); + + var memoryAllocated = ((jsonObj.cpuallocated==null)? "":convertBytes(jsonObj.memoryallocated)); + $thisTab.find("#memoryallocated").text(memoryAllocated); + + var memoryUsed = ((jsonObj.memoryused==null)? "":convertBytes(jsonObj.memoryused)); + $thisTab.find("#memoryused").text(memoryUsed); + var networkKbsRead = ((jsonObj.networkkbsread==null)? "":convertBytes(jsonObj.networkkbsread * 1024)); $thisTab.find("#networkkbsread").text(networkKbsRead);