]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
ui: storage: implement apiCallDone callback for storage input panels
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 15 Nov 2020 13:52:55 +0000 (14:52 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 15 Nov 2020 13:56:37 +0000 (14:56 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/storage/Base.js

index 7f2d7cc6f1ee1a77c1f48d1d25292c0214dc3381..67e0f3ce5bdbf789c993820f2f6b88f8fcb55d5e 100644 (file)
@@ -57,6 +57,13 @@ Ext.define('PVE.panel.StorageBase', {
 Ext.define('PVE.storage.BaseEdit', {
     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() {
        var me = this;
 
@@ -70,7 +77,7 @@ Ext.define('PVE.storage.BaseEdit', {
            me.method = 'PUT';
        }
 
-       var ipanel = Ext.create(me.paneltype, {
+       me.ipanel = Ext.create(me.paneltype, {
            type: me.type,
            isCreate: me.isCreate,
            storageId: me.storageId
@@ -79,7 +86,7 @@ Ext.define('PVE.storage.BaseEdit', {
        Ext.apply(me, {
             subject: PVE.Utils.format_storage_type(me.type),
            isAdd: true,
-           items: [ ipanel ]
+           items: [ me.ipanel ]
        });
 
        me.callParent();
@@ -97,7 +104,7 @@ Ext.define('PVE.storage.BaseEdit', {
                    }
                    values.enable = values.disable ? 0 : 1;
 
-                   ipanel.setValues(values);
+                   me.ipanel.setValues(values);
                }
            });
        }