]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
3 years agoad #3140: allow interface suffix in dns entries
Wolfgang Bumiller [Wed, 25 Nov 2020 10:36:43 +0000 (11:36 +0100)]
ad #3140: allow interface suffix in dns entries

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoui: metrics: Link help button to correct chapter
Dominic Jäger [Wed, 25 Nov 2020 10:29:24 +0000 (11:29 +0100)]
ui: metrics: Link help button to correct chapter

... instead of generic PVE admin guide.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoapi: metrics/server: add minimum and maximum to port schema
Dominik Csapak [Wed, 25 Nov 2020 11:06:26 +0000 (12:06 +0100)]
api: metrics/server: add minimum and maximum to port schema

we just added the api, so it would be good to only accept valid ports
(they were wrapped before)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 6.3-1
Thomas Lamprecht [Tue, 24 Nov 2020 22:45:11 +0000 (23:45 +0100)]
bump version to 6.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi2: osd destroy: untaint device before pvremove
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.

The issue is most likely due to
cb9db10c1a9855cf40ff13e81f9dd97d6a9b2698 in pve-common ('run_command:
improve performance for logging and long lines'),

Tested on a virtual testsetup by creating OSDs with second DB disk,
and destroying it via GUI (did not manage to get the error without the
DB disk)

Reported via our community forum:
https://forum.proxmox.com/threads/insecure-dependency-in-exec-during-osd-destroy.79574/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoapi2: osd destroy: fix error function
Stoiko Ivanov [Tue, 24 Nov 2020 18:55:46 +0000 (19:55 +0100)]
api2: osd destroy: fix error function

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoui: storage content: add encryption and verification columns for PBS
Thomas Lamprecht [Tue, 24 Nov 2020 22:36:02 +0000 (23:36 +0100)]
ui: storage content: add encryption and verification columns for PBS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: factor out backup verification renderer
Thomas Lamprecht [Tue, 24 Nov 2020 22:35:39 +0000 (23:35 +0100)]
ui: factor out backup verification renderer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: guest backup view: add encrypted column for PBS storages
Thomas Lamprecht [Tue, 24 Nov 2020 22:35:15 +0000 (23:35 +0100)]
ui: guest backup view: add encrypted column for PBS storages

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage content: allow to specify extraColumns (again)
Thomas Lamprecht [Tue, 24 Nov 2020 22:34:25 +0000 (23:34 +0100)]
ui: storage content: allow to specify extraColumns (again)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage/browser: pass storage plugin type to content panels
Thomas Lamprecht [Tue, 24 Nov 2020 22:33:53 +0000 (23:33 +0100)]
ui: storage/browser: pass storage plugin type to content panels

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: pbs paperkey: print short fingerprint in heading
Thomas Lamprecht [Tue, 24 Nov 2020 22:32:20 +0000 (23:32 +0100)]
ui: storage: pbs paperkey: print short fingerprint in heading

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: pbs: move datastore field to right column for balance
Thomas Lamprecht [Tue, 24 Nov 2020 22:09:36 +0000 (23:09 +0100)]
ui: storage: pbs: move datastore field to right column for balance

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: pbs: improve encryption key handling
Thomas Lamprecht [Tue, 24 Nov 2020 22:07:32 +0000 (23:07 +0100)]
ui: storage: pbs: improve encryption key handling

Move encryption key handling in its own tab.

Allow uploads, warn more visible on edit/remove

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: utils: add more generic loadTextFromFile upload helper
Thomas Lamprecht [Tue, 24 Nov 2020 22:08:43 +0000 (23:08 +0100)]
ui: utils: add more generic loadTextFromFile upload helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: base: allow adding extra tab panels
Thomas Lamprecht [Tue, 24 Nov 2020 22:06:21 +0000 (23:06 +0100)]
ui: storage: base: allow adding extra tab panels

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: resources: return plugin type
Thomas Lamprecht [Tue, 24 Nov 2020 22:01:53 +0000 (23:01 +0100)]
api: resources: return plugin type

The storage one for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: dc/storage: set onlineHelp for prune tab in edit window
Thomas Lamprecht [Tue, 24 Nov 2020 16:09:51 +0000 (17:09 +0100)]
ui: dc/storage: set onlineHelp for prune tab in edit window

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 6.2-17
Thomas Lamprecht [Tue, 24 Nov 2020 15:01:48 +0000 (16:01 +0100)]
bump version to 6.2-17

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAPI2/Ceph: fix createpools 'add_storages' parameter
Dominik Csapak [Tue, 24 Nov 2020 14:32:55 +0000 (15:32 +0100)]
API2/Ceph: fix createpools 'add_storages' parameter

by deleteing it from $ceph_param we deleted it also from
$param since it was only a reference

fix it by extracting it beforehand

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: storage: show no-keeps hint exactly when needed
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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: guest backups: add separator, fix left-over Comments title
Thomas Lamprecht [Tue, 24 Nov 2020 13:26:18 +0000 (14:26 +0100)]
ui: guest backups: add separator, fix left-over Comments title

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage backup view: add prune window
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

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: add ability to show and edit comments for backups
Dominik Csapak [Tue, 24 Nov 2020 09:09:35 +0000 (10:09 +0100)]
ui: add ability to show and edit comments for backups

for now we filter out pbs storages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: change comment column to notes
Dominik Csapak [Tue, 24 Nov 2020 09:09:34 +0000 (10:09 +0100)]
ui: change comment column to notes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofollowup code cleanup
Thomas Lamprecht [Tue, 24 Nov 2020 12:38:50 +0000 (13:38 +0100)]
followup code cleanup

actually cleaning up the initial state, the last patch was OK as is..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agostorage: base edit: Don't send delete during creation
Dominic Jäger [Tue, 24 Nov 2020 12:15:58 +0000 (13:15 +0100)]
storage: base edit: Don't send delete during creation

... as this is now allowed by the API (createSchema() in PVE::SectionConfig).
It is only allowed by the update API call (updateSchema()).

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoUI: Ceph Wizard: language fixup
Dylan Whyte [Tue, 24 Nov 2020 10:14:47 +0000 (11:14 +0100)]
UI: Ceph Wizard: language fixup

Improve the language found in the ceph install Wizard.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
3 years agoui: wizard: fix ceph docs link
Thomas Lamprecht [Tue, 24 Nov 2020 08:27:18 +0000 (09:27 +0100)]
ui: wizard: fix ceph docs link

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: avoid ||=
Thomas Lamprecht [Mon, 23 Nov 2020 19:12:56 +0000 (20:12 +0100)]
ui: avoid ||=

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 6.2-16
Thomas Lamprecht [Mon, 23 Nov 2020 13:01:54 +0000 (14:01 +0100)]
bump version to 6.2-16

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: pbs: add hint for backup retention
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>
3 years agostorage: drop max backup fields, replaced by pruning
Thomas Lamprecht [Mon, 23 Nov 2020 17:55:19 +0000 (18:55 +0100)]
storage: drop max backup fields, replaced by pruning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agostorage: base edit: add Backup Retention tab
Thomas Lamprecht [Mon, 23 Nov 2020 17:52:19 +0000 (18:52 +0100)]
storage: base edit: add Backup Retention tab

Support all prune keep- settings we have.

masked if the storage cannot support backups.

We do not care if it is disabled as content type for now, a user can
just set them nonetheless (could show a hint though).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agostorage: base edit: move main inputpanel into tab panel
Thomas Lamprecht [Mon, 23 Nov 2020 17:51:16 +0000 (18:51 +0100)]
storage: base edit: move main inputpanel into tab panel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage base panel: cope with undefined column2
Thomas Lamprecht [Mon, 23 Nov 2020 18:12:36 +0000 (19:12 +0100)]
ui: storage base panel: cope with undefined column2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: bump versioned dependency of libpve-storage-perl 6.2-11
Thomas Lamprecht [Mon, 23 Nov 2020 15:03:57 +0000 (16:03 +0100)]
d/control: bump versioned dependency of libpve-storage-perl 6.2-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agocleanup keep-all handling
Fabian Ebner [Mon, 23 Nov 2020 14:54:15 +0000 (15:54 +0100)]
cleanup keep-all handling

If keep-all is set to 0, adding it doesn't make a difference,
if the key is not in the hash, it won't show up in the 'values'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: adapt to new keep-all prune option
Fabian Ebner [Mon, 23 Nov 2020 12:33:10 +0000 (13:33 +0100)]
vzdump: adapt to new keep-all prune option

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: snapshot tree: add separator between rollback and edit button
Thomas Lamprecht [Mon, 23 Nov 2020 13:00:07 +0000 (14:00 +0100)]
ui: snapshot tree: add separator between rollback and edit button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclose #3114: ui: snapshots: switch Edit and Remove Button & add warning logo
Moayad Almalat [Mon, 9 Nov 2020 11:40:10 +0000 (12:40 +0100)]
close #3114: ui: snapshots: switch Edit and Remove Button & add warning logo

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
3 years agopveceph: update octopus repository
Thomas Lamprecht [Mon, 23 Nov 2020 11:01:52 +0000 (12:01 +0100)]
pveceph: update octopus repository

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph install wizard: fix indentation
Thomas Lamprecht [Sun, 22 Nov 2020 17:51:19 +0000 (18:51 +0100)]
ui: ceph install wizard: fix indentation

Hi to the people from the future which came here due to git blame or
the like. `git show -w` should proof that you got the wrong one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: make remaining content views not stateful
Fabian Ebner [Wed, 18 Nov 2020 10:04:19 +0000 (11:04 +0100)]
ui: make remaining content views not stateful

Commit 2dcc87c798406e74b9f28a894663937967b2c57c removed the statefulness from
the other storage content views, so remove it from the remaining ones too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: storage: get content types from resources
Fabian Ebner [Wed, 18 Nov 2020 10:04:18 +0000 (11:04 +0100)]
ui: storage: get content types from resources

to avoid waiting for a status API call.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agocluster resources: include content type for storages
Fabian Ebner [Wed, 18 Nov 2020 10:04:17 +0000 (11:04 +0100)]
cluster resources: include content type for storages

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: ceph install mask: avoid showing version
Thomas Lamprecht [Sun, 22 Nov 2020 16:58:52 +0000 (17:58 +0100)]
ui: ceph install mask: avoid showing version

we do not know yet which version will get installed for real, so just
drop that part.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph: allow selecting which version to install
Thomas Lamprecht [Sun, 22 Nov 2020 16:56:23 +0000 (17:56 +0100)]
ui: ceph: allow selecting which version to install

Try to find out the newest version in the cluster and select that (if
in the known OK list).

Slightly hacky, but nothing really out of the ordinary, so should be
OK.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph wizard: move out info panel to separate component
Thomas Lamprecht [Sun, 22 Nov 2020 14:46:18 +0000 (15:46 +0100)]
ui: ceph wizard: move out info panel to separate component

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: do not require allow-experimental flag for octopus anymore
Thomas Lamprecht [Sun, 22 Nov 2020 14:29:02 +0000 (15:29 +0100)]
ceph: do not require allow-experimental flag for octopus anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: console: add beforeLoad callback
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>
3 years agoapi: nodes: allow root to pass arbitrary arguments to commands
Thomas Lamprecht [Sun, 22 Nov 2020 14:23:16 +0000 (15:23 +0100)]
api: nodes: allow root to pass arbitrary arguments to commands

If the command itself allows it, which normally means it has good
verification of passed arguments.

We may want to re-evaluate security here if we allow execution for a
group of non-root users.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: cluster/ceph: allow version metadata call on non-ceph nodes
Thomas Lamprecht [Sun, 22 Nov 2020 15:12:58 +0000 (16:12 +0100)]
api: cluster/ceph: allow version metadata call on non-ceph nodes

the information comes only from the key value store in the pmxcfs, so
we do not actually require ceph to be installed.

So only check if ceph is locally initialized and create the rados
connection after the early return when only versions scope is set.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph services: cleanup variable names
Thomas Lamprecht [Sun, 22 Nov 2020 16:58:17 +0000 (17:58 +0100)]
ceph services: cleanup variable names

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: lxc: code cleanup ssh key upload
Thomas Lamprecht [Sun, 22 Nov 2020 09:22:10 +0000 (10:22 +0100)]
ui: lxc: code cleanup ssh key upload

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: metrics: set default for port
Thomas Lamprecht [Sat, 21 Nov 2020 19:55:13 +0000 (20:55 +0100)]
ui: metrics: set default for port

while it may not be always correct, we can only win by setting a
reasonable default, taken from

* graphite:
  https://graphite.readthedocs.io/en/stable/feeding-carbon.html#the-plaintext-protocol
* influxdb, udp port:
  https://docs.influxdata.com/influxdb/v1.8/administration/ports/

Also, changing that is easy for the admin and can always be done
afterwards.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: metrics: move server and port on same line
Thomas Lamprecht [Sat, 21 Nov 2020 19:55:04 +0000 (20:55 +0100)]
ui: metrics: move server and port on same line

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: metrics: style cleanup: defined xtype first, name second
Thomas Lamprecht [Sat, 21 Nov 2020 19:43:08 +0000 (20:43 +0100)]
ui: metrics: style cleanup: defined xtype first, name second

those are both the most important for what the field is, so they
should come first.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: metrics: advancedColumn1 may now be empty
Thomas Lamprecht [Sat, 21 Nov 2020 19:42:10 +0000 (20:42 +0100)]
ui: metrics: advancedColumn1 may now be empty

we have now improved detection in widget toolkit, not yet packaged
though

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: metrics: use icons for add server
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>
3 years agoui/api: metrics: move server to subpath, post to path with ID
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>
3 years agoui: metrics: add server base edit window
Thomas Lamprecht [Sat, 21 Nov 2020 19:31:54 +0000 (20:31 +0100)]
ui: metrics: add server base edit window

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add MetricServerView to Datacenter
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi: drop Config from MetricServer module name
Thomas Lamprecht [Fri, 20 Nov 2020 15:45:37 +0000 (16:45 +0100)]
api: drop Config from MetricServer module name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi2/cluster: add 'metricserver' api endpoints
Dominik Csapak [Fri, 20 Nov 2020 14:12:27 +0000 (15:12 +0100)]
api2/cluster: add 'metricserver' api endpoints

modeled after our typical api endpoints for sectionschema configs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoinfluxdb: avoid three line comment if one is enough
Thomas Lamprecht [Sat, 21 Nov 2020 19:39:22 +0000 (20:39 +0100)]
influxdb: avoid three line comment if one is enough

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: manager: use eslint for lint target
Thomas Lamprecht [Sat, 21 Nov 2020 19:28:51 +0000 (20:28 +0100)]
ui: manager: use eslint for lint target

not yet linting by default, we need to fix a few thousands linter
errors before that (most are trivial though)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agohttp server: allow duplicate params (URI and form) if equal
Thomas Lamprecht [Sat, 21 Nov 2020 19:33:47 +0000 (20:33 +0100)]
http server: allow duplicate params (URI and form) if equal

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: fix 'no iommu found' message for setups
Dominik Csapak [Fri, 20 Nov 2020 14:29:13 +0000 (15:29 +0100)]
ui: fix 'no iommu found' message for setups

sometimes, the first device in the pci api call is not in a separate
iommu group (see e.g. [0]), but it is active and should work

instead of testing the first, test all, and only show the message
if no device has a set iommu group

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix iteration over hash without keys
Dominik Csapak [Fri, 20 Nov 2020 14:14:22 +0000 (15:14 +0100)]
fix iteration over hash without keys

without 'keys' we iterate also over the values and use them as keys

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoStatus/Plugin: add id to schema
Dominik Csapak [Fri, 20 Nov 2020 09:50:47 +0000 (10:50 +0100)]
Status/Plugin: add id to schema

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoStatus/Plugin: fix jsonschema for MTU
Dominik Csapak [Fri, 20 Nov 2020 09:50:46 +0000 (10:50 +0100)]
Status/Plugin: fix jsonschema for MTU

jsonschema wants 'minimum' not 'min'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agovzdump mail: Refactor text part
Dominic Jäger [Tue, 17 Nov 2020 10:46:52 +0000 (11:46 +0100)]
vzdump mail: Refactor text part

Less lines exeeding the character limit, less nesting, less duplicate code,
more readable sprintf arguments.

Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoui: fix column behavior with browser scaling
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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agofix maxfiles behavior
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.

Also, force conversion to int to be extra safe.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoaplinfo: update shipped index
Thomas Lamprecht [Mon, 16 Nov 2020 16:35:19 +0000 (17:35 +0100)]
aplinfo: update shipped index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agovzdump mail: fix #3136: Add name to plain/text part
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.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoui: remove sum for percentages of ceph pools
Dominik Csapak [Fri, 13 Nov 2020 12:01:12 +0000 (13:01 +0100)]
ui: remove sum for percentages of ceph pools

because different pools can have different crush rules, etc.
the sum of the 'percentage used' column makes no real sense, so we
remove it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: storage content view: add clear trigger to search
Thomas Lamprecht [Mon, 16 Nov 2020 08:58:22 +0000 (09:58 +0100)]
ui: storage content view: add clear trigger to search

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage content view: eslint fixes and code cleanup
Thomas Lamprecht [Mon, 16 Nov 2020 08:58:04 +0000 (09:58 +0100)]
ui: storage content view: eslint fixes and code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: re-order navigation tree entries, avoid state saving
Thomas Lamprecht [Sun, 15 Nov 2020 18:38:36 +0000 (19:38 +0100)]
ui: storage: re-order navigation tree entries, avoid state saving

So we have first backups, then disk images (VM, CT), then templates
(VM, CT) and finally snippets.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: reverse showColumns to hideColumns, default to hide comment
Thomas Lamprecht [Sun, 15 Nov 2020 18:37:21 +0000 (19:37 +0100)]
ui: reverse showColumns to hideColumns, default to hide comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: makefile: fix order
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>
3 years agocontent view: allow specifying which columns to show on init
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

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agosimplify reload call
Fabian Ebner [Fri, 13 Nov 2020 13:16:28 +0000 (14:16 +0100)]
simplify reload call

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agocreate ImageView and use it for VM and CT images
Fabian Ebner [Fri, 13 Nov 2020 13:16:27 +0000 (14:16 +0100)]
create ImageView and use it for VM and CT images

The enableFn's that were responsible for switching
between the image remove button and the standard remove button
are not needed anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoget rid of unneccessary enableFn's
Fabian Ebner [Fri, 13 Nov 2020 13:16:26 +0000 (14:16 +0100)]
get rid of unneccessary enableFn's

There's only backups in this view.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agocreate and use BackupView
Fabian Ebner [Fri, 13 Nov 2020 13:16:25 +0000 (14:16 +0100)]
create and use BackupView

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agocreate and use TemplateView
Fabian Ebner [Fri, 13 Nov 2020 13:16:24 +0000 (14:16 +0100)]
create and use TemplateView

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoadd upload button conditionally
Fabian Ebner [Fri, 13 Nov 2020 13:16:23 +0000 (14:16 +0100)]
add upload button conditionally

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoturn {nodename, storage, sm} into object variables
Fabian Ebner [Fri, 13 Nov 2020 13:16:22 +0000 (14:16 +0100)]
turn {nodename, storage, sm} into object variables

so they can be used and specified in derived classes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agocontent view: allow specifying title bar elements for init
Fabian Ebner [Fri, 13 Nov 2020 13:16:21 +0000 (14:16 +0100)]
content view: allow specifying title bar elements for init

in preparation to create derived classes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoremove the now unneccessary content type column
Fabian Ebner [Fri, 13 Nov 2020 13:16:20 +0000 (14:16 +0100)]
remove the now unneccessary content type column

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoremove the now unnecessary grouping by content type
Fabian Ebner [Fri, 13 Nov 2020 13:16:19 +0000 (14:16 +0100)]
remove the now unnecessary grouping by content type

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agouse separate view for each content type
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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoadd CD ROM and lxc icons for treelist-item-icon
Fabian Ebner [Fri, 13 Nov 2020 13:16:17 +0000 (14:16 +0100)]
add CD ROM and lxc icons for treelist-item-icon

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agostorage panel/browser: use insertNodes function
Fabian Ebner [Fri, 13 Nov 2020 13:16:16 +0000 (14:16 +0100)]
storage panel/browser: use insertNodes function

in preparation for dynamically loading nodes for content-type-specific views.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoconfig panel: allow new nodes to be added later
Fabian Ebner [Fri, 13 Nov 2020 13:16:15 +0000 (14:16 +0100)]
config panel: allow new nodes to be added later

in preparation for dynamically loading nodes for content-type-specific views.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agofix extension filter for upload window
Fabian Ebner [Fri, 13 Nov 2020 13:16:14 +0000 (14:16 +0100)]
fix extension filter for upload window

so that it selects the correct filter for container templates

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: storage/PBS: allow to download/print new encryption key
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>