5306 Commits

Author SHA1 Message Date
Fabian Ebner
7806065d78 vzdump: adapt to new keep-all prune option
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-23 16:03:08 +01:00
Thomas Lamprecht
e8a66c818a ui: snapshot tree: add separator between rollback and edit button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 14:00:07 +01:00
Moayad Almalat
f0c82f0f01 close #3114: ui: snapshots: switch Edit and Remove Button & add warning logo
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
2020-11-23 13:57:40 +01:00
Thomas Lamprecht
6bcc29f971 pveceph: update octopus repository
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 12:01:52 +01:00
Thomas Lamprecht
2bc6f69610 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>
2020-11-22 18:51:21 +01:00
Fabian Ebner
dc1d16e23c ui: make remaining content views not stateful
Commit c2b949f05bb8942b4827df4aeec91e10e09c1b2f 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>
2020-11-22 18:39:16 +01:00
Fabian Ebner
fea44a06ec ui: storage: get content types from resources
to avoid waiting for a status API call.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-22 18:39:16 +01:00
Fabian Ebner
903e8ace45 cluster resources: include content type for storages
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-22 18:39:16 +01:00
Thomas Lamprecht
09b9073a62 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>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
7910cb9829 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>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
4710634b2c ui: ceph wizard: move out info panel to separate component
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
a1e5819bc2 ceph: do not require allow-experimental flag for octopus anymore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
c5027524ca 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>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
8f49acaca1 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>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
cf485f2a36 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>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
2a5d20c843 ceph services: cleanup variable names
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
9e6ce53915 ui: lxc: code cleanup ssh key upload
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 10:22:10 +01:00
Thomas Lamprecht
c23d74d32d 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>
2020-11-21 20:55:15 +01:00
Thomas Lamprecht
37b4b9cfab ui: metrics: move server and port on same line
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-21 20:55:04 +01:00
Thomas Lamprecht
709784e21a 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>
2020-11-21 20:53:05 +01:00
Thomas Lamprecht
26f876e281 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>
2020-11-21 20:53:05 +01:00
Thomas Lamprecht
e4566d81e5 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>
2020-11-21 20:53:05 +01:00
Thomas Lamprecht
336b11738d 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>
2020-11-21 20:53:05 +01:00
Thomas Lamprecht
d244c47246 ui: metrics: add server base edit window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-21 20:39:33 +01:00
Dominik Csapak
bd714ac558 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>
2020-11-21 20:39:33 +01:00
Thomas Lamprecht
24c8594d5c api: drop Config from MetricServer module name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-21 20:39:33 +01:00
Dominik Csapak
af17f1b5c9 api2/cluster: add 'metricserver' api endpoints
modeled after our typical api endpoints for sectionschema configs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-21 20:39:33 +01:00
Thomas Lamprecht
4ca31af852 influxdb: avoid three line comment if one is enough
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-21 20:39:33 +01:00
Thomas Lamprecht
4412216f61 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>
2020-11-21 20:34:18 +01:00
Thomas Lamprecht
571328f6a7 http server: allow duplicate params (URI and form) if equal
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-21 20:34:18 +01:00
Dominik Csapak
972941fc57 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>
2020-11-20 15:34:27 +01:00
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