Commit Graph

63 Commits

Author SHA1 Message Date
Dominik Csapak
13d465c146 ui: refactor refreshing the the resource store/tree
we'll need it elsewhere too, and it was rather hidden in the
updateTagSettings call.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Dominik Csapak
731436ee86 ui: refactor ui option related methods into UIOptions
a new singleton like Utils/Parser, intended for holding stuff for
ui options, such as the tag settings/overrides

no behavioural change intended

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Daniel Tschlatscher
6e3c144219 fix typo in user tag access text field
This text is only displayed when at least one tag is defined in the
User Tag Access editor.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2023-01-25 12:58:54 +01:00
Thomas Lamprecht
5a9848fac0 fix #1295: ui: allow one to configure new notification settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-03 16:51:31 +01:00
Thomas Lamprecht
8fab87dc72 ui: dc options: support setting case sensitive
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 08:49:13 +01:00
Thomas Lamprecht
1d1a331949 ui: dc options: add Color-Overrides text to render, if any
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 08:48:53 +01:00
Thomas Lamprecht
9d7d39ef1c ui: datacenter options: add Cluster Resource Scheduling editor
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 17:26:38 +01:00
Dominik Csapak
56dee217bc ui: fix datacenter tags options inputs
* dont allow blank for tree shape
* allow completely removing registered tags and user-tag-access properties
* correctly check validity for the listfield
* use correct gettexts
* don't inject empty field in the listfield when setting an empty string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 12:56:18 +01:00
Thomas Lamprecht
13a0c8bf11 ui: eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
1f359096b6 ui: tags: add preview to tag shape option
with a combogrid and the example text 'preview'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
8d8ba23da9 ui: implement tag ordering as configured in datacenter config
datacenter.cfg returns an 'ordering' option. parse that and
use it to order the tags when viewing. default is alphabetical.

With alphabetical ordering, drag & drop when editing is disabled and the
tags will be inserted at the right place. When saving, the sorted
order will be written into the config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +01:00
Dominik Csapak
0a627d9468 ui: dc/OptionView: add editors for tag settings
namely for 'tag-tree-style' and 'tag-colors'.
display the tag overrides directly as they will appear as tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:53 +01:00
Dominik Csapak
b7f4cb7cf9 ui: save ui options from /cluster/options instead of version
/cluster/options is now the go to place for getting these options
(until we have more options unrelated to the datacenter.cfg)

Also move the use of the console from VersionInfo to here, since
this will be the future place for ui related backend options.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:12 +01:00
Thomas Lamprecht
bad1742cef ui: datacenter: use "Name" label for respective part of full rp
as contrary to the property name this is actually only the rather
irrelevant part (auth wise) of the whole relying party, the ID is the
other part, and that one actually matters.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-26 12:00:45 +02:00
Thomas Lamprecht
727b64aec3 ui: datacenter: rework webauthn settings UX
Make origin optional, as it actually is, and its not covered by the
challenge anyway.

Also, not the thing we name rp, but the ID is important for the
validity of existing webauthn records, this error comes from the
confusing use of the same named thing in different ways by browsers,
us and the webauthn rust crate...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-25 16:48:32 +02:00
Thomas Lamprecht
47353b27df ui; datacenter options: add next-id editor
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 20:34:37 +02:00
Thomas Lamprecht
56148f253e ui: utils: drop some useles _array helpers, just use Object.entries
if we need to enforce ordering it may help to reintroduce them
though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:07:14 +02:00
Thomas Lamprecht
80cfedf852 ui: dc/options: fix renderer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 18:29:33 +01:00
Thomas Lamprecht
fd6c879471 ui: dc options: fix indentation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 21:02:04 +01:00
Thomas Lamprecht
a2e0725adb ui: dc/options: show depreacation notice in u2f settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 17:44:03 +01:00
Thomas Lamprecht
cca2aea8b2 ui: dc/options: display WebAuthn and add editor
mostly copied 1:1 from PBS, we could move this to widget toolkit
sometimes though..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 17:38:15 +01:00
Thomas Lamprecht
03153d556b ui: dc: log, options, support: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:14:51 +02:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +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
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
59807d1e3b ui: fix optionview caps
there's no caps.dc['Sys.Modify'] in our heuristic caps-for-frontend
and the === undefined check was wrong

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-01 17:14:42 +02:00
Thomas Lamprecht
df9ad35744 ui: dc/options: add max_workers setting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-06 20:42:16 +01:00
Thomas Lamprecht
27af8ed019 ui dc/options: refactor render_bwlimits
while this /could/ (not benched marked in any way) be slower it
operates on so small data sets that this isn't worth it having double
the code lines.

A map + join is still quite readable and not yet "code golfy"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-06 20:19:12 +01:00
Thomas Lamprecht
136103b0c9 ui dc/options: add trailing commas
just to avoid making those lines dirty again in a future property
addition..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-06 20:16:32 +01:00
Stefan Reiter
e670ffc28a fix #2611: gui: use backendUnit and pretty renderer
Slightly confusing with the units:
* Backend stores values in KiB/s
* Frontend displays MiB/s (which is a good choice when considering
  current generation network speeds as opposed to huge KiB numbers IMO)
* Renderer previously showed no units, which would usually be interpreted
  as Bytes/s

So add a pretty renderer that shows units and set backendUnit to submit
correctly converted values.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-03-06 19:56:49 +01:00
Thomas Lamprecht
6ddc083cb5 ui: dc/options: fix capabillities for u2f, bwlimits, ha settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-29 15:20:32 +01:00
Thomas Lamprecht
17a1ffa1b9 ui: dc/options: add onlineHelp to u2f and ha edit window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 19:35:17 +01:00
Dominik Csapak
7d01dad4ef gui: Bandwidth limits: increase labelWidth to 120
in some languages (e.g. German) the default (100) is too short for some labels,
resulting in cut-off text. We often use 120 in such cases, so we should
do here as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-27 18:40:30 +01:00
Thomas Lamprecht
d837e79e39 fixup whitespace error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 11:36:19 +01:00
Thomas Lamprecht
a89375f6a3 ui: dc/options: add bandwidth limit editor
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 11:25:51 +01:00
Thomas Lamprecht
481816075e followup: add intermediate directory index for sdn/zones
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 17:58:01 +01:00
Thomas Lamprecht
61c2b43420 ui: dc/options: allow to set U2F
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 17:02:01 +01:00
Thomas Lamprecht
e86024b727 allow to set 'migrate' shutdown policy in datacenter options
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-25 19:54:44 +01:00
Thomas Lamprecht
8144a0ddc7 ui: dc/options: minor followup cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 14:58:19 +02:00
Thomas Lamprecht
6619af8d4f ui: dc/options: use proxmoxNetworkSelector for network
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 14:38:49 +02:00
Thomas Lamprecht
bb469a1176 ui: dc/options: allow to edit cluster wide migration settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 16:04:34 +02:00
Thomas Lamprecht
8f17b4965a ui: dc/options: allow to edit HA shutdown policy
add some helpers handling this, can be re used for adding the
migration field, maybe we want to move this to widget-toolkits parent
ObjectGrid class, a bit cleaned up.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 15:31:24 +02:00
Dominik Csapak
3f2cccbc73 allow deletion of mac prefix
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-22 14:01:40 +01:00
Dominik Csapak
5dc48aa804 set the default console in the gui when setting the option
until now, we only set the default console once on page load,
this enables to set it everytime the dc->options panel loads,
so also after setting an option

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-23 09:42:55 +02:00
Thomas Lamprecht
21026cceb7 reuse Toolkit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
755b9083dc dc/OptionView: cleanup & use new features from ObjectGrid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
8ea2c8709e use ObjectGrid from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
09cacce778 use KVCombobox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
e7ade592e3 use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00