Merge branch 'ent-9686-crear-seccion-de-politicas-dentro-del-agente' into 'develop'

Ent 9686 crear seccion de politicas dentro del agente

See merge request artica/pandorafms!5830
This commit is contained in:
Rafael Ameijeiras 2023-07-14 06:58:00 +00:00
commit 9499e50eea
3 changed files with 29 additions and 2 deletions

View File

@ -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 = __('Policies');
break;
case 'plugins':
$help_header = 'plugins_tab';
$tab_name = __('Agent plugins');
@ -2428,6 +2446,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

View File

@ -4343,7 +4343,8 @@ function ui_print_datatable(array $parameters)
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").attr("style","margin-right: 10px;"));
let original_styles = $("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").attr("style");
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").attr("style", original_styles + " margin-right: 10px;"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_length"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dt-buttons"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_filter"));

View File

@ -10804,6 +10804,10 @@ button.ui-button.ui-widget.submit-cancel:active {
border-color: #96a2bf;
}
.cursor-default {
cursor: default;
}
.hasColorPicker {
z-index: 10;
}