[pbs-devel] [PATCH proxmox-backup 2/5] ui: form/NamespaceSelector: show proper emptyText
Dominik Csapak
d.csapak at proxmox.com
Tue May 17 08:52:12 CEST 2022
by filtering out the empty namespace from the api, and putting the
correct div with xclass around the gettext
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/form/NamespaceSelector.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/www/form/NamespaceSelector.js b/www/form/NamespaceSelector.js
index 44b7ca0d..c847cd4e 100644
--- a/www/form/NamespaceSelector.js
+++ b/www/form/NamespaceSelector.js
@@ -34,8 +34,8 @@ Ext.define('PBS.form.NamespaceSelector', {
minWidth: 170,
maxWidth: 500,
// below doesn't work :/
- //minHeight: 30,
- //emptyText: gettext('No namespaces accesible.'),
+ minHeight: 30,
+ emptyText: `<div class="x-grid-empty">${gettext('No namespaces accessible.')}</div>`,
},
triggers: {
@@ -82,6 +82,7 @@ Ext.define('PBS.form.NamespaceSelector', {
me.store = Ext.create('Ext.data.Store', {
model: 'pbs-namespaces',
autoLoad: !!me.datastore,
+ filters: (rec) => rec.data.ns !== '',
proxy: {
type: 'proxmox',
timeout: 30 * 1000,
--
2.30.2
More information about the pbs-devel
mailing list