]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
data/DiffStore: auto-create the rstore if its just a config
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 7 May 2020 08:27:06 +0000 (10:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 May 2020 10:47:20 +0000 (12:47 +0200)
commiteb54b1142eeacbf2d553408fad777ddaa7c47c57
tree216671f568443d32b02dffc7e8060cc54aede4d0
parent65277f6a2e113fc9120fc6094c048effcc07f2ba
data/DiffStore: auto-create the rstore if its just a config

when rstore is not instanciated but only a config,
auto-create it with its type

this allows us to configure an diff/rstore combination completely
declaratively like this:

store: {
    type: 'diff',
    autoDestroy: true,
    autoDestroyRstore: true,
    rstore: {
type: 'update',
model: 'some-model',
autoStart: true,
interval: 5000,
    },
},

the only thing we have to be careful about is to either
do a manual 'stopUpdate' somewhere, or use the 'autoDestroyRstore' flag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
data/DiffStore.js