mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
This commit is contained in:
commit
dc5cf270e6
|
|
@ -142,7 +142,12 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
//if pool is NOT in up state, return false
|
||||
if(!pool.getStatus().equals(com.cloud.host.Status.Up))//this is the pool status
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the pool type is correct
|
||||
if (!poolIsCorrectType(dskCh, pool, vm, offering)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ long milliseconds = new Date().getTime();
|
|||
- Default Cloud.com styling of the site. This file contains the easiest portion of the site
|
||||
that can be styled to your companie's need such as logo, top navigation, and dialogs.
|
||||
-->
|
||||
<link rel= "stylesheet" href="css/cloud_custom.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/cloud_custom.css" type="text/css" />
|
||||
|
||||
<!-- Javascripts -->
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ function loadAccountToRigntPanelFn($rightPanelContent) {
|
|||
var jsonObj = $rightPanelContent.data("jsonObj");
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#role").text(toRole(jsonObj.accounttype));
|
||||
$rightPanelContent.find("#account").text(jsonObj.name);
|
||||
$rightPanelContent.find("#domain").text(jsonObj.domain);
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#domain").text(fromdb(jsonObj.domain));
|
||||
$rightPanelContent.find("#vm_total").text(jsonObj.vmtotal);
|
||||
$rightPanelContent.find("#ip_total").text(jsonObj.iptotal);
|
||||
$rightPanelContent.find("#bytes_received").text(jsonObj.receivedbytes);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
function loadEventToRigntPanelFn($rightPanelContent) {
|
||||
var jsonObj = $rightPanelContent.data("jsonObj");
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#username").text(jsonObj.username);
|
||||
$rightPanelContent.find("#account").text(jsonObj.account);
|
||||
$rightPanelContent.find("#username").text(fromdb(jsonObj.username));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
$rightPanelContent.find("#type").text(jsonObj.type);
|
||||
$rightPanelContent.find("#level").text(jsonObj.level);
|
||||
$rightPanelContent.find("#description").text(jsonObj.description);
|
||||
$rightPanelContent.find("#description").text(fromdb(jsonObj.description));
|
||||
$rightPanelContent.find("#state").text(jsonObj.state);
|
||||
setDateField(jsonObj.created, $rightPanelContent.find("#created"));
|
||||
}
|
||||
|
|
@ -384,21 +384,21 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
|
||||
var jsonObj = $t.data("jsonObj");
|
||||
var vmName = getVmName(jsonObj.name, jsonObj.displayname);
|
||||
$rightPanelHeader.find("#vm_name").text(vmName);
|
||||
$rightPanelHeader.find("#vm_name").text(fromdb(vmName));
|
||||
updateVirtualMachineStateInRightPanel(jsonObj.state);
|
||||
$rightPanelContent.find("#ipAddress").text(jsonObj.ipaddress);
|
||||
$rightPanelContent.find("#zoneName").text(jsonObj.zonename);
|
||||
$rightPanelContent.find("#templateName").text(jsonObj.templatename);
|
||||
$rightPanelContent.find("#serviceOfferingName").text(jsonObj.serviceofferingname);
|
||||
$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("#created").text(jsonObj.created);
|
||||
$rightPanelContent.find("#account").text(jsonObj.account);
|
||||
$rightPanelContent.find("#domain").text(jsonObj.domain);
|
||||
$rightPanelContent.find("#hostName").text(jsonObj.hostname);
|
||||
$rightPanelContent.find("#group").text(jsonObj.group);
|
||||
$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
|
||||
|
|
|
|||
|
|
@ -165,6 +165,14 @@ function createURL(url) {
|
|||
return url +"&response=json&sessionkey=" + g_sessionKey;
|
||||
}
|
||||
|
||||
function fromdb(val) {
|
||||
return sanitizeXSS(unescape(noNull(val)));
|
||||
}
|
||||
|
||||
function todb(val) {
|
||||
return encodeURIComponent(escape(display));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -790,16 +798,16 @@ function sanitizeXSS(val) {
|
|||
|
||||
function getVmName(p_vmName, p_vmDisplayname) {
|
||||
if(p_vmDisplayname == null)
|
||||
return sanitizeXSS(p_vmName);
|
||||
return sanitizeXSS(unescape(p_vmName));
|
||||
var vmName = null;
|
||||
if (isAdmin()) {
|
||||
if (p_vmDisplayname != p_vmName) {
|
||||
vmName = p_vmName + "(" + sanitizeXSS(p_vmDisplayname) + ")";
|
||||
vmName = p_vmName + "(" + sanitizeXSS(unescape(p_vmDisplayname)) + ")";
|
||||
} else {
|
||||
vmName = p_vmName;
|
||||
}
|
||||
} else {
|
||||
vmName = sanitizeXSS(p_vmDisplayname);
|
||||
vmName = sanitizeXSS(unescape(p_vmDisplayname));
|
||||
}
|
||||
return vmName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ function loadSnapshotToRigntPanelFn($rightPanelContent) {
|
|||
var $rightPanelContent = $("#right_panel_content");
|
||||
|
||||
$rightPanelContent.find("#id").text(jsonObj.id);
|
||||
$rightPanelContent.find("#name").text(jsonObj.name);
|
||||
$rightPanelContent.find("#volume_name").text(jsonObj.volumename);
|
||||
$rightPanelContent.find("#name").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#volume_name").text(fromdb(jsonObj.volumename));
|
||||
$rightPanelContent.find("#interval_type").text(jsonObj.intervaltype);
|
||||
$rightPanelContent.find("#account").text(jsonObj.account);
|
||||
$rightPanelContent.find("#domain").text(jsonObj.domain);
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
$rightPanelContent.find("#domain").text(fromdb(jsonObj.domain));
|
||||
|
||||
setDateField(jsonObj.created, $rightPanelContent.find("#created"));
|
||||
}
|
||||
|
|
@ -4,14 +4,14 @@ function loadVolumeToRigntPanelFn($rightPanelContent) {
|
|||
var $rightPanelContent = $("#right_panel_content");
|
||||
|
||||
$rightPanelContent.find("#id").text(jsonObj.id);
|
||||
$rightPanelContent.find("#name").text(jsonObj.name);
|
||||
$rightPanelContent.find("#zonename").text(jsonObj.zonename);
|
||||
$rightPanelContent.find("#name").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$rightPanelContent.find("#device_id").text(jsonObj.deviceid);
|
||||
$rightPanelContent.find("#state").text(jsonObj.state);
|
||||
$rightPanelContent.find("#storage").text(jsonObj.storage);
|
||||
$rightPanelContent.find("#account").text(jsonObj.account);
|
||||
$rightPanelContent.find("#storage").text(fromdb(jsonObj.storage));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
|
||||
$rightPanelContent.find("#type").text(noNull(jsonObj.type) + " (" + noNull(jsonObj.storagetype) + " storage)");
|
||||
$rightPanelContent.find("#type").text(jsonObj.type + " (" + jsonObj.storagetype + " storage)");
|
||||
$rightPanelContent.find("#size").text((jsonObj.size == "0") ? "" : convertBytes(jsonObj.size));
|
||||
|
||||
if (jsonObj.virtualmachineid == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue