ui: factor out not found rendering to common helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -393,6 +393,8 @@ Ext.define('PVE.Utils', {
|
||||
'efidisk but no OMVF BIOS': gettext('EFI Disk without OMVF BIOS'),
|
||||
},
|
||||
|
||||
renderNotFound: what => Ext.String.format(gettext("No {0} found"), what),
|
||||
|
||||
get_kvm_osinfo: function(value) {
|
||||
var info = { base: 'Other' }; // default
|
||||
if (value) {
|
||||
|
@ -86,7 +86,7 @@ Ext.define('PVE.node.LVMList', {
|
||||
},
|
||||
},
|
||||
|
||||
emptyText: gettext('No Volume Groups found'),
|
||||
emptyText: PVE.Utils.renderNotFound('VGs'),
|
||||
|
||||
stateful: true,
|
||||
stateId: 'grid-node-lvm',
|
||||
|
@ -91,7 +91,7 @@ Ext.define('PVE.node.LVMThinList', {
|
||||
},
|
||||
},
|
||||
|
||||
emptyText: gettext('No thinpools found'),
|
||||
emptyText: PVE.Utils.renderNotFound('Thin-Pool'),
|
||||
|
||||
stateful: true,
|
||||
stateId: 'grid-node-lvmthin',
|
||||
|
@ -16,7 +16,7 @@ Ext.define('PVE.storage.IScsiScan', {
|
||||
flex: 1,
|
||||
},
|
||||
],
|
||||
emptyText: gettext('No iSCSI target found'),
|
||||
emptyText: PVE.Utils.renderNotFound(gettext('iSCSI Target')),
|
||||
},
|
||||
|
||||
config: {
|
||||
|
@ -13,7 +13,7 @@ Ext.define('PVE.storage.VgSelector', {
|
||||
flex: 1,
|
||||
},
|
||||
],
|
||||
emptyText: gettext('No volume groups found'),
|
||||
emptyText: PVE.Utils.renderNotFound('VGs'),
|
||||
},
|
||||
|
||||
config: {
|
||||
@ -130,7 +130,7 @@ Ext.define('PVE.storage.LunSelector', {
|
||||
},
|
||||
],
|
||||
},
|
||||
emptyText: me.listConfig?.emptyText ?? gettext('Nothing found'),
|
||||
emptyText: me.listConfig?.emptyText ?? PVE.Utils.renderNotFound(gettext('Volume')),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ Ext.define('PVE.storage.TPoolSelector', {
|
||||
allowBlank: false,
|
||||
|
||||
listConfig: {
|
||||
emptyText: gettext("No thinpool found"),
|
||||
emptyText: PVE.Utils.renderNotFound('Thin-Pool'),
|
||||
columns: [
|
||||
{
|
||||
dataIndex: 'lv',
|
||||
|
@ -14,7 +14,7 @@ Ext.define('PVE.storage.ZFSPoolSelector', {
|
||||
flex: 1,
|
||||
},
|
||||
],
|
||||
emptyText: gettext('No ZFS Pools found'),
|
||||
emptyText: PVE.Utils.renderNotFound(gettext('ZFS Pool')),
|
||||
},
|
||||
|
||||
config: {
|
||||
|
Reference in New Issue
Block a user