all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] grid/DiskList: restore info about ceph
@ 2020-11-25 15:37 Dominik Csapak
  2021-01-26 17:53 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-11-25 15:37 UTC (permalink / raw)
  To: pve-devel

previously we printed this ceph info, but it got lost during
refactoring to widget-toolkit, restore a slightly modified
version of the code

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/grid/DiskList.js | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/grid/DiskList.js b/src/grid/DiskList.js
index 4d8ef1b..54f58f8 100644
--- a/src/grid/DiskList.js
+++ b/src/grid/DiskList.js
@@ -3,7 +3,7 @@ Ext.define('pmx-disk-list', {
     fields: [
 	'devpath', 'used',
 	{ name: 'size', type: 'number' },
-	{ name: 'osdid', type: 'number' },
+	{ name: 'osdid', type: 'number', defaultValue: -1 },
 	{
 	    name: 'status',
 	    convert: function(value, rec) {
@@ -169,7 +169,28 @@ Ext.define('Proxmox.DiskList', {
 	    header: gettext('Usage'),
 	    width: 150,
 	    sortable: false,
-	    renderer: v => v || Proxmox.Utils.noText,
+	    renderer: function(v, metaData, rec) {
+		let extendedInfo = ' ';
+		if (rec) {
+		    let types = [];
+		    if (rec.data.osdid !== undefined && rec.data.osdid >= 0) {
+			types.push(`OSD.${rec.data.osdid.toString()}`);
+		    }
+		    if (rec.data.journals > 0) {
+			types.push('Journal');
+		    }
+		    if (rec.data.db > 0) {
+			types.push('DB');
+		    }
+		    if (rec.data.wal > 0) {
+			types.push('WAL');
+		    }
+		    if (types.length > 0) {
+			extendedInfo = `, Ceph (${types.join(', ')})`;
+		    }
+		}
+		return v ? `${v}${extendedInfo}` : Proxmox.Utils.noText;
+	    },
 	    dataIndex: 'used',
 	},
 	{
-- 
2.20.1





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

* [pve-devel] applied: [PATCH widget-toolkit] grid/DiskList: restore info about ceph
  2020-11-25 15:37 [pve-devel] [PATCH widget-toolkit] grid/DiskList: restore info about ceph Dominik Csapak
@ 2021-01-26 17:53 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-01-26 17:53 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 25.11.20 16:37, Dominik Csapak wrote:
> previously we printed this ceph info, but it got lost during
> refactoring to widget-toolkit, restore a slightly modified
> version of the code
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  src/grid/DiskList.js | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
> 
>

applied, thanks!




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

end of thread, other threads:[~2021-01-26 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 15:37 [pve-devel] [PATCH widget-toolkit] grid/DiskList: restore info about ceph Dominik Csapak
2021-01-26 17:53 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal