public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
@ 2023-12-07 13:35 Dominik Csapak
  2024-02-19 13:28 ` Fiona Ebner
  2024-02-19 13:57 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 5+ messages in thread
From: Dominik Csapak @ 2023-12-07 13:35 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
  2023-12-07 13:35 [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand Dominik Csapak
@ 2024-02-19 13:28 ` Fiona Ebner
  2024-02-19 13:57 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 5+ messages in thread
From: Fiona Ebner @ 2024-02-19 13:28 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 07.12.23 um 14:35 schrieb Dominik Csapak:
> 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>

Tested-by: Fiona Ebner <f.ebner@proxmox.com>

> @@ -139,6 +149,12 @@ Ext.define('PVE.node.CephStatus', {
>  			{
>  			    dataIndex: 'summary',
>  			    header: gettext('Summary'),
> +			    renderer: function(value, metaData,record, rI, cI, store, view) {

eslint complains about missing space after ',' here

> +				if (record.get('expanded')) {
> +				    metaData.tdCls = 'pmx-column-wrapped';
> +				}
> +				return value;
> +			    },
>  			    flex: 1,
>  			},
>  			{




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied: [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
  2023-12-07 13:35 [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand Dominik Csapak
  2024-02-19 13:28 ` Fiona Ebner
@ 2024-02-19 13:57 ` Thomas Lamprecht
  2024-02-19 13:59   ` Dominik Csapak
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Lamprecht @ 2024-02-19 13:57 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 07/12/2023 um 14:35 schrieb Dominik Csapak:
> 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(+)
> 
>

applied, with Fiona's T-b and the fix for the eslint warning squashed in,
thanks!

btw. I first tried `pve-eslint --fix .` inside the (clean) www/manager6
folder, but that just resulted in a truncated ceph/Status.js file, so while
eslint seems to correctly get the fix option and finds the issue, writing
out the updated code to the file seems broken – can you look into that?
(no pressure though)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] applied: [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
  2024-02-19 13:57 ` [pve-devel] applied: " Thomas Lamprecht
@ 2024-02-19 13:59   ` Dominik Csapak
  2024-02-19 14:07     ` Thomas Lamprecht
  0 siblings, 1 reply; 5+ messages in thread
From: Dominik Csapak @ 2024-02-19 13:59 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion

On 2/19/24 14:57, Thomas Lamprecht wrote:
> Am 07/12/2023 um 14:35 schrieb Dominik Csapak:
>> 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(+)
>>
>>
> 
> applied, with Fiona's T-b and the fix for the eslint warning squashed in,
> thanks!
> 
> btw. I first tried `pve-eslint --fix .` inside the (clean) www/manager6
> folder, but that just resulted in a truncated ceph/Status.js file, so while
> eslint seems to correctly get the fix option and finds the issue, writing
> out the updated code to the file seems broken – can you look into that?
> (no pressure though)

i guess you meant me with that ;)
yes i can look into that




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pve-devel] applied: [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand
  2024-02-19 13:59   ` Dominik Csapak
@ 2024-02-19 14:07     ` Thomas Lamprecht
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2024-02-19 14:07 UTC (permalink / raw)
  To: Dominik Csapak, Proxmox VE development discussion

Am 19/02/2024 um 14:59 schrieb Dominik Csapak:
> On 2/19/24 14:57, Thomas Lamprecht wrote:
>> btw. I first tried `pve-eslint --fix .` inside the (clean) www/manager6
>> folder, but that just resulted in a truncated ceph/Status.js file, so while
>> eslint seems to correctly get the fix option and finds the issue, writing
>> out the updated code to the file seems broken – can you look into that?
>> (no pressure though)
> 
> i guess you meant me with that ;)

yeah, with you being the only person in the address To field and basically
main pve-eslint dev here that's a good guess ;-P But sure, an explicitly
@mention surely wouldn't have hurt, I will try to do add that next time too.


> yes i can look into that

thx!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-19 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 13:35 [pve-devel] [PATCH manager v2] fix #5106: ui: ceph status: make column wrap the summary text on expand Dominik Csapak
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

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