ui: avoid trivial decompression widget, only used once
Currently it was only used once and it had not really any benefit, as the one thing it did is defining a list of compressors – the KVComboBox is made such, so that this can be done on definition directly, no need for inheritance. Also, if one would think about adopting this more for other similar selectors: While we have some uses of compressors all over the place, and most of them are not really coupled to each other, so having a single widget for them does not make sense. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e86862bf27
commit
65704cc2a8
@ -30,11 +30,9 @@ JSSRC= \
|
||||
form/CephPoolSelector.js \
|
||||
form/CephFSSelector.js \
|
||||
form/ComboBoxSetStoreNode.js \
|
||||
form/CompressionSelector.js \
|
||||
form/ContentTypeSelector.js \
|
||||
form/ControllerSelector.js \
|
||||
form/DayOfWeekSelector.js \
|
||||
form/DecompressionSelector.js \
|
||||
form/DiskFormatSelector.js \
|
||||
form/DiskStorageSelector.js \
|
||||
form/FileSelector.js \
|
||||
|
@ -1,13 +0,0 @@
|
||||
Ext.define('PVE.form.DecompressionSelector', {
|
||||
extend: 'Proxmox.form.KVComboBox',
|
||||
alias: ['widget.pveDecompressionSelector'],
|
||||
config: {
|
||||
deleteEmpty: false,
|
||||
},
|
||||
comboItems: [
|
||||
['__default__', Proxmox.Utils.NoneText],
|
||||
['lzo', 'LZO'],
|
||||
['gz', 'GZIP'],
|
||||
['zst', 'ZSTD'],
|
||||
],
|
||||
});
|
@ -206,12 +206,19 @@ Ext.define('PVE.window.DownloadUrlToStorage', {
|
||||
},
|
||||
},
|
||||
{
|
||||
xtype: 'pveDecompressionSelector',
|
||||
xtype: 'proxmoxKVComboBox',
|
||||
name: 'compression',
|
||||
fieldLabel: gettext('Decompression algorithm'),
|
||||
allowBlank: true,
|
||||
hasNoneOption: true,
|
||||
deleteEmpty: false,
|
||||
value: '__default__',
|
||||
comboItems: [
|
||||
['__default__', Proxmox.Utils.NoneText],
|
||||
['lzo', 'LZO'],
|
||||
['gz', 'GZIP'],
|
||||
['zst', 'ZSTD'],
|
||||
],
|
||||
cbind: {
|
||||
hidden: get => get('content') !== 'iso',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user