5275 Commits

Author SHA1 Message Date
Dominik Csapak
846ff6395b 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>
2020-11-20 15:34:27 +01:00
Dominik Csapak
d1cbfe0fa2 Status/Plugin: add id to schema
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 14:00:16 +01:00
Dominik Csapak
48fd18565b Status/Plugin: fix jsonschema for MTU
jsonschema wants 'minimum' not 'min'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-20 14:00:16 +01:00
Dominic Jäger
1f152d9f6e 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>
2020-11-17 14:13:11 +01:00
Aaron Lauterer
c94925897e 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>
2020-11-17 09:58:49 +01:00
Fabian Ebner
5b0667f01b fix maxfiles behavior
Commit 5ba2a605ac14de58572f7b8d6e04b45b34724b0a 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>
2020-11-16 18:18:32 +01:00
Thomas Lamprecht
d19eda111d aplinfo: update shipped index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-16 18:06:16 +01:00
Dominic Jäger
91e4b0e7c7 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>
2020-11-16 18:06:12 +01:00
Dominik Csapak
2ced2e8618 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>
2020-11-16 10:12:03 +01:00
Thomas Lamprecht
058087fd66 ui: storage content view: add clear trigger to search
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-16 10:09:05 +01:00
Thomas Lamprecht
d682bcf5fa ui: storage content view: eslint fixes and code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-16 09:58:04 +01:00
Thomas Lamprecht
c2b949f05b 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>
2020-11-15 19:38:38 +01:00
Thomas Lamprecht
1c829a4aba ui: reverse showColumns to hideColumns, default to hide comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 19:37:21 +01:00
Thomas Lamprecht
409ee1c442 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>
2020-11-15 19:34:58 +01:00
Fabian Ebner
27c00fff96 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>
2020-11-15 19:02:21 +01:00
Fabian Ebner
d82f2ef5d1 simplify reload call
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
67900d76e0 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>
2020-11-15 18:41:11 +01:00
Fabian Ebner
7df605eee5 get rid of unneccessary enableFn's
There's only backups in this view.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
abac522894 create and use BackupView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
2a5e4ad77e create and use TemplateView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
37b7e2487d add upload button conditionally
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
f3a18c920a 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>
2020-11-15 18:41:11 +01:00
Fabian Ebner
33cd1cf67b content view: allow specifying title bar elements for init
in preparation to create derived classes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
5b10ecf869 remove the now unneccessary content type column
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
4885101f11 remove the now unnecessary grouping by content type
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
9cd22de1b9 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>
2020-11-15 18:41:11 +01:00
Fabian Ebner
febda77bfc add CD ROM and lxc icons for treelist-item-icon
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
65db357c62 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>
2020-11-15 18:41:11 +01:00
Fabian Ebner
ed5d540350 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>
2020-11-15 18:41:11 +01:00
Fabian Ebner
17cc1de7c3 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>
2020-11-15 18:41:11 +01:00
Thomas Lamprecht
c3edb378da 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>
2020-11-15 16:46:02 +01:00
Thomas Lamprecht
c88b8f56b1 ui: storage: implement apiCallDone callback for storage input panels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:56:37 +01:00
Thomas Lamprecht
a8af1f2ace ui: storage/PBS: drop beta hint
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:56:37 +01:00
Thomas Lamprecht
00b37800d6 ui: token create: use clipboard icon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:51:43 +01:00
Thomas Lamprecht
fcbafbf2c7 ui: save cluster name in PVE global
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:51:13 +01:00
Thomas Lamprecht
6d3d5de5df ui: content/backup-view: move comment to second col, make flex
to make it more look like what we to in PBS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-12 18:34:38 +01:00
Thomas Lamprecht
5a5a7c1a37 ui: storage content: fix verify time tooltip
this was partial copied over from PBS, but there we pull out the task
startime alreay when building the store.

As eslint mentions, task was unused, verify_time not defined, fix
that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-12 18:31:17 +01:00
Thomas Lamprecht
e78f9bfc84 eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-12 18:23:47 +01:00
Dominik Csapak
5e6bf13276 ui: add comment/verification columns to backup/content grid
verification column only shows in the backup grid and for
pbs storages

(renderer is mostly copied from proxmox-backup)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-12 18:14:53 +01:00
Thomas Lamprecht
9e107f1999 ui: package versions: make taller, add copy button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-05 19:45:10 +01:00
Thomas Lamprecht
08c6191640 ui: package versions: code cleanup, use template strings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-05 19:43:57 +01:00
Stefan Reiter
5ba2a605ac restore default value of 0 for remove/maxfiles
If neither the 'remove' option of vzdump nor the 'maxfiles' option in
the storage config are set, assume a value of 0, i.e. do not delete
anything and allow unlimited backups.

Restores previous behaviour that was broken in 7ab7d6f15f.

Also fixes a warning about using '== 0' on a non-number type.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-05 16:29:00 +01:00
Stefan Reiter
8eabe60e47 ui: qemu: set correct disabled state for start button
If a guest's QEMU process is 'running', but QMP says 'shutdown' or
'prelaunch', the VM is ready to be booted anew, so we can show the
button.

The 'shutdown' button is intentionally not touched, as we always want to
give the user the ability to 'stop' a VM (and thus kill any potentially
leftover processes).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-05 13:31:29 +01:00
Stefan Reiter
b21348c117 apt: add libproxmox-backup-qemu0 to displayed packages
Can provide important information for debugging issues in forum etc...

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-11-05 10:30:08 +01:00
Thomas Lamprecht
48bd51b6cd bump version to 6.2-15
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-01 20:35:03 +01:00
Thomas Lamprecht
d6eaf5a10f vzdump: fix regression with keep forever logic
fixes commit 43ff41c6c58ea8f6c28ef0a4012b4af706fa280b, which changed
the logic to the newer storage prune helpers, but those are designed
in the spirits of PBS, with a keep-option not set meaning to keep
none.

This does not respects the storage special handling of maxfiles.
While in the API/CLI that option must be > 0m in can be zero when set
in a storage configuration entry, and then it means keep all. So, set
the internal remove option to false if that special condition is met.

This would have been a clearer, and less prone to changes,
implementation to begin with.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-01 20:11:03 +01:00
Dominik Csapak
eff099960e ui: Utils: add product specific task descriptions
move them from widget-toolkit to here
i took the chance, and sorted them alphabetically

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-10-30 14:06:28 +01:00
Dominic Jäger
a5c3378776 ui: Add verify SSL cert checkbox for active directory
Like for LDAP, the option is too important to be hidden in CLI.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-10-29 19:22:51 +01:00
Thomas Lamprecht
fd186ea5c5 follouwp whitespace fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-29 09:12:22 +01:00
Fabian Grünbichler
e46ca16f43 status/metrics: make MTU configurable
since some users don't even have a full 1500 (and some systems might
have links with bigger MTU and not require as much fragmentation).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-10-29 08:51:51 +01:00