+
-
diff --git a/ui/scripts/cloud.core.configuration.js b/ui/scripts/cloud.core.configuration.js
index 84a58ca625b..2f927ae74eb 100644
--- a/ui/scripts/cloud.core.configuration.js
+++ b/ui/scripts/cloud.core.configuration.js
@@ -616,7 +616,7 @@ function showConfigurationTab() {
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container, #add_publicip_vlan_domain_container, #add_publicip_vlan_account_container").hide();
dialogAddVlanForZone.find("#add_publicip_vlan_tagged, #add_publicip_vlan_vlan, #add_publicip_vlan_gateway, #add_publicip_vlan_netmask, #add_publicip_vlan_startip, #add_publicip_vlan_endip, #add_publicip_vlan_account").val("");
dialogAddVlanForZone.find("#add_publicip_vlan_zone_name").text($(this).data("name"));
-
+
if (getNetworkType() == 'vnet') {
$("#add_publicip_vlan_type_container").hide();
} else {
@@ -1001,9 +1001,6 @@ function showConfigurationTab() {
dialogAddVlanForZone.find("#add_publicip_vlan_type").change(function(event) {
var addPublicipVlanTagged = dialogAddVlanForZone.find("#add_publicip_vlan_tagged").empty();
- // default value of "#add_publicip_vlan_scope" is "zone-wide". Calling change() will hide "#add_publicip_vlan_domain_container", "#add_publicip_vlan_account_container".
- dialogAddVlanForZone.find("#add_publicip_vlan_scope").change();
-
if ($(this).val() == "false") { //direct VLAN (only tagged option)
addPublicipVlanTagged.append('
');
@@ -1020,6 +1017,7 @@ function showConfigurationTab() {
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container").hide();
dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").hide();
}
+ addPublicipVlanTagged.change();
}
return false;
});
@@ -1031,12 +1029,15 @@ function showConfigurationTab() {
if (dialogAddVlanForZone.find("#add_publicip_vlan_type").val() == "false") { //direct VLAN (only tagged option)
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container").show();
- dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").hide();
+ dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").hide();
+ dialogAddVlanForZone.find("#vlan_scope_account").show();
} else { //public VLAN
if ($(this).val() == "tagged") {
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container").show();
dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").hide();
+ dialogAddVlanForZone.find("#vlan_scope_account").show();
} else {
+ dialogAddVlanForZone.find("#vlan_scope_account").hide();
dialogAddVlanForZone.find("#add_publicip_vlan_vlan_container").hide();
dialogAddVlanForZone.find("#add_publicip_vlan_pod_container").hide();
}
diff --git a/ui/scripts/cloud.core.domains.js b/ui/scripts/cloud.core.domains.js
index 1a1f875daee..d57b74fdcb3 100644
--- a/ui/scripts/cloud.core.domains.js
+++ b/ui/scripts/cloud.core.domains.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
function showDomainsTab() {
var defaultRootDomainId = g_domainid;
var defaultRootLevel = 0;
diff --git a/ui/scripts/cloud.core.events.js b/ui/scripts/cloud.core.events.js
index 82229ac0c8a..a6180e20d05 100644
--- a/ui/scripts/cloud.core.events.js
+++ b/ui/scripts/cloud.core.events.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
function showEventsTab(showEvents) {
var currentSubMenu = $("#submenu_events");
diff --git a/ui/scripts/cloud.core.hosts.js b/ui/scripts/cloud.core.hosts.js
index 10adc943c3c..7db3d74c0c0 100644
--- a/ui/scripts/cloud.core.hosts.js
+++ b/ui/scripts/cloud.core.hosts.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
function showHostsTab() {
var rIndex = 0;
var sIndex = 0;
diff --git a/ui/scripts/cloud.core.instances.js b/ui/scripts/cloud.core.instances.js
index 42da5c3c9cf..e4502e5c986 100644
--- a/ui/scripts/cloud.core.instances.js
+++ b/ui/scripts/cloud.core.instances.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
var rowZIndexGlobal = 300;
var rowZIndex = 299;
var currentVMAction = null;
@@ -199,8 +197,8 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_loading_container").hide();
if (result.jobstatus == 1) {
// Succeeded
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully started.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully started.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmred_arrow").addClass("admin_vmgreen_arrow");
vmInstance.find("#vm_state").text(result.virtualmachine[0].state).removeClass("grid_celltitles grid_stoppedtitles").addClass("grid_runningtitles");
@@ -230,8 +228,8 @@ function showInstancesTab(p_domainId, p_account) {
// Failed
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
vmInstance.find("#vm_state").text("Stopped").removeClass("grid_celltitles grid_runningtitles").addClass("grid_stoppedtitles");
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to start your instance due to the error: " + result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to start your instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -289,8 +287,8 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_loading_container").hide();
if (result.jobstatus == 1) {
// Succeeded
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully stopped.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully stopped.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
vmInstance.find("#vm_state").text(result.virtualmachine[0].state).removeClass("grid_celltitles grid_runningtitles").addClass("grid_stoppedtitles");
@@ -310,8 +308,8 @@ function showInstancesTab(p_domainId, p_account) {
// Failed
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmred_arrow").addClass("admin_vmgreen_arrow");
vmInstance.find("#vm_state").text("Running").removeClass("grid_celltitles grid_stoppedtitles").addClass("grid_runningtitles");
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to stop your instance due to the error: " + result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to stop your instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -367,16 +365,16 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_loading_container").hide();
if (result.jobstatus == 1) {
// Succeeded
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully rebooted.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully rebooted.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmred_arrow").addClass("admin_vmgreen_arrow");
vmInstance.find("#vm_state").text("Running").removeClass("grid_stoppedtitles grid_celltitles").addClass("grid_runningtitles");
} else if (result.jobstatus == 2) {
// Failed
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmred_arrow").addClass("admin_vmgreen_arrow");
vmInstance.find("#vm_state").text("Running").removeClass("grid_celltitles grid_stoppedtitles").addClass("grid_runningtitles");
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to reboot your instance due to the error: " + result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to reboot your instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -434,8 +432,8 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_loading_container").hide();
if (result.jobstatus == 1) {
// Succeeded
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully destroyed.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully destroyed.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
if (isAdmin()) {
vmInstance.find("#vm_state_bar").removeClass("admin_vmred_arrow admin_vmgreen_arrow").addClass("admin_vmgrey_arrow");
@@ -445,11 +443,11 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_host").html("
Host:");
- vmInstance.find("#vm_action_restore").show();
- vmInstance.find("#vm_action_volumes, #vm_actions").hide();
+ vmInstance.find("#vm_action_restore").show();
+ vmInstance.find("#vm_action_volumes, #vm_actions, #vm_action_statistics").hide();
} else {
vmInstance.find(".continue_button").unbind("click").bind("click", function(event) {
- $(this).parents(".loadingmessage_container").hide().prevAll(".row_loading").hide();
+ $(this).parents(".loadingmessage_container_vm").hide().prevAll(".row_loading").hide();
vmInstance.fadeOut("slow", function(event) {
$(this).remove();
});
@@ -464,8 +462,8 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
vmInstance.find("#vm_state").text(vmState).removeClass("grid_runningtitles grid_celltitles").addClass("grid_stoppedtitles");
}
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to destroy your instance due to the error: " + result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to destroy your instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -530,12 +528,12 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.find("#vm_loading_container").hide();
if (result.jobstatus == 1) {
// Succeeded
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your password has been successfully resetted. Your new password is :
" + result.virtualmachine[0].password + " . Please reboot your virtual instance for the new password to take effect.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your password has been successfully resetted. Your new password is :
" + result.virtualmachine[0].password + " . Please reboot your virtual instance for the new password to take effect.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
} else if (result.jobstatus == 2) {
// Failed
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to reset your password. Please try again or contact support.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to reset your password. Please try again or contact support.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -611,8 +609,8 @@ function showInstancesTab(p_domainId, p_account) {
if (result.jobstatus == 1) { // Succeeded
vmInstance.find("#vm_loading_container").hide();
vmInstance.find(".row_loading").show();
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your virtual instance has been upgraded. Please restart your virtual instance for the new service offering to take effect.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your virtual instance has been upgraded. Please restart your virtual instance for the new service offering to take effect.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.find("#vm_service").html("
Service: " + fromdb(result.virtualmachine[0].serviceofferingname));
if (result.virtualmachine[0].haenable =='true') {
vmInstance.find("#vm_ha").html("
HA: Enabled");
@@ -746,13 +744,9 @@ function showInstancesTab(p_domainId, p_account) {
data: "command=updateVirtualMachine&id="+vmId+"&displayName="+encodeURIComponent(name)+"&response=json",
dataType: "json",
success: function(json) {
- if (isAdmin()) {
- var systemName = vmInstance.data("systemName");
- name = systemName + "(" + name + ")";
- vmInstance.find("#vm_name").text(name);
- } else {
- vmInstance.find("#vm_name").text(name);
- }
+ var systemName = vmInstance.data("systemName");
+ name = systemName + "(" + name + ")";
+ vmInstance.find("#vm_name").html("
Name: " + name);
vmInstance.data("name", name);
},
error: function(XMLHttpResponse) {
@@ -811,8 +805,8 @@ function showInstancesTab(p_domainId, p_account) {
success: function(json) {
vmInstance.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
vmInstance.find("#vm_state").text("Stopped").removeClass("grid_celltitles grid_runningtitles").addClass("grid_stoppedtitles");
- vmInstance.find("#vm_action_restore").hide();
- vmInstance.find("#vm_action_volumes, #vm_actions").show();
+ vmInstance.find("#vm_action_restore").hide();
+ vmInstance.find("#vm_action_volumes, #vm_actions, #vm_action_statistics").show();
vmInstance.find("#vm_action_start, #vm_action_reset_password, #vm_action_change_service").removeClass().addClass("vmaction_links_on");
if (vmInstance.data("isoId") != null) {
vmInstance.find("#vm_action_detach_iso").removeClass().addClass("vmaction_links_on");
@@ -885,12 +879,12 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.data("isoId", isoId);
vmInstance.find("#vm_action_detach_iso").removeClass().addClass("vmaction_links_on");
vmInstance.find("#vm_action_attach_iso").removeClass().addClass("vmaction_links_off");
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your ISO has been successfully attached.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your ISO has been successfully attached.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
} else if (result.jobstatus == 2) {
// Failed
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("We were unable to attach the ISO to your VM. Please contact support or try again.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("We were unable to attach the ISO to your VM. Please contact support or try again.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -948,12 +942,12 @@ function showInstancesTab(p_domainId, p_account) {
vmInstance.data("isoId", null);
vmInstance.find("#vm_action_detach_iso").removeClass().addClass("vmaction_links_off");
vmInstance.find("#vm_action_attach_iso").removeClass().addClass("vmaction_links_on");
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("You have successfully detached your ISO.");
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("You have successfully detached your ISO.");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
} else if (result.jobstatus == 2) {
// Failed
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text(result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text(result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
}
}
}
@@ -1072,7 +1066,7 @@ function showInstancesTab(p_domainId, p_account) {
break;
case "vm_action_continue" :
hideInstanceLoading(vmInstance);
- vmInstance.find(".loadingmessage_container").fadeOut("slow");
+ vmInstance.find(".loadingmessage_container_vm").fadeOut("slow");
vmInstance.find(".row_loading").fadeOut("slow");
break;
default:
@@ -1087,12 +1081,14 @@ function showInstancesTab(p_domainId, p_account) {
// FUNCTION: Parses the JSON object for VM Instances and applies it to the vm template
function vmJSONToTemplate(instanceJSON, instanceTemplate, isNew) {
instanceTemplate.attr("id","vm"+instanceJSON.id);
+
+ // This code fixes IE 7 issues with z-index.
if (isNew != undefined && isNew) {
instanceTemplate.find("#vm_rows").attr("style", "z-index: "+(rowZIndexGlobal++));
} else {
instanceTemplate.find("#vm_rows").attr("style", "z-index: "+(rowZIndex--));
- }
-
+ }
+
// Setup
var vmName = getVmName(instanceJSON.name, instanceJSON.displayname);
@@ -1148,7 +1144,7 @@ function showInstancesTab(p_domainId, p_account) {
instanceTemplate.find("#vm_state_bar").removeClass("admin_vmred_arrow admin_vmgreen_arrow").addClass("admin_vmgrey_arrow");
instanceTemplate.find("#vm_state").text(instanceJSON.state).removeClass("grid_stoppedtitles grid_runningtitles").addClass("grid_celltitles");
instanceTemplate.find("#vm_action_restore").show();
- instanceTemplate.find("#vm_action_volumes, #vm_actions").hide();
+ instanceTemplate.find("#vm_action_volumes, #vm_actions, #vm_action_statistics").hide();
instanceTemplate.find("#vm_action_view_console").unbind("mouseover");
} else if (instanceJSON.state == 'Running') {
instanceTemplate.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmred_arrow").addClass("admin_vmgreen_arrow");
@@ -1168,7 +1164,13 @@ function showInstancesTab(p_domainId, p_account) {
instanceTemplate.find("#vm_action_attach_iso").removeClass().addClass("vmaction_links_off");
} else {
instanceTemplate.find("#vm_action_detach_iso").removeClass().addClass("vmaction_links_off");
- }
+ }
+ } else if (instanceJSON.state == 'Error') {
+ // If vm state is error, just make sure all links are no longer visible.
+ instanceTemplate.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
+ instanceTemplate.find("#vm_state").text(instanceJSON.state).removeClass("grid_celltitles grid_runningtitles").addClass("grid_stoppedtitles");
+ instanceTemplate.find("#vm_action_volumes, #vm_actions, #vm_action_statistics").hide();
+ return;
} else {
if (instanceJSON.state == 'Stopped') {
instanceTemplate.find("#vm_state_bar").removeClass("admin_vmgrey_arrow admin_vmgreen_arrow").addClass("admin_vmred_arrow");
@@ -1703,19 +1705,19 @@ function showInstancesTab(p_domainId, p_account) {
// Succeeded
vmJSONToTemplate(result.virtualmachine[0], vmInstance, true);
if (result.virtualmachine[0].passwordenabled == 'true') {
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully created. Your new password is :
" + result.virtualmachine[0].password + " . Please change it as soon as you log into your new instance");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully created. Your new password is :
" + result.virtualmachine[0].password + " . Please change it as soon as you log into your new instance");
} else {
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully created.");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").html("Your instance has been successfully created.");
}
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.attr("id", "vm" + result.virtualmachine[0].id);
vmInstance.find("#vm_state_bar").removeClass("admin_vmred_arrow admin_vmgrey_arrow").addClass("admin_vmgreen_arrow");
vmInstance.find("#vm_state").text("Running").removeClass("grid_stoppedtitles grid_celltitles").addClass("grid_runningtitles");
changeGridRowsTotal($("#grid_rows_total"), 1);
} else if (result.jobstatus == 2) {
// Failed
- vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to create your new instance due to the error: " + result.jobresult);
- vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".loadingmessage_container_vm .loadingmessage_top_vm p").text("Unable to create your new instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container_vm").fadeIn("slow");
vmInstance.find(".continue_button").data("jobId", result.jobid).unbind("click").bind("click", function(event) {
event.preventDefault();
var deadVM = $("#vmNew"+$(this).data("jobId"));
diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js
index 41c6b6d9ed3..cb536bc3aa7 100644
--- a/ui/scripts/cloud.core.js
+++ b/ui/scripts/cloud.core.js
@@ -16,8 +16,6 @@
*
*/
-// Version: 1.9.1.4
-
// global variables
var g_mySession = null;
var g_role = null; // roles - root, domain-admin, ro-admin, user
@@ -496,14 +494,10 @@ function getVmName(p_vmName, p_vmDisplayname) {
if(p_vmDisplayname == null)
return sanitizeXSS(p_vmName);
var vmName = null;
- if (isAdmin()) {
- if (p_vmDisplayname != p_vmName) {
- vmName = p_vmName + "(" + sanitizeXSS(p_vmDisplayname) + ")";
- } else {
- vmName = p_vmName;
- }
+ if (p_vmDisplayname != p_vmName) {
+ vmName = p_vmName + "(" + sanitizeXSS(p_vmDisplayname) + ")";
} else {
- vmName = sanitizeXSS(p_vmDisplayname);
+ vmName = p_vmName;
}
return vmName;
}
diff --git a/ui/scripts/cloud.core.network.js b/ui/scripts/cloud.core.network.js
index 36fdceb2248..7c5f27663ec 100644
--- a/ui/scripts/cloud.core.network.js
+++ b/ui/scripts/cloud.core.network.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
function showNetworkingTab(p_domainId, p_account) {
//*** Network (begin) ****************************************************************************
activateDialog($("#dialog_acquire_public_ip").dialog({
@@ -386,8 +384,10 @@ function showNetworkingTab(p_domainId, p_account) {
var vmSelect = createPortForwardingRow.find("#vm").empty();
if (instances != null && instances.length > 0) {
for (var i = 0; i < instances.length; i++) {
- var html = $("
");
- vmSelect.append(html);
+ if (instances[i].state != 'Destroyed' && instances[i].state != 'Error' && instances[i].state != 'Creating') {
+ var html = $("
");
+ vmSelect.append(html);
+ }
}
}
}
@@ -420,9 +420,11 @@ function showNetworkingTab(p_domainId, p_account) {
var instances = json.listvirtualmachinesresponse.virtualmachine;
var vmSelect = template.find("#row_container_edit #vm").empty();
if (instances != null && instances.length > 0) {
- for (var i = 0; i < instances.length; i++) {
- var html = $("
");
- vmSelect.append(html);
+ for (var i = 0; i < instances.length; i++) {
+ if (instances[i].state != 'Destroyed' && instances[i].state != 'Error' && instances[i].state != 'Creating') {
+ var html = $("
");
+ vmSelect.append(html);
+ }
}
vmSelect.val(virtualMachineId);
}
diff --git a/ui/scripts/cloud.core.storage.js b/ui/scripts/cloud.core.storage.js
index d7e4aa888a8..0ad5923f39a 100644
--- a/ui/scripts/cloud.core.storage.js
+++ b/ui/scripts/cloud.core.storage.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
function showStorageTab(domainId, targetTab) {
var currentSubMenu;
@@ -240,7 +238,7 @@ function showStorageTab(domainId, targetTab) {
// FUNCTION: volume JSON to Template
function volumeJSONToTemplate(json, template) {
if (getHypervisorType() == "kvm") {
- template.find("#volume_action_create_template_span").show();
+ //template.find("#volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
}
template.attr("id", "volume"+json.id);
if (index++ % 2 == 0) {
@@ -277,7 +275,7 @@ function showStorageTab(domainId, targetTab) {
if(json.type=="ROOT") {
if (json.virtualmachineid != undefined && json.vmstate == "Stopped" && getHypervisorType() == "kvm") {
- template.find("#volume_action_create_template_span").show();
+ //template.find("#volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
}
} else {
// DataDisk
@@ -286,12 +284,12 @@ function showStorageTab(domainId, targetTab) {
template.find("#volume_action_detach_span").show();
}
if (json.vmstate == "Stopped" && getHypervisorType() == "kvm") {
- template.find("#volume_action_create_template_span").show();
+ //template.find("#volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
}
} else {
// Disk not attached
if (getHypervisorType() == "kvm") {
- template.find("#volume_action_create_template_span").show();
+ //template.find("#volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
}
if (json.storagetype == "shared") {
template.find("#volume_action_attach_span, #volume_action_delete_span").show();
@@ -1042,7 +1040,9 @@ function showStorageTab(domainId, targetTab) {
$("body").stopTime(timerKey);
if (result.jobstatus == 1) {
// Succeeded
- template.find("#volume_action_attach_span, #volume_action_delete_span, #volume_action_create_template_span").show();
+ //template.find("#volume_action_attach_span, #volume_action_delete_span, #volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
+ template.find("#volume_action_attach_span, #volume_action_delete_span").show(); //delete line after createTemplateFromVolume API is fixed.
+
template.find("#volume_action_detach_span").hide();
template.find("#volume_vmname").text("detached");
template.data("vmid", null).data("vmname", null);
@@ -1119,7 +1119,8 @@ function showStorageTab(domainId, targetTab) {
// Succeeded
if (result.virtualmachine[0].vmstate == "Stopped") {
template.find("#volume_action_attach_span, #volume_action_delete_span").hide();
- template.find("#volume_action_detach_span, #volume_action_create_template_span").show();
+ //template.find("#volume_action_detach_span, #volume_action_create_template_span").show(); //create template from volume doesn't work. Hide it from UI on 2.1.x
+ template.find("#volume_action_detach_span").show(); //delete line after createTemplateFromVolume API is fixed.
} else {
template.find("#volume_action_attach_span, #volume_action_delete_span, #volume_action_create_template_span").hide();
template.find("#volume_action_detach_span").show();
diff --git a/ui/scripts/cloud.core.templates.js b/ui/scripts/cloud.core.templates.js
index 89b2123e393..e415e625114 100644
--- a/ui/scripts/cloud.core.templates.js
+++ b/ui/scripts/cloud.core.templates.js
@@ -16,8 +16,6 @@
*
*/
-// Version: @VERSION@
-
var DomRTemplateId = 1;
function showTemplatesTab() {
diff --git a/ui/scripts/cloud.logger.js b/ui/scripts/cloud.logger.js
index 895e421ce91..f6371f41a5b 100644
--- a/ui/scripts/cloud.logger.js
+++ b/ui/scripts/cloud.logger.js
@@ -16,8 +16,6 @@
*
*/
-// Version: 1.9.1.152
-
//
// Javascript logger utility
// Author
diff --git a/ui/scripts/jquery-ui-1.8.2.custom.min.js b/ui/scripts/jquery-ui.custom.min.js
similarity index 100%
rename from ui/scripts/jquery-ui-1.8.2.custom.min.js
rename to ui/scripts/jquery-ui.custom.min.js
diff --git a/ui/scripts/jquery-1.4.2.min.js b/ui/scripts/jquery.min.js
similarity index 100%
rename from ui/scripts/jquery-1.4.2.min.js
rename to ui/scripts/jquery.min.js
diff --git a/ui/test/index.html b/ui/test/index.html
index e699108a35b..0f65ba90b81 100644
--- a/ui/test/index.html
+++ b/ui/test/index.html
@@ -4,7 +4,7 @@
-
+
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/wscript_build b/wscript_build
index c0a9fc3b39c..1d4280154dd 100644
--- a/wscript_build
+++ b/wscript_build
@@ -195,7 +195,7 @@ for src,tgt,inst in zip(src_files,subst_files,inst_files):
tgen = bld(features='subst', name='patchsubst', source=src, target=tgt)
tgen.dict = bld.env.get_merged_dict()
bld.path.find_or_declare(tgt)
-
+
# this is a clever little thing
# given a list of nodes, build or source
# construct a tar file containing them
@@ -270,6 +270,7 @@ deps = " ".join( Utils.to_list(
deps/cloud-libvirt-0.4.5.jar
deps/cloud-jna.jar
deps/cloud-cglib.jar
+ deps/cloud-manageontap.jar
"""
) )
thirdparties = " ".join( Utils.to_list(
@@ -277,6 +278,7 @@ thirdparties = " ".join( Utils.to_list(
cloudstack-proprietary/thirdparty/xmlrpc-client-3.1.3.jar
cloudstack-proprietary/thirdparty/xmlrpc-common-3.1.3.jar
cloudstack-proprietary/thirdparty/ws-commons-util-1.0.2.jar
+ cloudstack-proprietary/thirdparty/manageontap.jar
cloudstack-proprietary/thirdparty/log4j-1.2.15.jar
cloudstack-proprietary/thirdparty/gson-1.3.jar
cloudstack-proprietary/thirdparty/apache-log4j-extras-1.0.jar
@@ -522,7 +524,7 @@ def minifyjs(task):
return Utils.exec_command(["java",'-jar',compilerjar] + newinputfiles + outputfile,log=True)
javascripts = [
- ['ui/scripts/jquery-1.4.2.min.js','ui/scripts/date.js'],
+ ['ui/scripts/jquery.min.js','ui/scripts/date.js'],
Utils.to_list(filelist('ui/scripts/jquery*js')),
['ui/scripts/cloud.core.js','ui/scripts/cloud.core.callbacks.js'],
Utils.to_list(filelist('ui/scripts/cloud*js')),
@@ -607,16 +609,21 @@ def generate_xml_api_description(task):
ret = Utils.exec_command(["java","-cp",cp,"com.cloud.utils.commandlinetool.BuildCommandLineInputFile"]+arguments,log=True)
return ret
-props = " client/tomcatconf/commands.properties"
-if buildpremium: props += " cloudstack-proprietary/premium/tomcatconf/commands-ext.properties"
-jarnames = ['utils','server','core']
-if buildpremium: jarnames += ['server-extras']
-tgen = bld(
- rule = generate_xml_api_description,
- source = " ".join( [ 'target/jar/cloud-%s.jar'%x for x in jarnames ] ) + props,
- target = 'commands.xml',
- name = 'xmlapi',
- after = 'runant',
-)
-bld.process_after(tgen)
+if buildpremium:
+ props = " client/tomcatconf/commands.properties"
+ props += " cloudstack-proprietary/premium/tomcatconf/commands-ext.properties"
+ jarnames = ['utils','server','core']
+ jarnames += ['server-extras']
+ tgen = bld(
+ rule = generate_xml_api_description,
+ source = " ".join( [ 'target/jar/cloud-%s.jar'%x for x in jarnames ] ) + props,
+ target = 'commands.xml',
+ name = 'xmlapi',
+ after = 'runant',
+ install_path="${CLIDIR}"
+ )
+ bld.process_after(tgen)
+
+ bld.install_files("${PYTHONDIR}//cloudtool", 'cloudstack-proprietary/cloud-cli/cloudtool/*')
+ bld.install_as("${PYTHONDIR}/cloudapis.py", 'cloudstack-proprietary/cloud-cli/cloudapis/cloud.py')
diff --git a/wscript_configure b/wscript_configure
index 2c8d38edd62..69e29d1a169 100644
--- a/wscript_configure
+++ b/wscript_configure
@@ -151,6 +151,7 @@ else:
conf.check_message_2("%s (assumed presence of Tomcat there)"%conf.env.TOMCATHOME,"GREEN")
conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent")
+conf.env.CLIPATH = _join(conf.env.PACKAGE,"cli")
conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy")
conf.env.MSPATH = _join(conf.env.PACKAGE,"management")
conf.env.USAGEPATH = _join(conf.env.PACKAGE,"usage")
@@ -255,6 +256,7 @@ conf.env.USAGESYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${USAGEPATH}"
conf.env.CPLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${CPPATH}"),conf.env)
conf.env.CPSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${CPPATH}"),conf.env)
conf.env.CPLOGDIR = Utils.subst_vars(_join("${LOCALSTATEDIR}","log","${CPPATH}"),conf.env)
+conf.env.CLIDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${CLIPATH}"),conf.env)
conf.env.MSLOG = _join(conf.env.MSLOGDIR,"management-server.log")
conf.env.APISERVERLOG = _join(conf.env.MSLOGDIR,"api-server.log")