Commit Graph

5604 Commits

Author SHA1 Message Date
Thomas Lamprecht
4fd034b13e ui: lxc/CreateWizard: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 08:45:03 +02:00
Thomas Lamprecht
d11524c6d1 ui: ha/Resources: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 07:01:51 +02:00
Thomas Lamprecht
09eb422315 ui: ha/GroupView: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 07:01:31 +02:00
Thomas Lamprecht
ad9091d0d1 ui: ha/Group Edit: use simple map+join to serialize nodes-prio
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 18:17:55 +02:00
Thomas Lamprecht
1bcc556fe7 ui: ha/Group Edit: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 18:17:12 +02:00
Thomas Lamprecht
f79de80378 ui: grid/Resources: eslint fixes and code cleanup/refactoring
this is a major cleanup, using the current ExtJS and ES2018 features
allows to do a lot more concise and nicer.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 18:02:27 +02:00
Thomas Lamprecht
c1802413d9 ui: grid/Replication: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 18:00:30 +02:00
Thomas Lamprecht
5e7d27235e ui: grid/Firewall: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 17:59:16 +02:00
Thomas Lamprecht
4f73992703 ui: qemu/OS defaults: code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:53:22 +02:00
Thomas Lamprecht
5807b3a043 ui: form/Guest Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:52:53 +02:00
Thomas Lamprecht
7b261bf845 ui: form/View Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:52:40 +02:00
Thomas Lamprecht
2ef4b8ed12 ui: form/USB Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:51:35 +02:00
Thomas Lamprecht
128a24edf5 ui: form/API Token Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:51:21 +02:00
Thomas Lamprecht
93365f47d7 ui: form/Priv.Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:50:53 +02:00
Thomas Lamprecht
65c6c5d592 ui: form/Node Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:50:38 +02:00
Thomas Lamprecht
86b60bd59e ui: form/Global Search: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:50:14 +02:00
Thomas Lamprecht
ecfd8bcd2f ui: form/Controller Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:50:03 +02:00
Thomas Lamprecht
f155d934e2 ui: parser: fixup printing LXC network
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:42:35 +02:00
Thomas Lamprecht
8af03a8dbd ui: eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
f09f1c27ad ui: eslint: Miscellaneous eslint fixes
Function syntax, raw words, string templates, no prototype builtins

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
91a47a766f ui: eslint: State equalities more precisely
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
f1374bff13 ui: eslint: Remove useless escapes
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
5eb9b7b1b0 ui: eslint: Functions may not be completely empty
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
55ee6ba132 ui: eslint: No unused or duplicate variables
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
46d9a35c33 ui: eslint: fix usage of 'me'
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02: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
9f84f443aa ui: dc/StorageView: 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
1a5df27f23 ui: dc/UserEdit: 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
d74c3805d3 ui: dc/Tasks: 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
12f237de8b ui: dc/TFA Edit: 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
a30dca2f9f ui: dc/Summary: 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
90d5bbb64d ui: dc/FW Security Group: 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
a1abaf7064 ui: dc/RoleView: 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
2dcb6bb046 ui: dc/NodeView: mark only usage over 75% with a warning
As 60% is pretty low, and normally still OK and even wanted to have
(no need for having an over-dimensioned setup with lots of unused
resources).

Note, this is not a off-by-one, I want to compare real bigger > 75%

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:14:51 +02:00
Thomas Lamprecht
ffc947807c ui: dc/NodeView: 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
8295f55e56 ui: dc: health, config, guests; 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
95f59d0b89 ui: dc/corosync-link: 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
4ed38e2569 ui: dc/cluster: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 10:05:05 +02:00
Thomas Lamprecht
12809bba4f ui: dc/Backup: eslint fixes and code cleanup/refactoring
this one would deserve much more, especially the newer backup job
detail and not-backed-up view should be split out and done in a
declarative way (view view-controller)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:40:11 +02:00
Thomas Lamprecht
1848bf9eb0 ui: dc/ACMEPlugins: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:11:28 +02:00
Thomas Lamprecht
cf696df332 ui: dc/ACLView: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:11:07 +02:00
Thomas Lamprecht
a0b5aa9096 ui: data/ResourceStore: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:03:47 +02:00
Thomas Lamprecht
f729096099 ui: buttons: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:58:52 +02:00
Thomas Lamprecht
063997ed16 ui: workspace: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:40:33 +02:00
Thomas Lamprecht
4d739f4a2a ui: utils: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:21:52 +02:00
Thomas Lamprecht
d6b661874c ui: state provider: try to find string encoded values in dictionary
My browser here is pretty fixated on the history, and due to some
unknown reason I got a history fragment string like:
`#v1:=0:=18:=4:::::::` so the "hashes" got into strings, and I was
not able to move them back.

Adding a match here to always try reverse-mapping the hash to the
original input helps to fix that here.

We'd only run into issues if we'd use a integer-string as id, but we
really don't (IIRC not even allowed in extjs) so this is safe to do.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 18:21:52 +02:00
Thomas Lamprecht
2f6cf848b6 ui: state provider: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 18:09:07 +02:00
Thomas Lamprecht
265f10ddac state provider: drop confirm-query when going back over initial history
eslint complains about the window.confirm call, and neither I nor
some other colleagues here did see that dialogue ever in practice.

The confirm here does not adds any real value, as all other back
navigation are unprotected, but have similar potential in loosing
state.

One can always navigate forward via their user agent and for console
(noVNC, xterm.js) we have now a separate check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
0199b09144 ui: toolkit: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00
Thomas Lamprecht
a3aef0f5d9 ui: parser: eslint fixes and refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 17:30:39 +02:00