MemoryEdit.js 788 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
Ext.define('PVE.qemu.MemoryInputPanel', {
    extend: 'PVE.panel.InputPanel',
    alias: 'widget.PVE.qemu.MemoryInputPanel',

    insideWizard: false,

    initComponent : function() {
	var me = this;

	var items = {
	    xtype: 'numberfield',
	    name: 'memory',
	    minValue: 32,
	    maxValue: 128*1024,
	    value: '512',
	    step: 32,
	    fieldLabel: 'Memory (MB)',
	    allowBlank: false
	};

	if (me.insideWizard) {
	    me.column1 = items;
	} else {
	    me.items = items;
	}

	me.callParent();
    }
});

Ext.define('PVE.qemu.MemoryEdit', {
    extend: 'PVE.window.Edit',

    initComponent : function() {
	var me = this;
	
	Ext.apply(me, {
	    title: "Edit memory settings",
	    items: Ext.create('PVE.qemu.MemoryInputPanel')
	});

	me.callParent();

	me.load();
    }
});