mirror of
https://github.com/apache/cloudstack
synced 2026-08-02 05:26:35 +00:00
VM snapshot is disabled if the VM Instance is off
(cherry picked from commit bd80c8e179)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
645283abc4
commit
ba60718585
@ -49,6 +49,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
Block a user