Fabian Ebner [Tue, 19 May 2020 08:12:19 +0000 (10:12 +0200)]
Fix 2718: GUI: handle localtime option correctly
The backend treats an undefined value and 0 differently. If the option
is undefined, it will still be set for Windows in config_to_command.
Replace the checkbox with a combobox covering all options.
Thomas Lamprecht [Sun, 24 May 2020 00:10:47 +0000 (02:10 +0200)]
fix #2574: ui: permission-path selector: push each unique path only once
In clusters a storage was pushed as many times as there are nodes
using it. Ensure we only push a path once, do this with a memory
oriented solution, i.e., build a extra object to remember what we
already pushed. This is preferred over a me.findExact call as it's a
o(n) vs o(n^2) solution compute wise and we make the user wait if
this would need long, so reducing compute time over memory use is
here a good choice - even if we will seldom run into situations where
this actually will make a difference with such small data counts.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 22 May 2020 15:16:35 +0000 (17:16 +0200)]
ui: qemu: stop pending changes in correct scope
I saw some cases where the pending changes just continued to get
triggered for some VMs, even if they shouldn't anymore - effectively
resulting in 3 - 4 concurrent pending changes call at a time.
It could be this, or not, but it's cleaner this way so go for it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 19 May 2020 19:00:57 +0000 (21:00 +0200)]
ui: TokenEdit: change default focus to tokenide field
Avoids that the user selector always pops up and tokenid is normally
more likely to change as the userid gets pre-selected to the one from
the logged in user.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 8 May 2020 07:53:31 +0000 (09:53 +0200)]
dc/Realms: fix adding of new ldap realm
we cannot pass 'delete' on create api call, and we have to make
sure that 'default_opts' and 'sync_attributes' are alwyas available,
since they are used in onGetValues
(they were only created during setValues, which is not called
when adding a new realm)
we need to parse the config even if it does not exist - it will return
the 'standalone' entry that's needed to be backwards compatible with
existing setups.
Dominik Csapak [Thu, 7 May 2020 08:27:12 +0000 (10:27 +0200)]
ui: node/ACME: only enable order button when it should work
to order a ceritificate, we need at least one configured domain, and
the configured account (or default) must exist
so track the domaincount in the viewmodel and introduce a
'canOrder' formula which is only true when domaincount > 0 and
account is set (if the configured account does not exist, or no account
exists at all we set 'account' to 'null')
Dominik Csapak [Thu, 7 May 2020 08:27:07 +0000 (10:27 +0200)]
NodeConfig/get_acme_conf: make domains always a hash
on all call sites, we assume $cfg->{domains} is a hash, but if we do not
have any domains configured, that fails with
'Can't use an undefined value as a HASH reference at ...'
It's not 100% true, but for the user more understandable. IF we
actually change such that this detail matters we can still go for a
"Better" solution then, as it will need UI updates anyway..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 6 May 2020 14:31:12 +0000 (16:31 +0200)]
ui: node/ACME: rework ACME grid for plugin based domains
This is basically a complete rework of the ACME grid.
Instead of having an ObjectGrid, we now have a normal
GridPanel which allows us to show a row for each Domain.
But to achieve this, we need to manually fill the store with data
from the 'acme' and 'acmedomainX' entries of the node config.
We also add an AccountSelector to the tbar and a link to the
datacenter->acme panel (when there is no account)
this also removes the 'register account' and 'view account' buttons,
since those are now available in datacenter->acme
Dominik Csapak [Wed, 6 May 2020 14:31:11 +0000 (16:31 +0200)]
ui: node/ACME: add ACMEDomainEdit
which expects a nodeconfig (for digest and domaincount)
and for the edit case, the parsed 'domain' object
this editwindow has three fields:
* type selector (standalone/dns)
* domain
* plugin (only for dns)
if the user chooses dns but there are already the maximum count of
acmedomainX entries, the type field gets invalid (with a error tooltip)
the onGetValues method is non-trivial, because of the mixing of
acmedomainX and acme.domain values, so we have to be careful
that we delete/edit the correct entry
Stefan Reiter [Wed, 6 May 2020 10:34:59 +0000 (12:34 +0200)]
gui: never collapse notes for templates
There's no graphs on screen, so no reason to collapse the notes to save
space. Besides, it looked a bit funky expanding the notes on smaller
screens, since they always jumped to the bottom to fill the space...
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Fabian Ebner [Wed, 6 May 2020 08:14:27 +0000 (10:14 +0200)]
Improve storage selection on restore
Previously, the blank '' would be passed along and lead to a
parameter verfication failure.
For LXC the default behavior in the backend is to use 'local', so
disallow blank and auto-select the first storage supporting'rootdir'
instead.
For QEMU the default behavior in the backend is to use the
original layout from the backup configuration file, which
makes sense to use as the default in the GUI as well.
vzdump: set 'pbs' option when backing up to PBS target
this unifies the logic into a single place instead of all over this
module and the plugins.
it also fixes tons of 'uninitialized value' warnings when backing up
with --dumpdir but no --storage set, since the existing conditions for
PBS targets are missing a definedness check.
Dominik Csapak [Tue, 5 May 2020 12:38:17 +0000 (14:38 +0200)]
ui: add ACMEPluginEdit window
this is a rather complex edit window, because we dynamically create form
fields according to the schema we get from the api
to do this properly we have to handle a few things:
* we have to properly set the values on edit
* we have to properly track the original values
* we have to merge and split with/from the generic 'data' field
(so that if a plugin has some extra fields that we did not include in
the schema the user can still enter them)
Dominik Csapak [Tue, 5 May 2020 12:38:14 +0000 (14:38 +0200)]
ACME: add challengeschema api call
which returns a list of challenge api types with the schema of their
required data (if it exists)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ Thomas: adapt to my changes from proxmox-acme schema def and change
path from challengeschema to challenge-schema ]