ui: add RemoteSelector and DataStoreSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-05-29 10:53:40 +02:00 committed by Dietmar Maurer
parent d43f86f3f3
commit 709584719d
3 changed files with 76 additions and 0 deletions

View File

@ -6,6 +6,8 @@ IMAGES := \
JSSRC= \ JSSRC= \
form/UserSelector.js \ form/UserSelector.js \
form/RemoteSelector.js \
form/DataStoreSelector.js \
config/UserView.js \ config/UserView.js \
config/RemoteView.js \ config/RemoteView.js \
config/ACLView.js \ config/ACLView.js \

View File

@ -0,0 +1,34 @@
Ext.define('PBS.form.DataStoreSelector', {
extend: 'Proxmox.form.ComboGrid',
alias: 'widget.pbsDataStoreSelector',
allowBlank: false,
autoSelect: false,
valueField: 'store',
displayField: 'store',
store: {
model: 'pbs-datastore-list',
autoLoad: true,
sorters: 'store',
},
listConfig: {
columns: [
{
header: gettext('DataStore'),
sortable: true,
dataIndex: 'store',
renderer: Ext.String.htmlEncode,
flex: 1,
},
{
header: gettext('Comment'),
sortable: true,
dataIndex: 'comment',
renderer: Ext.String.htmlEncode,
flex: 1,
},
],
},
});

View File

@ -0,0 +1,40 @@
Ext.define('PBS.form.RemoteSelector', {
extend: 'Proxmox.form.ComboGrid',
alias: 'widget.pbsRemoteSelector',
allowBlank: false,
autoSelect: false,
valueField: 'name',
displayField: 'name',
store: {
model: 'pmx-remotes',
autoLoad: true,
sorters: 'name',
},
listConfig: {
columns: [
{
header: gettext('Remote'),
sortable: true,
dataIndex: 'name',
renderer: Ext.String.htmlEncode,
flex: 1,
},
{
header: gettext('Host'),
sortable: true,
dataIndex: 'host',
flex: 1,
},
{
header: gettext('User name'),
sortable: true,
dataIndex: 'userid',
renderer: Ext.String.htmlEncode,
flex: 1,
},
],
},
});