#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');
|
||||
|
||||
// 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.
|
||||
$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',
|
||||
|
@ -638,6 +650,7 @@ if ($id_agente) {
|
|||
'template' => $templatetab,
|
||||
'inventory' => $inventorytab,
|
||||
'pluginstab' => $pluginstab,
|
||||
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
||||
'collection' => $collectiontab,
|
||||
'group' => $grouptab,
|
||||
'gis' => $gistab,
|
||||
|
@ -654,11 +667,11 @@ if ($id_agente) {
|
|||
'template' => $templatetab,
|
||||
'inventory' => $inventorytab,
|
||||
'pluginstab' => $pluginstab,
|
||||
'policy' => (enterprise_installed() === true) ? $policyTab : '',
|
||||
'collection' => $collectiontab,
|
||||
'group' => $grouptab,
|
||||
'gis' => $gistab,
|
||||
'agent_wizard' => $agent_wizard,
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -725,6 +738,11 @@ if ($id_agente) {
|
|||
$tab_name = __('Inventory');
|
||||
break;
|
||||
|
||||
case 'policy':
|
||||
$help_header = 'policy_tab';
|
||||
$tab_name = __('Policy');
|
||||
break;
|
||||
|
||||
case 'plugins':
|
||||
$help_header = 'plugins_tab';
|
||||
$tab_name = __('Agent plugins');
|
||||
|
@ -2421,6 +2439,10 @@ switch ($tab) {
|
|||
include 'inventory_manager.php';
|
||||
break;
|
||||
|
||||
case 'policy':
|
||||
enterprise_include('operation/agentes/policy_manager.php');
|
||||
break;
|
||||
|
||||
default:
|
||||
if (enterprise_hook('switch_agent_tab', [$tab])) {
|
||||
// This will make sure that blank pages will have at least some
|
||||
|
|
Loading…
Reference in New Issue