mirror of https://github.com/apache/cloudstack.git
Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x
This commit is contained in:
commit
704683d1f0
|
|
@ -542,7 +542,8 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
|
|||
}
|
||||
}
|
||||
|
||||
if (!permittedAccounts.isEmpty() && !(templateFilter == TemplateFilter.featured || templateFilter == TemplateFilter.community) && !isAdmin(caller.getType()) ) {
|
||||
if (!permittedAccounts.isEmpty() && !(templateFilter == TemplateFilter.featured ||
|
||||
templateFilter == TemplateFilter.community || templateFilter == TemplateFilter.executable) && !isAdmin(caller.getType()) ) {
|
||||
whereClause += attr + "t.account_id IN (" + permittedAccountsStr + ")";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,7 +269,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
|
||||
@Override
|
||||
public boolean isAdmin(short accountType) {
|
||||
return ((accountType == Account.ACCOUNT_TYPE_ADMIN) || (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN));
|
||||
return ((accountType == Account.ACCOUNT_TYPE_ADMIN) || (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN)
|
||||
|| (accountType == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1549,11 +1549,31 @@
|
|||
},
|
||||
|
||||
fields: [
|
||||
{
|
||||
|
||||
{
|
||||
displayname: { label: 'label.display.name', isEditable: true },
|
||||
instancename: { label: 'label.internal.name' },
|
||||
state: { label: 'label.state' },
|
||||
state: {
|
||||
label: 'label.state',
|
||||
pollAgainIfValueIsIn: {
|
||||
'Starting': 1,
|
||||
'Stopping': 1
|
||||
},
|
||||
pollAgainFn: function(context) { //???
|
||||
var toClearInterval = false;
|
||||
$.ajax({
|
||||
url: createURL("listVirtualMachines&id=" + context.instances[0].id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listvirtualmachinesresponse.virtualmachine[0];
|
||||
if(jsonObj.state != context.instances[0].state) {
|
||||
toClearInterval = true; //to clear interval
|
||||
}
|
||||
}
|
||||
});
|
||||
return toClearInterval;
|
||||
}
|
||||
},
|
||||
hypervisor: { label: 'label.hypervisor' },
|
||||
templatename: { label: 'label.template' },
|
||||
guestosid: {
|
||||
|
|
|
|||
|
|
@ -33,14 +33,17 @@
|
|||
fields: {
|
||||
name: { label: 'label.name' },
|
||||
type: { label: 'label.type' },
|
||||
//hypervisor: { label: 'label.hypervisor' },
|
||||
//vmdisplayname: { label: 'label.vm.display.name' },
|
||||
state: {
|
||||
hypervisor: { label: 'label.hypervisor' },
|
||||
vmdisplayname: { label: 'label.vm.display.name' },
|
||||
|
||||
/*
|
||||
state: {
|
||||
label: 'State',
|
||||
indicator: {
|
||||
'Ready': 'on'
|
||||
}
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
// List view actions
|
||||
|
|
@ -943,7 +946,27 @@
|
|||
{
|
||||
id: { label: 'ID' },
|
||||
zonename: { label: 'label.zone' },
|
||||
state: { label: 'label.state' },
|
||||
state: {
|
||||
label: 'label.state',
|
||||
pollAgainIfValueIsIn: {
|
||||
'UploadNotStarted': 1
|
||||
},
|
||||
pollAgainFn: function(context) { //???
|
||||
var toClearInterval = false;
|
||||
$.ajax({
|
||||
url: createURL("listVolumes&id=" + context.volumes[0].id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listvolumesresponse.volume[0];
|
||||
if(jsonObj.state != context.volumes[0].state) {
|
||||
toClearInterval = true; //to clear interval
|
||||
}
|
||||
}
|
||||
});
|
||||
return toClearInterval;
|
||||
}
|
||||
},
|
||||
type: { label: 'label.type' },
|
||||
storagetype: { label: 'label.storage.type' },
|
||||
hypervisor: { label: 'label.hypervisor' },
|
||||
|
|
|
|||
|
|
@ -680,7 +680,23 @@
|
|||
} else if (key != 'name') {
|
||||
isOddRow = true;
|
||||
}
|
||||
|
||||
|
||||
//???
|
||||
/*
|
||||
if("pollAgainIfValueIsIn" in value) {
|
||||
if ((content in value.pollAgainIfValueIsIn) && (value.pollAgainFn != null)) {
|
||||
//poll again
|
||||
var intervalKey = setInterval(function() {
|
||||
var toClearInterval = value.pollAgainFn(context);
|
||||
if(toClearInterval == true) {
|
||||
clearInterval(intervalKey);
|
||||
$('.detail-view .toolbar .button.refresh').click(); //click Refresh button to refresh detailView
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$name.html(_l(value.label));
|
||||
$value.html(_s(content));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue