instead of relying on the contentTypeField (which does not need to exists, e.g. for iscsi), explicitely write it into the panel/icon mapping and check that better would be if we query the backend about storage capabilities, but such an api call does not exist yet, so this should be ok for now Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
492d4039a6
commit
06c8315d86
@ -713,78 +713,93 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
dir: {
|
||||
name: Proxmox.Utils.directoryText,
|
||||
ipanel: 'DirInputPanel',
|
||||
faIcon: 'folder'
|
||||
faIcon: 'folder',
|
||||
backups: true,
|
||||
},
|
||||
lvm: {
|
||||
name: 'LVM',
|
||||
ipanel: 'LVMInputPanel',
|
||||
faIcon: 'folder'
|
||||
faIcon: 'folder',
|
||||
backups: false,
|
||||
},
|
||||
lvmthin: {
|
||||
name: 'LVM-Thin',
|
||||
ipanel: 'LvmThinInputPanel',
|
||||
faIcon: 'folder'
|
||||
faIcon: 'folder',
|
||||
backups: false,
|
||||
},
|
||||
nfs: {
|
||||
name: 'NFS',
|
||||
ipanel: 'NFSInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: true,
|
||||
},
|
||||
cifs: {
|
||||
name: 'CIFS',
|
||||
ipanel: 'CIFSInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: true,
|
||||
},
|
||||
glusterfs: {
|
||||
name: 'GlusterFS',
|
||||
ipanel: 'GlusterFsInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: true,
|
||||
},
|
||||
iscsi: {
|
||||
name: 'iSCSI',
|
||||
ipanel: 'IScsiInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: false,
|
||||
},
|
||||
cephfs: {
|
||||
name: 'CephFS',
|
||||
ipanel: 'CephFSInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: true,
|
||||
},
|
||||
pvecephfs: {
|
||||
name: 'CephFS (PVE)',
|
||||
ipanel: 'CephFSInputPanel',
|
||||
hideAdd: true,
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: true,
|
||||
},
|
||||
rbd: {
|
||||
name: 'RBD',
|
||||
ipanel: 'RBDInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: false,
|
||||
},
|
||||
pveceph: {
|
||||
name: 'RBD (PVE)',
|
||||
ipanel: 'RBDInputPanel',
|
||||
hideAdd: true,
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: false,
|
||||
},
|
||||
zfs: {
|
||||
name: 'ZFS over iSCSI',
|
||||
ipanel: 'ZFSInputPanel',
|
||||
faIcon: 'building'
|
||||
faIcon: 'building',
|
||||
backups: false,
|
||||
},
|
||||
zfspool: {
|
||||
name: 'ZFS',
|
||||
ipanel: 'ZFSPoolInputPanel',
|
||||
faIcon: 'folder'
|
||||
faIcon: 'folder',
|
||||
backups: false,
|
||||
},
|
||||
pbs: {
|
||||
name: 'Proxmox Backup Server',
|
||||
ipanel: 'PBSInputPanel',
|
||||
faIcon: 'floppy-o',
|
||||
backups: true,
|
||||
},
|
||||
drbd: {
|
||||
name: 'DRBD',
|
||||
hideAdd: true,
|
||||
backups: false,
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -18,6 +18,7 @@ Ext.define('PVE.dc.StorageView', {
|
||||
paneltype: 'PVE.storage.' + schema.ipanel,
|
||||
type: type,
|
||||
storageId: sid,
|
||||
canDoBackups: schema.backups,
|
||||
autoShow: true,
|
||||
listeners: {
|
||||
destroy: this.reloadStore
|
||||
|
@ -211,8 +211,7 @@ Ext.define('PVE.storage.BaseEdit', {
|
||||
|
||||
me.callParent();
|
||||
|
||||
let contentTypeField = me.ipanel.down('pveContentTypeSelector');
|
||||
if (contentTypeField && !contentTypeField.cts.includes('backup')) {
|
||||
if (!me.canDoBackups) {
|
||||
// cannot mask now, not fully rendered until activated
|
||||
me.down('pmxPruneInputPanel').needMask = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user