mirror of https://github.com/apache/cloudstack.git
VM snapshot is disabled if the VM Instance is off
This commit is contained in:
parent
50147a4208
commit
bd80c8e179
|
|
@ -50,6 +50,12 @@
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
isDisabled: function(args){
|
||||
if(args.context.instances[0].state == 'Stopped'){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
quiescevm: {
|
||||
|
|
|
|||
|
|
@ -637,8 +637,14 @@
|
|||
$input.attr('id', inputId);
|
||||
$name.find('label').attr('for', inputId);
|
||||
|
||||
if (field.isDisabled)
|
||||
$input.attr("disabled", "disabled");
|
||||
if(field.isDisabled ){
|
||||
if(typeof(field.isDisabled) == 'boolean' && field.isDisabled == true){
|
||||
$input.attr("disabled","disabled");
|
||||
}
|
||||
else if (typeof(field.isDisabled) == 'function' && field.isDisabled(args) == true){
|
||||
$input.attr("disabled","disabled");
|
||||
}
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
if (field.docID) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue