]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
data/*Store: drop storeid requirement
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 11 Mar 2021 09:14:32 +0000 (10:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Mar 2021 12:56:11 +0000 (13:56 +0100)
We never use that and it serves no purpose. It probably was meant to
be the upstream config 'storeId' which would add the store to the
Ext.StoreManager. This is unpractical though, since then the store
has to be explicitely destroyed, otherwise the StoreManager retains a
reference and the GC cannot remove the store.

Since donwstream users of the store can simply give the 'storeId'
property anyway if they need to be managed by the StoreManager, drop
the requirement here.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/data/ObjectStore.js
src/data/RRDStore.js
src/data/UpdateStore.js

index 860cbfdb755b9345d321c897f456fc2c2be4e6e1..cb41f9c3225eee065bd0906d0cf80c01391b0197 100644 (file)
@@ -21,10 +21,6 @@ Ext.define('Proxmox.data.ObjectStore', {
 
         config = config || {};
 
-       if (!config.storeid) {
-           config.storeid = 'proxmox-store-' + ++Ext.idSeed;
-       }
-
         Ext.applyIf(config, {
            model: 'KeyValue',
             proxy: {
index 67ffb57098fa31517cfde75948e40a4f1da60cf7..7c96dede70ab513d01e2d4c56ba5416e996c74e7 100644 (file)
@@ -37,11 +37,6 @@ Ext.define('Proxmox.data.RRDStore', {
            config.interval = 30000;
        }
 
-       // set a new storeid
-       if (!config.storeid) {
-           config.storeid = 'rrdstore-' + ++Ext.idSeed;
-       }
-
        // rrdurl is required
        if (!config.rrdurl) {
            throw "no rrdurl specified";
index be85e4f5feb50880d053a6696878e9a59714dea7..cd510891994effea1da5409903b52c7e925d424c 100644 (file)
@@ -33,9 +33,6 @@ Ext.define('Proxmox.data.UpdateStore', {
            delete config.interval;
        }
 
-       if (!config.storeid) {
-           throw "no storeid specified";
-       }
 
        let load_task = new Ext.util.DelayedTask();