From c050d0717b591e01407606217baccae601bcc15a Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 3 Sep 2010 18:24:43 -0700 Subject: [PATCH] new UI - implement alert detail panel. --- ui/new/index.jsp | 2 ++ ui/new/jsp/tab_alert.jsp | 56 ++++++++++++++++++++++++++++++ ui/new/jsp/tab_event.jsp | 2 +- ui/new/scripts/cloud.core.alert.js | 10 ++++++ ui/new/scripts/cloud.core.init.js | 2 +- 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 ui/new/jsp/tab_alert.jsp create mode 100644 ui/new/scripts/cloud.core.alert.js diff --git a/ui/new/index.jsp b/ui/new/index.jsp index 3008a154f28..93fa2b84844 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -33,6 +33,8 @@ + + diff --git a/ui/new/jsp/tab_alert.jsp b/ui/new/jsp/tab_alert.jsp new file mode 100644 index 00000000000..5d388aa4b7c --- /dev/null +++ b/ui/new/jsp/tab_alert.jsp @@ -0,0 +1,56 @@ + + +<%@ 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("Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Description")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Sent")%>:
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/ui/new/jsp/tab_event.jsp b/ui/new/jsp/tab_event.jsp index 4c33b31018e..58cd0b49f57 100644 --- a/ui/new/jsp/tab_event.jsp +++ b/ui/new/jsp/tab_event.jsp @@ -93,4 +93,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/ui/new/scripts/cloud.core.alert.js b/ui/new/scripts/cloud.core.alert.js new file mode 100644 index 00000000000..76d488b0991 --- /dev/null +++ b/ui/new/scripts/cloud.core.alert.js @@ -0,0 +1,10 @@ +function loadAlertToRigntPanelFn($rightPanelContent) { + var jsonObj = $rightPanelContent.data("jsonObj"); + + var $rightPanelContent = $("#right_panel_content"); + + $rightPanelContent.find("#type").text(jsonObj.type); + $rightPanelContent.find("#description").text(jsonObj.description); + + setDateField(jsonObj.sent, $rightPanelContent.find("#sent")); +} \ 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 4a2398e6448..b6203176cef 100755 --- a/ui/new/scripts/cloud.core.init.js +++ b/ui/new/scripts/cloud.core.init.js @@ -91,7 +91,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_alert", "listAlerts", "listalertsresponse", "alert", "description", "jsp/tab_alert.jsp", loadAlertToRigntPanelFn); listMidMenuItems("leftmenu_account", "listAccounts", "listaccountsresponse", "account", "name", "jsp/tab_account.jsp", loadAccountToRigntPanelFn); listMidMenuItems("leftmenu_volume", "listVolumes", "listvolumesresponse", "volume", "name", "jsp/tab_volume.jsp", loadVolumeToRigntPanelFn);