From f82e73b861b4d0f32994b6a588d262c5a4c477f2 Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 09:30:09 -0700 Subject: [PATCH 01/42] bug 6159: incremental checkin --- .../cloud/server/ManagementServerImpl.java | 68 +++++++++++++++---- 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 4ecb921ebc9..2472a85f020 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -3393,27 +3393,69 @@ public class ManagementServerImpl implements ManagementServer { // check for ip address/port conflicts by checking existing forwarding and load balancing rules List existingRulesOnPubIp = _firewallRulesDao.listIPForwarding(ipAddress); - Map> mappedPublicPorts = new HashMap>(); - + Map mappedPublicPorts = new HashMap(); + Map publicPortToProtocolMapping=new HashMap(); if (existingRulesOnPubIp != null) { for (FirewallRuleVO fwRule : existingRulesOnPubIp) { - mappedPublicPorts.put(fwRule.getPublicPort(), new Pair(fwRule.getPrivateIpAddress(), fwRule.getPrivatePort())); + + //mappedPublicPorts.put(fwRule.getPublicPort(), new Pair(fwRule.getPrivateIpAddress(), fwRule.getPrivatePort())); + if(mappedPublicPorts.containsKey(fwRule.getPublicPort())){ + mappedPublicPorts.put(fwRule.getPublicPort(), mappedPublicPorts.get(fwRule.getPublicPort()).append(";").append(fwRule.getPrivateIpAddress().concat(",").concat(fwRule.getPrivatePort()))); + } + else{ + mappedPublicPorts.put(fwRule.getPublicPort(), new StringBuilder(fwRule.getPrivateIpAddress()+","+fwRule.getPrivatePort())); + } + + if(publicPortToProtocolMapping.containsKey(fwRule.getPublicPort())){ + publicPortToProtocolMapping.put(fwRule.getPublicPort(), publicPortToProtocolMapping.get(fwRule.getPublicPort()).append(";").append(fwRule.getProtocol())); + } + else{ + publicPortToProtocolMapping.put(fwRule.getPublicPort(),new StringBuilder(fwRule.getProtocol())); + } } } - if (userVm != null) { - Pair privateIpPort = mappedPublicPorts.get(publicPort); - if (privateIpPort != null) { - if (privateIpPort.first().equals(userVm.getGuestIpAddress()) && privateIpPort.second().equals(privatePort)) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists."); - } - return null; // already mapped - } else { + if (userVm != null) + { + String privateIpPort = mappedPublicPorts.get(publicPort).toString();//eg: 10.1.1.2,30 ; 10.1.1.2,34 + if (privateIpPort != null && privateIpPort.length()>0) + { + String publicPortProtocol = publicPortToProtocolMapping.get(publicPort).toString(); + String[] privateIpPortPairs = privateIpPort.toString().split(";"); //eg. 10.1.1.2,30 + String[] privateIpAndPortStr; + boolean errFlag = false; + + for(String pair: privateIpPortPairs) + { + privateIpAndPortStr = pair.split(",");//split into 10.1.1.2 & 30 + + if (privateIpAndPortStr[0].equals(userVm.getGuestIpAddress()) && privateIpAndPortStr[1].equals(privatePort)) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists."); + } + return null; // already mapped + } + //at this point protocol string looks like: eg. tcp;udp || tcp || udp || udp;tcp + else if(!publicPortProtocol.contains(protocol))//check if this public port is mapped to the protocol or not + { + //this is the case eg: + //pub:1 pri:2 pro: tcp + //pub 1 pri:3 pro: udp + break; //we break here out of the loop, for the record to be created + } + else + { + errFlag = true; +// throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort +// + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " +// + securityGroupId.toString() + ".")); + } + } + + if(errFlag) throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " + securityGroupId.toString() + ".")); - } } FirewallRuleVO newFwRule = new FirewallRuleVO(); From 542230fc2621ed3951a6af74bdc586606b902790 Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 09:35:28 -0700 Subject: [PATCH 02/42] null check for the npe --- server/src/com/cloud/storage/StorageManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 864825ed87a..4f8176eada9 100644 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -308,7 +308,7 @@ public class StorageManagerImpl implements StorageManager { { StoragePoolVO sp = _storagePoolDao.findById(vol.getPoolId()); - if(sp.getStatus().equals(Status.PrepareForMaintenance)) + if(sp!=null && sp.getStatus().equals(Status.PrepareForMaintenance)) { recreateVols.add(vol); continue; From 1af28db9cd5871a5e1a7340edafdf93a7cfefaf5 Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 10:19:02 -0700 Subject: [PATCH 03/42] bug 6159: now we can add at most 2 records per public port (one for tcp, one for udp) eg: 1:2:tcp and 1:3:udp; any other combination for this port will result in an error being propagated back to the UI status 6159: resolved fixed --- .../cloud/server/ManagementServerImpl.java | 88 ++++++++++--------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 2472a85f020..951327af0a3 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -3417,47 +3417,53 @@ public class ManagementServerImpl implements ManagementServer { if (userVm != null) { - String privateIpPort = mappedPublicPorts.get(publicPort).toString();//eg: 10.1.1.2,30 ; 10.1.1.2,34 - if (privateIpPort != null && privateIpPort.length()>0) - { - String publicPortProtocol = publicPortToProtocolMapping.get(publicPort).toString(); - String[] privateIpPortPairs = privateIpPort.toString().split(";"); //eg. 10.1.1.2,30 - String[] privateIpAndPortStr; - boolean errFlag = false; - - for(String pair: privateIpPortPairs) - { - privateIpAndPortStr = pair.split(",");//split into 10.1.1.2 & 30 - - if (privateIpAndPortStr[0].equals(userVm.getGuestIpAddress()) && privateIpAndPortStr[1].equals(privatePort)) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists."); - } - return null; // already mapped - } - //at this point protocol string looks like: eg. tcp;udp || tcp || udp || udp;tcp - else if(!publicPortProtocol.contains(protocol))//check if this public port is mapped to the protocol or not - { - //this is the case eg: - //pub:1 pri:2 pro: tcp - //pub 1 pri:3 pro: udp - break; //we break here out of the loop, for the record to be created - } - else - { - errFlag = true; -// throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort -// + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " -// + securityGroupId.toString() + ".")); - } - } - - if(errFlag) - throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort - + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " - + securityGroupId.toString() + ".")); - } - + if(mappedPublicPorts.size()>0) + { + StringBuilder privateIpPortIntermediate = mappedPublicPorts.get(publicPort); + String privateIpPort = null; + if(privateIpPortIntermediate != null && privateIpPortIntermediate.length()>0) + privateIpPort = privateIpPortIntermediate.toString();//eg: 10.1.1.2,30 ; 10.1.1.2,34 + + if (privateIpPort != null && privateIpPort.length()>0) + { + String publicPortProtocol = publicPortToProtocolMapping.get(publicPort).toString(); + String[] privateIpPortPairs = privateIpPort.toString().split(";"); //eg. 10.1.1.2,30 + String[] privateIpAndPortStr; + boolean errFlag = false; + + for(String pair: privateIpPortPairs) + { + privateIpAndPortStr = pair.split(",");//split into 10.1.1.2 & 30 + + if (privateIpAndPortStr[0].equals(userVm.getGuestIpAddress()) && privateIpAndPortStr[1].equals(privatePort)) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists."); + } + return null; // already mapped + } + //at this point protocol string looks like: eg. tcp;udp || tcp || udp || udp;tcp + else if(!publicPortProtocol.contains(protocol))//check if this public port is mapped to the protocol or not + { + //this is the case eg: + //pub:1 pri:2 pro: tcp + //pub 1 pri:3 pro: udp + break; //we break here out of the loop, for the record to be created + } + else + { + errFlag = true; + // throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort + // + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " + // + securityGroupId.toString() + ".")); + } + } + + if(errFlag) + throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort + + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service " + + securityGroupId.toString() + ".")); + } + } FirewallRuleVO newFwRule = new FirewallRuleVO(); newFwRule.setEnabled(true); newFwRule.setForwarding(true); From ab05973b18372c4422fa3a77dd178d2dc7e998ef Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 13 Sep 2010 11:05:42 -0700 Subject: [PATCH 04/42] new UI - clear midmenu icons (add icon, action icon) when clicking on a different page. --- ui/new/index.jsp | 2 +- ui/new/scripts/cloud.core2.init.js | 9 ++++++++- ui/new/scripts/cloud.core2.instance.js | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ui/new/index.jsp b/ui/new/index.jsp index a60dc348803..5d6c90e1bec 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -105,7 +105,7 @@ long milliseconds = new Date().getTime(); - @@ -194,53 +223,24 @@
Algorithm
+
-
LB#1
+
-
8080
+
-
80
+
-
-
Source
+
+
-
-
-
-
-
-
-
-
-
1-2-2-TEST
-
-
-
10.23.231.230
-
-
- -
-
- -
-
-
-
-
-
1-2-2-TEST
-
-
-
10.23.231.230
-
-
- -
-
-
-
+
+ +
+
@@ -256,20 +256,29 @@
Source
- -
-
-
-
- Templates
- Template +
+
+
+
+ Templates
+ Template +
+
+
+
+
+
+
+
+ My Templates
+
+
+
+
+
+
+
+ Featured
+
+
+
+
+
+
+
+ Community
+
+
-
-
-
- Templates
- ISO +
+
+
+
+ Templates
+ ISO +
+
+
+
+
+
+
+
+ My ISOs
+
+
+
+
+
+
+
+ Featured
+
+
+
+
+
+
+
+ Community
+
+
@@ -605,12 +663,12 @@ long milliseconds = new Date().getTime();
- diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index 237c53aca6a..a874bb18fb5 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -97,6 +97,7 @@ $(document).ready(function() { return false; }); + diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js index 8b2e146e6fe..5aa6bd5a1b2 100644 --- a/ui/new/scripts/cloud.core2.instance.js +++ b/ui/new/scripts/cloud.core2.instance.js @@ -19,42 +19,42 @@ function clickInstanceGroupHeader($arrowIcon) { api: "stopVirtualMachine", isAsyncJob: true, asyncJobResponse: "stopvirtualmachineresponse", - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Start Instance": { api: "startVirtualMachine", isAsyncJob: true, asyncJobResponse: "startvirtualmachineresponse", - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Reboot Instance": { api: "rebootVirtualMachine", isAsyncJob: true, asyncJobResponse: "rebootvirtualmachineresponse", - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Destroy Instance": { api: "destroyVirtualMachine", isAsyncJob: true, asyncJobResponse: "destroyvirtualmachineresponse", - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Restore Instance": { api: "recoverVirtualMachine", isAsyncJob: false, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Attach ISO": { isAsyncJob: true, asyncJobResponse: "attachisoresponse", dialogBeforeActionFn : doAttachISO, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Detach ISO": { isAsyncJob: true, asyncJobResponse: "detachisoresponse", dialogBeforeActionFn : doDetachISO, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Reset Password": { isAsyncJob: true, @@ -65,28 +65,28 @@ function clickInstanceGroupHeader($arrowIcon) { "Change Name": { isAsyncJob: false, dialogBeforeActionFn : doChangeName, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Change Service": { isAsyncJob: true, asyncJobResponse: "changeserviceforvirtualmachineresponse", dialogBeforeActionFn : doChangeService, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Change Group": { isAsyncJob: false, dialogBeforeActionFn : doChangeGroup, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Enable HA": { isAsyncJob: false, dialogBeforeActionFn : doEnableHA, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu }, "Disable HA": { isAsyncJob: false, dialogBeforeActionFn : doDisableHA, - afterActionSeccessFn: vmJsonToMidmenu + afterActionSeccessFn: vmToMidmenu } } @@ -329,9 +329,9 @@ function clickInstanceGroupHeader($arrowIcon) { midmenuItem.find("#icon").attr("src", "images/status_gray.png"); } - function vmJsonToMidmenu(json, $midmenuItem) { + function vmToMidmenu(json, $midmenuItem, toRightPanelFn) { $midmenuItem.data("jsonObj", json); - $midmenuItem.data("toRightPanelFn", vmMidmenuToRightPanel); + $midmenuItem.data("toRightPanelFn", toRightPanelFn); $midmenuItem.attr("id", ("midmenuItem_"+json.id)); $midmenuItem.data("id", json.id); @@ -344,7 +344,7 @@ function clickInstanceGroupHeader($arrowIcon) { updateVirtualMachineStateInMidMenu(json, $midmenuItem); $midmenuItem.bind("click", function(event) { var $t = $(this); - vmMidmenuToRightPanel($t); + vmToRightPanel($t); return false; }); } @@ -365,7 +365,7 @@ function clickInstanceGroupHeader($arrowIcon) { $rightPanelContent.find("#iso").hide(); } - function vmMidmenuToRightPanel($midmenuItem) { + function vmToRightPanel($midmenuItem) { //details tab if($midmenuItem.find("#info_icon").css("display") != "none") { $rightPanelContent.find("#after_action_info").text($midmenuItem.data("afterActionInfo")); @@ -511,15 +511,16 @@ function clickInstanceGroupHeader($arrowIcon) { } for(var i=0; i < instanceGroupArray.length; i++) { if(instanceGroupArray[i]!=null && instanceGroupArray[i].length>0) { - var $groupTemplate = $("#leftmenu_instance_group_template").clone().show(); - $groupTemplate.find("#group_name").text(instanceGroupArray[i]); - - $groupTemplate.bind("click", function(event) { + var $leftmenuSubmenuTemplate = $("#leftmenu_submenu_template").clone().show(); + $leftmenuSubmenuTemplate.find("#submenu_name").text(instanceGroupArray[i]); + $leftmenuSubmenuTemplate.find("#icon").attr("src", "images/instance_leftmenuicon.png").show(); + + $leftmenuSubmenuTemplate.bind("click", function(event) { //$(this).removeClass("leftmenu_content").addClass("leftmenu_content_selected"); $("#midmenu_container").empty(); selectedItemsInMidMenu = {}; - var groupName = $(this).find("#group_name").text(); + var groupName = $(this).find("#submenu_name").text(); var group1 = groupName; if(groupName == noGroupName) group1 = ""; @@ -532,14 +533,14 @@ function clickInstanceGroupHeader($arrowIcon) { var instances = json.listvirtualmachinesresponse.virtualmachine; for(var i=0; i Date: Mon, 13 Sep 2010 15:49:39 -0700 Subject: [PATCH 08/42] new UI - add jsp file for template page. --- ui/new/index.jsp | 6 +- ui/new/jsp/template.jsp | 164 ++++++++++++++++++++++++ ui/new/scripts/cloud.core2.account.js | 3 +- ui/new/scripts/cloud.core2.alert.js | 3 +- ui/new/scripts/cloud.core2.event.js | 3 +- ui/new/scripts/cloud.core2.init.js | 24 ++-- ui/new/scripts/cloud.core2.instance.js | 3 +- ui/new/scripts/cloud.core2.ipaddress.js | 3 +- ui/new/scripts/cloud.core2.snapshot.js | 3 +- ui/new/scripts/cloud.core2.template.js | 37 ++++++ ui/new/scripts/cloud.core2.volume.js | 3 +- 11 files changed, 225 insertions(+), 27 deletions(-) create mode 100644 ui/new/jsp/template.jsp create mode 100644 ui/new/scripts/cloud.core2.template.js diff --git a/ui/new/index.jsp b/ui/new/index.jsp index a3ceeedb72f..9484d79dd08 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -50,7 +50,7 @@ long milliseconds = new Date().getTime(); - + Cloud.com CloudStack @@ -471,7 +471,7 @@ long milliseconds = new Date().getTime();
-
+
@@ -506,7 +506,7 @@ long milliseconds = new Date().getTime();
-
+
diff --git a/ui/new/jsp/template.jsp b/ui/new/jsp/template.jsp new file mode 100644 index 00000000000..007b0294498 --- /dev/null +++ b/ui/new/jsp/template.jsp @@ -0,0 +1,164 @@ + + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +

Template +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Display.Text")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Status")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Password.Enabled")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Public")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Featured")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Cross.Zones")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("OS.Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js index 1b5db3800a8..ccfca5f67d2 100644 --- a/ui/new/scripts/cloud.core2.account.js +++ b/ui/new/scripts/cloud.core2.account.js @@ -3,8 +3,7 @@ function afterLoadAccountJSP() { } function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { - $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); - $midmenuItem1.data("id", jsonObj.id); + $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); var iconContainer = $midmenuItem1.find("#icon_container").show(); diff --git a/ui/new/scripts/cloud.core2.alert.js b/ui/new/scripts/cloud.core2.alert.js index 46e2d5756c6..ff395d19b24 100644 --- a/ui/new/scripts/cloud.core2.alert.js +++ b/ui/new/scripts/cloud.core2.alert.js @@ -3,8 +3,7 @@ function afterLoadAlertJSP() { } function alertToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { - $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); - $midmenuItem1.data("id", jsonObj.id); + $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); $midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.event.js b/ui/new/scripts/cloud.core2.event.js index b3d86a66e0e..160a559a487 100644 --- a/ui/new/scripts/cloud.core2.event.js +++ b/ui/new/scripts/cloud.core2.event.js @@ -3,8 +3,7 @@ function afterLoadEventJSP() { } function eventToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { - $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); - $midmenuItem1.data("id", jsonObj.id); + $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); var iconContainer = $midmenuItem1.find("#icon_container").show(); diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index a874bb18fb5..c3ded528257 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -21,7 +21,7 @@ $(document).ready(function() { if(ui.selecting.id.indexOf("midmenuItem") != -1) { var $midmenuItem1 = $("#"+ui.selecting.id); if($midmenuItem1.find("#content").hasClass("inaction") == false) { //only items not in action are allowed to be selected - var id =$midmenuItem1.data("id"); + var id =$midmenuItem1.data("jsonObj").id; selectedItemsInMidMenu[id] = $midmenuItem1; $midmenuItem1.find("#content").addClass("selected"); } @@ -32,7 +32,7 @@ $(document).ready(function() { unselecting: function(event, ui) { if(ui.unselecting.id.indexOf("midmenuItem") != -1) { var $midmenuItem1 = $("#"+ui.unselecting.id); - var id = $midmenuItem1.data("id"); + var id = $midmenuItem1.data("jsonObj").id; if(id in selectedItemsInMidMenu) { delete selectedItemsInMidMenu[id]; $midmenuItem1.find("#content").removeClass("selected"); @@ -51,24 +51,23 @@ $(document).ready(function() { } function clearMidMenu() { + $("#midmenu_container").empty(); $("#midmenu_action_link").hide(); - $("#midmenu_add_link").hide(); + $("#midmenu_add_link").hide(); } var $midmenuItem = $("#midmenu_item"); - function listMidMenuItems(leftmenuId, apiName, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) { + function listMidMenuItems(leftmenuId, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) { $("#"+leftmenuId).bind("click", function(event) { clearMidMenu(); $("#right_panel").load(rightPanelJSP, function(){ - afterLoadRightPanelJSP(); + afterLoadRightPanelJSP(); $.ajax({ cache: false, - data: createURL("command="+apiName+"&pagesize="+midmenuItemCount), + data: createURL("command="+commandString+"&pagesize="+midmenuItemCount), dataType: "json", - success: function(json) { - $("#midmenu_container").empty(); - selectedItemsInMidMenu = {}; - + success: function(json) { + selectedItemsInMidMenu = {}; var items = json[jsonResponse1][jsonResponse2]; if(items != null && items.length > 0) { for(var i=0; i Date: Mon, 13 Sep 2010 15:59:03 -0700 Subject: [PATCH 09/42] UI for Grid info and error msgs --- ui/new/css/main.css | 74 ++++++++++++++++++++++++--- ui/new/images/close_button.png | Bin 0 -> 1051 bytes ui/new/images/close_button_hover.png | Bin 0 -> 1135 bytes ui/new/images/errormsg_bg.gif | Bin 0 -> 136 bytes ui/new/images/infomsg_bg.gif | Bin 0 -> 188 bytes ui/new/jsp/account.jsp | 18 ++++++- 6 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 ui/new/images/close_button.png create mode 100644 ui/new/images/close_button_hover.png create mode 100644 ui/new/images/errormsg_bg.gif create mode 100644 ui/new/images/infomsg_bg.gif diff --git a/ui/new/css/main.css b/ui/new/css/main.css index e55f56cb27c..1ce8a4d17bd 100644 --- a/ui/new/css/main.css +++ b/ui/new/css/main.css @@ -232,7 +232,7 @@ a:visited { width:420px; height:auto; float:left; - background:#ffe5e5 repeat top left; + background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left; border:1px solid #CCC; margin:7px 0 0 0; padding:0 0 5px 0; @@ -2131,7 +2131,7 @@ a:visited { width:100%; height:auto; float:left; - background:#fffbe6 repeat top left; + background:#fffbe6 url(../images/infomsg_bg.gif) repeat-x top left; border:1px dashed #CCC; color:#333; margin:0 0 0 0; @@ -2149,7 +2149,7 @@ a:visited { } .info_detailbox.errorbox { - background:#ffe5e5 repeat top left; + background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left; color:#a90000; } @@ -2215,8 +2215,7 @@ a:visited { position:absolute; background:#99b2c3 url(../images/gridheader_loadingbg.gif) repeat-x top left; border-left:1px solid #999; - margin:0px 0 0 0; - padding:0; + padding:2px 5px 0 0; z-index:1001; right:0; } @@ -2243,6 +2242,68 @@ a:visited { padding:0; } +.gridheader_message { + width:auto; + height:20px; + float:right; + position:absolute; + border-left:1px solid #999; + background:#fffbe6 url(../images/infomsg_bg.gif) repeat-x top left; + margin:0px 0 0 0; + padding:0 5px 0 0; + z-index:1005; + right:0; +} + +.gridheader_message p { + width:auto; + height:auto; + float:left; + color:#333; + font-size:11px; + font-size:11px; + font-weight:bold; + margin:2px 0 0 5px; + display:inline; + padding:0; +} + + +.gridheader_message.error { + background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left; +} + +.gridheader_message.error p{ + width:auto; + height:auto; + float:left; + color:#ae0000; + font-size:11px; + font-size:11px; + font-weight:bold; + margin:2px 0 0 5px; + display:inline; + padding:0; +} + +.close_button { + width:38px; + height:17px; + float:left; + background:url(../images/close_button.png) no-repeat top left; + display:inline; + padding:0; + cursor:pointer; + cursor:hand; + margin:1px 0 0 5px; + padding:0; + +} + +.close_button:hover{ + background:url(../images/close_button_hover.png) no-repeat top left; +} + .grid_editbox { width:27px; height:17px; @@ -2311,5 +2372,6 @@ a:visited { top:17px; right:6px; margin:0; - padding:0 + padding:0; + z-index:1002; } \ No newline at end of file diff --git a/ui/new/images/close_button.png b/ui/new/images/close_button.png new file mode 100644 index 0000000000000000000000000000000000000000..593048b0e46ae6ad736a0e4d0822adff6ea6c514 GIT binary patch literal 1051 zcmV+$1mydPP)MC$ef$5_t5;*S7VL}i@^ZLOKy*${4wzoLbScDFPo6x%XB8L_}pAXvZ}1Nqy4Sd0vF<^pjFFfB5G z(qb1V04V{`2xMRYC0b+vN@brveyvkZ?OJz^*= zEoEqIY-G^X)MRjXcV{p&GlQ!Gf}@Pbjvf0iCnv{1DY$m+S`7=(Ws`-3gmRgfn8-Hh z?c2AYVycy@=?ox1aaGKkFc?HHHRzzYWUNEM#myg(L01P?M^{I&P;ttlQ>8dcv$>0i z{)GqyCx3vnViCc`4jtv|dxs6NcB|M2$9MVi<#M^)d#Aw&1bj>+5)avIR_PRv$K@Iz z4cQgT2!M0#FztfSu7UMf;nlRf@juhwG3wGulHz_V6KzN#B@3x z^`WAs*XyZYsZi;zSMRSAlz2IS%@5D&%&1Q45M}7{6L-h%+K@do> zSX3X$vRBpjeP1~}7z_k-mGye9XBn4qz_{?asBshkfenHE1kReBb7DT9OTAtfCZ0?t zrBo{E%Z~z~Ypqt3e!nl{@mL$#^E}<>2Y~l_u23jQI-L&Ba$XVDYBh}YjpOx)1%bY^ zZTpo2?k}2g2~Z(cs}(gnW22AW*mq#&6RLObIF2?qb^ID2;W#|@`#sn0Xf$fFs$X#- V=H13%LVExJ002ovPDHLkV1kvf?NR^$ literal 0 HcmV?d00001 diff --git a/ui/new/images/close_button_hover.png b/ui/new/images/close_button_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..db1f19c0949d867747214ffeefadd1e6bf1ba9bc GIT binary patch literal 1135 zcmV-#1d#iQP))y6LEEQWn=&;2VtG=J^yRAUV>=H zrV=247=VJ+Ky&}^yz%lsE^zzy?f)#FK7HbT`t&J-HV*>>h{guKef!1$5J1>mi4IIa ziogoiTzbmz>Bk?2Br|zTWv~E%`2<9VEI1CPrysrr@zs+jPw-g<21L0DAb=P^iq4%o z_n#8*=g*)2z##2n*uH)H)nC7U{RiP$$L{`zvA14*3ib<#oxJkw|2Ln%fyF>$|zUx48ccBh3TC&T_5PZ=b6*%`in{|*+Lar6#Dr?Wgm@utfR>cX60 z_L=)H7~XvP%8;lp&H&R3j-QN-32M-=}0|XE(V2y$NZ9ptWhB#(o+iV7km!9xkRT z!~y63`}dE*NP?RoeeFdC6DeK>hZ)D<>VQCt>D8-O3_pJS0OP8ix4?AVs!MRO%g;YD z9KH9N;oj>{4Bf7Z4A~p6F&F|34Am53a8M9{s{?|gjK_{0`!6Ra$3Q8#cI{dX3(#eg zg@lB1nV6W!Ht6l!x1eIGm8$6sAix-*We>=}E_QbIQe|aj22oK_1~xV}26_NcHU#Et zhP!v~G61u7H_%aK;9?4x)}(#x3GIQ94=L%WAM!@_e<7@mIo z$x!8}%-}rxB*UU`eFk2j$EF;62o^(Di_As_Ah!U4Hxn@UPP~5o8Weme7?immz59wH z2FjoFPCW#(K>$SWy7ijDM@+{h1gdhz)0+gdLj%5AAV#AU4Dt-`Ilb|yll)2;W{E<%b^7X zn69>wW@tY2m|@ZRXAEC{{biWur3@CIbM7U>xffr+>bzBi7=&2=!`1G+`xY!-U@iqW z3kIP4kBqBVuU24TVY#oTr^i4^nL!NzDj^;|dcCmB)tot z*8kw(|JBw1;^P0~bT~jsaqx qNTROE;l2kU&xBy#!lLg>;s1q(aM*AdkB*0O`2aYd(5Q480RTJi=S)HX literal 0 HcmV?d00001 diff --git a/ui/new/images/infomsg_bg.gif b/ui/new/images/infomsg_bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..dda40b6dc1ab64ffa0e9fecc20d47eb6cf5cd7c5 GIT binary patch literal 188 zcmZ?wbhEHbWMdF!IKsg2|M#>1zn}j9_2B={oBw}5{{QRV|6h;(|GfSG$Myf;&;9>? z`u~rs|G%C3|LyGm?`Qx2xbXk`h5tV;{r?U`r~dyq_y6bh|385WPBY*Dia%MvGCCj< zWG4fwrGl}q&q@vPRTjLr)e4*fFEC&A7xCP^C1U^4MNJw?TFpy79mo-z7tmOewIYi1 TMoz+M){6ZPHvEugVz34P#?)Yt literal 0 HcmV?d00001 diff --git a/ui/new/jsp/account.jsp b/ui/new/jsp/account.jsp index 67421dbd2c5..2f69b65f083 100644 --- a/ui/new/jsp/account.jsp +++ b/ui/new/jsp/account.jsp @@ -29,14 +29,28 @@
- -
+
+ + +
+

Disk has been succesfully dettached …

+
+
+ +
From 5642eb2837755d2e9518d1ea1e4861f8b8995f79 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Mon, 13 Sep 2010 16:10:03 -0700 Subject: [PATCH 10/42] Link Change in Instance Add VM popup --- ui/new/css/main.css | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/ui/new/css/main.css b/ui/new/css/main.css index 1ce8a4d17bd..ca9cfd74680 100644 --- a/ui/new/css/main.css +++ b/ui/new/css/main.css @@ -38,7 +38,8 @@ a { } a:link, a:visited { - text-decoration:none; + text-decoration:none; + } a:visited { @@ -833,7 +834,7 @@ a:visited { padding:0; } -.rev_wiztemplist_actionsbox a:link { +.rev_wiztemplist_actionsbox a { width:auto; height:auto; float:left; @@ -846,30 +847,13 @@ a:visited { padding:0; } -.rev_wiztemplist_actionsbox a:visted { - width:auto; - height:auto; - float:left; - color:#2c8bbc; - font-size:12px; - text-align:left; - font-weight:normal; +.rev_wiztemplist_actionsbox a:link, rev_wiztemplist_actionsbox a:visted { text-decoration:none; - margin:0 15px 0 0; - padding:0; } .rev_wiztemplist_actionsbox a:hover { - width:auto; - height:auto; - float:left; - color:#2c8bbc; - font-size:12px; - text-align:left; - font-weight:normal; text-decoration:underline; - margin:0 15px 0 0; - padding:0; + } From ddb5321a27d48aaff2e5e940ccc74407b795f918 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 13 Sep 2010 16:20:44 -0700 Subject: [PATCH 11/42] new UI - template page - populate data to middle menu and right panel when left menu is clicked. --- ui/new/jsp/event.jsp | 10 +++++++ ui/new/jsp/template.jsp | 26 +++++++++--------- ui/new/scripts/cloud.core2.account.js | 1 + ui/new/scripts/cloud.core2.event.js | 1 + ui/new/scripts/cloud.core2.template.js | 37 +++++++++++++++++--------- 5 files changed, 50 insertions(+), 25 deletions(-) diff --git a/ui/new/jsp/event.jsp b/ui/new/jsp/event.jsp index 7ef509ba0c5..778de56e2e9 100644 --- a/ui/new/jsp/event.jsp +++ b/ui/new/jsp/event.jsp @@ -29,6 +29,16 @@ <%=t.t("Details")%>
+
+
+
+ <%=t.t("id")%>:
+
+
+
+
+
+
diff --git a/ui/new/jsp/template.jsp b/ui/new/jsp/template.jsp index 007b0294498..4e74c261341 100644 --- a/ui/new/jsp/template.jsp +++ b/ui/new/jsp/template.jsp @@ -35,7 +35,7 @@ <%=t.t("ID")%>:
-
+
@@ -45,7 +45,7 @@ <%=t.t("Zone")%>:
-
+
@@ -55,7 +55,7 @@ <%=t.t("Name")%>:
-
+
@@ -65,7 +65,7 @@ <%=t.t("Display.Text")%>:
-
+
@@ -75,7 +75,7 @@ <%=t.t("Status")%>:
-
+
@@ -85,7 +85,7 @@ <%=t.t("Password.Enabled")%>:
-
+
@@ -95,7 +95,7 @@ <%=t.t("Public")%>:
-
+
@@ -105,7 +105,7 @@ <%=t.t("Featured")%>:
-
+
@@ -115,7 +115,7 @@ <%=t.t("Cross.Zones")%>:
-
+
@@ -125,7 +125,7 @@ <%=t.t("OS.Type")%>:
-
+
@@ -135,7 +135,7 @@ <%=t.t("Account")%>:
-
+
@@ -145,7 +145,7 @@ <%=t.t("Created")%>:
-
+
@@ -155,7 +155,7 @@ <%=t.t("Size")%>:
-
+
diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js index ccfca5f67d2..1554bc1dc51 100644 --- a/ui/new/scripts/cloud.core2.account.js +++ b/ui/new/scripts/cloud.core2.account.js @@ -23,6 +23,7 @@ function accountToRigntPanel($midmenuItem) { var jsonObj = $midmenuItem.data("jsonObj"); var $rightPanelContent = $("#right_panel_content"); + $rightPanelContent.find("#id").text(jsonObj.id); $rightPanelContent.find("#role").text(toRole(jsonObj.accounttype)); $rightPanelContent.find("#account").text(fromdb(jsonObj.name)); $rightPanelContent.find("#domain").text(fromdb(jsonObj.domain)); diff --git a/ui/new/scripts/cloud.core2.event.js b/ui/new/scripts/cloud.core2.event.js index 160a559a487..c680c68a73b 100644 --- a/ui/new/scripts/cloud.core2.event.js +++ b/ui/new/scripts/cloud.core2.event.js @@ -23,6 +23,7 @@ function eventToRigntPanel($midmenuItem) { var jsonObj = $midmenuItem.data("jsonObj"); var $rightPanelContent = $("#right_panel_content"); + $rightPanelContent.find("#id").text(fromdb(jsonObj.id)); $rightPanelContent.find("#username").text(fromdb(jsonObj.username)); $rightPanelContent.find("#account").text(fromdb(jsonObj.account)); $rightPanelContent.find("#type").text(jsonObj.type); diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index f3b34dd6f21..41a5e4b8c7d 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -14,24 +14,37 @@ function templateToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); else if(jsonObj.level == "WARN") iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); + */ - $midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); + $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); + $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); - */ + } -function templateToRigntPanel($midmenuItem) { - /* +function templateToRigntPanel($midmenuItem) { var jsonObj = $midmenuItem.data("jsonObj"); var $rightPanelContent = $("#right_panel_content"); - $rightPanelContent.find("#username").text(fromdb(jsonObj.username)); + $rightPanelContent.find("#id").text(fromdb(jsonObj.id)); + $rightPanelContent.find("#zonename").text(fromdb(jsonObj.zonename)); + $rightPanelContent.find("#name").text(fromdb(jsonObj.name)); + $rightPanelContent.find("#displaytext").text(fromdb(jsonObj.displaytext)); + + var status = "Ready"; + if (jsonObj.isready == "false") + status = jsonObj.templatestatus; + $rightPanelContent.find("#status").text(status); + + $rightPanelContent.find("#passwordenabled").text(fromdb(jsonObj.passwordenabled)); + $rightPanelContent.find("#ispublic").text(fromdb(jsonObj.ispublic)); + $rightPanelContent.find("#isfeatured").text(fromdb(jsonObj.isfeatured)); + $rightPanelContent.find("#crossZones").text(fromdb(jsonObj.crossZones)); + $rightPanelContent.find("#ostypename").text(fromdb(jsonObj.ostypename)); $rightPanelContent.find("#account").text(fromdb(jsonObj.account)); - $rightPanelContent.find("#type").text(jsonObj.type); - $rightPanelContent.find("#level").text(jsonObj.level); - $rightPanelContent.find("#description").text(fromdb(jsonObj.description)); - $rightPanelContent.find("#state").text(jsonObj.state); - setDateField(jsonObj.created, $rightPanelContent.find("#created")); - */ + + if(jsonObj.size != null) + $rightPanelContent.find("#size").text(convertBytes(parseInt(jsonObj.size))); + + setDateField(jsonObj.created, $rightPanelContent.find("#created")); } \ No newline at end of file From 6e2beaba3a6933be58d667d7850bd1472fc1599a Mon Sep 17 00:00:00 2001 From: NIKITA Date: Mon, 13 Sep 2010 16:44:45 -0700 Subject: [PATCH 12/42] height Change in loader box -Instance tab --- ui/new/jsp/instance.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index b8456bcc2f9..9c041a8a516 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -157,7 +157,7 @@ -
+

Creating Template …

@@ -779,7 +779,7 @@
-
+
+
+
+ <%=t.t("id")%>:
+
+
+
+
+
+
diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js index eca6778f48f..1afaa38d9c1 100644 --- a/ui/new/scripts/cloud.core2.instance.js +++ b/ui/new/scripts/cloud.core2.instance.js @@ -386,20 +386,15 @@ function clickInstanceGroupHeader($arrowIcon) { $rightPanelContent.find("#ipAddress").text(jsonObj.ipaddress); $rightPanelContent.find("#zoneName").text(fromdb(jsonObj.zonename)); $rightPanelContent.find("#templateName").text(fromdb(jsonObj.templatename)); - $rightPanelContent.find("#serviceOfferingName").text(fromdb(jsonObj.serviceofferingname)); - if(jsonObj.haenable == "true") - $rightPanelContent.find("#ha").removeClass("cross_icon").addClass("tick_icon").show(); - else - $rightPanelContent.find("#ha").removeClass("tick_icon").addClass("cross_icon").show(); + $rightPanelContent.find("#serviceOfferingName").text(fromdb(jsonObj.serviceofferingname)); $rightPanelContent.find("#created").text(jsonObj.created); $rightPanelContent.find("#account").text(fromdb(jsonObj.account)); $rightPanelContent.find("#domain").text(fromdb(jsonObj.domain)); $rightPanelContent.find("#hostName").text(fromdb(jsonObj.hostname)); $rightPanelContent.find("#group").text(fromdb(jsonObj.group)); - if(jsonObj.isoid != null && jsonObj.isoid.length > 0) - $rightPanelContent.find("#iso").removeClass("cross_icon").addClass("tick_icon").show(); - else - $rightPanelContent.find("#iso").removeClass("tick_icon").addClass("cross_icon").show(); + + setBooleanField(jsonObj.haenable, $rightPanelContent.find("#ha")); + setBooleanField((jsonObj.isoid != null && jsonObj.isoid.length > 0), $rightPanelContent.find("#iso")); //volume tab //if (getHypervisorType() == "kvm") diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index 5ecdf96bb6d..7f1e25fe819 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -360,6 +360,14 @@ function todb(val) { var midmenuItemCount = 20; +function setBooleanField(value, $field) { + if(value == "true") + $field.removeClass("cross_icon").addClass("tick_icon").show(); + else + $field.removeClass("tick_icon").addClass("cross_icon").show(); +} + + diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index 41a5e4b8c7d..63cc9657c68 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -36,10 +36,11 @@ function templateToRigntPanel($midmenuItem) { status = jsonObj.templatestatus; $rightPanelContent.find("#status").text(status); - $rightPanelContent.find("#passwordenabled").text(fromdb(jsonObj.passwordenabled)); - $rightPanelContent.find("#ispublic").text(fromdb(jsonObj.ispublic)); - $rightPanelContent.find("#isfeatured").text(fromdb(jsonObj.isfeatured)); - $rightPanelContent.find("#crossZones").text(fromdb(jsonObj.crossZones)); + setBooleanField(jsonObj.passwordenabled, $rightPanelContent.find("#passwordenabled")); + setBooleanField(jsonObj.ispublic, $rightPanelContent.find("#ispublic")); + setBooleanField(jsonObj.isfeatured, $rightPanelContent.find("#isfeatured")); + setBooleanField(jsonObj.crossZones, $rightPanelContent.find("#crossZones")); + $rightPanelContent.find("#ostypename").text(fromdb(jsonObj.ostypename)); $rightPanelContent.find("#account").text(fromdb(jsonObj.account)); From 11169a8bb90c865ab820f7929ce97f0d6227ebb0 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Mon, 13 Sep 2010 16:54:31 -0700 Subject: [PATCH 14/42] Template icons name has been changed --- ui/new/css/main.css | 4 ++-- ...template.png => midmenuicon_template_centos.png} | Bin ...xtemplate.png => midmenuicon_template_linux.png} | Bin ...emplate.png => midmenuicon_template_windows.png} | Bin 4 files changed, 2 insertions(+), 2 deletions(-) rename ui/new/images/{midmenuicon_storage_centostemplate.png => midmenuicon_template_centos.png} (100%) rename ui/new/images/{midmenuicon_storage_linuxtemplate.png => midmenuicon_template_linux.png} (100%) rename ui/new/images/{midmenuicon_storage_windowstemplate.png => midmenuicon_template_windows.png} (100%) diff --git a/ui/new/css/main.css b/ui/new/css/main.css index ca9cfd74680..34ea85e6646 100644 --- a/ui/new/css/main.css +++ b/ui/new/css/main.css @@ -2199,7 +2199,7 @@ a:visited { position:absolute; background:#99b2c3 url(../images/gridheader_loadingbg.gif) repeat-x top left; border-left:1px solid #999; - padding:2px 5px 0 0; + padding:0 5px 0 0; z-index:1001; right:0; } @@ -2211,7 +2211,7 @@ a:visited { color:#FFF; font-size:11px; font-weight:bold; - margin:2px 5px 0 5px; + margin:3px 5px 0 5px; display:inline; padding:0; } diff --git a/ui/new/images/midmenuicon_storage_centostemplate.png b/ui/new/images/midmenuicon_template_centos.png similarity index 100% rename from ui/new/images/midmenuicon_storage_centostemplate.png rename to ui/new/images/midmenuicon_template_centos.png diff --git a/ui/new/images/midmenuicon_storage_linuxtemplate.png b/ui/new/images/midmenuicon_template_linux.png similarity index 100% rename from ui/new/images/midmenuicon_storage_linuxtemplate.png rename to ui/new/images/midmenuicon_template_linux.png diff --git a/ui/new/images/midmenuicon_storage_windowstemplate.png b/ui/new/images/midmenuicon_template_windows.png similarity index 100% rename from ui/new/images/midmenuicon_storage_windowstemplate.png rename to ui/new/images/midmenuicon_template_windows.png From b86382c38579ad044b4930ad1327c2c7ee7c896a Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 13 Sep 2010 17:32:15 -0700 Subject: [PATCH 15/42] new UI - implement ISO page. --- ui/new/index.jsp | 14 ++-- ui/new/jsp/iso.jsp | 125 +++++++++++++++++++++++++++++ ui/new/scripts/cloud.core2.init.js | 11 ++- ui/new/scripts/cloud.core2.iso.js | 45 +++++++++++ 4 files changed, 185 insertions(+), 10 deletions(-) create mode 100644 ui/new/jsp/iso.jsp create mode 100644 ui/new/scripts/cloud.core2.iso.js diff --git a/ui/new/index.jsp b/ui/new/index.jsp index 9484d79dd08..f3a3b430569 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -52,6 +52,8 @@ long milliseconds = new Date().getTime(); + + Cloud.com CloudStack @@ -471,7 +473,7 @@ long milliseconds = new Date().getTime();
-
+
@@ -479,7 +481,7 @@ long milliseconds = new Date().getTime(); My Templates
-
+
-
+
@@ -506,7 +508,7 @@ long milliseconds = new Date().getTime();
-
+
@@ -514,7 +516,7 @@ long milliseconds = new Date().getTime(); My ISOs
-
+
-
+
diff --git a/ui/new/jsp/iso.jsp b/ui/new/jsp/iso.jsp new file mode 100644 index 00000000000..1344d1cd5dc --- /dev/null +++ b/ui/new/jsp/iso.jsp @@ -0,0 +1,125 @@ + + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +

ISO +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Display.Text")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Status")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Bootable")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+ +
+
+ \ No newline at end of file diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index c3ded528257..721b73180c6 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -89,11 +89,14 @@ $(document).ready(function() { listMidMenuItems("leftmenu_snapshot", "listSnapshots", "listsnapshotsresponse", "snapshot", "jsp/snapshot.jsp", afterLoadSnapshotJSP, snapshotToMidmenu, snapshotToRigntPanel); listMidMenuItems("leftmenu_ip", "listPublicIpAddresses", "listpublicipaddressesresponse", "publicipaddress", "jsp/ip_address.jsp", afterLoadIpJSP, ipToMidmenu, ipToRigntPanel); - listMidMenuItems("leftmenu_submenu_myTemplate", "listTemplates&templatefilter=self", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); - listMidMenuItems("leftmenu_submenu_featuredTemplate", "listTemplates&templatefilter=featured", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); - listMidMenuItems("leftmenu_submenu_communityTemplate", "listTemplates&templatefilter=community", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); - + listMidMenuItems("leftmenu_submenu_my_template", "listTemplates&templatefilter=self", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); + listMidMenuItems("leftmenu_submenu_featured_template", "listTemplates&templatefilter=featured", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); + listMidMenuItems("leftmenu_submenu_community_template", "listTemplates&templatefilter=community", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel); + listMidMenuItems("leftmenu_submenu_my_iso", "listIsos&isofilter=self", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel); + listMidMenuItems("leftmenu_submenu_featured_iso", "listIsos&isofilter=featured", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel); + listMidMenuItems("leftmenu_submenu_community_iso", "listIsos&isofilter=community", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel); + $("#leftmenu_instance_group_header").bind("click", function(event) { clearMidMenu(); var $arrowIcon = $(this).find("#arrow_icon"); diff --git a/ui/new/scripts/cloud.core2.iso.js b/ui/new/scripts/cloud.core2.iso.js new file mode 100644 index 00000000000..dc10db856bc --- /dev/null +++ b/ui/new/scripts/cloud.core2.iso.js @@ -0,0 +1,45 @@ +function afterLoadIsoJSP() { + +} + +function isoToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { + $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); + $midmenuItem1.data("jsonObj", jsonObj); + + /* + var iconContainer = $midmenuItem1.find("#icon_container").show(); + if(jsonObj.level == "INFO") + iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png"); + else if(jsonObj.level == "ERROR") + iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); + else if(jsonObj.level == "WARN") + iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); + */ + + $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); + $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); + $midmenuItem1.data("toRightPanelFn", toRightPanelFn); + +} + +function isoToRigntPanel($midmenuItem) { + var jsonObj = $midmenuItem.data("jsonObj"); + + var $rightPanelContent = $("#right_panel_content"); + $rightPanelContent.find("#id").text(fromdb(jsonObj.id)); + $rightPanelContent.find("#zonename").text(fromdb(jsonObj.zonename)); + $rightPanelContent.find("#name").text(fromdb(jsonObj.name)); + $rightPanelContent.find("#displaytext").text(fromdb(jsonObj.displaytext)); + $rightPanelContent.find("#account").text(fromdb(jsonObj.account)); + + if(jsonObj.size != null) + $rightPanelContent.find("#size").text(convertBytes(parseInt(jsonObj.size))); + + var status = "Ready"; + if (jsonObj.isready == "false") + status = jsonObj.isostatus; + $rightPanelContent.find("#status").text(status); + + setBooleanField(jsonObj.bootable, $rightPanelContent.find("#bootable")); + setDateField(jsonObj.created, $rightPanelContent.find("#created")); +} \ No newline at end of file From b137b0873198a26f4d709ecb1b9b3bcf128a230b Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 13 Sep 2010 17:52:05 -0700 Subject: [PATCH 16/42] new UI - template page, ISO page - add middle menu icons. --- ui/new/scripts/cloud.core2.account.js | 8 ++++---- ui/new/scripts/cloud.core2.event.js | 8 ++++---- ui/new/scripts/cloud.core2.instance.js | 23 ++++++++++++----------- ui/new/scripts/cloud.core2.ipaddress.js | 4 ++-- ui/new/scripts/cloud.core2.iso.js | 13 +++---------- ui/new/scripts/cloud.core2.snapshot.js | 4 ++-- ui/new/scripts/cloud.core2.template.js | 20 ++++++++++++++++---- ui/new/scripts/cloud.core2.volume.js | 4 ++-- 8 files changed, 45 insertions(+), 39 deletions(-) diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js index 1554bc1dc51..3320136ce17 100644 --- a/ui/new/scripts/cloud.core2.account.js +++ b/ui/new/scripts/cloud.core2.account.js @@ -6,13 +6,13 @@ function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - var iconContainer = $midmenuItem1.find("#icon_container").show(); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); if (jsonObj.accounttype == roleTypeUser) - iconContainer.find("#icon").attr("src", "images/midmenuicon_account_user.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_account_user.png"); else if (jsonObj.accounttype == roleTypeAdmin) - iconContainer.find("#icon").attr("src", "images/midmenuicon_account_admin.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_account_admin.png"); else if (jsonObj.accounttype == roleTypeDomainAdmin) - iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png"); $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.domain.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.event.js b/ui/new/scripts/cloud.core2.event.js index c680c68a73b..3b85803a840 100644 --- a/ui/new/scripts/cloud.core2.event.js +++ b/ui/new/scripts/cloud.core2.event.js @@ -6,13 +6,13 @@ function eventToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - var iconContainer = $midmenuItem1.find("#icon_container").show(); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); if(jsonObj.level == "INFO") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png"); else if(jsonObj.level == "ERROR") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); else if(jsonObj.level == "WARN") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); $midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js index 1afaa38d9c1..23ea90889b9 100644 --- a/ui/new/scripts/cloud.core2.instance.js +++ b/ui/new/scripts/cloud.core2.instance.js @@ -329,19 +329,20 @@ function clickInstanceGroupHeader($arrowIcon) { midmenuItem.find("#icon").attr("src", "images/status_gray.png"); } - function vmToMidmenu(json, $midmenuItem, toRightPanelFn) { - $midmenuItem.data("jsonObj", json); - $midmenuItem.data("toRightPanelFn", toRightPanelFn); - $midmenuItem.attr("id", ("midmenuItem_"+json.id)); + function vmToMidmenu(json, $midmenuItem1, toRightPanelFn) { + $midmenuItem1.data("jsonObj", json); + $midmenuItem1.data("toRightPanelFn", toRightPanelFn); + $midmenuItem1.attr("id", ("midmenuItem_"+json.id)); - $midmenuItem.find("#icon").attr("src", "images/status_gray.png"); - $midmenuItem.find("#icon_container").show(); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + $iconContainer.find("#icon").attr("src", "images/status_gray.png"); + var vmName = getVmName(json.name, json.displayname); - $midmenuItem.find("#first_row").text(vmName); - //$midmenuItem.find("#second_row_label").text("IP Address:"); - $midmenuItem.find("#second_row").text(json.ipaddress); - updateVirtualMachineStateInMidMenu(json, $midmenuItem); - $midmenuItem.bind("click", function(event) { + $midmenuItem1.find("#first_row").text(vmName); + //$midmenuItem1.find("#second_row_label").text("IP Address:"); + $midmenuItem1.find("#second_row").text(json.ipaddress); + updateVirtualMachineStateInMidMenu(json, $midmenuItem1); + $midmenuItem1.bind("click", function(event) { var $t = $(this); vmToRightPanel($t); return false; diff --git a/ui/new/scripts/cloud.core2.ipaddress.js b/ui/new/scripts/cloud.core2.ipaddress.js index d0daa46b10d..21cb70e19ff 100644 --- a/ui/new/scripts/cloud.core2.ipaddress.js +++ b/ui/new/scripts/cloud.core2.ipaddress.js @@ -6,8 +6,8 @@ function ipToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - var iconContainer = $midmenuItem1.find("#icon_container").show(); - iconContainer.find("#icon").attr("src", "images/midmenuicon_network_networkgroup.png"); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_network_networkgroup.png"); $midmenuItem1.find("#first_row").text(jsonObj.ipaddress.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.account.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.iso.js b/ui/new/scripts/cloud.core2.iso.js index dc10db856bc..be68637013b 100644 --- a/ui/new/scripts/cloud.core2.iso.js +++ b/ui/new/scripts/cloud.core2.iso.js @@ -5,16 +5,9 @@ function afterLoadIsoJSP() { function isoToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - - /* - var iconContainer = $midmenuItem1.find("#icon_container").show(); - if(jsonObj.level == "INFO") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png"); - else if(jsonObj.level == "ERROR") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); - else if(jsonObj.level == "WARN") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); - */ + + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + setIconByOsType(jsonObj.ostypename, $iconContainer.find("#icon")); $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.snapshot.js b/ui/new/scripts/cloud.core2.snapshot.js index 241d547d7cd..eedc2eba2cb 100644 --- a/ui/new/scripts/cloud.core2.snapshot.js +++ b/ui/new/scripts/cloud.core2.snapshot.js @@ -6,8 +6,8 @@ function snapshotToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - var iconContainer = $midmenuItem1.find("#icon_container").show(); - iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_snapshots.png"); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_snapshots.png"); $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.volumename.substring(0,25)); diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index 63cc9657c68..23e2545d415 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -5,16 +5,16 @@ function afterLoadTemplateJSP() { function templateToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); + + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + setIconByOsType(jsonObj.ostypename, $iconContainer.find("#icon")); - /* - var iconContainer = $midmenuItem1.find("#icon_container").show(); if(jsonObj.level == "INFO") iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png"); else if(jsonObj.level == "ERROR") iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png"); else if(jsonObj.level == "WARN") - iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); - */ + iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); @@ -48,4 +48,16 @@ function templateToRigntPanel($midmenuItem) { $rightPanelContent.find("#size").text(convertBytes(parseInt(jsonObj.size))); setDateField(jsonObj.created, $rightPanelContent.find("#created")); +} + +//setIconByOsType() is shared by template page and ISO page +function setIconByOsType(osType, $field) { + if (osType == null || osType.length == 0) + return; + if (osType.match("^CentOS") != null) + $field.attr("src", "images/midmenuicon_template_centos.png"); + else if (osType.match("^Windows") != null) + $field.attr("src", "images/midmenuicon_template_windows.png"); + else + $field.attr("src", "images/midmenuicon_template_linux.png"); } \ No newline at end of file diff --git a/ui/new/scripts/cloud.core2.volume.js b/ui/new/scripts/cloud.core2.volume.js index cfeee1ac336..de225990fcf 100644 --- a/ui/new/scripts/cloud.core2.volume.js +++ b/ui/new/scripts/cloud.core2.volume.js @@ -26,8 +26,8 @@ function volumeToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); - var iconContainer = $midmenuItem1.find("#icon_container").show(); - iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png"); + var $iconContainer = $midmenuItem1.find("#icon_container").show(); + $iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png"); $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); From 8f955c2889cfc47f8cad3ab9eac749a9f0f09ac8 Mon Sep 17 00:00:00 2001 From: nit Date: Tue, 14 Sep 2010 20:18:51 +0530 Subject: [PATCH 17/42] Fixing the ConcurrentModificationException --- .../cloud/agent/manager/allocator/impl/FirstFitAllocator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java index 2465d7a01ae..2570cb94aef 100755 --- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java @@ -99,7 +99,7 @@ public class FirstFitAllocator implements HostAllocator { while (it.hasNext()) { HostVO host = it.next(); if (avoid.contains(host)) { - clusterHosts.remove(host); + it.remove(); } else { if (s_logger.isDebugEnabled()) { s_logger.debug("Adding host " + host + " as possible pod host"); From ef6f5b618120c86fe43e2010c0afd4740732c7ec Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 09:53:18 -0700 Subject: [PATCH 18/42] new UI - volume page - adjust position of spinning wheel and add dialog box that will appear after action is finished. --- ui/new/jsp/account.jsp | 2 +- ui/new/jsp/instance.jsp | 10 +++++ ui/new/jsp/volume.jsp | 52 ++++++++++++++----------- ui/new/scripts/cloud.core2.account.js | 4 +- ui/new/scripts/cloud.core2.instance.js | 32 +++++++-------- ui/new/scripts/cloud.core2.ipaddress.js | 7 +--- ui/new/scripts/cloud.core2.iso.js | 4 +- ui/new/scripts/cloud.core2.snapshot.js | 4 +- ui/new/scripts/cloud.core2.template.js | 4 +- ui/new/scripts/cloud.core2.volume.js | 2 +- 10 files changed, 67 insertions(+), 54 deletions(-) diff --git a/ui/new/jsp/account.jsp b/ui/new/jsp/account.jsp index 1739707555c..4743129db16 100644 --- a/ui/new/jsp/account.jsp +++ b/ui/new/jsp/account.jsp @@ -39,7 +39,7 @@
diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index 9c041a8a516..8291b287d69 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -140,6 +140,16 @@
+
+
+
+ <%=t.t("Group")%>:
+
+
+
+
+
+
diff --git a/ui/new/jsp/volume.jsp b/ui/new/jsp/volume.jsp index 729bb5779b0..c8d11d0cef1 100644 --- a/ui/new/jsp/volume.jsp +++ b/ui/new/jsp/volume.jsp @@ -24,32 +24,38 @@
- -
- - -
- - +
<%=t.t("Details")%>
- + +
+ +
+ + + + + +
diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js index 3320136ce17..f11407cb226 100644 --- a/ui/new/scripts/cloud.core2.account.js +++ b/ui/new/scripts/cloud.core2.account.js @@ -14,8 +14,8 @@ function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { else if (jsonObj.accounttype == roleTypeDomainAdmin) $iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png"); - $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.domain.substring(0,25)); + $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.domain).substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js index 23ea90889b9..a5b31d2e88e 100644 --- a/ui/new/scripts/cloud.core2.instance.js +++ b/ui/new/scripts/cloud.core2.instance.js @@ -349,22 +349,6 @@ function clickInstanceGroupHeader($arrowIcon) { }); } - function vmClearRightPanel(jsonObj) { - $rightPanelHeader.find("#vm_name").text(""); - updateVirtualMachineStateInRightPanel(""); - $rightPanelContent.find("#ipAddress").text(""); - $rightPanelContent.find("#zoneName").text(""); - $rightPanelContent.find("#templateName").text(""); - $rightPanelContent.find("#serviceOfferingName").text(""); - $rightPanelContent.find("#ha").hide(); - $rightPanelContent.find("#created").text(""); - $rightPanelContent.find("#account").text(""); - $rightPanelContent.find("#domain").text(""); - $rightPanelContent.find("#hostName").text(""); - $rightPanelContent.find("#group").text(""); - $rightPanelContent.find("#iso").hide(); - } - function vmToRightPanel($midmenuItem) { //details tab if($midmenuItem.find("#info_icon").css("display") != "none") { @@ -418,6 +402,22 @@ function clickInstanceGroupHeader($arrowIcon) { } }); } + + function vmClearRightPanel(jsonObj) { + $rightPanelHeader.find("#vm_name").text(""); + updateVirtualMachineStateInRightPanel(""); + $rightPanelContent.find("#ipAddress").text(""); + $rightPanelContent.find("#zoneName").text(""); + $rightPanelContent.find("#templateName").text(""); + $rightPanelContent.find("#serviceOfferingName").text(""); + $rightPanelContent.find("#ha").hide(); + $rightPanelContent.find("#created").text(""); + $rightPanelContent.find("#account").text(""); + $rightPanelContent.find("#domain").text(""); + $rightPanelContent.find("#hostName").text(""); + $rightPanelContent.find("#group").text(""); + $rightPanelContent.find("#iso").hide(); + } //***** declaration for volume tab (begin) ********************************************************* var vmVolumeActionMap = { diff --git a/ui/new/scripts/cloud.core2.ipaddress.js b/ui/new/scripts/cloud.core2.ipaddress.js index 21cb70e19ff..afeb6cba90d 100644 --- a/ui/new/scripts/cloud.core2.ipaddress.js +++ b/ui/new/scripts/cloud.core2.ipaddress.js @@ -10,15 +10,12 @@ function ipToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $iconContainer.find("#icon").attr("src", "images/midmenuicon_network_networkgroup.png"); $midmenuItem1.find("#first_row").text(jsonObj.ipaddress.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.account.substring(0,25)); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.account).substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } function ipToRigntPanel($midmenuItem) { var jsonObj = $midmenuItem.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")); + var $rightPanelContent = $("#right_panel_content"); } \ No newline at end of file diff --git a/ui/new/scripts/cloud.core2.iso.js b/ui/new/scripts/cloud.core2.iso.js index be68637013b..120705d00ec 100644 --- a/ui/new/scripts/cloud.core2.iso.js +++ b/ui/new/scripts/cloud.core2.iso.js @@ -9,8 +9,8 @@ function isoToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { var $iconContainer = $midmenuItem1.find("#icon_container").show(); setIconByOsType(jsonObj.ostypename, $iconContainer.find("#icon")); - $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); + $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.zonename).substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } diff --git a/ui/new/scripts/cloud.core2.snapshot.js b/ui/new/scripts/cloud.core2.snapshot.js index eedc2eba2cb..8c916a2b72c 100644 --- a/ui/new/scripts/cloud.core2.snapshot.js +++ b/ui/new/scripts/cloud.core2.snapshot.js @@ -9,8 +9,8 @@ function snapshotToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { var $iconContainer = $midmenuItem1.find("#icon_container").show(); $iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_snapshots.png"); - $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.volumename.substring(0,25)); + $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.volumename).substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index 23e2545d415..0bf5a65b929 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -16,8 +16,8 @@ function templateToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { else if(jsonObj.level == "WARN") iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); - $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.zonename.substring(0,25)); + $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.zonename).substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } diff --git a/ui/new/scripts/cloud.core2.volume.js b/ui/new/scripts/cloud.core2.volume.js index de225990fcf..1c0a5354c9c 100644 --- a/ui/new/scripts/cloud.core2.volume.js +++ b/ui/new/scripts/cloud.core2.volume.js @@ -29,7 +29,7 @@ function volumeToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { var $iconContainer = $midmenuItem1.find("#icon_container").show(); $iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png"); - $midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25)); + $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); $midmenuItem1.data("toRightPanelFn", toRightPanelFn); } From ce7278164deaeb8044ac11b398062ca39d3b34b0 Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 15:49:36 -0700 Subject: [PATCH 19/42] bug 6163: adding new dao functionality --- core/src/com/cloud/dc/dao/VlanDao.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/cloud/dc/dao/VlanDao.java b/core/src/com/cloud/dc/dao/VlanDao.java index b70df875ed9..47b0969d86a 100644 --- a/core/src/com/cloud/dc/dao/VlanDao.java +++ b/core/src/com/cloud/dc/dao/VlanDao.java @@ -48,4 +48,6 @@ public interface VlanDao extends GenericDao { boolean zoneHasDirectAttachUntaggedVlans(long zoneId); + List listZoneWideVlans(long zoneId, VlanType vlanType, String vlanId); + } From 10ad2aa468305aa1eba1ec5d34627e1661e52c9f Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 15:51:53 -0700 Subject: [PATCH 20/42] bug 6163: further addition of functionality wrt zone wide vlan search --- core/src/com/cloud/dc/dao/VlanDaoImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/core/src/com/cloud/dc/dao/VlanDaoImpl.java b/core/src/com/cloud/dc/dao/VlanDaoImpl.java index 76e78b7b6f7..7358dabc30a 100644 --- a/core/src/com/cloud/dc/dao/VlanDaoImpl.java +++ b/core/src/com/cloud/dc/dao/VlanDaoImpl.java @@ -25,6 +25,8 @@ import java.util.Map; import javax.ejb.Local; import javax.naming.ConfigurationException; +import sun.swing.SwingUtilities2.Section; + import com.cloud.dc.AccountVlanMapVO; import com.cloud.dc.PodVlanMapVO; import com.cloud.dc.Vlan; @@ -45,7 +47,7 @@ public class VlanDaoImpl extends GenericDaoBase implements VlanDao protected SearchBuilder ZoneTypeSearch; protected SearchBuilder ZoneTypeAllPodsSearch; protected SearchBuilder ZoneTypePodSearch; - + protected SearchBuilder ZoneVlanSearch; protected PodVlanMapDaoImpl _podVlanMapDao = new PodVlanMapDaoImpl(); protected AccountVlanMapDao _accountVlanMapDao = new AccountVlanMapDaoImpl(); @@ -80,8 +82,22 @@ public class VlanDaoImpl extends GenericDaoBase implements VlanDao ZoneTypeSearch.and("zoneId", ZoneTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); ZoneTypeSearch.and("vlanType", ZoneTypeSearch.entity().getVlanType(), SearchCriteria.Op.EQ); ZoneTypeSearch.done(); + + ZoneVlanSearch = createSearchBuilder(); + ZoneVlanSearch.and("vlanType", ZoneVlanSearch.entity().getVlanType(), SearchCriteria.Op.EQ); + ZoneVlanSearch.and("vlanId", ZoneVlanSearch.entity().getVlanId(), SearchCriteria.Op.NEQ); + ZoneVlanSearch.and("zoneId", ZoneTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); } + @Override + public List listZoneWideVlans(long zoneId, VlanType vlanType, String vlanId){ + SearchCriteria sc = ZoneVlanSearch.create(); + sc.setParameters("zoneId", zoneId); + sc.setParameters("vlanId", vlanId); + sc.setParameters("vlanType", vlanType); + return listBy(sc); + } + @Override public List listByZoneAndType(long zoneId, VlanType vlanType) { SearchCriteria sc = ZoneTypeSearch.create(); From 743187a951c900665d96e4154ff03eb40da97d44 Mon Sep 17 00:00:00 2001 From: abhishek Date: Mon, 13 Sep 2010 17:46:18 -0700 Subject: [PATCH 21/42] bug 6163: implementing the search function for zone wide searches for vlans --- core/src/com/cloud/dc/dao/VlanDao.java | 2 + core/src/com/cloud/dc/dao/VlanDaoImpl.java | 40 +++++++++++++++++-- .../com/cloud/server/ManagementServer.java | 1 + .../cloud/server/ManagementServerImpl.java | 5 +++ .../src/com/cloud/vm/UserVmManagerImpl.java | 25 +++++++++++- 5 files changed, 67 insertions(+), 6 deletions(-) diff --git a/core/src/com/cloud/dc/dao/VlanDao.java b/core/src/com/cloud/dc/dao/VlanDao.java index 47b0969d86a..f96ff50d859 100644 --- a/core/src/com/cloud/dc/dao/VlanDao.java +++ b/core/src/com/cloud/dc/dao/VlanDao.java @@ -50,4 +50,6 @@ public interface VlanDao extends GenericDao { List listZoneWideVlans(long zoneId, VlanType vlanType, String vlanId); + List searchForZoneWideVlans(long dcId, String vlanType,String vlanId); + } diff --git a/core/src/com/cloud/dc/dao/VlanDaoImpl.java b/core/src/com/cloud/dc/dao/VlanDaoImpl.java index 7358dabc30a..1115cfd24cf 100644 --- a/core/src/com/cloud/dc/dao/VlanDaoImpl.java +++ b/core/src/com/cloud/dc/dao/VlanDaoImpl.java @@ -18,6 +18,9 @@ package com.cloud.dc.dao; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -35,13 +38,18 @@ import com.cloud.dc.Vlan.VlanType; import com.cloud.network.dao.IPAddressDao; import com.cloud.utils.Pair; import com.cloud.utils.component.ComponentLocator; +import com.cloud.utils.db.DB; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; @Local(value={VlanDao.class}) public class VlanDaoImpl extends GenericDaoBase implements VlanDao { + private final String FindZoneWideVlans = "SELECT * FROM vlan WHERE data_center_id=? and vlan_type=? and vlan_id!=? and id not in (select vlan_db_id from account_vlan_map)"; + protected SearchBuilder ZoneVlanIdSearch; protected SearchBuilder ZoneSearch; protected SearchBuilder ZoneTypeSearch; @@ -83,10 +91,6 @@ public class VlanDaoImpl extends GenericDaoBase implements VlanDao ZoneTypeSearch.and("vlanType", ZoneTypeSearch.entity().getVlanType(), SearchCriteria.Op.EQ); ZoneTypeSearch.done(); - ZoneVlanSearch = createSearchBuilder(); - ZoneVlanSearch.and("vlanType", ZoneVlanSearch.entity().getVlanType(), SearchCriteria.Op.EQ); - ZoneVlanSearch.and("vlanId", ZoneVlanSearch.entity().getVlanId(), SearchCriteria.Op.NEQ); - ZoneVlanSearch.and("zoneId", ZoneTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); } @Override @@ -270,5 +274,33 @@ public class VlanDaoImpl extends GenericDaoBase implements VlanDao return new Pair(ipAddress, vlan); } + + @Override + @DB + public List searchForZoneWideVlans(long dcId, String vlanType, String vlanId){ + + StringBuilder sql = new StringBuilder(FindZoneWideVlans); + + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + try { + pstmt = txn.prepareAutoCloseStatement(sql.toString()); + pstmt.setLong(1, dcId); + pstmt.setString(2, vlanType); + pstmt.setString(3, vlanId); + + ResultSet rs = pstmt.executeQuery(); + List zoneWideVlans = new ArrayList(); + + while (rs.next()) { + zoneWideVlans.add(toEntityBean(rs, false)); + } + + return zoneWideVlans; + } catch (SQLException e) { + throw new CloudRuntimeException("Unable to execute " + pstmt.toString(), e); + } + + } } diff --git a/core/src/com/cloud/server/ManagementServer.java b/core/src/com/cloud/server/ManagementServer.java index c3794a40303..2d0901d61ad 100755 --- a/core/src/com/cloud/server/ManagementServer.java +++ b/core/src/com/cloud/server/ManagementServer.java @@ -2201,4 +2201,5 @@ public interface ManagementServer { VolumeVO getRootVolume(Long instanceId); long getPsMaintenanceCount(long podId); boolean isPoolUp(long instanceId); + List searchForZoneWideVlans(long dcId, String vlanType,String vlanId); } diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 951327af0a3..35f2cf9f356 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -8807,5 +8807,10 @@ public class ManagementServerImpl implements ManagementServer { return false; } + + @Override + public List searchForZoneWideVlans(long dcId, String vlanType, String vlanId){ + return _vlanDao.searchForZoneWideVlans(dcId, vlanType, vlanId); + } } diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 2e116761556..904a718bb30 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -80,10 +80,12 @@ import com.cloud.capacity.dao.CapacityDao; import com.cloud.configuration.ResourceCount.ResourceType; import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.configuration.dao.ResourceLimitDao; +import com.cloud.dc.AccountVlanMapVO; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.VlanVO; import com.cloud.dc.Vlan.VlanType; +import com.cloud.dc.dao.AccountVlanMapDao; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.dc.dao.VlanDao; @@ -169,6 +171,8 @@ import com.cloud.utils.component.Inject; import com.cloud.utils.concurrency.NamedThreadFactory; import com.cloud.utils.db.DB; import com.cloud.utils.db.GlobalLock; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.Transaction; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.ExecutionException; @@ -221,12 +225,13 @@ public class UserVmManagerImpl implements UserVmManager { @Inject AsyncJobManager _asyncMgr; @Inject protected StoragePoolHostDao _storagePoolHostDao; @Inject VlanDao _vlanDao; + @Inject AccountVlanMapDao _accountVlanMapDao; @Inject StoragePoolDao _storagePoolDao; @Inject VMTemplateHostDao _vmTemplateHostDao; @Inject NetworkGroupManager _networkGroupManager; @Inject ServiceOfferingDao _serviceOfferingDao; @Inject EventDao _eventDao = null; - + private IpAddrAllocator _IpAllocator; ScheduledExecutorService _executor = null; int _expungeInterval; @@ -1868,6 +1873,7 @@ public class UserVmManagerImpl implements UserVmManager { Enumeration it = ipAllocators.enumeration(); _IpAllocator = it.nextElement(); } + return true; } @@ -2647,15 +2653,30 @@ public class UserVmManagerImpl implements UserVmManager { List vlansForAccount = _vlanDao.listVlansForAccountByType(dc.getId(), account.getId(), VlanType.DirectAttached); boolean forAccount = false; + boolean forZone = false; if (vlansForAccount.size() > 0) { forAccount = true; guestVlan = vlansForAccount.get(0);//FIXME: iterate over all vlans } + else + { + //list zone wide vlans that are direct attached and tagged + //if exists pick random one + //set forZone = true + + //note the dao method below does a NEQ on vlan id, hence passing untagged + List zoneWideVlans = _vlanDao.listZoneWideVlans(dc.getId(),VlanType.DirectAttached,"untagged"); + + if(zoneWideVlans!=null && zoneWideVlans.size()>0){ + forZone = true; + guestVlan = zoneWideVlans.get(0);//FIXME: iterate over all vlans + } + } while ((pod = _agentMgr.findPod(template, offering, dc, account.getId(), avoids)) != null) { if (s_logger.isDebugEnabled()) { s_logger.debug("Attempting to create direct attached vm in pod " + pod.first().getName()); } - if (!forAccount) { + if (!forAccount && !forZone) { List vlansForPod = _vlanDao.listVlansForPodByType(pod.first().getId(), VlanType.DirectAttached); if (vlansForPod.size() < 1) { avoids.add(pod.first().getId()); From ab166071f845db53045b5a287822ebae447ad1c1 Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 14 Sep 2010 10:03:30 -0700 Subject: [PATCH 22/42] bug 6163: refactoring some more code --- core/src/com/cloud/dc/dao/VlanDaoImpl.java | 2 -- server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/com/cloud/dc/dao/VlanDaoImpl.java b/core/src/com/cloud/dc/dao/VlanDaoImpl.java index 1115cfd24cf..d98e04edc21 100644 --- a/core/src/com/cloud/dc/dao/VlanDaoImpl.java +++ b/core/src/com/cloud/dc/dao/VlanDaoImpl.java @@ -28,8 +28,6 @@ import java.util.Map; import javax.ejb.Local; import javax.naming.ConfigurationException; -import sun.swing.SwingUtilities2.Section; - import com.cloud.dc.AccountVlanMapVO; import com.cloud.dc.PodVlanMapVO; import com.cloud.dc.Vlan; diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 904a718bb30..c3d5bf4e8fb 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2665,7 +2665,7 @@ public class UserVmManagerImpl implements UserVmManager { //set forZone = true //note the dao method below does a NEQ on vlan id, hence passing untagged - List zoneWideVlans = _vlanDao.listZoneWideVlans(dc.getId(),VlanType.DirectAttached,"untagged"); + List zoneWideVlans = _vlanDao.searchForZoneWideVlans(dc.getId(),VlanType.DirectAttached.toString(),"untagged"); if(zoneWideVlans!=null && zoneWideVlans.size()>0){ forZone = true; From edc85dd12db5572cc7d8ec53df3bc04f29586912 Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 14 Sep 2010 10:52:04 -0700 Subject: [PATCH 23/42] bug 6163: waiting on Alex to give me the go ahead for this bug, commenting out some of the code till then --- .../src/com/cloud/vm/UserVmManagerImpl.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index c3d5bf4e8fb..4ab89304043 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2658,20 +2658,20 @@ public class UserVmManagerImpl implements UserVmManager { forAccount = true; guestVlan = vlansForAccount.get(0);//FIXME: iterate over all vlans } - else - { - //list zone wide vlans that are direct attached and tagged - //if exists pick random one - //set forZone = true - - //note the dao method below does a NEQ on vlan id, hence passing untagged - List zoneWideVlans = _vlanDao.searchForZoneWideVlans(dc.getId(),VlanType.DirectAttached.toString(),"untagged"); - - if(zoneWideVlans!=null && zoneWideVlans.size()>0){ - forZone = true; - guestVlan = zoneWideVlans.get(0);//FIXME: iterate over all vlans - } - } +// else +// { +// //list zone wide vlans that are direct attached and tagged +// //if exists pick random one +// //set forZone = true +// +// //note the dao method below does a NEQ on vlan id, hence passing untagged +// List zoneWideVlans = _vlanDao.searchForZoneWideVlans(dc.getId(),VlanType.DirectAttached.toString(),"untagged"); +// +// if(zoneWideVlans!=null && zoneWideVlans.size()>0){ +// forZone = true; +// guestVlan = zoneWideVlans.get(0);//FIXME: iterate over all vlans +// } +// } while ((pod = _agentMgr.findPod(template, offering, dc, account.getId(), avoids)) != null) { if (s_logger.isDebugEnabled()) { s_logger.debug("Attempting to create direct attached vm in pod " + pod.first().getName()); From 91813371b4effe8933a6f894a03c6aacd0fda5eb Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 14 Sep 2010 10:53:27 -0700 Subject: [PATCH 24/42] further comments added --- server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 4ab89304043..38b5726589b 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2658,7 +2658,7 @@ public class UserVmManagerImpl implements UserVmManager { forAccount = true; guestVlan = vlansForAccount.get(0);//FIXME: iterate over all vlans } -// else +// else //TODO PLEASE DO NOT REMOVE THIS COMMENTED PART // { // //list zone wide vlans that are direct attached and tagged // //if exists pick random one From 336634c2f59abcbb7578e5306c291336b10f3788 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 11:28:26 -0700 Subject: [PATCH 25/42] new UI - update details tab in right panel after action is finished. --- ui/new/scripts/cloud.core2.instance.js | 4 +- ui/new/scripts/cloud.core2.js | 215 ++++++++++++++++++++++--- ui/new/scripts/cloud.core2.volume.js | 15 +- 3 files changed, 200 insertions(+), 34 deletions(-) diff --git a/ui/new/scripts/cloud.core2.instance.js b/ui/new/scripts/cloud.core2.instance.js index a5b31d2e88e..85eb8783f60 100644 --- a/ui/new/scripts/cloud.core2.instance.js +++ b/ui/new/scripts/cloud.core2.instance.js @@ -469,10 +469,10 @@ function clickInstanceGroupHeader($arrowIcon) { $actionMenu.find("#action_list").empty(); if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed. if (json.vmstate == "Stopped") - buildActionLinkForSingleObject("Create Template", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template); + buildActionLinkForSubgridItem("Create Template", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template); } else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed. - buildActionLinkForSingleObject("Detach Disk", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template); + buildActionLinkForSubgridItem("Detach Disk", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template); } } diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index 7f1e25fe819..5c7aaa5cce8 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -100,11 +100,11 @@ function doActionForMidMenu(id, $actionLink, apiCommand, listAPIMap) { data: createURL("command="+listAPI+"&id="+id), dataType: "json", success: function(json) { - afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn")); } }); //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below - //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem); + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn")); } else if (result.jobstatus == 2) { // Failed $midmenuItem.find("#info_icon").addClass("error").show(); @@ -148,11 +148,11 @@ function doActionForMidMenu(id, $actionLink, apiCommand, listAPIMap) { success: function(json) { $midmenuItem.find("#info_icon").removeClass("error").show(); $midmenuItem.data("afterActionInfo", (label + " action succeeded.")); - afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn")); } }); //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below - //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem); + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn")); }, error: function(XMLHttpResponse) { handleErrorInMidMenu(XMLHttpResponse, $midmenuItem); @@ -180,8 +180,8 @@ function handleErrorInMidMenu(XMLHttpResponse, $midmenuItem) { } //***** actions for middle menu (end) ************************************************************************** -//***** actions for right panel (begin) ************************************************************************ -function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMap, $singleObject) { +//***** actions for details tab in right panel (begin) ************************************************************************ +function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, $detailsTab) { //debugger; var apiInfo = actionMap[label]; var $listItem = $("#action_list_item").clone(); @@ -195,7 +195,7 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa $link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn); $link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn); - var id = $singleObject.data("jsonObj").id; + var id = $detailsTab.data("jsonObj").id; $link.bind("click", function(event) { //debugger; @@ -204,16 +204,16 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn"); if(dialogBeforeActionFn == null) { var apiCommand = "command="+$actionLink.data("api")+"&id="+id; - doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject); + doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsTab); } else { - dialogBeforeActionFn($actionLink, listAPIMap, $singleObject); + dialogBeforeActionFn($actionLink, listAPIMap, $detailsTab); } return false; }); } -function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject) { +function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsTab) { var label = $actionLink.data("label"); var inProcessText = $actionLink.data("inProcessText"); var isAsyncJob = $actionLink.data("isAsyncJob"); @@ -224,7 +224,7 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single var listAPIResponseObj = listAPIMap["listAPIResponseObj"]; //debugger; - var $spinningWheel = $singleObject.find("#spinning_wheel"); + var $spinningWheel = $detailsTab.find("#spinning_wheel"); $spinningWheel.find("#description").text(inProcessText); $spinningWheel.show(); @@ -253,7 +253,7 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single $("body").stopTime(timerKey); $spinningWheel.hide(); if (result.jobstatus == 1) { // Succeeded - $singleObject.data("afterActionInfo", (label + " action succeeded.")); + $detailsTab.data("afterActionInfo", (label + " action succeeded.")); //DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041) //Before Bug 6041 get fixed, use the temporary solution below. @@ -262,21 +262,21 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single data: createURL("command="+listAPI+"&id="+id), dataType: "json", success: function(json) { - afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); } }); //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below - //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject); + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); } else if (result.jobstatus == 2) { // Failed - $singleObject.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult))); + $detailsTab.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult))); } } }, error: function(XMLHttpResponse) { //debugger; $("body").stopTime(timerKey); - handleErrorInSingleObject(XMLHttpResponse, $singleObject, label); + handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } }); }, @@ -285,7 +285,7 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single }, error: function(XMLHttpResponse) { //debugger; - handleErrorInSingleObject(XMLHttpResponse, $singleObject, label); + handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } }); } @@ -310,25 +310,25 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single dataType: "json", async: false, success: function(json) { - $singleObject.data("afterActionInfo", (label + " action succeeded.")); - afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject); + $detailsTab.data("afterActionInfo", (label + " action succeeded.")); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); } }); //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below - //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject); + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); }, error: function(XMLHttpResponse) { //debugger; - handleErrorInSingleObject(XMLHttpResponse, $singleObject, label); + handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } }); } //Sync job (end) ***** } -function handleErrorInSingleObject(XMLHttpResponse, $singleObject, label) { +function handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label) { //debugger; - $singleObject.find("#spinning_wheel").hide(); + $detailsTab.find("#spinning_wheel").hide(); var errorMsg = ""; if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) { @@ -337,11 +337,174 @@ function handleErrorInSingleObject(XMLHttpResponse, $singleObject, label) { errorMsg = XMLHttpResponse.responseText.substring(start, end); } if(errorMsg.length > 0) - $singleObject.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))))); + $detailsTab.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))))); else - $singleObject.data("afterActionInfo", (label + " action failed.")); + $detailsTab.data("afterActionInfo", (label + " action failed.")); } -//***** actions for right panel (end) ************************************************************************** +//***** actions for details tab in right panel (end) ************************************************************************** + +//***** actions for a subgrid item in right panel (begin) ************************************************************************ +function buildActionLinkForSubgridItem(label, actionMap, $actionMenu, listAPIMap, $subgridItem) { + //debugger; + var apiInfo = actionMap[label]; + var $listItem = $("#action_list_item").clone(); + $actionMenu.find("#action_list").append($listItem.show()); + var $link = $listItem.find("#link").text(label); + $link.data("label", label); + $link.data("inProcessText", apiInfo.inProcessText); + $link.data("api", apiInfo.api); + $link.data("isAsyncJob", apiInfo.isAsyncJob); + $link.data("asyncJobResponse", apiInfo.asyncJobResponse); + $link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn); + $link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn); + + var id = $subgridItem.data("jsonObj").id; + + $link.bind("click", function(event) { + //debugger; + $actionMenu.hide(); + var $actionLink = $(this); + var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn"); + if(dialogBeforeActionFn == null) { + var apiCommand = "command="+$actionLink.data("api")+"&id="+id; + doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgridItem); + } + else { + dialogBeforeActionFn($actionLink, listAPIMap, $subgridItem); + } + return false; + }); +} + +function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgridItem) { + var label = $actionLink.data("label"); + var inProcessText = $actionLink.data("inProcessText"); + var isAsyncJob = $actionLink.data("isAsyncJob"); + var asyncJobResponse = $actionLink.data("asyncJobResponse"); + var afterActionSeccessFn = $actionLink.data("afterActionSeccessFn"); + var listAPI = listAPIMap["listAPI"]; + var listAPIResponse = listAPIMap["listAPIResponse"]; + var listAPIResponseObj = listAPIMap["listAPIResponseObj"]; + + //debugger; + var $spinningWheel = $subgridItem.find("#spinning_wheel"); + $spinningWheel.find("#description").text(inProcessText); + $spinningWheel.show(); + + //Async job (begin) ***** + if(isAsyncJob == true) { + $.ajax({ + data: createURL(apiCommand), + dataType: "json", + success: function(json) { + //debugger; + var jobId = json[asyncJobResponse].jobid; + var timerKey = "asyncJob_" + jobId; + $("body").everyTime( + 10000, + timerKey, + function() { + $.ajax({ + data: createURL("command=queryAsyncJobResult&jobId="+jobId), + dataType: "json", + success: function(json) { + //debugger; + var result = json.queryasyncjobresultresponse; + if (result.jobstatus == 0) { + return; //Job has not completed + } else { + $("body").stopTime(timerKey); + $spinningWheel.hide(); + if (result.jobstatus == 1) { // Succeeded + $subgridItem.data("afterActionInfo", (label + " action succeeded.")); + + //DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041) + //Before Bug 6041 get fixed, use the temporary solution below. + $.ajax({ + cache: false, + data: createURL("command="+listAPI+"&id="+id), + dataType: "json", + success: function(json) { + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem); + } + }); + //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem); + + } else if (result.jobstatus == 2) { // Failed + $subgridItem.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult))); + } + } + }, + error: function(XMLHttpResponse) { + //debugger; + $("body").stopTime(timerKey); + handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); + } + }); + }, + 0 + ); + }, + error: function(XMLHttpResponse) { + //debugger; + handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); + } + }); + } + //Async job (end) ***** + + //Sync job (begin) ***** + else { + //debugger; + $.ajax({ + data: createURL(apiCommand), + dataType: "json", + async: false, + success: function(json) { + //debugger; + $spinningWheel.hide(); + + //RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037) + //Before Bug 6037 get fixed, use the temporary solution below. + $.ajax({ + cache: false, + data: createURL("command="+listAPI+"&id="+id), + dataType: "json", + async: false, + success: function(json) { + $subgridItem.data("afterActionInfo", (label + " action succeeded.")); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem); + } + }); + //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below + //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem); + }, + error: function(XMLHttpResponse) { + //debugger; + handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); + } + }); + } + //Sync job (end) ***** +} + +function handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label) { + //debugger; + $subgridItem.find("#spinning_wheel").hide(); + + var errorMsg = ""; + if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) { + var start = XMLHttpResponse.responseText.indexOf("h1") + 3; + var end = XMLHttpResponse.responseText.indexOf(" 0) + $subgridItem.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))))); + else + $subgridItem.data("afterActionInfo", (label + " action failed.")); +} +//***** actions for a subgrid item in right panel (end) ************************************************************************** diff --git a/ui/new/scripts/cloud.core2.volume.js b/ui/new/scripts/cloud.core2.volume.js index 1c0a5354c9c..1edbc5bd0fd 100644 --- a/ui/new/scripts/cloud.core2.volume.js +++ b/ui/new/scripts/cloud.core2.volume.js @@ -35,8 +35,11 @@ function volumeToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { } function volumeToRigntPanel($midmenuItem) { - var json = $midmenuItem.data("jsonObj"); - + var json = $midmenuItem.data("jsonObj"); + volumeJsonToDetailsTab(json); +} + +function volumeJsonToDetailsTab(json){ var $rightPanelContent = $("#right_panel_content"); $rightPanelContent.data("jsonObj", json); $rightPanelContent.find("#id").text(json.id); @@ -71,12 +74,12 @@ function volumeToRigntPanel($midmenuItem) { $actionMenu.find("#action_list").empty(); if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed. if (json.vmstate == "Stopped") - buildActionLinkForSingleObject("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); + buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); } else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed. - buildActionLinkForSingleObject("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); + buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); } -} +} var volumeListAPIMap = { listAPI: "listVolumes", @@ -90,7 +93,7 @@ var volumeActionMap = { isAsyncJob: true, asyncJobResponse: "detachvolumeresponse", inProcessText: "Detaching disk....", - afterActionSeccessFn: function(){} + afterActionSeccessFn: volumeJsonToDetailsTab }, "Create Template": { isAsyncJob: true, From dea01d07521f068367d3518fea4ff8997a097a5c Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 14 Sep 2010 11:37:09 -0700 Subject: [PATCH 26/42] adding the status value whilst creating a storage pool using database config --- server/src/com/cloud/test/DatabaseConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java index 1f2e6b0db21..b51a99f3af4 100644 --- a/server/src/com/cloud/test/DatabaseConfig.java +++ b/server/src/com/cloud/test/DatabaseConfig.java @@ -49,6 +49,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; +import com.cloud.host.Status; import com.cloud.offering.NetworkOffering; import com.cloud.offering.NetworkOffering.GuestIpType; import com.cloud.service.ServiceOfferingVO; @@ -529,7 +530,7 @@ public class DatabaseConfig { String storageType = _currentObjectParams.get("storageType"); String uuid = UUID.nameUUIDFromBytes(new String(hostAddress+hostPath).getBytes()).toString(); - String insertSql1 = "INSERT INTO `storage_pool` (`id`, `name`, `uuid` , `pool_type` , `port`, `data_center_id` ,`available_bytes` , `capacity_bytes` ,`host_address`, `path`, `created`, `pod_id` ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"; + String insertSql1 = "INSERT INTO `storage_pool` (`id`, `name`, `uuid` , `pool_type` , `port`, `data_center_id` ,`available_bytes` , `capacity_bytes` ,`host_address`, `path`, `created`, `pod_id`,`status` ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"; // String insertSql2 = "INSERT INTO `netfs_storage_pool` VALUES (?,?,?)"; Transaction txn = Transaction.currentTxn(); @@ -550,6 +551,7 @@ public class DatabaseConfig { stmt.setString(10, hostPath); stmt.setDate(11, new Date(new java.util.Date().getTime())); stmt.setLong(12, podId); + stmt.setString(13, Status.Up.toString()); stmt.executeUpdate(); // stmt = txn.prepareAutoCloseStatement(insertSql2); // stmt.setLong(1, 2); From a178a9a6752be02030e15f0d8c1c689ef4c44931 Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 14 Sep 2010 11:38:41 -0700 Subject: [PATCH 27/42] import cleanup --- server/src/com/cloud/vm/UserVmManagerImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 38b5726589b..a258b9974b0 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -80,7 +80,6 @@ import com.cloud.capacity.dao.CapacityDao; import com.cloud.configuration.ResourceCount.ResourceType; import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.configuration.dao.ResourceLimitDao; -import com.cloud.dc.AccountVlanMapVO; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.VlanVO; @@ -152,8 +151,8 @@ import com.cloud.storage.dao.StoragePoolHostDao; import com.cloud.storage.dao.VMTemplateDao; import com.cloud.storage.dao.VMTemplateHostDao; import com.cloud.storage.dao.VolumeDao; -import com.cloud.template.VirtualMachineTemplate.BootloaderType; import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.template.VirtualMachineTemplate.BootloaderType; import com.cloud.user.AccountManager; import com.cloud.user.AccountVO; import com.cloud.user.User; @@ -171,8 +170,6 @@ import com.cloud.utils.component.Inject; import com.cloud.utils.concurrency.NamedThreadFactory; import com.cloud.utils.db.DB; import com.cloud.utils.db.GlobalLock; -import com.cloud.utils.db.SearchBuilder; -import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.Transaction; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.ExecutionException; From 85ea3d600ad365a5e0a0ee99617335b8bf749826 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 14:37:18 -0700 Subject: [PATCH 28/42] new UI - implement close button in action message box. --- ui/new/jsp/volume.jsp | 454 ++++++++++++++------------- ui/new/scripts/cloud.core2.js | 77 ++--- ui/new/scripts/cloud.core2.volume.js | 39 ++- 3 files changed, 282 insertions(+), 288 deletions(-) diff --git a/ui/new/jsp/volume.jsp b/ui/new/jsp/volume.jsp index c8d11d0cef1..eddace55988 100644 --- a/ui/new/jsp/volume.jsp +++ b/ui/new/jsp/volume.jsp @@ -1,224 +1,230 @@ - - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
- -

Volume -

-
-
- -
-
- <%=t.t("Details")%>
- -
- -
- - - - - -
- -
-
-
-
-
- <%=t.t("ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Type")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Zone")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Instance.Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Device.ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Size")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("State")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Storage")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file + + +<%@ page import="java.util.*" %> + +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + +
+ +

+ Volume +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+ +
+
+ +
+
+
+
+
+

+ Detaching Disk …

+
+ + +
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Instance.Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Device.ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("State")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Storage")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ + + diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index 5c7aaa5cce8..846422c23de 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -181,8 +181,7 @@ function handleErrorInMidMenu(XMLHttpResponse, $midmenuItem) { //***** actions for middle menu (end) ************************************************************************** //***** actions for details tab in right panel (begin) ************************************************************************ -function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, $detailsTab) { - //debugger; +function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, $detailsTab) { var apiInfo = actionMap[label]; var $listItem = $("#action_list_item").clone(); $actionMenu.find("#action_list").append($listItem.show()); @@ -197,8 +196,7 @@ function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, var id = $detailsTab.data("jsonObj").id; - $link.bind("click", function(event) { - //debugger; + $link.bind("click", function(event) { $actionMenu.hide(); var $actionLink = $(this); var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn"); @@ -222,8 +220,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT var listAPI = listAPIMap["listAPI"]; var listAPIResponse = listAPIMap["listAPIResponse"]; var listAPIResponseObj = listAPIMap["listAPIResponseObj"]; - - //debugger; + var $spinningWheel = $detailsTab.find("#spinning_wheel"); $spinningWheel.find("#description").text(inProcessText); $spinningWheel.show(); @@ -233,8 +230,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT $.ajax({ data: createURL(apiCommand), dataType: "json", - success: function(json) { - //debugger; + success: function(json) { var jobId = json[asyncJobResponse].jobid; var timerKey = "asyncJob_" + jobId; $("body").everyTime( @@ -244,16 +240,16 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT $.ajax({ data: createURL("command=queryAsyncJobResult&jobId="+jobId), dataType: "json", - success: function(json) { - //debugger; + success: function(json) { var result = json.queryasyncjobresultresponse; if (result.jobstatus == 0) { return; //Job has not completed } else { $("body").stopTime(timerKey); $spinningWheel.hide(); - if (result.jobstatus == 1) { // Succeeded - $detailsTab.data("afterActionInfo", (label + " action succeeded.")); + if (result.jobstatus == 1) { // Succeeded + $detailsTab.find("#action_message_box #description").text(label + " action succeeded."); + $detailsTab.find("#action_message_box").show(); //DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041) //Before Bug 6041 get fixed, use the temporary solution below. @@ -268,13 +264,13 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); - } else if (result.jobstatus == 2) { // Failed - $detailsTab.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult))); + } else if (result.jobstatus == 2) { // Failed + $detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(result.jobresult)); + $detailsTab.find("#action_message_box").show(); } } }, - error: function(XMLHttpResponse) { - //debugger; + error: function(XMLHttpResponse) { $("body").stopTime(timerKey); handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } @@ -283,8 +279,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT 0 ); }, - error: function(XMLHttpResponse) { - //debugger; + error: function(XMLHttpResponse) { handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } }); @@ -292,14 +287,12 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT //Async job (end) ***** //Sync job (begin) ***** - else { - //debugger; + else { $.ajax({ data: createURL(apiCommand), dataType: "json", async: false, - success: function(json) { - //debugger; + success: function(json) { $spinningWheel.hide(); //RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037) @@ -310,15 +303,16 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT dataType: "json", async: false, success: function(json) { - $detailsTab.data("afterActionInfo", (label + " action succeeded.")); + $detailsTab.find("#action_message_box #description").text(label + " action succeeded."); + $detailsTab.find("#action_message_box").show(); + afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); } }); //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); }, - error: function(XMLHttpResponse) { - //debugger; + error: function(XMLHttpResponse) { handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label); } }); @@ -327,7 +321,6 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT } function handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label) { - //debugger; $detailsTab.find("#spinning_wheel").hide(); var errorMsg = ""; @@ -337,15 +330,15 @@ function handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label) { errorMsg = XMLHttpResponse.responseText.substring(start, end); } if(errorMsg.length > 0) - $detailsTab.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))))); + $detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))); else - $detailsTab.data("afterActionInfo", (label + " action failed.")); + $detailsTab.find("#action_message_box #description").text(label + " action failed."); + $detailsTab.find("#action_message_box").show(); } //***** actions for details tab in right panel (end) ************************************************************************** //***** actions for a subgrid item in right panel (begin) ************************************************************************ function buildActionLinkForSubgridItem(label, actionMap, $actionMenu, listAPIMap, $subgridItem) { - //debugger; var apiInfo = actionMap[label]; var $listItem = $("#action_list_item").clone(); $actionMenu.find("#action_list").append($listItem.show()); @@ -360,8 +353,7 @@ function buildActionLinkForSubgridItem(label, actionMap, $actionMenu, listAPIMap var id = $subgridItem.data("jsonObj").id; - $link.bind("click", function(event) { - //debugger; + $link.bind("click", function(event) { $actionMenu.hide(); var $actionLink = $(this); var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn"); @@ -385,8 +377,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid var listAPI = listAPIMap["listAPI"]; var listAPIResponse = listAPIMap["listAPIResponse"]; var listAPIResponseObj = listAPIMap["listAPIResponseObj"]; - - //debugger; + var $spinningWheel = $subgridItem.find("#spinning_wheel"); $spinningWheel.find("#description").text(inProcessText); $spinningWheel.show(); @@ -396,8 +387,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid $.ajax({ data: createURL(apiCommand), dataType: "json", - success: function(json) { - //debugger; + success: function(json) { var jobId = json[asyncJobResponse].jobid; var timerKey = "asyncJob_" + jobId; $("body").everyTime( @@ -407,8 +397,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid $.ajax({ data: createURL("command=queryAsyncJobResult&jobId="+jobId), dataType: "json", - success: function(json) { - //debugger; + success: function(json) { var result = json.queryasyncjobresultresponse; if (result.jobstatus == 0) { return; //Job has not completed @@ -436,8 +425,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid } } }, - error: function(XMLHttpResponse) { - //debugger; + error: function(XMLHttpResponse) { $("body").stopTime(timerKey); handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); } @@ -447,7 +435,6 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid ); }, error: function(XMLHttpResponse) { - //debugger; handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); } }); @@ -455,14 +442,12 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid //Async job (end) ***** //Sync job (begin) ***** - else { - //debugger; + else { $.ajax({ data: createURL(apiCommand), dataType: "json", async: false, - success: function(json) { - //debugger; + success: function(json) { $spinningWheel.hide(); //RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037) @@ -480,8 +465,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem); }, - error: function(XMLHttpResponse) { - //debugger; + error: function(XMLHttpResponse) { handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label); } }); @@ -490,7 +474,6 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgrid } function handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label) { - //debugger; $subgridItem.find("#spinning_wheel").hide(); var errorMsg = ""; diff --git a/ui/new/scripts/cloud.core2.volume.js b/ui/new/scripts/cloud.core2.volume.js index 1edbc5bd0fd..19bb3856b0b 100644 --- a/ui/new/scripts/cloud.core2.volume.js +++ b/ui/new/scripts/cloud.core2.volume.js @@ -19,6 +19,11 @@ function afterLoadVolumeJSP() { } } } + }); + + $("#right_panel_content #tab_content_details #action_message_box #close_button").bind("click", function(event){ + $(this).parent().hide(); + return false; }); } @@ -40,27 +45,27 @@ function volumeToRigntPanel($midmenuItem) { } function volumeJsonToDetailsTab(json){ - var $rightPanelContent = $("#right_panel_content"); - $rightPanelContent.data("jsonObj", json); - $rightPanelContent.find("#id").text(json.id); - $rightPanelContent.find("#name").text(fromdb(json.name)); - $rightPanelContent.find("#zonename").text(fromdb(json.zonename)); - $rightPanelContent.find("#device_id").text(json.deviceid); - $rightPanelContent.find("#state").text(json.state); - $rightPanelContent.find("#storage").text(fromdb(json.storage)); - $rightPanelContent.find("#account").text(fromdb(json.account)); + var $detailsTab = $("#right_panel_content #tab_content_details"); + $detailsTab.data("jsonObj", json); + $detailsTab.find("#id").text(json.id); + $detailsTab.find("#name").text(fromdb(json.name)); + $detailsTab.find("#zonename").text(fromdb(json.zonename)); + $detailsTab.find("#device_id").text(json.deviceid); + $detailsTab.find("#state").text(json.state); + $detailsTab.find("#storage").text(fromdb(json.storage)); + $detailsTab.find("#account").text(fromdb(json.account)); - $rightPanelContent.find("#type").text(json.type + " (" + json.storagetype + " storage)"); - $rightPanelContent.find("#size").text((json.size == "0") ? "" : convertBytes(json.size)); + $detailsTab.find("#type").text(json.type + " (" + json.storagetype + " storage)"); + $detailsTab.find("#size").text((json.size == "0") ? "" : convertBytes(json.size)); if (json.virtualmachineid == null) - $rightPanelContent.find("#vm_name").text("detached"); + $detailsTab.find("#vm_name").text("detached"); else - $rightPanelContent.find("#vm_name").text(getVmName(json.vmname, json.vmdisplayname) + " (" + json.vmstate + ")"); + $detailsTab.find("#vm_name").text(getVmName(json.vmname, json.vmdisplayname) + " (" + json.vmstate + ")"); - setDateField(json.created, $rightPanelContent.find("#created")); + setDateField(json.created, $detailsTab.find("#created")); - var $actionLink = $rightPanelContent.find("#volume_action_link"); + var $actionLink = $detailsTab.find("#volume_action_link"); $actionLink.bind("mouseover", function(event) { $(this).find("#volume_action_menu").show(); return false; @@ -74,10 +79,10 @@ function volumeJsonToDetailsTab(json){ $actionMenu.find("#action_list").empty(); if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed. if (json.vmstate == "Stopped") - buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); + buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $detailsTab); } else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed. - buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent); + buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $detailsTab); } } From 252add5d2bb9a9a3a8a6255c2f81789c69e0850e Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 14:51:44 -0700 Subject: [PATCH 29/42] Names changed for title icons --- ui/new/images/alerttitle_icons.gif | Bin 1567 -> 0 bytes ...ntstitle_icons.gif => title_accountsicon.gif} | Bin ...proxytitle_icons.gif => title_cproxyicon.gif} | Bin ...rdtitle_icons.gif => title_dashboardicon.gif} | Bin ...omaintitle_icons.gif => title_domainicon.gif} | Bin ...ventstitle_icons.gif => title_eventsicon.gif} | Bin ui/new/images/title_hosticon.gif | Bin 0 -> 1641 bytes ...cetitle_icons.gif => title_instanceicons.gif} | Bin .../{iptitle_icons.gif => title_ipicon.gif} | Bin .../{loadtitle_icons.gif => title_loadicon.gif} | Bin ...k_titleicon.gif => title_loadnetworkicon.gif} | Bin ...terstitle_icons.gif => title_routersicon.gif} | Bin ...sgtitle_icons.gif => title_secgroupicons.gif} | Bin ...ftitle_icons.gif => title_serviceofficon.gif} | Bin ui/new/images/title_templatesicon.gif | Bin 0 -> 1527 bytes 15 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ui/new/images/alerttitle_icons.gif rename ui/new/images/{accountstitle_icons.gif => title_accountsicon.gif} (100%) rename ui/new/images/{cproxytitle_icons.gif => title_cproxyicon.gif} (100%) rename ui/new/images/{dashboardtitle_icons.gif => title_dashboardicon.gif} (100%) rename ui/new/images/{domaintitle_icons.gif => title_domainicon.gif} (100%) rename ui/new/images/{eventstitle_icons.gif => title_eventsicon.gif} (100%) create mode 100644 ui/new/images/title_hosticon.gif rename ui/new/images/{instancetitle_icons.gif => title_instanceicons.gif} (100%) rename ui/new/images/{iptitle_icons.gif => title_ipicon.gif} (100%) rename ui/new/images/{loadtitle_icons.gif => title_loadicon.gif} (100%) rename ui/new/images/{loadnetwork_titleicon.gif => title_loadnetworkicon.gif} (100%) rename ui/new/images/{routerstitle_icons.gif => title_routersicon.gif} (100%) rename ui/new/images/{sgtitle_icons.gif => title_secgroupicons.gif} (100%) rename ui/new/images/{serviceofftitle_icons.gif => title_serviceofficon.gif} (100%) create mode 100644 ui/new/images/title_templatesicon.gif diff --git a/ui/new/images/alerttitle_icons.gif b/ui/new/images/alerttitle_icons.gif deleted file mode 100644 index 6b1f7368d65f33a976f75dbd5a0a088af815c1a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1567 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 literal 0 HcmV?d00001 diff --git a/ui/new/images/instancetitle_icons.gif b/ui/new/images/title_instanceicons.gif similarity index 100% rename from ui/new/images/instancetitle_icons.gif rename to ui/new/images/title_instanceicons.gif diff --git a/ui/new/images/iptitle_icons.gif b/ui/new/images/title_ipicon.gif similarity index 100% rename from ui/new/images/iptitle_icons.gif rename to ui/new/images/title_ipicon.gif diff --git a/ui/new/images/loadtitle_icons.gif b/ui/new/images/title_loadicon.gif similarity index 100% rename from ui/new/images/loadtitle_icons.gif rename to ui/new/images/title_loadicon.gif diff --git a/ui/new/images/loadnetwork_titleicon.gif b/ui/new/images/title_loadnetworkicon.gif similarity index 100% rename from ui/new/images/loadnetwork_titleicon.gif rename to ui/new/images/title_loadnetworkicon.gif diff --git a/ui/new/images/routerstitle_icons.gif b/ui/new/images/title_routersicon.gif similarity index 100% rename from ui/new/images/routerstitle_icons.gif rename to ui/new/images/title_routersicon.gif diff --git a/ui/new/images/sgtitle_icons.gif b/ui/new/images/title_secgroupicons.gif similarity index 100% rename from ui/new/images/sgtitle_icons.gif rename to ui/new/images/title_secgroupicons.gif diff --git a/ui/new/images/serviceofftitle_icons.gif b/ui/new/images/title_serviceofficon.gif similarity index 100% rename from ui/new/images/serviceofftitle_icons.gif rename to ui/new/images/title_serviceofficon.gif diff --git a/ui/new/images/title_templatesicon.gif b/ui/new/images/title_templatesicon.gif new file mode 100644 index 0000000000000000000000000000000000000000..db8b1239683b35ed1d139b2f4a0b7ab64960bc03 GIT binary patch literal 1527 zcmVyauW9|+4%obW{Mr}h=H=O~ zh}f+u{_d{NyQUHn5@Lb)=JVH2EEJ}wng3Y^|9L7fLD!R;_T}Ey0s;a%Q{sNDQD&+l zsnv0l003dK12{N0|H@_U?d>ZlC;05*dA%zE2g622MoCxe>FMbFmPygy!2Oz4{_>IC z+}-}zxXjGV|MsM=Ag12br0fMr`}_vS9qol`L2Qi);Y*SQY+= zI;+S3{?aV_+gkr+7*m59)#L8=w@TsR;p*er)#v!;ze#FoXGw2&GF^G||I}yv+Kf790165U_xSin zmjIQj_vyMkD_QyX^605175??&8yp<)>EHj^m;dn~|HxYY{{H=mPK2TT(b3TV{`BtZ z<~Kb<{Or?;rvCrGbLCPP{QUgpjD8QvY0MPRu_J`uO@K9~qo}6$u3Znv!gqI#IuN&Wu+ zIAHd+hyecl{piSl|NZ~?#&YM%Aoj^6|H?F9UtW^5|LW@O^YZflbr|W+nVi*(yRWId zwyYW$7`wN&9z_6&k(ybJDq~q%n|S~b5D^6h1~M-tN`6RBr4lAs6`M#PH(N^6A<7#jpCwvzUxm+rL~~UuNINbc&$& zkEi>!>wdc^0Hp;0{%;_SUk>5x|EPEX>F)cqb}{+-`{3EtQBzV(bq*67(5sCf`oYrZ zCjkFE0J4!JA^8LV00000EC2ui03rY$000R8009UbNU)&6g9sBUTv%|>pn;f1xLD!F zoWX|-4~~dJB?XlU{VHK2$Sb44L$xNzSV2L^ojqm@sW6Gq4?HR|Qo!pWr31fXh%`XJ zqYFa2B{Ts=Ss}xRkRFdZ0C46dOc)OwBuH?C!elv>gs8Z5X9mEIAsa|=m~pACg8>Y0 zxhdB4$^X$@WY^3`)|1F_gzi*c)0nnEdbq0nw7Qwj`)x5#-mTbPEsR!a;zY zsRtRVSO7p|$kkMO7T7Sr;#xF33J;P0VMpN2lPwuaV1jnQk02yOq77q^=9Ut|hY~I# zLx2DuMc`y|N*pxskjofcoP)*y0<>@e9MXKz6+(){LVy_0y;6b&EYR=|ETo|G1r}fg z5CAm+d?3vSmK@XuE`0n@$9X4IQOGtt^r6id(C%{0%KB6oz%^ZKo(Zroi za5D@RCP)*2L6BhL2LOZc(ncQgKtY3!Nz_mS3T51L!K89DpvN2w(o_u(^OT|k16_pU z$}ATgaYQG*L?S{FbkHPFH#ykU;Q|cxNYlv~x1P&Rv2LfHN%8J z%m9|)!5KpKfI&#oBM%f106R8r1DF5+ literal 0 HcmV?d00001 From 8c48de076a6c4298c1f8f6bc21c9702b009cc40f Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 15:19:36 -0700 Subject: [PATCH 30/42] new UI - volume page - after action on right panel is finished, update both middle menu and right panel. --- ui/new/scripts/cloud.core2.account.js | 5 ++- ui/new/scripts/cloud.core2.alert.js | 5 ++- ui/new/scripts/cloud.core2.event.js | 5 ++- ui/new/scripts/cloud.core2.init.js | 16 +++------ ui/new/scripts/cloud.core2.instance.js | 15 ++++---- ui/new/scripts/cloud.core2.ipaddress.js | 5 ++- ui/new/scripts/cloud.core2.iso.js | 6 ++-- ui/new/scripts/cloud.core2.snapshot.js | 5 ++- ui/new/scripts/cloud.core2.template.js | 6 ++-- ui/new/scripts/cloud.core2.volume.js | 46 ++++++++++++++----------- 10 files changed, 50 insertions(+), 64 deletions(-) diff --git a/ui/new/scripts/cloud.core2.account.js b/ui/new/scripts/cloud.core2.account.js index f11407cb226..7bf04e1b8a1 100644 --- a/ui/new/scripts/cloud.core2.account.js +++ b/ui/new/scripts/cloud.core2.account.js @@ -2,7 +2,7 @@ function afterLoadAccountJSP() { } -function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { +function accountToMidmenu(jsonObj, $midmenuItem1) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); @@ -15,8 +15,7 @@ function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png"); $midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25)); - $midmenuItem1.find("#second_row").text(fromdb(jsonObj.domain).substring(0,25)); - $midmenuItem1.data("toRightPanelFn", toRightPanelFn); + $midmenuItem1.find("#second_row").text(fromdb(jsonObj.domain).substring(0,25)); } function accountToRigntPanel($midmenuItem) { diff --git a/ui/new/scripts/cloud.core2.alert.js b/ui/new/scripts/cloud.core2.alert.js index ff395d19b24..737775f7bfb 100644 --- a/ui/new/scripts/cloud.core2.alert.js +++ b/ui/new/scripts/cloud.core2.alert.js @@ -2,12 +2,11 @@ function afterLoadAlertJSP() { } -function alertToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { +function alertToMidmenu(jsonObj, $midmenuItem1) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); $midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); - $midmenuItem1.data("toRightPanelFn", toRightPanelFn); + $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); } function alertToRigntPanel($midmenuItem) { diff --git a/ui/new/scripts/cloud.core2.event.js b/ui/new/scripts/cloud.core2.event.js index 3b85803a840..e856b8bdc59 100644 --- a/ui/new/scripts/cloud.core2.event.js +++ b/ui/new/scripts/cloud.core2.event.js @@ -2,7 +2,7 @@ function afterLoadEventJSP() { } -function eventToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { +function eventToMidmenu(jsonObj, $midmenuItem1) { $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); $midmenuItem1.data("jsonObj", jsonObj); @@ -15,8 +15,7 @@ function eventToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) { $iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png"); $midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); - $midmenuItem1.data("toRightPanelFn", toRightPanelFn); + $midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25)); } function eventToRigntPanel($midmenuItem) { diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index 721b73180c6..390d22e4cf8 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -40,16 +40,7 @@ $(document).ready(function() { } } }); - - function jsonToMidmenu(jsonObj, $midmenuItem1, propertyForFirstRow, propertyForSecondRow, toRightPanelFn) { - $midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id)); - $midmenuItem1.data("id", jsonObj.id); - $midmenuItem1.data("jsonObj", jsonObj); - $midmenuItem1.find("#first_row").text(jsonObj[propertyForFirstRow].substring(0,25)); - $midmenuItem1.find("#second_row").text(jsonObj[propertyForSecondRow].substring(0,25)); - $midmenuItem1.data("toRightPanelFn", toRightPanelFn); - } - + function clearMidMenu() { $("#midmenu_container").empty(); $("#midmenu_action_link").hide(); @@ -71,8 +62,9 @@ $(document).ready(function() { var items = json[jsonResponse1][jsonResponse2]; if(items != null && items.length > 0) { for(var i=0; i Date: Tue, 14 Sep 2010 15:33:08 -0700 Subject: [PATCH 31/42] bug 6188: fix for the issue status 6188: resolved fixed --- server/src/com/cloud/configuration/Config.java | 2 +- server/src/com/cloud/server/ManagementServerImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index e2f22c3989d..03b24c200fb 100644 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -47,7 +47,7 @@ public enum Config { StorageOverprovisioningFactor("Storage", StoragePoolAllocator.class, String.class, "storage.overprovisioning.factor", "2", "Used for storage overprovisioning calculation; available storage will be (actualStorageSize * storage.overprovisioning.factor)", null), StorageStatsInterval("Storage", ManagementServer.class, String.class, "storage.stats.interval", "60000", "The interval in milliseconds when storage stats (per host) are retrieved from agents.", null), - MaxVolumeSize("Storage", ManagementServer.class, Integer.class, "max.volume.size.gb", "2000", "The maximum size for a volume in Gb.", null), + MaxVolumeSize("Storage", ManagementServer.class, Integer.class, "max.volume.size.gb", "2097152000", "The maximum size for a volume in Gb.", null), TotalRetries("Storage", AgentManager.class, Integer.class, "total.retries", "4", "The number of times each command sent to a host should be retried in case of failure.", null), // Network diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 35f2cf9f356..b62ef5c156a 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -452,7 +452,7 @@ public class ManagementServerImpl implements ManagementServer { // and set them in the right places String maxVolumeSizeInGbString = _configs.get("max.volume.size.gb"); - int maxVolumeSizeGb = NumbersUtil.parseInt(maxVolumeSizeInGbString, 2000); + int maxVolumeSizeGb = NumbersUtil.parseInt(maxVolumeSizeInGbString, 2097152000); _maxVolumeSizeInGb = maxVolumeSizeGb; From 6eab10ad47b2abcdb5b747f900a4fa63930539b1 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 15:43:57 -0700 Subject: [PATCH 32/42] new UI - boolean field (cross icon, tick icon) - adjust position of cross icon and tick icon. --- ui/new/jsp/instance.jsp | 8 ++++---- ui/new/jsp/iso.jsp | 2 ++ ui/new/scripts/cloud.core2.js | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index 8291b287d69..41e57deeebd 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -82,8 +82,8 @@ <%=t.t("HA")%>:
-
- @@ -134,8 +134,8 @@ <%=t.t("ISO")%>:
-
- diff --git a/ui/new/jsp/iso.jsp b/ui/new/jsp/iso.jsp index 1344d1cd5dc..01056df63a2 100644 --- a/ui/new/jsp/iso.jsp +++ b/ui/new/jsp/iso.jsp @@ -86,6 +86,8 @@
+
+
diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index 846422c23de..f03c9cdd890 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -508,9 +508,9 @@ var midmenuItemCount = 20; function setBooleanField(value, $field) { if(value == "true") - $field.removeClass("cross_icon").addClass("tick_icon").show(); + $field.find("#icon").removeClass("cross_icon").addClass("tick_icon").show(); else - $field.removeClass("tick_icon").addClass("cross_icon").show(); + $field.find("#icon").removeClass("tick_icon").addClass("cross_icon").show(); } From 03728cf9d85478c928818bf8a8ba612a7d9e3e3e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 15:58:52 -0700 Subject: [PATCH 33/42] new UI - clean right panel when different item in middle menu is selected. --- ui/new/scripts/cloud.core2.init.js | 7 +------ ui/new/scripts/cloud.core2.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index 390d22e4cf8..c6127536e56 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -25,6 +25,7 @@ $(document).ready(function() { selectedItemsInMidMenu[id] = $midmenuItem1; $midmenuItem1.find("#content").addClass("selected"); } + clearRightPanel(); var toRightPanelFn = $midmenuItem1.data("toRightPanelFn"); toRightPanelFn($midmenuItem1); } @@ -40,12 +41,6 @@ $(document).ready(function() { } } }); - - function clearMidMenu() { - $("#midmenu_container").empty(); - $("#midmenu_action_link").hide(); - $("#midmenu_add_link").hide(); - } var $midmenuItem = $("#midmenu_item"); function listMidMenuItems(leftmenuId, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) { diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index f03c9cdd890..c69460a0f8d 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -512,7 +512,18 @@ function setBooleanField(value, $field) { else $field.find("#icon").removeClass("tick_icon").addClass("cross_icon").show(); } + +function clearMidMenu() { + $("#midmenu_container").empty(); + $("#midmenu_action_link").hide(); + $("#midmenu_add_link").hide(); +} +function clearRightPanel() { + $("#right_panel_content #action_message_box").hide(); +} + + From c464c7f5b7b796bd19a837417f5f0070f003af25 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 16:01:26 -0700 Subject: [PATCH 34/42] Ui for edit version --- ui/new/css/main.css | 2 + ui/new/jsp/template.jsp | 334 ++++++++++++++++++++-------------------- 2 files changed, 173 insertions(+), 163 deletions(-) diff --git a/ui/new/css/main.css b/ui/new/css/main.css index 34ea85e6646..24058dc9571 100644 --- a/ui/new/css/main.css +++ b/ui/new/css/main.css @@ -1921,6 +1921,8 @@ a:visited { padding:0; } + + .row_celltitles a{ width:auto; height:auto; diff --git a/ui/new/jsp/template.jsp b/ui/new/jsp/template.jsp index 4e74c261341..45db59599f5 100644 --- a/ui/new/jsp/template.jsp +++ b/ui/new/jsp/template.jsp @@ -1,164 +1,172 @@ - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
- -

Template -

-
-
- -
-
- <%=t.t("Details")%>
-
-
-
-
-
- <%=t.t("ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Zone")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Display.Text")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Status")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Password.Enabled")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Public")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Featured")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Cross.Zones")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("OS.Type")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Size")%>:
-
-
-
-
-
-
-
-
+ + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +
+ Instance
+ +

Template +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Display.Text")%>:
+
+
+
+ +
+
+
+
+
+ <%=t.t("Status")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Password.Enabled")%>:
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("Public")%>:
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("Featured")%>:
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("Cross.Zones")%>:
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("OS.Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+ +
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+
+
\ No newline at end of file From 188b3e8b3e3863d4af80d277decebd06e82525ff Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 16:20:45 -0700 Subject: [PATCH 35/42] Icon added to main content title --- ui/new/jsp/account.jsp | 2 +- ui/new/jsp/event.jsp | 226 ++++++++++++++++++++-------------------- ui/new/jsp/instance.jsp | 2 +- 3 files changed, 115 insertions(+), 115 deletions(-) diff --git a/ui/new/jsp/account.jsp b/ui/new/jsp/account.jsp index 4743129db16..ff73aa49790 100644 --- a/ui/new/jsp/account.jsp +++ b/ui/new/jsp/account.jsp @@ -15,7 +15,7 @@
- Accounts
+ Accounts

Accounts

diff --git a/ui/new/jsp/event.jsp b/ui/new/jsp/event.jsp index 778de56e2e9..b871dcddde8 100644 --- a/ui/new/jsp/event.jsp +++ b/ui/new/jsp/event.jsp @@ -1,114 +1,114 @@ - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
- -

Event -

-
-
- -
-
- <%=t.t("Details")%>
-
-
-
-
-
- <%=t.t("id")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Initiated.By")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Owner.Account")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Type")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Level")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Description")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("State")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Date")%>:
-
-
-
-
-
-
-
-
+ + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +
+ Instance
+ +

Event +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("id")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Initiated.By")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Owner.Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Level")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Description")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("State")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Date")%>:
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index 41e57deeebd..e27364f9548 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -14,7 +14,7 @@
- Instance
+ Instance

Instance

From 98c32fbf7102013492abe85cc37c284d59a56809 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 16:26:13 -0700 Subject: [PATCH 36/42] Icons for main titles for event and Instance --- ui/new/jsp/event.jsp | 2 +- ui/new/jsp/instance.jsp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/new/jsp/event.jsp b/ui/new/jsp/event.jsp index b871dcddde8..563ab2973c5 100644 --- a/ui/new/jsp/event.jsp +++ b/ui/new/jsp/event.jsp @@ -15,7 +15,7 @@
- Instance
+ Event

Event

diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index e27364f9548..0bc5da7f7df 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -14,7 +14,7 @@
- Instance
+ Instance

Instance

From 3d61949f06143b1d531570c8f7d5f50420faad2a Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 16:30:01 -0700 Subject: [PATCH 37/42] Icon for main title -IP Address --- ui/new/jsp/ip_address.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/new/jsp/ip_address.jsp b/ui/new/jsp/ip_address.jsp index 682dc75e4da..56aa7a927bd 100644 --- a/ui/new/jsp/ip_address.jsp +++ b/ui/new/jsp/ip_address.jsp @@ -11,7 +11,7 @@
- IP Address
+ IP Address

IP Address

From 68e17586d056828adb718dd8aa9ff448e5efdff1 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 16:39:09 -0700 Subject: [PATCH 38/42] new UI - actions in details panel - show error message in red dialog box when action fails. --- ui/new/jsp/volume.jsp | 8 +------- ui/new/scripts/cloud.core2.js | 18 ++++++++++-------- ui/new/scripts/cloud.core2.volume.js | 6 +++--- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ui/new/jsp/volume.jsp b/ui/new/jsp/volume.jsp index eddace55988..adb53246fde 100644 --- a/ui/new/jsp/volume.jsp +++ b/ui/new/jsp/volume.jsp @@ -56,13 +56,7 @@

-
- +
diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index c69460a0f8d..abf2561ba3a 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -181,7 +181,7 @@ function handleErrorInMidMenu(XMLHttpResponse, $midmenuItem) { //***** actions for middle menu (end) ************************************************************************** //***** actions for details tab in right panel (begin) ************************************************************************ -function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, $detailsTab) { +function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap) { var apiInfo = actionMap[label]; var $listItem = $("#action_list_item").clone(); $actionMenu.find("#action_list").append($listItem.show()); @@ -194,6 +194,7 @@ function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, $link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn); $link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn); + var $detailsTab = $("#right_panel_content #tab_content_details"); var id = $detailsTab.data("jsonObj").id; $link.bind("click", function(event) { @@ -202,7 +203,7 @@ function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn"); if(dialogBeforeActionFn == null) { var apiCommand = "command="+$actionLink.data("api")+"&id="+id; - doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsTab); + doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap); } else { dialogBeforeActionFn($actionLink, listAPIMap, $detailsTab); @@ -211,7 +212,7 @@ function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap, }); } -function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsTab) { +function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap) { var label = $actionLink.data("label"); var inProcessText = $actionLink.data("inProcessText"); var isAsyncJob = $actionLink.data("isAsyncJob"); @@ -220,7 +221,8 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT var listAPI = listAPIMap["listAPI"]; var listAPIResponse = listAPIMap["listAPIResponse"]; var listAPIResponseObj = listAPIMap["listAPIResponseObj"]; - + + var $detailsTab = $("#right_panel_content #tab_content_details"); var $spinningWheel = $detailsTab.find("#spinning_wheel"); $spinningWheel.find("#description").text(inProcessText); $spinningWheel.show(); @@ -249,7 +251,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT $spinningWheel.hide(); if (result.jobstatus == 1) { // Succeeded $detailsTab.find("#action_message_box #description").text(label + " action succeeded."); - $detailsTab.find("#action_message_box").show(); + $detailsTab.find("#action_message_box").removeClass("error").show(); //DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041) //Before Bug 6041 get fixed, use the temporary solution below. @@ -266,7 +268,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT } else if (result.jobstatus == 2) { // Failed $detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(result.jobresult)); - $detailsTab.find("#action_message_box").show(); + $detailsTab.find("#action_message_box").addClass("error").show(); } } }, @@ -304,7 +306,7 @@ function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap, $detailsT async: false, success: function(json) { $detailsTab.find("#action_message_box #description").text(label + " action succeeded."); - $detailsTab.find("#action_message_box").show(); + $detailsTab.find("#action_message_box").removeClass("error").show(); afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]); } @@ -333,7 +335,7 @@ function handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label) { $detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg))); else $detailsTab.find("#action_message_box #description").text(label + " action failed."); - $detailsTab.find("#action_message_box").show(); + $detailsTab.find("#action_message_box").addClass("error").show(); } //***** actions for details tab in right panel (end) ************************************************************************** diff --git a/ui/new/scripts/cloud.core2.volume.js b/ui/new/scripts/cloud.core2.volume.js index 26708f202f9..23dc9f90477 100644 --- a/ui/new/scripts/cloud.core2.volume.js +++ b/ui/new/scripts/cloud.core2.volume.js @@ -83,10 +83,10 @@ function volumeJsonToDetailsTab(jsonObj){ $actionMenu.find("#action_list").empty(); if(jsonObj.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed. if (jsonObj.vmstate == "Stopped") - buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $detailsTab); + buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap); } else { //jsonObj.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed. - buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $detailsTab); + buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap); } } @@ -138,7 +138,7 @@ function doCreateTemplate($actionLink, listAPIMap, $singleObject) { var id = $singleObject.data("jsonObj").id; var apiCommand = "command=createTemplate&volumeId="+id+"&name="+encodeURIComponent(name)+"&displayText="+encodeURIComponent(desc)+"&osTypeId="+osType+"&isPublic="+isPublic+"&passwordEnabled="+password; - doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject); + doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap); }, "Cancel": function() { $(this).dialog("close"); From cd066f03a061de24fb24c1eb312e0fe8b88920a0 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 16:54:05 -0700 Subject: [PATCH 39/42] Title icons for ISO, Snapshots and volume --- ui/new/images/title_alerticon.gif | Bin 0 -> 1567 bytes ui/new/images/title_isoicon.gif | Bin 0 -> 1671 bytes ui/new/images/title_snapshoticon.gif | Bin 0 -> 1430 bytes ...ttitle_icons.gif => title_volumeicons.gif} | Bin ui/new/jsp/iso.jsp | 252 +++++----- ui/new/jsp/snapshot.jsp | 206 ++++---- ui/new/jsp/volume.jsp | 460 +++++++++--------- 7 files changed, 459 insertions(+), 459 deletions(-) create mode 100644 ui/new/images/title_alerticon.gif create mode 100644 ui/new/images/title_isoicon.gif create mode 100644 ui/new/images/title_snapshoticon.gif rename ui/new/images/{hosttitle_icons.gif => title_volumeicons.gif} (100%) diff --git a/ui/new/images/title_alerticon.gif b/ui/new/images/title_alerticon.gif new file mode 100644 index 0000000000000000000000000000000000000000..6b1f7368d65f33a976f75dbd5a0a088af815c1a9 GIT binary patch literal 1567 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 literal 0 HcmV?d00001 diff --git a/ui/new/images/hosttitle_icons.gif b/ui/new/images/title_volumeicons.gif similarity index 100% rename from ui/new/images/hosttitle_icons.gif rename to ui/new/images/title_volumeicons.gif diff --git a/ui/new/jsp/iso.jsp b/ui/new/jsp/iso.jsp index 01056df63a2..57f68875187 100644 --- a/ui/new/jsp/iso.jsp +++ b/ui/new/jsp/iso.jsp @@ -1,127 +1,127 @@ - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
- -

ISO -

-
-
- -
-
- <%=t.t("Details")%>
-
-
-
-
-
- <%=t.t("ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Zone")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Display.Text")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Status")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Bootable")%>:
-
-
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Size")%>:
-
-
-
-
-
-
- -
-
+ + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +
+ ISO
+ +

ISO +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Display.Text")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Status")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Bootable")%>:
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+ +
+
\ No newline at end of file diff --git a/ui/new/jsp/snapshot.jsp b/ui/new/jsp/snapshot.jsp index b781f9354ad..107cdf24fde 100644 --- a/ui/new/jsp/snapshot.jsp +++ b/ui/new/jsp/snapshot.jsp @@ -1,104 +1,104 @@ - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
- -

Snapshot -

-
-
- -
-
- <%=t.t("Details")%>
-
-
-
-
-
- <%=t.t("ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Volume")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Interval.Type")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Domain")%>:
-
-
-
-
-
-
-
-
+ + +<%@ page import="java.util.*" %> +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + + +
+ +
+ Instance
+ +

Snapshot +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Volume")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Interval.Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Domain")%>:
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/ui/new/jsp/volume.jsp b/ui/new/jsp/volume.jsp index eddace55988..224204c97e9 100644 --- a/ui/new/jsp/volume.jsp +++ b/ui/new/jsp/volume.jsp @@ -1,230 +1,230 @@ - - -<%@ page import="java.util.*" %> - -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - -
- -

- Volume -

-
-
- -
-
- <%=t.t("Details")%>
-
- -
-
- -
-
-
-
-
-

- Detaching Disk …

-
- - -
-
-
-
-
- <%=t.t("ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Type")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Zone")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Instance.Name")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Device.ID")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Size")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("State")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Storage")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
-
- - - + + +<%@ page import="java.util.*" %> + +<%@ page import="com.cloud.utils.*" %> + +<% + + Locale browserLocale = request.getLocale(); + CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); +%> + +
+ +
+ Instance
+ +

+ Volume +

+
+
+ +
+
+ <%=t.t("Details")%>
+
+ +
+
+ +
+
+
+
+
+

+ Detaching Disk …

+
+ + +
+
+
+
+
+ <%=t.t("ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Type")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Zone")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Instance.Name")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Device.ID")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Size")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("State")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Storage")%>:
+
+
+
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+
+
+
+ + + From d575d083b83bc292e7106708c6036f8b49287212 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Tue, 14 Sep 2010 17:10:35 -0700 Subject: [PATCH 40/42] git ignore changes --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d7723b24bc6..01478d2c9b5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ cloud-*.tar.bz2 *.log *.pyc build.number +cloud.log.*.* From c3144e0d7635c6838c242d1d30a64f152213c2d2 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 14 Sep 2010 17:40:36 -0700 Subject: [PATCH 41/42] new UI - add action message box to actions for subgrid items. --- ui/new/jsp/instance.jsp | 1791 ++++++++++++------------ ui/new/scripts/cloud.core2.instance.js | 38 +- ui/new/scripts/cloud.core2.js | 24 +- ui/new/scripts/cloud.core2.volume.js | 8 +- 4 files changed, 963 insertions(+), 898 deletions(-) diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index 0bc5da7f7df..d464b3860a6 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -1,883 +1,908 @@ - - -<%@ page import="java.util.*" %> -<%@ page import="com.cloud.utils.*" %> - -<% - - Locale browserLocale = request.getLocale(); - CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale); -%> - - -
-
- Instance
-

Instance -

-
-
- -
-
- <%=t.t("Details")%>
-
- <%=t.t("Volume")%>
-
- <%=t.t("Statistics")%>
-
- - -
-
-
-
-
-
-
-
-
-

-

-
-
-
-
-
-
- <%=t.t("Zone")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Template")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Service")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("HA")%>:
-
-
-
-
-
-
-
-
-
-
-
- <%=t.t("Created")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Account")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Domain")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("Host")%>:
-
-
-
-
-
-
-
-
-
- <%=t.t("ISO")%>:
-
-
-
-
-
-
-
-
-
-
-
- <%=t.t("Group")%>:
-
-
-
-
-
-
-
- - - - - - - - - -
- - - - - - - - - -