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 00000000000..9f7a2802954 Binary files /dev/null and b/ui/new/images/addingfailed_closeicon.png differ diff --git a/ui/new/images/addingfailed_closeicon_hover.png b/ui/new/images/addingfailed_closeicon_hover.png new file mode 100644 index 00000000000..98d30ce28de Binary files /dev/null and b/ui/new/images/addingfailed_closeicon_hover.png differ diff --git a/ui/new/images/addingfailed_icon.png b/ui/new/images/addingfailed_icon.png new file mode 100644 index 00000000000..3a4105b9ba3 Binary files /dev/null and b/ui/new/images/addingfailed_icon.png differ 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(); + 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 @@
- + +
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);