public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
Date: Thu,  7 Dec 2023 14:35:58 +0100	[thread overview]
Message-ID: <20231207133558.566788-1-d.csapak@proxmox.com> (raw)

with this the title is now completely visible when the column is
expanded, even if it's originally too narrow.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
changes from v1:
* wrap the text in the column, instead of duplicating it in the expanded
  body

thanks @thomas for the suggestion

 www/css/ext6-pve.css        |  4 ++++
 www/manager6/ceph/Status.js | 16 ++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index 09185535..b5a3683a 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -750,3 +750,7 @@ table.osds td:first-of-type {
 .pmx-tag-tooltip .proxmox-tags-full > span {
     margin: 0px;
 }
+
+.pmx-column-wrapped > div {
+    white-space: pre-wrap;
+}
diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index ab882327..4845db99 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -82,6 +82,16 @@ Ext.define('PVE.node.CephStatus', {
 		    stateId: 'ceph-status-warnings',
 		    viewConfig: {
 			enableTextSelection: true,
+			    listeners: {
+				collapsebody: function(rowNode, record) {
+				    record.set('expanded', false);
+				    record.commit();
+				},
+				expandbody: function(rowNode, record) {
+				    record.set('expanded', true);
+				    record.commit();
+				},
+			    },
 		    },
 		    // we load the store manually, to show an emptyText specify an empty intermediate store
 		    store: {
@@ -139,6 +149,12 @@ Ext.define('PVE.node.CephStatus', {
 			{
 			    dataIndex: 'summary',
 			    header: gettext('Summary'),
+			    renderer: function(value, metaData,record, rI, cI, store, view) {
+				if (record.get('expanded')) {
+				    metaData.tdCls = 'pmx-column-wrapped';
+				}
+				return value;
+			    },
 			    flex: 1,
 			},
 			{
-- 
2.30.2





             reply	other threads:[~2023-12-07 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 13:35 Dominik Csapak [this message]
2024-02-19 13:28 ` Fiona Ebner
2024-02-19 13:57 ` [pve-devel] applied: " Thomas Lamprecht
2024-02-19 13:59   ` Dominik Csapak
2024-02-19 14:07     ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231207133558.566788-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal