mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 10:39:49 +00:00
ui: storage: implement apiCallDone callback for storage input panels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
57e40406de
commit
71dec88f99
@ -57,6 +57,13 @@ Ext.define('PVE.panel.StorageBase', {
|
|||||||
Ext.define('PVE.storage.BaseEdit', {
|
Ext.define('PVE.storage.BaseEdit', {
|
||||||
extend: 'Proxmox.window.Edit',
|
extend: 'Proxmox.window.Edit',
|
||||||
|
|
||||||
|
apiCallDone: function(success, response, options) {
|
||||||
|
let me = this;
|
||||||
|
if (typeof me.ipanel.apiCallDone === "function") {
|
||||||
|
me.ipanel.apiCallDone(success, response, options);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -70,7 +77,7 @@ Ext.define('PVE.storage.BaseEdit', {
|
|||||||
me.method = 'PUT';
|
me.method = 'PUT';
|
||||||
}
|
}
|
||||||
|
|
||||||
var ipanel = Ext.create(me.paneltype, {
|
me.ipanel = Ext.create(me.paneltype, {
|
||||||
type: me.type,
|
type: me.type,
|
||||||
isCreate: me.isCreate,
|
isCreate: me.isCreate,
|
||||||
storageId: me.storageId
|
storageId: me.storageId
|
||||||
@ -79,7 +86,7 @@ Ext.define('PVE.storage.BaseEdit', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
subject: PVE.Utils.format_storage_type(me.type),
|
subject: PVE.Utils.format_storage_type(me.type),
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
items: [ ipanel ]
|
items: [ me.ipanel ]
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
@ -97,7 +104,7 @@ Ext.define('PVE.storage.BaseEdit', {
|
|||||||
}
|
}
|
||||||
values.enable = values.disable ? 0 : 1;
|
values.enable = values.disable ? 0 : 1;
|
||||||
|
|
||||||
ipanel.setValues(values);
|
me.ipanel.setValues(values);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user