2021-05-12 14:42:32 +00:00
|
|
|
Ext.define('PBS.NodeOptionView', {
|
|
|
|
extend: 'Proxmox.grid.ObjectGrid',
|
|
|
|
alias: 'widget.pbsNodeOptionView',
|
|
|
|
|
|
|
|
monStoreErrors: true,
|
|
|
|
|
|
|
|
url: `/api2/json/nodes/${Proxmox.NodeName}/config`,
|
|
|
|
editorConfig: {
|
|
|
|
url: `/api2/extjs/nodes/${Proxmox.NodeName}/config`,
|
|
|
|
},
|
|
|
|
interval: 5000,
|
|
|
|
cwidth1: 200,
|
|
|
|
|
|
|
|
listeners: {
|
2021-05-21 16:18:20 +00:00
|
|
|
itemdblclick: function() { this.run_editor(); },
|
2021-05-12 14:42:32 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
tbar: [
|
|
|
|
{
|
|
|
|
text: gettext('Edit'),
|
|
|
|
xtype: 'proxmoxButton',
|
|
|
|
disabled: true,
|
2021-05-21 16:18:20 +00:00
|
|
|
handler: btn => btn.up('grid').run_editor(),
|
|
|
|
},
|
2021-05-12 14:42:32 +00:00
|
|
|
],
|
|
|
|
|
2021-05-21 16:18:20 +00:00
|
|
|
gridRows: [
|
|
|
|
{
|
|
|
|
xtype: 'text',
|
|
|
|
name: 'http-proxy',
|
|
|
|
text: gettext('HTTP proxy'),
|
2021-05-12 14:42:32 +00:00
|
|
|
defaultValue: Proxmox.Utils.noneText,
|
|
|
|
vtype: 'HttpProxy',
|
|
|
|
deleteEmpty: true,
|
2021-05-21 16:18:20 +00:00
|
|
|
onlineHelp: 'node_options_http_proxy',
|
|
|
|
},
|
2022-01-03 09:04:56 +00:00
|
|
|
{
|
|
|
|
xtype: 'text',
|
|
|
|
name: 'email-from',
|
|
|
|
defaultValue: gettext('root@$hostname'),
|
|
|
|
text: gettext('Email from address'),
|
|
|
|
vtype: 'proxmoxMail',
|
|
|
|
deleteEmpty: true,
|
|
|
|
},
|
|
|
|
|
2021-05-21 16:18:20 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
initComponent: function() {
|
|
|
|
let me = this;
|
2021-05-12 14:42:32 +00:00
|
|
|
|
|
|
|
me.callParent();
|
|
|
|
|
|
|
|
me.on('activate', me.rstore.startUpdate);
|
|
|
|
me.on('destroy', me.rstore.stopUpdate);
|
|
|
|
me.on('deactivate', me.rstore.stopUpdate);
|
|
|
|
},
|
|
|
|
});
|