From 5e1b17018b571047d79cafe06789e2b82bc4d1ac Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 17 May 2022 08:52:12 +0200 Subject: [PATCH] ui: namespace selector: show picker empty text if no namespace by filtering out the empty namespace from the api, and putting manually a div with the grid-empty xclass around the gettext Signed-off-by: Dominik Csapak [ T: reword commit message ] Signed-off-by: Thomas Lamprecht --- 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: `
${gettext('No namespaces accessible.')}
`, }, 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.39.5