Commit Graph

20 Commits

Author SHA1 Message Date
Dominik Csapak
0391dee1a2 add Realm model and RealmComboBox
copied from pve-manager, with adaptions for modern js
(let, parameter destructuring,...)

and dropped the not needed 'needOTP' method

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-18 17:03:32 +02:00
Thomas Lamprecht
50fea44c68 diff store: set autoDestroyRstore by default to true for rstore configs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-07 12:54:06 +02:00
Dominik Csapak
eb54b1142e 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>
2020-05-07 12:47:20 +02:00
Dominik Csapak
65277f6a2e data/DiffStore: add autoDestroyRstore flag
when this flag is set, the diffstore will automatically try to destroy
the rstore when it is destroyed itself

for this we have to move the rstore into the object (instead of using a closure)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-07 12:47:20 +02:00
Dominik Csapak
d4c342fb73 UpdateStore: fix 'undefined' interval
in some cases, we provide a config with interval set to 'undefined',
which gets happily applied to the config, but gets interpreted as '0'
when actually starting the task, resulting in constant api requests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-16 17:59:30 +02:00
Thomas Lamprecht
4a2f360d45 update store: move store parameter into config, use getter/setter
this allows to drop setting the default values and ensures that when
interval is updated it actually effects the used update frequency.

Anything which was saved in "me" before, for example me.autoStart, is
still there and gets also updated on a me.setIsStopped(), so there
should be no effects on code using internals.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-03 08:53:21 +02:00
Thomas Lamprecht
94f1770488 update store: refactor do modern syntax
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-03 08:53:21 +02:00
Aaron Lauterer
13fc756dfd tree-wide trailing whitespace cleanup
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-30 08:00:34 +02:00
Thomas Lamprecht
a9c65d7e9c fix #1784: allow to set UTC as Timezone
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-15 11:31:26 +00:00
Thomas Lamprecht
73b0150c5e fixup: rename returnCompleteRecord to getRecord
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-04-30 10:46:30 +02:00
Dominik Csapak
59db703100 add returnCompleteRecord to ObjectStore
this can be useful when needing multiple fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-30 09:41:36 +02:00
Dominik Csapak
ff5351f775 remove updatequeue
since all modern browsers can properly handle multiple
xmlhttprequests, we do not need to serialize them ourselves, but
leave it to the browser

this fixes an issue wehre a canceled request of an updatestore
blocks all other updatestores until refresh

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-29 12:04:31 +01:00
Dietmar Maurer
929d5ff7ea UpdateStore.js - fix update problem with chrome 2017-11-23 07:27:27 +01:00
Dominik Csapak
5f0f6b13b5 fix updateStore destroy
the store never fires/gets a destroy event, thus it
never stops the load_task and never unqueues itself in case
the store gets destroyed but not explicitely stopped

with overriding the destroy method, this works now as intended

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-11 11:46:29 +02:00
Dominik Csapak
b07f375602 add autostart and alias to UpdateStore
the alias is to use it in a declarative syntax,
the autostart parameter automatically starts the update

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-11 06:44:29 +02:00
Dietmar Maurer
1748088d28 add RRDStore class
Copied from pve-manager:

- removed field specification
- changed statid to proxmoxRRDTypeSelection
2017-08-29 07:27:40 +02:00
Dietmar Maurer
40d43a3923 PendingObjectGrid.js: import from pve-manager
just changed the name
2017-02-24 07:45:09 +01:00
Dietmar Maurer
09d6446578 add task list class 2017-01-31 09:26:42 +01:00
Dietmar Maurer
0669450939 add TimeView, TimeEdit and TaskViewer 2017-01-30 13:40:51 +01:00
Dietmar Maurer
0bb29d3556 initial import
copied from pve-manager, remove pve-manager specific code and
rename 'pve' to 'proxmox'.
2017-01-30 09:45:41 +01:00