Commit Graph

12 Commits

Author SHA1 Message Date
Maximiliano Sandoval
d76c2b0f9e fix typos in comments
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 18:28:18 +02:00
Dominik Csapak
569b038830 ui: fix reset behavior of backup job editor
when we `bind` we also have to set the initial value correctly,
otherwise the form dirty tracking is off (the initial bind set does not
reset the `originalValue`)

also the bandwidth selector auto transformed the value `null` to `0`
when there was no initial transformation. Since this is not a valid
value anyway, skip that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-04-23 09:52:03 +02:00
Thomas Lamprecht
b34b1187ee ui: size field: allow to specifiy emptyValue
I.e., the value the empty field should resolve for the submit value

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 14:25:02 +02:00
Thomas Lamprecht
8654b4b02f ui: size-field: add more units
This would probably benefit from being an object alá:
```
'GiB': {
    base: 2,
    order: 30,
},
```
but that would be a transparent internal change, and the current way
isn't yet a limitation, so ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:11:41 +02:00
Thomas Lamprecht
635163b051 ui: transform bandwidth-field to generic size-field & derive bandwidth from that
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:03:36 +02:00
Thomas Lamprecht
d43aec909b ui: bandwidth field: make unit postfix configurable
preparation for making this widget more general, for sizes (not over
time) too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:01:54 +02:00
Thomas Lamprecht
e1e930c39b ui: bandwidth field: fix eslint complaints and slight readability improvements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:00:08 +02:00
Fabian Ebner
dcbc3b3ee9 ui: bandwidth limit selector: make it possible to allow zero
The initial value is '' and in getSubmitValue(), previously the branch
   if (v == 0 || v == 0.0) return null;
was taken, because of the lax '==' comparision. Make sure we still return null
for '' by explicitly checking for it.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-03-15 13:26:05 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Dominik Csapak
fa4a2036c1 fix BandwidthSelector empty return value
if we do not want to return a value for submitting, we have to return
'null', every other value will get returned by getSubmitValue,
including 'undefined' and '' (empty string)

this fixes an issue when the user did not enter any bwlimit on
restore (the user would get an api error that bwlimit expects an
integer and not '')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-16 11:37:21 +01:00
Thomas Lamprecht
56b14a54ea ui: add Bandwidth selector widget
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 11:24:46 +01:00