Merge branch 'ent-9662-Restyling-fuentes-colores-botones' of brutus.artica.es:artica/pandorafms into ent-9662-Restyling-fuentes-colores-botones
This commit is contained in:
commit
967ac6dad3
|
@ -397,55 +397,135 @@ function mainAgentsModules()
|
||||||
1 => __('Show module data'),
|
1 => __('Show module data'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$filter_type_label = '<b>'.__('Information to be shown').'</b>';
|
$filter_type = html_print_label_input_block(
|
||||||
$filter_type = html_print_select($show_select, 'show_type', $show_type, '', '', 0, true, false, false, '', false, 'min-width: 180px;');
|
__('Information to be shown'),
|
||||||
|
html_print_select(
|
||||||
// Groups.
|
$show_select,
|
||||||
$filter_groups_label = '<b>'.__('Group').'</b>';
|
'show_type',
|
||||||
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
|
$show_type,
|
||||||
|
'',
|
||||||
$filter_recursion_label = '</td><td><b>'.__('Recursion').'</b>';
|
'',
|
||||||
$filter_recursion = html_print_checkbox('recursion', 1, 0, true).'</td>';
|
0,
|
||||||
// Groups module.
|
true,
|
||||||
$filter_module_groups_label = '<b>'.__('Module group').'</b>';
|
false,
|
||||||
$filter_module_groups = html_print_select_from_sql(
|
false,
|
||||||
'SELECT * FROM tmodule_group ORDER BY name',
|
'',
|
||||||
'modulegroup',
|
false,
|
||||||
$modulegroup,
|
'width: 100%;'
|
||||||
'',
|
)
|
||||||
__('All'),
|
);
|
||||||
0,
|
|
||||||
true,
|
$filter_groups = html_print_label_input_block(
|
||||||
false,
|
__('Group'),
|
||||||
true,
|
html_print_select_groups(
|
||||||
false,
|
false,
|
||||||
'width: auto;'
|
'AR',
|
||||||
|
true,
|
||||||
|
'group_id',
|
||||||
|
$group_id,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$filter_groups .= html_print_label_input_block(
|
||||||
|
__('Recursion'),
|
||||||
|
html_print_checkbox_switch('recursion', 1, 0, true),
|
||||||
|
[
|
||||||
|
'div_class' => 'add-input-reverse',
|
||||||
|
'label_class' => 'label-thin',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$filter_module_groups = html_print_label_input_block(
|
||||||
|
__('Module group'),
|
||||||
|
html_print_select_from_sql(
|
||||||
|
'SELECT * FROM tmodule_group ORDER BY name',
|
||||||
|
'modulegroup',
|
||||||
|
$modulegroup,
|
||||||
|
'',
|
||||||
|
__('All'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'width: 100%;'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Agent.
|
|
||||||
$agents = agents_get_group_agents($group_id);
|
$agents = agents_get_group_agents($group_id);
|
||||||
if ((empty($agents)) || $agents == -1) {
|
if ((empty($agents)) || $agents == -1) {
|
||||||
$agents = [];
|
$agents = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter_agents_label = '<b>'.__('Agents').'</b>';
|
$filter_agents = html_print_label_input_block(
|
||||||
$filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;');
|
__('Agents'),
|
||||||
|
html_print_select(
|
||||||
|
$agents,
|
||||||
|
'id_agents2[]',
|
||||||
|
$agents_id,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Type show.
|
// Type show.
|
||||||
$selection = [
|
$selection = [
|
||||||
0 => __('Show common modules'),
|
0 => __('Show common modules'),
|
||||||
1 => __('Show all modules'),
|
1 => __('Show all modules'),
|
||||||
];
|
];
|
||||||
$filter_type_show_label = '<b>'.__('Show common modules').'</b>';
|
$filter_type_show = html_print_label_input_block(
|
||||||
$filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;');
|
__('Show common modules'),
|
||||||
|
html_print_select(
|
||||||
|
$selection,
|
||||||
|
'selection_agent_module',
|
||||||
|
$selection_a_m,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Modules.
|
// Modules.
|
||||||
$all_modules = select_modules_for_agent_group($group_id, $agents_id, $selection_a_m, false);
|
$all_modules = select_modules_for_agent_group($group_id, $agents_id, $selection_a_m, false);
|
||||||
$filter_modules_label = '<b>'.__('Module').'</b>';
|
$filter_modules = html_print_label_input_block(
|
||||||
$filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;');
|
__('Module'),
|
||||||
|
html_print_select(
|
||||||
// Update.
|
$all_modules,
|
||||||
$filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true);
|
'module[]',
|
||||||
|
$modules_selected,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$onheader = [
|
$onheader = [
|
||||||
'updated_time' => $updated_time,
|
'updated_time' => $updated_time,
|
||||||
|
@ -566,36 +646,39 @@ function mainAgentsModules()
|
||||||
|
|
||||||
if ($config['pure'] != 1) {
|
if ($config['pure'] != 1) {
|
||||||
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
||||||
$show_filters .= '<table class="w100p no-border" cellpadding="15" cellspacing="0" border="0">';
|
$show_filters .= '<table class="filter-table-adv w100p no-border" cellpadding="4" cellspacing="4">';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= '<td>'.$filter_type_label.'</td>';
|
$show_filters .= '<td width="33%">'.$filter_type.'</td>';
|
||||||
$show_filters .= '<td>'.$filter_type.'</td>';
|
$show_filters .= '<td width="33%">'.$filter_groups.'</td>';
|
||||||
|
$show_filters .= '<td width="33%">'.$filter_module_groups.'</td>';
|
||||||
$show_filters .= '</tr>';
|
$show_filters .= '</tr>';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= '<td>'.$filter_groups_label.'</td>';
|
|
||||||
$show_filters .= '<td>'.$filter_groups.' '.$filter_recursion_label.$filter_recursion.'</td>';
|
|
||||||
$show_filters .= '<td></td>';
|
|
||||||
$show_filters .= '<td></td>';
|
|
||||||
$show_filters .= '<td>'.$filter_module_groups_label.'</td>';
|
|
||||||
$show_filters .= '<td>'.$filter_module_groups.'</td>';
|
|
||||||
$show_filters .= '</tr>';
|
|
||||||
$show_filters .= '<tr>';
|
|
||||||
$show_filters .= '<td>'.$filter_agents_label.'</td>';
|
|
||||||
$show_filters .= '<td>'.$filter_agents.'</td>';
|
$show_filters .= '<td>'.$filter_agents.'</td>';
|
||||||
$show_filters .= '<td>'.$filter_type_show_label.'</td>';
|
|
||||||
$show_filters .= '<td>'.$filter_type_show.'</td>';
|
$show_filters .= '<td>'.$filter_type_show.'</td>';
|
||||||
$show_filters .= '<td>'.$filter_modules_label.'</td>';
|
|
||||||
$show_filters .= '<td>'.$filter_modules.'</td>';
|
$show_filters .= '<td>'.$filter_modules.'</td>';
|
||||||
$show_filters .= '</tr>';
|
$show_filters .= '</tr>';
|
||||||
$show_filters .= '<tr>';
|
|
||||||
$show_filters .= "<td colspan=6 ><span class='right pdd_r_35px mrgn_top_25px'>".$filter_update.'</span></td>';
|
|
||||||
$show_filters .= '</tr>';
|
|
||||||
$show_filters .= '</table>';
|
$show_filters .= '</table>';
|
||||||
|
$show_filters .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'action-buttons',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Filter'),
|
||||||
|
'srcbutton',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'search',
|
||||||
|
'mode' => 'mini',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
$show_filters .= '</form>';
|
$show_filters .= '</form>';
|
||||||
|
|
||||||
ui_toggle(
|
ui_toggle(
|
||||||
$show_filters,
|
$show_filters,
|
||||||
__('Filters ').ui_print_help_tip(__('Secondary groups and agent subgroups will be taken into account.'), true),
|
'<span class="subsection_header_title">'.__('Filters ').'</span>'.ui_print_help_tip(__('Secondary groups and agent subgroups will be taken into account.'), true),
|
||||||
'filter_form',
|
'filter_form',
|
||||||
'',
|
'',
|
||||||
true,
|
true,
|
||||||
|
@ -804,7 +887,20 @@ function mainAgentsModules()
|
||||||
|
|
||||||
// Prepare pagination.
|
// Prepare pagination.
|
||||||
$url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
|
$url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
|
||||||
ui_pagination($total_pagination, $url);
|
$tablePagination = ui_pagination(
|
||||||
|
$total_pagination,
|
||||||
|
$url,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
'offset',
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
'',
|
||||||
|
[ 'right_content' => $tablePagination ]
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
// Get stats for this group.
|
// Get stats for this group.
|
||||||
|
|
|
@ -441,17 +441,18 @@ function mainModuleGroups()
|
||||||
[ 'right_content' => $tablePagination ]
|
[ 'right_content' => $tablePagination ]
|
||||||
);
|
);
|
||||||
|
|
||||||
echo "<div class='legend_basic w99p'>";
|
$show_legend = '<div>';
|
||||||
echo '<table >';
|
$show_legend .= '<table>';
|
||||||
echo "<tr><td colspan='2' class='pdd_b_10px'><b>".__('Legend').'</b></td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module group and agent have at least one alarm fired.').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module group and agent have at least one alarm fired.').'</td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module group and agent have at least one module in critical status and the others in any status').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module group and agent have at least one module in critical status and the others in any status').'</td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status').'</td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></td><td>".__('Grey cell when the module group and agent have at least one in unknown status and the others in green status').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></td><td>".__('Grey cell when the module group and agent have at least one in unknown status and the others in green status').'</td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></td><td>".__('Green cell when the module group and agent have all modules in OK status').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></td><td>".__('Green cell when the module group and agent have all modules in OK status').'</td></tr>';
|
$show_legend .= "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></td><td>".__('Blue cell when the module group and agent have all modules in not init status.').'</td></tr>';
|
||||||
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></td><td>".__('Blue cell when the module group and agent have all modules in not init status.').'</td></tr>';
|
$show_legend .= '</table>';
|
||||||
echo '</table>';
|
$show_legend .= '</div>';
|
||||||
echo '</div>';
|
|
||||||
|
ui_toggle($show_legend, __('Legend'));
|
||||||
} else {
|
} else {
|
||||||
ui_print_info_message(['no_close' => true, 'message' => __('This table shows in columns the modules group and in rows agents group. The cell shows all modules') ]);
|
ui_print_info_message(['no_close' => true, 'message' => __('This table shows in columns the modules group and in rows agents group. The cell shows all modules') ]);
|
||||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups or module groups') ]);
|
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups or module groups') ]);
|
||||||
|
|
Loading…
Reference in New Issue