mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-09 11:25:25 +00:00
rename ObjectGroup to ObjectGroupList
This commit is contained in:
parent
56b0691b19
commit
a43acf2e5c
@ -2,7 +2,7 @@ JSSRC= \
|
|||||||
Utils.js \
|
Utils.js \
|
||||||
LoginWindow.js \
|
LoginWindow.js \
|
||||||
ServerAdministration.js \
|
ServerAdministration.js \
|
||||||
ObjectGroup.js \
|
ObjectGroupList.js \
|
||||||
Who.js \
|
Who.js \
|
||||||
WhoConfiguration.js \
|
WhoConfiguration.js \
|
||||||
RuleConfiguration.js \
|
RuleConfiguration.js \
|
||||||
|
@ -15,17 +15,21 @@ Ext.define('pmg-object-list', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Ext.define('PMG.ObjectGroup', {
|
Ext.define('PMG.ObjectGroupList', {
|
||||||
extend: 'Ext.grid.GridPanel',
|
extend: 'Ext.grid.GridPanel',
|
||||||
alias: ['widget.pmgObjectGroup'],
|
alias: ['widget.pmgObjectGroupList'],
|
||||||
|
|
||||||
ogclass: 'who',
|
ogclass: undefined, // 'who', 'when', 'what'
|
||||||
|
|
||||||
|
subject: 'Object Group List', // please overwrite
|
||||||
|
|
||||||
subject: gettext('Object Group'),
|
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
if (!me.ogclass) {
|
||||||
|
throw "ogclass not initialized";
|
||||||
|
}
|
||||||
|
|
||||||
var baseurl = "/config/ruledb/" + me.ogclass;
|
var baseurl = "/config/ruledb/" + me.ogclass;
|
||||||
|
|
||||||
var store = new Ext.data.Store({
|
var store = new Ext.data.Store({
|
||||||
@ -84,7 +88,7 @@ Ext.define('PMG.ObjectGroup', {
|
|||||||
fieldLabel: gettext('Name')
|
fieldLabel: gettext('Name')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textareafield',
|
||||||
name: 'info',
|
name: 'info',
|
||||||
fieldLabel: gettext("Description")
|
fieldLabel: gettext("Description")
|
||||||
}
|
}
|
||||||
@ -100,6 +104,7 @@ Ext.define('PMG.ObjectGroup', {
|
|||||||
url: "/api2/extjs" + baseurl +'/' + rec.data.id + '/config',
|
url: "/api2/extjs" + baseurl +'/' + rec.data.id + '/config',
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
subject: me.subject,
|
subject: me.subject,
|
||||||
|
width: 400,
|
||||||
items: inputItems
|
items: inputItems
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -125,6 +130,7 @@ Ext.define('PMG.ObjectGroup', {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: "/api2/extjs" + baseurl,
|
url: "/api2/extjs" + baseurl,
|
||||||
create: true,
|
create: true,
|
||||||
|
width: 400,
|
||||||
subject: me.subject,
|
subject: me.subject,
|
||||||
items: inputItems
|
items: inputItems
|
||||||
};
|
};
|
@ -12,9 +12,10 @@ Ext.define('PMG.WhoConfiguration', {
|
|||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var left = Ext.create('PMG.ObjectGroup', {
|
var left = Ext.create('PMG.ObjectGroupList', {
|
||||||
width: 250,
|
width: 250,
|
||||||
ogclass: me.ogclass,
|
ogclass: me.ogclass,
|
||||||
|
subject: me.title,
|
||||||
border: false
|
border: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user