mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Solved bug in disk-resize dialog
This commit is contained in:
parent
58404f3820
commit
383dc92fc8
@ -312,7 +312,7 @@ define(function(require) {
|
||||
}
|
||||
|
||||
if (Config.isTabActionEnabled("vms-tab", "VM.disk_resize")) {
|
||||
if (StateActions.enabledStateAction("VM.disk_resize", that.element.STATE, that.element.LCM_STATE)) {
|
||||
if (StateActions.enabledStateAction("VM.disk_resize", that.element.STATE, that.element.LCM_STATE) && !disk.CONTEXT) {
|
||||
if(that.element.LCM_STATE != "3" || that.element.HISTORY_RECORDS.HISTORY.VM_MAD != "vcenter"){
|
||||
actions += ('<a class="disk_resize nowrap" >\
|
||||
<i class="fa fa-expand fa-fw" title="Resize"></i></a>');
|
||||
@ -587,7 +587,12 @@ define(function(require) {
|
||||
context.off('click', '.disk_sresize');
|
||||
context.on('click', '.disk_resize', function() {
|
||||
var disk_id = $(this).parents('tr').attr('disk_id');
|
||||
var disk_size = that.element.TEMPLATE.DISK.SIZE*1024; //to MB
|
||||
var disk_size = "";
|
||||
$.each(that.element.TEMPLATE.DISK, function(){
|
||||
if(this.DISK_ID == disk_id){
|
||||
disk_size = this.SIZE * 1024;
|
||||
}
|
||||
});
|
||||
var dialog = Sunstone.getDialog(DISK_RESIZE_DIALOG_ID);
|
||||
dialog.setParams(
|
||||
{ element: that.element,
|
||||
|
Loading…
x
Reference in New Issue
Block a user