Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Lamprecht
c680135252 ui: ceph: fixup optional chaining operator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 17:06:50 +01:00
Dominik Csapak
30a6ce73f4 ui: ceph: add more compatibilty code for versions
we now have to handle the version of 'old' nodes, as well as the
new nodes, which are missing the 'version' field in the metadata/osd call

so set the 'versions' object to a default empty object for osds
and get the host version directly from the treenode
(the parent node of the osd node)

also compare the host version in the dashboard by getting first the
new version field, and the old one as fallback.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-12 17:02:27 +01:00
Dominik Csapak
d6fb92d747 ui: ceph: make version handling actually future proof
It seems we did not prepare the GUI enough for the API changes
planned when stopping to broadcast the old single string version. We
have to use the node specific versions, not the global 'versions'
object.

Also use the `PVE.Utils.compare_ceph_versions` everywhere, since some
versions are strings and others are the parts of the version (e.g.
["16", "2, "6"])

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 14:36:23 +01:00
Thomas Lamprecht
f87b8d2f3f ui: ceph: services: eslint fixes and code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 18:44:57 +02:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
df598da578 ui: ceph/Services: do some housekeeping
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-16 14:31:31 +01:00
Thomas Lamprecht
e1ed931dd9 ui: ceph: update text for outdated versions a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-22 16:38:15 +02:00
Dominik Csapak
0575611e25 gui: ceph dashboard: improve version hints
show the difference between a service where the host has outdated
packages, and where only the service runs an outdated version and only
needs to restart

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-22 15:52:07 +02:00
Dominik Csapak
23c83a3aa0 gui: ceph: add HEALTH_UPGRADE state
to have 2 different states for
* packages are outdated
* packages are up to date but the service runs with the old version

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-22 15:52:07 +02:00
Dominik Csapak
9e5460013f gui: ceph: parse the whole message for monitor ids
sometimes a monitor id is only mentioned in a later part of the message
not always the first

for example, if more than one monitor is missing the msgr2 protocol
each monitor gets its own line

before this patch the whole error would only be attributed to the first
monitor mentioned, now it is attributed to all

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-04 15:38:12 +02:00
Dominik Csapak
4f71a0ff0a gui: ceph: fix version comparison
'>' on strings is not numeric, so we use our compare_ceph_versions helper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 15:46:01 +02:00
Dominik Csapak
95d0de895a gui: ceph: add Services.js
Used for a new Panel in ceph dashboard, shows the ceph services
managed by us (mon,mgr,mds)

some code is copied from 'ceph/StatusDetail.js' and is not necessary there
anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-27 16:17:29 +02:00