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,
|
minWidth: 170,
|
||||||
maxWidth: 500,
|
maxWidth: 500,
|
||||||
// below doesn't work :/
|
// below doesn't work :/
|
||||||
//minHeight: 30,
|
minHeight: 30,
|
||||||
//emptyText: gettext('No namespaces accesible.'),
|
emptyText: `<div class="x-grid-empty">${gettext('No namespaces accessible.')}</div>`,
|
||||||
},
|
},
|
||||||
|
|
||||||
triggers: {
|
triggers: {
|
||||||
|
@ -82,6 +82,7 @@ Ext.define('PBS.form.NamespaceSelector', {
|
||||||
me.store = Ext.create('Ext.data.Store', {
|
me.store = Ext.create('Ext.data.Store', {
|
||||||
model: 'pbs-namespaces',
|
model: 'pbs-namespaces',
|
||||||
autoLoad: !!me.datastore,
|
autoLoad: !!me.datastore,
|
||||||
|
filters: (rec) => rec.data.ns !== '',
|
||||||
proxy: {
|
proxy: {
|
||||||
type: 'proxmox',
|
type: 'proxmox',
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
|
|
Loading…
Reference in New Issue