From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/3] ui: DataStoreList: show message when there are no datastores
Date: Fri, 13 Nov 2020 15:02:35 +0100 [thread overview]
Message-ID: <20201113140236.31570-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20201113140236.31570-1-d.csapak@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/datastore/DataStoreList.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/www/datastore/DataStoreList.js b/www/datastore/DataStoreList.js
index 607f49c5..135a630a 100644
--- a/www/datastore/DataStoreList.js
+++ b/www/datastore/DataStoreList.js
@@ -87,11 +87,15 @@ Ext.define('PBS.datastore.DataStoreList', {
delete me.datastores[store];
}
}
+
+ let hasDatastores = Object.keys(me.datastores).length > 0;
+
+ me.getComponent('emptybox').setHidden(hasDatastores);
},
addSorted: function(data) {
let me = this;
- let i = 0;
+ let i = 1;
let datastores = Object
.keys(me.datastores)
.sort((a, b) => a.localeCompare(b));
@@ -116,7 +120,13 @@ Ext.define('PBS.datastore.DataStoreList', {
initComponent: function() {
let me = this;
- me.items = [];
+ me.items = [
+ {
+ itemId: 'emptybox',
+ xtype: 'box',
+ html: gettext('No Datastores configured'),
+ },
+ ];
me.datastores = {};
// todo make configurable?
me.since = (Date.now()/1000 - 30 * 24*3600).toFixed(0);
--
2.20.1
next prev parent reply other threads:[~2020-11-13 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 14:02 [pbs-devel] [PATCH proxmox-backup 1/3] ui: DataStoreList: remove datastores also from hash Dominik Csapak
2020-11-13 14:02 ` Dominik Csapak [this message]
2020-11-13 14:02 ` [pbs-devel] [PATCH proxmox-backup 3/3] ui: improve comment behaviour for datastore Summary Dominik Csapak
2020-11-16 16:00 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] ui: DataStoreList: remove datastores also from hash 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=20201113140236.31570-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-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