mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-02 06:11:47 +00:00
web: disallow datastore in root, add reuse-datastore flag
Disallows creating a datastore in root on the frontend side, by filtering the '/' path. Add reuse-flag to permit us to open existing datastores. Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
6e101ff757
commit
f2ea424cc1
@ -61,6 +61,7 @@ Ext.define('PBS.DataStoreEdit', {
|
|||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
fieldLabel: gettext('Backing Path'),
|
fieldLabel: gettext('Backing Path'),
|
||||||
emptyText: gettext('An absolute path'),
|
emptyText: gettext('An absolute path'),
|
||||||
|
validator: val => val?.trim() !== '/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
column2: [
|
column2: [
|
||||||
@ -93,6 +94,13 @@ Ext.define('PBS.DataStoreEdit', {
|
|||||||
fieldLabel: gettext('Comment'),
|
fieldLabel: gettext('Comment'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
advancedColumn1: [
|
||||||
|
{
|
||||||
|
xtype: 'checkbox',
|
||||||
|
name: 'reuse-datastore',
|
||||||
|
fieldLabel: gettext('Reuse existing datastore'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user