[pve-devel] applied-series: [PATCH manager 0/5] improve ux for ceph versions

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 1 18:41:01 CEST 2020


On 3/16/20 1:55 PM, Dominik Csapak wrote:
> adds more visual hints about the ceph versions (needs upgrade/restart)
> and a 'highest cluster version' on the ceph dashboard
> to let the admin know what the expected version is
> 
> Dominik Csapak (5):
>   ceph: factor out get/broadcast ceph versions to ceph::services
>   ceph: add 'scope' parameter to metadata api call
>   gui: ceph: let compare_ceph_versions accept arrays directly
>   gui: ceph: icons for versions in ServiceList
>   gui: ceph: add highest cluster version in summary
> 
>  PVE/API2/Cluster/Ceph.pm         | 18 +++++++---
>  PVE/Ceph/Services.pm             | 30 +++++++++++++++++
>  PVE/Service/pvestatd.pm          | 19 +----------
>  www/manager6/Utils.js            | 17 ++++++++--
>  www/manager6/ceph/ServiceList.js | 58 +++++++++++++++++++++++++++++++-
>  www/manager6/ceph/Status.js      | 51 ++++++++++++++++++++++++++--
>  6 files changed, 164 insertions(+), 29 deletions(-)
> 

Applied series with a followup (see below), thanks!

commit cb8dd773ab712b393fb55f3692df1b4c0d4a50ee
Author: Thomas Lamprecht <t.lamprecht at proxmox.com>
Date:   Wed Apr 1 18:39:06 2020 +0200

    ui: ceph: use displayfield with tooltip for overview version
    
    And drop the git shorthash for now, albeit we could add it to the
    tooltip..
    
    Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>

diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index e85df558..2de2ceed 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -53,24 +53,19 @@ Ext.define('PVE.node.CephStatus', {
                        },
                        {
                            itemId: 'versioninfo',
-                           xtype: 'component',
-                           data: {
-                               version: "",
-                               git: "",
+                           xtype: 'displayfield',
+                           fieldLabel: gettext('Ceph Version'),
+                           value: "",
+                           autoEl: {
+                               tag: 'div',
+                               'data-qtip': gettext('The newest version installed in the Cluster.'),
                            },
                            padding: '10 0 0 0',
                            style: {
                                'text-align': 'center',
                            },
-                           tpl: [
-                               '<tpl if="version">',
-                               '<b>', gettext('Highest Version in Cluster'), '</b>',
-                               '<br>',
-                               '{version} (git: {git})',
-                               '</tpl>'
-                           ],
                        }
-                   ]
+                   ],
                },
                {
                    flex: 2,
@@ -394,20 +389,14 @@ Ext.define('PVE.node.CephStatus', {
 
            let maxversion = [];
            let maxversiontext = "";
-           let git = "";
            for (const [nodename, data] of Object.entries(me.metadata.node)) {
                let version = data.version.parts;
                if (PVE.Utils.compare_ceph_versions(version, maxversion) > 0) {
                    maxversion = version;
-                   git = data.buildcommit.substr(0,8);
                    maxversiontext = data.version.str;
                }
            }
-
-           me.down('#versioninfo').update({
-               version: maxversiontext,
-               git: git,
-           });
+           me.down('#versioninfo').setValue(maxversiontext);
        }, me);
 
        me.on('destroy', me.store.stopUpdate);




More information about the pve-devel mailing list