From 8759c3f1f5236932b2f7ee0fdd31e22e24e36f8e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 27 Oct 2010 17:47:21 -0700 Subject: [PATCH 1/3] new UI - add primary storage - after action, show primary storage in middle menu with a title "Primary Storage" on it. --- ui/new/scripts/cloud.core2.resource.js | 43 ++++++++++++++++---------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/ui/new/scripts/cloud.core2.resource.js b/ui/new/scripts/cloud.core2.resource.js index 9ab215f7db5..fc19baa3e57 100644 --- a/ui/new/scripts/cloud.core2.resource.js +++ b/ui/new/scripts/cloud.core2.resource.js @@ -1338,16 +1338,16 @@ function initAddHostButton($midmenuAddLink1) { var password = trim($thisDialog.find("#host_password").val()); array1.push("&password="+encodeURIComponent(password)); - var newClusterName; + var newClusterName, existingClusterId; if(clusterRadio == "new_cluster_radio") { newClusterName = trim($thisDialog.find("#new_cluster_name").val()); array1.push("&clustername="+todb(newClusterName)); } else if(clusterRadio == "existing_cluster_radio") { - var clusterId = $thisDialog.find("#cluster_select").val(); + existingClusterId = $thisDialog.find("#cluster_select").val(); // We will default to no cluster if someone selects Join Cluster with no cluster available. - if (clusterId != '-1') { - array1.push("&clusterid="+clusterId); + if (existingClusterId != '-1') { + array1.push("&clusterid="+existingClusterId); } } @@ -1369,6 +1369,8 @@ function initAddHostButton($midmenuAddLink1) { $thisDialog.dialog("close"); showMiddleMenu(); + + /* var $midmenuItem1 = $("#midmenu_item").clone(); $("#midmenu_container").append($midmenuItem1.fadeIn("slow")); var items = json.addhostresponse.host; @@ -1382,18 +1384,13 @@ function initAddHostButton($midmenuAddLink1) { bindClickToMidMenu($midmenuItem2, hostToRightPanel, hostGetMidmenuId); $("#midmenu_container").append($midmenuItem2.fadeIn("slow")); } - } + } + */ - if(clusterRadio == "new_cluster_radio") { - refreshClusterUnderPod($("#pod_" + podObj.id), newClusterName); - $thisDialog.find("#new_cluster_name").val(""); - } + clickClusterNodeAfterAddHost(clusterRadio, podObj.id, newClusterName, existingClusterId, $thisDialog); }, error: function(XMLHttpResponse) { - if(clusterRadio == "new_cluster_radio") { - refreshClusterUnderPod($("#pod_" + podObj.id), newClusterName); - $thisDialog.find("#new_cluster_name").val(""); //even AddHost fails, new cluster is still created. So, we clean up new cluster field to avoid the same one gets created twice. - } + clickClusterNodeAfterAddHost(clusterRadio, podObj.id, newClusterName, existingClusterId, $thisDialog); handleErrorInDialog(XMLHttpResponse, $thisDialog); } }); @@ -1406,6 +1403,18 @@ function initAddHostButton($midmenuAddLink1) { }); } +function clickClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, existingClusterId, $thisDialog) { + if(clusterRadio == "new_cluster_radio") { //*** new cluster *** + refreshClusterUnderPod($("#pod_" + podId), newClusterName); //this function will click the new cluster node + $thisDialog.find("#new_cluster_name").val(""); + } + else if(clusterRadio == "existing_cluster_radio") { //*** existing cluster *** + if (existingClusterId != null && existingClusterId != '-1') { + $("#cluster_"+existingClusterId).find("#cluster_name").click(); + } + } +} + function refreshClusterUnderPod($podNode, newClusterName) { var podId = $podNode.data("podId"); $.ajax({ @@ -1516,13 +1525,15 @@ function initAddPrimaryStorageButton($midmenuAddLink2) { dataType: "json", success: function(json) { $thisDialog.find("#spinning_wheel").hide(); - $thisDialog.dialog("close"); - + $thisDialog.dialog("close"); + $("#cluster_"+clusterId).find("#cluster_name").click(); + /* var $midmenuItem1 = $("#midmenu_item").clone(); $("#midmenu_container").append($midmenuItem1.fadeIn("slow")); var item = json.createstoragepoolresponse; primarystorageToMidmenu(item, $midmenuItem1); - bindClickToMidMenu($midmenuItem1, primarystorageToRightPanel, primarystorageGetMidmenuId); + bindClickToMidMenu($midmenuItem1, primarystorageToRightPanel, primarystorageGetMidmenuId); + */ }, error: function(XMLHttpResponse) { handleErrorInDialog(XMLHttpResponse, $thisDialog); From 167086f066ce44214792c312ebadee06a254d2bd Mon Sep 17 00:00:00 2001 From: NIKITA Date: Wed, 27 Oct 2010 17:55:26 -0700 Subject: [PATCH 2/3] Adding failed div for Instance and in Add VM popup Hypervisor filter has been removed and added to template list --- ui/new/css/main.css | 70 ++++++++++++++---- ui/new/images/addingfailed_closeicon.png | Bin 0 -> 402 bytes .../images/addingfailed_closeicon_hover.png | Bin 0 -> 411 bytes ui/new/images/addingfailed_icon.png | Bin 0 -> 450 bytes ui/new/index.jsp | 2 + 5 files changed, 57 insertions(+), 15 deletions(-) create mode 100644 ui/new/images/addingfailed_closeicon.png create mode 100644 ui/new/images/addingfailed_closeicon_hover.png create mode 100644 ui/new/images/addingfailed_icon.png diff --git a/ui/new/css/main.css b/ui/new/css/main.css index ba5c4d2f9c8..aaf2cbbddc2 100644 --- a/ui/new/css/main.css +++ b/ui/new/css/main.css @@ -865,7 +865,7 @@ a:hover { float:left; border-bottom:1px solid #999; margin:0; - padding:0; + padding:0 0 3px 0; background:#FFF repeat top left; cursor:pointer; cursor:hand; @@ -881,7 +881,7 @@ a:hover { float:left; border-bottom:1px solid #999; margin:0; - padding:0; + padding:0 0 3px 0; background:#8fe0f4 repeat top left; cursor:pointer; cursor:hand; @@ -917,28 +917,48 @@ a:hover { } .rev_wiztemp_listtext { - width:380px; - height:auto; - float:left; - color:#021a28; - font-size:11px; - font-weight:normal; - text-align:left; - margin:5px 0 5px 0; - padding:0; -} - -.rev_wiztemp_ownertext { - width:80px; + width:350px; height:auto; float:left; color:#021a28; font-size:11px; font-weight:bold; text-align:left; + margin:5px 0 0 0; + padding:0; +} + +.rev_wiztemp_listtext.hypervisortext { + width:350px; + height:auto; + float:left; + color:#525252; + font-size:10px; + font-weight:normal; + text-align:left; + margin:2px 0 0 0; + padding:0; +} + +.rev_wiztemp_ownertext { + width:110px; + height:auto; + float:left; + color:#666; + font-size:10px; + font-weight:normal; + text-align:left; margin:5px 0 5px 0; padding:0; } +.rev_wiztemp_ownertext span { + color:#666; + font-size:10px; + font-weight:bold; + text-align:left; + margin:0; + padding:0; +} .rev_wizmid_selectedtempbut { width:167px; @@ -2210,6 +2230,11 @@ a:hover.search_button { background:#fffacd url(../images/mid_addingbg.gif) repeat-x top left; color:#333; } + +.midmenu_content.addingfailed{ + background:#ffe5e5url(../images/errormsg_bg.gif) repeat-x top left; + color:#a90000; +} /* .midmenu_content:hover{ background:#626262 url(../images/leftmenu_hover.gif) repeat-x top left; @@ -2762,6 +2787,21 @@ a:hover.search_button { display:inline; padding:0; } +.midmenu_addingfailed_closeicon { + width:12px; + height:12px; + float:left; + background:url(../images/addingfailed_closeicon.png) no-repeat top left; + margin:8px 0 0 0; + display:inline; + padding:0; + cursor:pointer; + cursor:hand; +} + +.midmenu_addingfailed_closeicon:hover { + background:url(../images/addingfailed_closeicon_hover.png) no-repeat top left; +} .midmenu_defaultloader { width:16px; diff --git a/ui/new/images/addingfailed_closeicon.png b/ui/new/images/addingfailed_closeicon.png new file mode 100644 index 0000000000000000000000000000000000000000..9f7a2802954919c9c3cb50652b82a307dff297bd GIT binary patch literal 402 zcmV;D0d4+?P)K$5oGcCk`kDNG1%>@+1U(dva%R-8yjH~Z6M1nfsA9w zegNVCfB=KJ3M5&M=41vm#hpNWoC)d$kV*dB3JMG$3nfDSy&`Z#^Ziuf8>Ik w^cduOAO>j+24Z(m_`ysB;+;Ue7OIW`0I*zMuYCX}@&Et;07*qoM6N<$g6`LuC;$Ke literal 0 HcmV?d00001 diff --git a/ui/new/images/addingfailed_closeicon_hover.png b/ui/new/images/addingfailed_closeicon_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..98d30ce28de59d5b8bad9b869dd044a69be4b49d GIT binary patch literal 411 zcmV;M0c8G(P)cXx)MSO?VQwt6*8q77uZC6I9p z*$+S*01#j>SAitU(VWbHrnnP`k28meih{fVGFwAPTbqGXOpM|C>(^jaAjdKS>0h5d zX#lBYApXb%^)DE_13DNKVnI;H3juBa^5hA!O;zxq1pzibKCt&ez6B|iu(U*X+F4j6 zO~&JXWPjv>!tXK2_dpEN7!1UqKs1J#2*f*qcr8>N0|3->VoR>${TToN002ovPDHLk FV1mOHoAm$y literal 0 HcmV?d00001 diff --git a/ui/new/images/addingfailed_icon.png b/ui/new/images/addingfailed_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a4105b9ba3d56fc431926a2d5ec4ef0a08e26f5 GIT binary patch literal 450 zcmV;z0X_bSP)+UxF3uK6&y2M6-Z& zG4Sw!*o^=I#0b(8r>@R$33|Py7XV20<{`xiX+lmzoCttq&4-y0E zFay%l7|;Mf0D)};0hp~I_M)3NAx42+AT09Y>brNoFg{q~!kagF3>Pmj$b^M$LXr6S z_wR(Cj~+4HSh|$q(6eV#!FH_V=Jp4=Zv(Q$-~aq!Wcl&uPc4vr7R^yP009Q~ATj_N z{rA`3zrT6e*f@~IQCtfHAAt)0{r}Iz!o;pfla=<+BUfZlue^2ZMr&P$gVK==(i zJIl5A@4q0cVSzDrJbH8!=ovwVFJBmh4jf?keEBlNU7(MFfcw$s&+mTy`zHZp{{s5~ s2u=a9DNJ+Rj~@^>bD((PJrJt`08agqR{j3I9smFU07*qoM6N<$f=G?bIRF3v literal 0 HcmV?d00001 diff --git a/ui/new/index.jsp b/ui/new/index.jsp index 375450a3070..daa35e9d8f2 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -747,6 +747,8 @@ long milliseconds = new Date().getTime(); + From 55b54f49bab67e213db9db668aac81a69a4f6f49 Mon Sep 17 00:00:00 2001 From: NIKITA Date: Wed, 27 Oct 2010 17:59:51 -0700 Subject: [PATCH 3/3] Change in Add vm tab --- ui/new/jsp/instance.jsp | 52 ++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/ui/new/jsp/instance.jsp b/ui/new/jsp/instance.jsp index d3c390ea4f0..2cb19a9c940 100644 --- a/ui/new/jsp/instance.jsp +++ b/ui/new/jsp/instance.jsp @@ -40,24 +40,23 @@

Loading …

-
-
-
-
-

- Waiting …

-
-
+
Title
@@ -255,13 +254,7 @@ - - +
@@ -304,24 +297,19 @@
- + +