From 61dce9f31a8117e2896da09cb12e1cd703b79ce9 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 3 Sep 2010 17:13:42 -0700 Subject: [PATCH] new UI - implement account detail panel. --- ui/new/index.jsp | 2 + ui/new/jsp/tab_account.jsp | 106 +++++++++++++++++++++++++++ ui/new/scripts/cloud.core.account.js | 12 +++ ui/new/scripts/cloud.core.init.js | 7 +- 4 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 ui/new/jsp/tab_account.jsp create mode 100644 ui/new/scripts/cloud.core.account.js diff --git a/ui/new/index.jsp b/ui/new/index.jsp index 759b77129ce..29da536dc88 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -34,6 +34,8 @@ + + Cloud.com CloudStack diff --git a/ui/new/jsp/tab_account.jsp b/ui/new/jsp/tab_account.jsp new file mode 100644 index 00000000000..a4b8c117648 --- /dev/null +++ b/ui/new/jsp/tab_account.jsp @@ -0,0 +1,106 @@ + + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("Role")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Domain")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("VMs")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("IPs")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Bytes.Received")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Bytes.Sent")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("State")%>:
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/ui/new/scripts/cloud.core.account.js b/ui/new/scripts/cloud.core.account.js new file mode 100644 index 00000000000..ed4475d3af1 --- /dev/null +++ b/ui/new/scripts/cloud.core.account.js @@ -0,0 +1,12 @@ +function loadAccountToRigntPanelFn($rightPanelContent) { + var jsonObj = $rightPanelContent.data("jsonObj"); + var $rightPanelContent = $("#right_panel_content"); + $rightPanelContent.find("#role").text(toRole(jsonObj.accounttype)); + $rightPanelContent.find("#account").text(jsonObj.name); + $rightPanelContent.find("#domain").text(jsonObj.domain); + $rightPanelContent.find("#vm_total").text(jsonObj.vmtotal); + $rightPanelContent.find("#ip_total").text(jsonObj.iptotal); + $rightPanelContent.find("#bytes_received").text(jsonObj.receivedbytes); + $rightPanelContent.find("#bytes_sent").text(jsonObj.sentbytes); + $rightPanelContent.find("#state").text(jsonObj.state); +} \ No newline at end of file diff --git a/ui/new/scripts/cloud.core.init.js b/ui/new/scripts/cloud.core.init.js index 2652cfd2ce7..8cc8478731e 100755 --- a/ui/new/scripts/cloud.core.init.js +++ b/ui/new/scripts/cloud.core.init.js @@ -60,12 +60,6 @@ $(document).ready(function() { $midmenuItem1.data("id", jsonObj.id); $midmenuItem1.data("jsonObj", jsonObj); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); - -// $midmenuItem1.bind("click", function(event) { -// var $t = $(this); -// toRightPanelFn($t); -// return false; -// }); } var $midmenuItem = $("#midmenu_item"); @@ -98,6 +92,7 @@ $(document).ready(function() { } listMidMenuItems("leftmenu_event", "listEvents", "listeventsresponse", "event", "description", "jsp/tab_event.jsp", loadEventToRigntPanelFn); //listMidMenuItems("leftmenu_alert", "listAlerts", "listalertsresponse", "alert", "description", loadAlertToRightPanel); + listMidMenuItems("leftmenu_account", "listAccounts", "listaccountsresponse", "account", "name", "jsp/tab_account.jsp", loadAccountToRigntPanelFn);