mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-16 03:15:35 +00:00
allow to edit relay domain comments
This commit is contained in:
parent
d80ddaf77e
commit
597c19d820
@ -53,23 +53,69 @@ Ext.define('PMG.RelayDomains', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var run_editor = function() {
|
||||||
|
var rec = me.selModel.getSelection()[0];
|
||||||
|
if (!rec) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
url: "/api2/extjs/config/domains/" + rec.data.domain,
|
||||||
|
method: 'PUT',
|
||||||
|
subject: gettext("Relay Domain"),
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: 'displayfield',
|
||||||
|
name: 'domain',
|
||||||
|
fieldLabel: gettext("Relay Domain")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
name: 'comment',
|
||||||
|
fieldLabel: gettext("Comment")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
var win = Ext.createWidget('proxmoxWindowEdit', config);
|
||||||
|
|
||||||
|
win.load();
|
||||||
|
win.on('destroy', reload);
|
||||||
|
win.show();
|
||||||
|
};
|
||||||
|
|
||||||
var tbar = [
|
var tbar = [
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxButton',
|
||||||
|
text: gettext('Edit'),
|
||||||
|
disabled: true,
|
||||||
|
selModel: me.selModel,
|
||||||
|
handler: run_editor
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: gettext('Create'),
|
text: gettext('Create'),
|
||||||
handler: function() {
|
handler: function() {
|
||||||
var config = {
|
var config = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
create: true,
|
|
||||||
url: "/api2/extjs/config/domains",
|
url: "/api2/extjs/config/domains",
|
||||||
|
create: true,
|
||||||
subject: gettext("Relay Domain"),
|
subject: gettext("Relay Domain"),
|
||||||
items: {
|
items: [
|
||||||
xtype: 'proxmoxtextfield',
|
{
|
||||||
name: 'domain',
|
xtype: 'proxmoxtextfield',
|
||||||
fieldLabel: gettext("Relay Domain")
|
name: 'domain',
|
||||||
}
|
fieldLabel: gettext("Relay Domain")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxtextfield',
|
||||||
|
name: 'comment',
|
||||||
|
fieldLabel: gettext("Comment")
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
var win = Ext.createWidget('proxmoxWindowEdit', config);
|
var win = Ext.createWidget('proxmoxWindowEdit', config);
|
||||||
|
|
||||||
win.on('destroy', reload);
|
win.on('destroy', reload);
|
||||||
win.show();
|
win.show();
|
||||||
}
|
}
|
||||||
@ -101,6 +147,7 @@ Ext.define('PMG.RelayDomains', {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
listeners: {
|
listeners: {
|
||||||
|
itemdblclick: run_editor,
|
||||||
activate: reload
|
activate: reload
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user