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 <d.csapak@proxmox.com> [ T: reword commit message ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
9615d9a6b6
commit
5e1b17018b
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue