F #4569: Hot disk resize on vcenter (#177)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
(cherry picked from commit 74b47ff681)
This commit is contained in:
Frederick Borges authored and Tino Vazquez committed 2020-09-03 12:18:20 +02:00
1 parent 78cbcfb2ac
commit 22ca390093
1 file changed
+2 -12
@@ -348,18 +348,8 @@ define(function(require) {
if (Config.isTabActionEnabled("vms-tab", "VM.disk_resize")) {
if (validateState(that,"VM.disk_resize") && !disk.CONTEXT) {
if(Array.isArray(that.element.HISTORY_RECORDS.HISTORY)){
var historyLenght = that.element.HISTORY_RECORDS.HISTORY.length - 1;
if(that.element.LCM_STATE != "3" || that.element.HISTORY_RECORDS.HISTORY[historyLenght].VM_MAD != "vcenter"){
actions += ('<a class="disk_resize nowrap" >\
<i class="fas fa-expand-arrows-alt fa-fw" title="Resize"></i></a>');
}
} else {
if(that.element.LCM_STATE != "3" || that.element.HISTORY_RECORDS.HISTORY.VM_MAD != "vcenter"){
actions += ('<a class="disk_resize nowrap" >\
<i class="fas fa-expand-arrows-alt fa-fw" title="Resize"></i></a>');
}
}
actions += ('<a class="disk_resize nowrap" >\
<i class="fas fa-expand-arrows-alt fa-fw" title="Resize"></i></a>');
}
}
}