ui: tape: add form fields
this includes selectors for * Allocation Policy * Retention Policy * Drives * Changers * Tape Device Paths * Pools Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
b03ec281bf
commit
c72fdb53ae
66
www/tape/form/DriveSelector.js
Normal file
66
www/tape/form/DriveSelector.js
Normal file
@ -0,0 +1,66 @@
|
||||
Ext.define('PBS.form.DriveSelector', {
|
||||
extend: 'Proxmox.form.ComboGrid',
|
||||
alias: 'widget.pbsDriveSelector',
|
||||
|
||||
allowBlank: false,
|
||||
displayField: 'name',
|
||||
valueField: 'name',
|
||||
value: null,
|
||||
|
||||
store: {
|
||||
proxy: {
|
||||
type: 'proxmox',
|
||||
url: '/api2/json/tape/drive',
|
||||
},
|
||||
autoLoad: true,
|
||||
sorters: 'name',
|
||||
},
|
||||
|
||||
listConfig: {
|
||||
columns: [
|
||||
{
|
||||
text: gettext('Name'),
|
||||
dataIndex: 'name',
|
||||
sortable: true,
|
||||
flex: 1,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
},
|
||||
{
|
||||
text: gettext('Vendor'),
|
||||
dataIndex: 'vendor',
|
||||
sortable: true,
|
||||
flex: 1,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
},
|
||||
{
|
||||
text: gettext('Model'),
|
||||
dataIndex: 'model',
|
||||
sortable: true,
|
||||
flex: 1,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
},
|
||||
{
|
||||
text: gettext('Serial'),
|
||||
dataIndex: 'serial',
|
||||
sortable: true,
|
||||
flex: 1,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
|
||||
if (me.changer) {
|
||||
me.store.proxy.extraParams = {
|
||||
changer: me.changer,
|
||||
};
|
||||
} else {
|
||||
me.store.proxy.extraParams = {};
|
||||
}
|
||||
|
||||
me.callParent();
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user