diff --git a/www/Makefile b/www/Makefile index 46c7e7bc..fb5b1d55 100644 --- a/www/Makefile +++ b/www/Makefile @@ -6,6 +6,8 @@ IMAGES := \ JSSRC= \ form/UserSelector.js \ + form/RemoteSelector.js \ + form/DataStoreSelector.js \ config/UserView.js \ config/RemoteView.js \ config/ACLView.js \ diff --git a/www/form/DataStoreSelector.js b/www/form/DataStoreSelector.js new file mode 100644 index 00000000..692ca6a5 --- /dev/null +++ b/www/form/DataStoreSelector.js @@ -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, + }, + ], + }, +}); diff --git a/www/form/RemoteSelector.js b/www/form/RemoteSelector.js new file mode 100644 index 00000000..3f55ef1f --- /dev/null +++ b/www/form/RemoteSelector.js @@ -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, + }, + ], + }, +});