mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-07 12:39:58 +00:00
ui: support create removable datastore through directory creation
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
42e3b2f12a
commit
c8835f5882
@ -150,6 +150,8 @@ pub fn list_datastore_mounts() -> Result<Vec<DatastoreMountInfo>, Error> {
|
|||||||
"removable-datastore": {
|
"removable-datastore": {
|
||||||
description: "The added datastore is removable.",
|
description: "The added datastore is removable.",
|
||||||
type: bool,
|
type: bool,
|
||||||
|
optional: true,
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
filesystem: {
|
filesystem: {
|
||||||
type: FileSystemType,
|
type: FileSystemType,
|
||||||
|
@ -121,6 +121,19 @@ Ext.define('PBS.admin.Directorylist', {
|
|||||||
],
|
],
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
text: '<span class="fa fa-plug"/>',
|
||||||
|
flex: 0,
|
||||||
|
width: 35,
|
||||||
|
dataIndex: 'removable',
|
||||||
|
renderer: function(_text, _, row) {
|
||||||
|
if (row.data.removable) {
|
||||||
|
return `<i class="fa fa-check"/>`;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: gettext('Path'),
|
text: gettext('Path'),
|
||||||
dataIndex: 'path',
|
dataIndex: 'path',
|
||||||
|
@ -43,6 +43,20 @@ Ext.define('PBS.window.CreateDirectory', {
|
|||||||
name: 'add-datastore',
|
name: 'add-datastore',
|
||||||
fieldLabel: gettext('Add as Datastore'),
|
fieldLabel: gettext('Add as Datastore'),
|
||||||
value: '1',
|
value: '1',
|
||||||
|
listeners: {
|
||||||
|
change(field, newValue, _oldValue) {
|
||||||
|
let form = field.up('form');
|
||||||
|
let rmBox = form.down('[name=removable-datastore]');
|
||||||
|
|
||||||
|
rmBox.setDisabled(!newValue);
|
||||||
|
rmBox.setValue(false);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxcheckbox',
|
||||||
|
name: 'removable-datastore',
|
||||||
|
fieldLabel: gettext('is removable'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user