Commit 73ff9bd3 authored by Emmanuel Kasper's avatar Emmanuel Kasper Committed by Dietmar Maurer

Enable loading of most of the datacenter config panel

This patch does the following:
 * remove the EXT5DEBUG header we added previously
 * build the items[] array as a one-dimensional array, as PVE.panel.Config
 with ExtJS5 is not able to find the elements otherwise
 * rename the problematic panel tabs with TODO suffix, to be dealed later on
parent 33477e30
/* /*
* Main config panel, located in Center of the ViewPort * Datacenter config panel, located in the center of the ViewPort after the Datacenter view is selected
*/ */
Ext.define('PVE.dc.Config', { Ext.define('PVE.dc.Config', {
...@@ -19,18 +19,17 @@ Ext.define('PVE.dc.Config', { ...@@ -19,18 +19,17 @@ Ext.define('PVE.dc.Config', {
}); });
if (caps.dc['Sys.Audit']) { if (caps.dc['Sys.Audit']) {
me.items.push([ me.items.push({
{ title: gettext('Summary'),
title: gettext('Summary'), xtype: 'pveDcSummary',
xtype: 'pveDcSummary', itemId: 'summary'
itemId: 'summary' });
},
{ me.items.push({
xtype: 'pveDcOptionView', xtype: 'pveDcOptionView',
title: gettext('Options'), title: gettext('Options'),
itemId: 'options' itemId: 'options'
} });
]);
} }
if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) { if (caps.storage['Datastore.Allocate'] || caps.dc['Sys.Audit']) {
...@@ -42,7 +41,7 @@ Ext.define('PVE.dc.Config', { ...@@ -42,7 +41,7 @@ Ext.define('PVE.dc.Config', {
} }
if (caps.dc['Sys.Audit']) { if (caps.dc['Sys.Audit']) {
me.items.push({ me.items.push({
xtype: 'pveDcBackupView', xtype: 'pveDcBackupView',
title: gettext('Backup'), title: gettext('Backup'),
itemId: 'backup' itemId: 'backup'
...@@ -56,47 +55,57 @@ Ext.define('PVE.dc.Config', { ...@@ -56,47 +55,57 @@ Ext.define('PVE.dc.Config', {
}); });
if (caps.dc['Sys.Audit']) { if (caps.dc['Sys.Audit']) {
me.items.push([ me.items.push({
{
xtype: 'pveGroupView', xtype: 'pveGroupView',
title: gettext('Groups'), title: gettext('Groups'),
itemId: 'groups' itemId: 'groups'
}, });
{
me.items.push({
xtype: 'pvePoolView', xtype: 'pvePoolView',
title: gettext('Pools'), title: gettext('Pools'),
itemId: 'pools' itemId: 'pools'
}, });
{
me.items.push({
xtype: 'pveACLView', xtype: 'pveACLView',
title: gettext('Permissions'), title: gettext('Permissions'),
itemId: 'permissions' itemId: 'permissions'
}, });
{
me.items.push({
xtype: 'pveRoleView', xtype: 'pveRoleView',
title: gettext('Roles'), title: gettext('Roles'),
itemId: 'roles' itemId: 'roles'
}, });
{
xtype: 'pveAuthView', me.items.push({
title: gettext('Authentication'), // xtype: 'pveAuthView',
// title: gettext('Authentication'),
xtype: 'gridpanel',
title: 'AuthenTODO',
itemId: 'domains' itemId: 'domains'
}, });
{
xtype: 'pveHAPanel', me.items.push({
title: 'HA', // xtype: 'pveHAPanel',
phstateid: me.hstateid, // title: 'HA',
xtype: 'gridpanel',
title: 'HATODO',
phstateid: me.hstateid,
itemId: 'ha' itemId: 'ha'
}, });
{
xtype: 'pveFirewallPanel', me.items.push({
title: gettext('Firewall'), // xtype: 'pveFirewallPanel',
// title: gettext('Firewall'),
xtype: 'gridpanel',
title: 'FireTODO',
base_url: '/cluster/firewall', base_url: '/cluster/firewall',
fwtype: 'dc', fwtype: 'dc',
phstateid: me.hstateid, phstateid: me.hstateid,
itemId: 'firewall' itemId: 'firewall'
} });
]);
me.items.push({ me.items.push({
xtype: 'pveDcSupport', xtype: 'pveDcSupport',
...@@ -104,8 +113,6 @@ Ext.define('PVE.dc.Config', { ...@@ -104,8 +113,6 @@ Ext.define('PVE.dc.Config', {
itemId: 'support' itemId: 'support'
}); });
} }
//EXT5DEBUG
me.items =[];
me.callParent(); me.callParent();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment