#9686 new section for add policy in agent
This commit is contained in:
parent
038e21cf0c
commit
c0f5264dde
|
@ -460,6 +460,18 @@ if ($id_agente) {
|
||||||
|
|
||||||
$templatetab['active'] = ($tab === 'template');
|
$templatetab['active'] = ($tab === 'template');
|
||||||
|
|
||||||
|
// Policy tab.
|
||||||
|
$policyTab['text'] = html_print_menu_button(
|
||||||
|
[
|
||||||
|
'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=policy&id_agente='.$id_agente,
|
||||||
|
'image' => 'images/policy@svg.svg',
|
||||||
|
'title' => __('Manage policy'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$policyTab['active'] = ($tab === 'policy');
|
||||||
|
|
||||||
// Inventory.
|
// Inventory.
|
||||||
$inventorytab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
|
$inventorytab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
|
||||||
'images/hardware-software-component@svg.svg',
|
'images/hardware-software-component@svg.svg',
|
||||||
|
@ -638,6 +650,7 @@ if ($id_agente) {
|
||||||
'template' => $templatetab,
|
'template' => $templatetab,
|
||||||
'inventory' => $inventorytab,
|
'inventory' => $inventorytab,
|
||||||
'pluginstab' => $pluginstab,
|
'pluginstab' => $pluginstab,
|
||||||
|
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
||||||
'collection' => $collectiontab,
|
'collection' => $collectiontab,
|
||||||
'group' => $grouptab,
|
'group' => $grouptab,
|
||||||
'gis' => $gistab,
|
'gis' => $gistab,
|
||||||
|
@ -654,11 +667,11 @@ if ($id_agente) {
|
||||||
'template' => $templatetab,
|
'template' => $templatetab,
|
||||||
'inventory' => $inventorytab,
|
'inventory' => $inventorytab,
|
||||||
'pluginstab' => $pluginstab,
|
'pluginstab' => $pluginstab,
|
||||||
|
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
||||||
'collection' => $collectiontab,
|
'collection' => $collectiontab,
|
||||||
'group' => $grouptab,
|
'group' => $grouptab,
|
||||||
'gis' => $gistab,
|
'gis' => $gistab,
|
||||||
'agent_wizard' => $agent_wizard,
|
'agent_wizard' => $agent_wizard,
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,6 +738,11 @@ if ($id_agente) {
|
||||||
$tab_name = __('Inventory');
|
$tab_name = __('Inventory');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'policy':
|
||||||
|
$help_header = 'policy_tab';
|
||||||
|
$tab_name = __('Policy');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'plugins':
|
case 'plugins':
|
||||||
$help_header = 'plugins_tab';
|
$help_header = 'plugins_tab';
|
||||||
$tab_name = __('Agent plugins');
|
$tab_name = __('Agent plugins');
|
||||||
|
@ -2421,6 +2439,10 @@ switch ($tab) {
|
||||||
include 'inventory_manager.php';
|
include 'inventory_manager.php';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'policy':
|
||||||
|
enterprise_include('operation/agentes/policy_manager.php');
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (enterprise_hook('switch_agent_tab', [$tab])) {
|
if (enterprise_hook('switch_agent_tab', [$tab])) {
|
||||||
// This will make sure that blank pages will have at least some
|
// This will make sure that blank pages will have at least some
|
||||||
|
|
Loading…
Reference in New Issue