[pbs-devel] [PATCH proxmox-backup v3 2/2] web: disallow datastore in root, add reuse-datastore flag

Gabriel Goller g.goller at proxmox.com
Wed Aug 14 10:56:47 CEST 2024


On 22.07.2024 08:52, Thomas Lamprecht wrote:
>Am 18/07/2024 um 14:29 schrieb Gabriel Goller:
>> 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 at proxmox.com>
>> ---
>>  www/window/DataStoreEdit.js | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js
>> index b61154606284..2565688e26ce 100644
>> --- a/www/window/DataStoreEdit.js
>> +++ b/www/window/DataStoreEdit.js
>> @@ -61,6 +61,17 @@ Ext.define('PBS.DataStoreEdit', {
>>  			allowBlank: false,
>>  			fieldLabel: gettext('Backing Path'),
>>  			emptyText: gettext('An absolute path'),
>> +			validator: function(val) {
>> +			    if (val.trim() === '/') {
>> +				return false;
>> +			    }
>> +			    return true;
>> +			},
>> +		    },
>> +		    {
>> +			xtype: 'checkbox',
>> +			name: 'reuse-datastore',
>> +			fieldLabel: gettext('Reuse existing datastore'),
>>  		    },
>>  		],
>>  		column2: [
>
>I missed that there is a new version already, but as this patch is
>unchanged the review from v2 of this patch [0] still applies.
>
>[0]: https://lists.proxmox.com/pipermail/pbs-devel/2024-July/010303.html

Oops, missed this one, v4 is on the list!




More information about the pbs-devel mailing list