reorganize lxc items

use new tree functionality of configpanel

move options,network,dns,console under resources (now system)
move firewall subpanels into tree

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-08-22 17:13:36 +02:00 committed by Dietmar Maurer
parent 332581a88d
commit e62ebded82
2 changed files with 68 additions and 24 deletions

View File

@ -49,6 +49,7 @@ Ext.define('PVE.StateProvider', {
hprefix: 'v1', hprefix: 'v1',
compDict: { compDict: {
system: 50,
monitor: 49, monitor: 49,
'ha-fencing': 48, 'ha-fencing': 48,
'ha-groups': 47, 'ha-groups': 47,

View File

@ -129,38 +129,41 @@ Ext.define('PVE.lxc.Config', {
{ {
title: gettext('Summary'), title: gettext('Summary'),
xtype: 'pveLxcSummary', xtype: 'pveLxcSummary',
iconCls: 'fa fa-book',
itemId: 'summary' itemId: 'summary'
}, },
{ {
title: gettext('Resources'), title: gettext('System'),
itemId: 'resources', itemId: 'system',
layout: 'fit', expandedOnInit: true,
plugins: { iconCls: 'fa fa-cube',
ptype: 'lazyitems', xtype: 'pveLxcRessourceView'
items: [{
xtype: 'pveLxcRessourceView',
pveSelNode: me.pveSelNode
}]
}
},
{
title: gettext('Network'),
itemId: 'network',
xtype: 'pveLxcNetworkView'
},
{
title: gettext('DNS'),
itemId: 'dns',
xtype: 'pveLxcDNS'
}, },
{ {
title: gettext('Options'), title: gettext('Options'),
itemId: 'options', itemId: 'options',
groups: ['system'],
iconCls: 'fa fa-gear',
xtype: 'pveLxcOptions' xtype: 'pveLxcOptions'
}, },
{
title: gettext('Network'),
iconCls: 'fa fa-exchange',
itemId: 'network',
groups:['system'],
xtype: 'pveLxcNetworkView'
},
{
title: gettext('DNS'),
groups: ['system'],
iconCls: 'fa fa-globe',
itemId: 'dns',
xtype: 'pveLxcDNS'
},
{ {
title: gettext('Task History'), title: gettext('Task History'),
itemId: 'tasks', itemId: 'tasks',
iconCls: 'fa fa-list',
xtype: 'pveNodeTasks', xtype: 'pveNodeTasks',
vmidFilter: vmid vmidFilter: vmid
} }
@ -170,6 +173,7 @@ Ext.define('PVE.lxc.Config', {
if (caps.vms['VM.Backup']) { if (caps.vms['VM.Backup']) {
me.items.push({ me.items.push({
title: gettext('Backup'), title: gettext('Backup'),
iconCls: 'fa fa-floppy-o',
xtype: 'pveBackupView', xtype: 'pveBackupView',
itemId: 'backup' itemId: 'backup'
}); });
@ -179,6 +183,8 @@ Ext.define('PVE.lxc.Config', {
me.items.push({ me.items.push({
title: gettext('Console'), title: gettext('Console'),
itemId: 'console', itemId: 'console',
groups: ['system'],
iconCls: 'fa fa-terminal',
xtype: 'pveNoVncConsole', xtype: 'pveNoVncConsole',
vmid: vmid, vmid: vmid,
consoleType: 'lxc', consoleType: 'lxc',
@ -189,6 +195,7 @@ Ext.define('PVE.lxc.Config', {
if (caps.vms['VM.Snapshot']) { if (caps.vms['VM.Snapshot']) {
me.items.push({ me.items.push({
title: gettext('Snapshots'), title: gettext('Snapshots'),
iconCls: 'fa fa-history',
xtype: 'pveLxcSnapshotTree', xtype: 'pveLxcSnapshotTree',
itemId: 'snapshot' itemId: 'snapshot'
}); });
@ -197,12 +204,47 @@ Ext.define('PVE.lxc.Config', {
if (caps.vms['VM.Console']) { if (caps.vms['VM.Console']) {
me.items.push( me.items.push(
{ {
xtype: 'pveFirewallPanel', xtype: 'pveFirewallRules',
title: gettext('Firewall'), title: gettext('Firewall'),
base_url: base_url + '/firewall', iconCls: 'fa fa-shield',
fwtype: 'vm', allow_iface: true,
phstateid: me.hstateid, base_url: base_url + '/firewall/rules',
list_refs_url: base_url + '/refs',
itemId: 'firewall' itemId: 'firewall'
},
{
xtype: 'pveFirewallOptions',
groups: ['firewall'],
iconCls: 'fa fa-gear',
title: gettext('Options'),
base_url: base_url + '/firewall/options',
fwtype: 'vm',
itemId: 'firewall-options'
},
{
xtype: 'pveFirewallAliases',
title: gettext('Alias'),
groups: ['firewall'],
iconCls: 'fa fa-external-link',
base_url: base_url + '/firewall/aliases',
itemId: 'firewall-aliases'
},
{
xtype: 'pveIPSet',
title: gettext('IPSet'),
groups: ['firewall'],
iconCls: 'fa fa-list-ol',
base_url: base_url + '/firewall/ipset',
list_refs_url: base_url + '/refs',
itemId: 'firewall-ipset'
},
{
title: gettext('Log'),
groups: ['firewall'],
iconCls: 'fa fa-list',
itemId: 'firewall-fwlog',
xtype: 'pveLogView',
url: '/api2/extjs' + base_url + '/firewall/log'
} }
); );
} }
@ -212,6 +254,7 @@ Ext.define('PVE.lxc.Config', {
xtype: 'pveACLView', xtype: 'pveACLView',
title: gettext('Permissions'), title: gettext('Permissions'),
itemId: 'permissions', itemId: 'permissions',
iconCls: 'fa fa-unlock',
path: '/vms/' + vmid path: '/vms/' + vmid
}); });
} }