Stoiko Ivanov [Tue, 24 Nov 2020 18:55:47 +0000 (19:55 +0100)]
api2: osd destroy: untaint device before pvremove
We get the device list from ceph-volume lvm list, and decode the json
output, which at that point is tainted (perlsec (1)).
Untaint it here before calling, because it is currently the only
call-site using the information in a problematic way (run_command).
(the only other call-site being in pve5to6)
Alternatively we could untaint while reading the information, but then
should only return a small subset of the ceph-volume output.
Fabian Ebner [Tue, 24 Nov 2020 14:31:36 +0000 (15:31 +0100)]
ui: storage: show no-keeps hint exactly when needed
extracting the logic from the previous checkbox listener into a function, which
is also called on field changes and once in afterrender. Calling it initially
makes sure the hint is also displayed at the beginning when editing a storage
with no retention options configured, and the initial disabling of the input
fields for the isCreate case now also happens through that call.
Fabian Ebner [Tue, 24 Nov 2020 13:00:53 +0000 (14:00 +0100)]
ui: storage backup view: add prune window
adapted from PBS. Main differences are:
* API has GET/DELETE distinction instead of 'dry-run'
* API expects a single property string for the prune options
Thomas Lamprecht [Mon, 23 Nov 2020 18:31:13 +0000 (19:31 +0100)]
ui: storage: pbs: add hint for backup retention
Normally it's better to configure pruning (backup retention) on the
backup server only, as then multiple client settings may not
interfere with each other due to outdated or to strict prune
settings (remember, the strictest prune setting always wins).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sun, 22 Nov 2020 14:26:13 +0000 (15:26 +0100)]
ui: console: add beforeLoad callback
we sometimes need to adapt parameters, but in a lot contexts the
component is already created, and the activate event order of
components may make this hard to do in a deterministic way.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 21 Nov 2020 19:39:54 +0000 (20:39 +0100)]
ui: metrics: use icons for add server
we could use the official influxdata one, they provide it in their
branding guide - and the use here would seem to comply with their
rules, and would fall under fair-user, probably.
Still, not 100% clear for me and Graphite is not easy to find a good
one with clear rules, so just reuse the bar-graph Font Awesome one,
better than nothing (looks empty-wrong)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 21 Nov 2020 19:36:31 +0000 (20:36 +0100)]
ui/api: metrics: move server to subpath, post to path with ID
We actually wanted to use that scheme for more new API paths, lets
see if it is really fitting starting with this.
Use the new widget-toolkit submitUrl helper to add the ID on create.
And unify the edit/create window creation, which may fit better in a
separate commit, it's quite small and was to cumbersome to untangle,
so just go against my one rules here... :(
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 20 Nov 2020 14:12:28 +0000 (15:12 +0100)]
ui: add MetricServerView to Datacenter
adds ui support for configuring the External Metric servers.
for now, influxdb and graphite edit windows do not share code,
it would be ideal to do that once we add more plugins
Aaron Lauterer [Mon, 2 Nov 2020 14:01:01 +0000 (15:01 +0100)]
ui: fix column behavior with browser scaling
especially on chromium based browser (e.g. chrome, edge) it can happen,
depending on the zoom level, that the last column does not fit next to
the other columns and is moved below the other columns.
This results in an ugly looking UI and in the worst case makes it
unusable.
This can also be triggered if the monitor is set to a higher scaling /
different DPI settings. I was able to have the same problem in Edge when
setting the scaling in the windows display settings to 125% (Clone VM).
Changing the layout from columns with 0.5 width to extjs HBOXes with
flex 1 works as expected.
Fabian Ebner [Mon, 9 Nov 2020 08:56:33 +0000 (09:56 +0100)]
fix maxfiles behavior
Commit b64dd8c8a56c424b4cfe8cb8ef0841e49ba38c03 hard-coded 0 as the default
for maxfiles in the --storage case, but the actual default should be the
value from read_vzdump_defaults(), which obtains the value from
/etc/vzdump.conf or the VZDump schema if the value has not been modified in
that file. The initial default from the schema is 1, not 0.
Tested on PVE 6.1 to verify that behavior.
Move the sanity check for zero-ness to where we have the final value for
maxfiles. Like this, we also have an implicit definedness check and more
importantly, it is more future-proof in case we ever allow maxfiles 0 in the
VZDump schema itself.
Dominic Jäger [Mon, 16 Nov 2020 09:44:11 +0000 (10:44 +0100)]
vzdump mail: fix #3136: Add name to plain/text part
The html/text part already has VMID NAME STATUS TIME..., but the text part only
had VMID STATUS TIME... so far. Therefore, add the missing "name" column.
Limit the length of names so that the content of the following columns remains
aligned to the headings. Note that (like before, too) this only works with
monospaced fonts.
Thomas Lamprecht [Sun, 15 Nov 2020 18:34:52 +0000 (19:34 +0100)]
ui: makefile: fix order
else some panels try to use conetent view before it is defined,
triggering the ExtJS auto-load from server magic, which fails - while
it does not breaks the UI, it generates a warning in the console and
an unnecessary request doomed to fail anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Fri, 13 Nov 2020 13:16:29 +0000 (14:16 +0100)]
content view: allow specifying which columns to show on init
depending on the content type, we might want to show different information, e.g.
parent for cloned VM/CT images, verification for backups, etc. Of course the
properties would have to be added to the model and the availableColumns first
Fabian Ebner [Fri, 13 Nov 2020 13:16:18 +0000 (14:16 +0100)]
use separate view for each content type
Organized as separate "if"s to allow changing properties easily later.
The StorageContentView now serves as a parent class, so the stateId
cannot be fixed there. Instead make each individual view stateful with a
unique stateId.
statusStore is not needed anymore, now there is a single fixed content type,
and the template and upload button are disabled depending on that type.
Thomas Lamprecht [Sun, 15 Nov 2020 13:54:19 +0000 (14:54 +0100)]
ui: storage/PBS: allow to download/print new encryption key
note that the key is really important, add our recommended backup
strategy (copy to PW manager, save onto secured USB drive, print
paperkey and secure it) with the respective buttons to do so.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>