Commit Graph

5234 Commits

Author SHA1 Message Date
Thomas Lamprecht
c64ee08643 pveceph: update octopus repository
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 12:01:52 +01:00
Thomas Lamprecht
80fdf8d266 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
b5ee2676fd ui: make remaining content views not stateful
Commit 2dcc87c798 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
d2ac54517c 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
74c8984dfc 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
77d7cf379f 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
c3035c01d0 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
37e75d8616 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
71696fc1ad 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
9199d1718c 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
f24be7e72d 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
22ad422ac9 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
a11328286a ceph services: cleanup variable names
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
49aac03491 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
9f4e985d99 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
1eb6d2bfdd 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
eb594f5ca5 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
06d157918f 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
7ba638362b 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
d57f8d9482 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
71f5bf0a45 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
f257dcec26 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
9dedf1e2d5 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
19e3a7f2a4 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
2c4bf90ff0 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
d01d651b54 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
a2beaf1374 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
d3b3b4ad2a 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
33b4554849 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
2f6cc103e0 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
fbe4599246 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
2cc64d0e42 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
d27a44a615 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
b15bdd864e fix maxfiles behavior
Commit b64dd8c8a5 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
5939af6bbb aplinfo: update shipped index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-16 18:06:16 +01:00
Dominic Jäger
d0610a6b4f 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
9493ac144b 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
c8a71b9e1f 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
1d8306e4ca 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
2dcc87c798 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
6ecc74209f 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
896475ee5b 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
7ef0f4c36c 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
1fe81ce99d simplify reload call
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
f5e17f156a 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
4323c70b47 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
1665b8402c create and use BackupView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
13d7dfccee create and use TemplateView
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
8798c35bcd add upload button conditionally
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-15 18:41:11 +01:00
Fabian Ebner
dbeddeb322 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