]>
git.proxmox.com Git - pmg-gui.git/blob - js/RelayDomains.js
1 Ext
.define('pmg-domains', {
2 extend
: 'Ext.data.Model',
3 fields
: [ 'domain', 'comment' ],
6 url
: "/api2/json/config/domains"
11 Ext
.define('PMG.RelayDomains', {
12 extend
: 'Ext.grid.GridPanel',
13 alias
: ['widget.pmgRelayDomains'],
15 initComponent : function() {
18 var store
= new Ext
.data
.Store({
26 var reload = function() {
30 me
.selModel
= Ext
.create('Ext.selection.RowModel', {});
32 var remove_btn
= Ext
.createWidget('proxmoxStdRemoveButton', {
33 selModel
: me
.selModel
,
34 baseurl
: '/config/domains',
39 var run_editor = function() {
40 var rec
= me
.selModel
.getSelection()[0];
46 url
: "/api2/extjs/config/domains/" + rec
.data
.domain
,
48 subject
: gettext("Relay Domain"),
51 xtype
: 'displayfield',
53 fieldLabel
: gettext("Relay Domain")
58 fieldLabel
: gettext("Comment")
63 var win
= Ext
.createWidget('proxmoxWindowEdit', config
);
66 win
.on('destroy', reload
);
72 xtype
: 'proxmoxButton',
73 text
: gettext('Edit'),
75 selModel
: me
.selModel
,
79 text
: gettext('Create'),
83 url
: "/api2/extjs/config/domains",
85 subject
: gettext("Relay Domain"),
88 xtype
: 'proxmoxtextfield',
90 fieldLabel
: gettext("Relay Domain")
93 xtype
: 'proxmoxtextfield',
95 fieldLabel
: gettext("Comment")
100 var win
= Ext
.createWidget('proxmoxWindowEdit', config
);
102 win
.on('destroy', reload
);
109 Proxmox
.Utils
.monStoreErrors(me
, store
, true);
119 header
: gettext('Relay Domain'),
125 header
: gettext('Comment'),
127 renderer
: Ext
.String
.htmlEncode
,
128 dataIndex
: 'comment',
133 itemdblclick
: run_editor
,