mirror of https://github.com/apache/cloudstack.git
Add VMFS (iscsi) storage support in UI for vmware
This commit is contained in:
parent
4875cbfabd
commit
7f199c5b71
|
|
@ -181,6 +181,7 @@
|
|||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -897,6 +897,7 @@
|
|||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@
|
|||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -657,6 +657,7 @@
|
|||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -598,6 +598,7 @@
|
|||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ function initAddPrimaryStorageButton($button, currentPageInRightPanel, $leftmenu
|
|||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text
|
||||
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
|
||||
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
|
||||
if (protocol == "nfs") {
|
||||
if (protocol == "nfs" || protocol == "vmfs") {
|
||||
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
|
||||
} else {
|
||||
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
|
||||
|
|
@ -514,6 +514,11 @@ function initAddPrimaryStorageButton($button, currentPageInRightPanel, $leftmenu
|
|||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = nfsURL(server, path);
|
||||
} else if (protocol == "vmfs") {
|
||||
var path = trim($thisDialog.find("#add_pool_path").val());
|
||||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = vmfsURL(server, path);
|
||||
} else {
|
||||
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
|
||||
if(iqn.substring(0,1)!="/")
|
||||
|
|
@ -658,7 +663,16 @@ function nfsURL(server, path) {
|
|||
else
|
||||
url = server + path;
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
function vmfsURL(server, path) {
|
||||
var url;
|
||||
if(server.indexOf("://")==-1)
|
||||
url = "vmfs://" + server + path;
|
||||
else
|
||||
url = server + path;
|
||||
return url;
|
||||
}
|
||||
|
||||
function iscsiURL(server, iqn, lun) {
|
||||
var url;
|
||||
|
|
@ -678,7 +692,11 @@ function bindEventHandlerToDialogAddPool($dialogAddPool) {
|
|||
else if ($(this).val() == "nfs") {
|
||||
$dialogAddPool.find("#add_pool_path_container").show();
|
||||
$dialogAddPool.find("#add_pool_iqn_container,#add_pool_lun_container").hide();
|
||||
}
|
||||
}
|
||||
else if ($(this).val() == "vmfs") {
|
||||
$dialogAddPool.find("#add_pool_path_container").show();
|
||||
$dialogAddPool.find("#add_pool_iqn_container,#add_pool_lun_container").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1096,7 +1096,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
|
||||
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
|
||||
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
|
||||
if (protocol == "nfs") {
|
||||
if (protocol == "nfs" || protocol == "vmfs") {
|
||||
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
|
||||
} else {
|
||||
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
|
||||
|
|
@ -1135,6 +1135,11 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = nfsURL(server, path);
|
||||
} else if(protocol == "vmfs") {
|
||||
var path = trim($thisDialog.find("#add_pool_path").val());
|
||||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = vmfsURL(server, path);
|
||||
} else {
|
||||
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
|
||||
if(iqn.substring(0,1)!="/")
|
||||
|
|
|
|||
|
|
@ -1189,7 +1189,7 @@ function initAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
|
||||
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
|
||||
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
|
||||
if (protocol == "nfs") {
|
||||
if (protocol == "nfs" || protocol == "vmfs") {
|
||||
isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg"));
|
||||
} else {
|
||||
isValid &= validateString("Target IQN", $thisDialog.find("#add_pool_iqn"), $thisDialog.find("#add_pool_iqn_errormsg"));
|
||||
|
|
@ -1227,6 +1227,11 @@ function initAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = nfsURL(server, path);
|
||||
} else if (protocol == "vmfs") {
|
||||
var path = trim($thisDialog.find("#add_pool_path").val());
|
||||
if(path.substring(0,1)!="/")
|
||||
path = "/" + path;
|
||||
url = vmfsURL(server, path);
|
||||
} else {
|
||||
var iqn = trim($thisDialog.find("#add_pool_iqn").val());
|
||||
if(iqn.substring(0,1)!="/")
|
||||
|
|
|
|||
Loading…
Reference in New Issue