From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] grid/DiskList: restore info about ceph
Date: Wed, 25 Nov 2020 16:37:07 +0100 [thread overview]
Message-ID: <20201125153707.9615-1-d.csapak@proxmox.com> (raw)
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
next reply other threads:[~2020-11-25 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 15:37 Dominik Csapak [this message]
2021-01-26 17:53 ` [pve-devel] applied: " 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=20201125153707.9615-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