Merge branch 'ent-3739-Vista-Agent-Module-view-no-funciona-en-pantalla-completa-y-autorefresco' into 'develop'

Fixed bug in Agent-Module fullscreen view

See merge request artica/pandorafms!2299
This commit is contained in:
Daniel Rodriguez 2019-06-18 17:00:15 +02:00
commit a87e3ce97e
3 changed files with 138 additions and 102 deletions

View File

@ -1,23 +1,24 @@
<?php <?php
/**
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
$refr = (int) get_parameter('refresh', 0);
// By default 30 seconds
function mainAgentsModules() function mainAgentsModules()
{ {
global $config; global $config;
// Load global vars // Load global vars.
include_once 'include/config.php'; include_once 'include/config.php';
include_once 'include/functions_reporting.php'; include_once 'include/functions_reporting.php';
include_once $config['homedir'].'/include/functions_agents.php'; include_once $config['homedir'].'/include/functions_agents.php';
@ -25,7 +26,7 @@ function mainAgentsModules()
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
check_login(); check_login();
// ACL Check // ACL Check.
if (! check_acl($config['id_user'], 0, 'AR')) { if (! check_acl($config['id_user'], 0, 'AR')) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
@ -37,7 +38,7 @@ function mainAgentsModules()
// Update network modules for this group // Update network modules for this group
// Check for Network FLAG change request // Check for Network FLAG change request
// Made it a subquery, much faster on both the database and server side // Made it a subquery, much faster on both the database and server side.
if (isset($_GET['update_netgroup'])) { if (isset($_GET['update_netgroup'])) {
$group = get_parameter_get('update_netgroup', 0); $group = get_parameter_get('update_netgroup', 0);
if (check_acl($config['id_user'], $group, 'AW')) { if (check_acl($config['id_user'], $group, 'AW')) {
@ -62,7 +63,7 @@ function mainAgentsModules()
$modulegroup = get_parameter('modulegroup', 0); $modulegroup = get_parameter('modulegroup', 0);
$refr = (int) get_parameter('refresh', 0); $refr = (int) get_parameter('refresh', 0);
// By default 30 seconds // By default 30 seconds.
$recursion = get_parameter('recursion', 0); $recursion = get_parameter('recursion', 0);
$group_id = (int) get_parameter('group_id', 0); $group_id = (int) get_parameter('group_id', 0);
$offset = (int) get_parameter('offset', 0); $offset = (int) get_parameter('offset', 0);
@ -79,7 +80,8 @@ function mainAgentsModules()
$full_modules_selected = explode(';', get_parameter('full_modules_selected', 0)); $full_modules_selected = explode(';', get_parameter('full_modules_selected', 0));
$full_agents_id = explode(';', get_parameter('full_agents_id', 0)); $full_agents_id = explode(';', get_parameter('full_agents_id', 0));
if ($save_serialize && $update_item == '') { // In full screen there is no pagination neither filters.
if (( ($config['pure'] == 0 && $save_serialize) && $update_item == '' ) || ( ($config['pure'] == 1 && $save_serialize == 0) && $update_item == '' )) {
$unserialize_modules_selected = unserialize_in_temp($config['id_user'].'_agent_module', true, 1); $unserialize_modules_selected = unserialize_in_temp($config['id_user'].'_agent_module', true, 1);
$unserialize_agents_id = unserialize_in_temp($config['id_user'].'_agents', true, 1); $unserialize_agents_id = unserialize_in_temp($config['id_user'].'_agents', true, 1);
if ($unserialize_modules_selected) { if ($unserialize_modules_selected) {
@ -102,7 +104,6 @@ function mainAgentsModules()
serialize_in_temp($agents_id, $config['id_user'].'_agents', 1); serialize_in_temp($agents_id, $config['id_user'].'_agents', 1);
} }
// if($agents_id != -1) $agents_id = null;
if ($config['pure'] == 0) { if ($config['pure'] == 0) {
if ($modules_selected[0] && $agents_id[0]) { if ($modules_selected[0] && $agents_id[0]) {
$full_modules = urlencode(implode(';', $modules_selected)); $full_modules = urlencode(implode(';', $modules_selected));
@ -124,13 +125,13 @@ function mainAgentsModules()
} }
} }
// groups // Groups.
$filter_groups_label = '<b>'.__('Group').'</b>'; $filter_groups_label = '<b>'.__('Group').'</b>';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;'); $filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
$filter_recursion_label = '<b>'.__('Recursion').'</b>'; $filter_recursion_label = '<b>'.__('Recursion').'</b>';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true); $filter_recursion = html_print_checkbox('recursion', 1, 0, true);
// groups module // Groups module.
$filter_module_groups_label = '<b>'.__('Module group').'</b>'; $filter_module_groups_label = '<b>'.__('Module group').'</b>';
$filter_module_groups = html_print_select_from_sql( $filter_module_groups = html_print_select_from_sql(
'SELECT * FROM tmodule_group ORDER BY name', 'SELECT * FROM tmodule_group ORDER BY name',
@ -146,7 +147,7 @@ function mainAgentsModules()
'width: auto;' 'width: auto;'
); );
// agent // 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 = [];
@ -155,7 +156,7 @@ function mainAgentsModules()
$filter_agents_label = '<b>'.__('Agents').'</b>'; $filter_agents_label = '<b>'.__('Agents').'</b>';
$filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;'); $filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;');
// type show // Type show.
$selection = [ $selection = [
0 => __('Show common modules'), 0 => __('Show common modules'),
1 => __('Show all modules'), 1 => __('Show all modules'),
@ -163,12 +164,12 @@ function mainAgentsModules()
$filter_type_show_label = '<b>'.__('Show common modules').'</b>'; $filter_type_show_label = '<b>'.__('Show common modules').'</b>';
$filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;'); $filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;');
// 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_label = '<b>'.__('Module').'</b>';
$filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;'); $filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;');
// update // Update.
$filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true); $filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true);
$onheader = [ $onheader = [
@ -178,8 +179,11 @@ function mainAgentsModules()
'combo_groups' => $filter_groups, 'combo_groups' => $filter_groups,
]; ];
// Old style table, we need a lot of special formatting,don't use table function /*
// Prepare old-style table * Old style table, we need a lot of special formatting,don't use table function.
* Prepare old-style table.
*/
if ($config['pure'] == 0) { if ($config['pure'] == 0) {
// Header. // Header.
ui_print_page_header( ui_print_page_header(
@ -200,38 +204,51 @@ function mainAgentsModules()
$full_modules = urlencode(implode(';', $full_modules_selected)); $full_modules = urlencode(implode(';', $full_modules_selected));
$full_agents = urlencode(implode(';', $full_agents_id)); $full_agents = urlencode(implode(';', $full_agents_id));
$url = " index.php?sec=view&sec2=extensions/agents_modules&amp;pure=0&amp;offset=$offset $url = 'index.php?sec=view&sec2=extensions/agents_modules&amp;pure=0&amp;offset=$offset
&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr&full_modules_selected=$full_modules &group_id=$group_id&modulegroup=$modulegroup&refresh=$refr&full_modules_selected=$full_modules
&full_agents_id=$full_agents&selection_agent_module=$selection_a_m"; &full_agents_id=$full_agents&selection_agent_module=$selection_a_m';
} else { } else {
$url = " index.php?sec=view&sec2=extensions/agents_modules&amp;pure=0&amp;offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr"; $url = 'index.php?sec=view&sec2=extensions/agents_modules&amp;pure=0&amp;offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr';
} }
// Floating menu - Start // Floating menu - Start.
echo '<div id="vc-controls" style="z-index: 999">'; echo '<div id="vc-controls" style="z-index: 999">';
echo '<div id="menu_tab">'; echo '<div id="menu_tab">';
echo '<ul class="mn">'; echo '<ul class="mn">';
// Quit fullscreen // Quit fullscreen.
echo '<li class="nomn">'; echo '<li class="nomn">';
echo '<a target="_top" href="'.$url.'">'; echo '<a target="_top" href="'.$url.'">';
echo html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode')]); echo html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode')]);
echo '</a>'; echo '</a>';
echo '</li>'; echo '</li>';
// Countdown // Countdown.
echo '<li class="nomn">'; echo '<li class="nomn">';
echo '<div class="vc-refr">'; echo '<div class="vc-refr">';
echo '<div class="vc-countdown"></div>'; echo '<div class="vc-countdown style="display: inline;"></div>';
echo '<div id="vc-refr-form">'; echo '<div id="vc-refr-form">';
echo __('Refresh').':'; echo __('Refresh').':';
echo html_print_select(get_refresh_time_array(), 'refresh', $refr, '', '', 0, true, false, false); echo html_print_select(
get_refresh_time_array(),
'refresh',
$refr,
'',
'',
0,
true,
false,
false,
'',
false,
'margin-top: 3px;'
);
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '</li>'; echo '</li>';
// Console name // Console name.
echo '<li class="nomn">'; echo '<li class="nomn">';
echo '<div class="vc-title">'.__('Agent/module view').'</div>'; echo '<div class="vc-title">'.__('Agent/module view').'</div>';
echo '</li>'; echo '</li>';
@ -240,35 +257,35 @@ function mainAgentsModules()
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
// Floating menu - End // Floating menu - End.
ui_require_jquery_file('countdown'); ui_require_jquery_file('countdown');
} }
if ($config['pure'] != 1) { if ($config['pure'] != 1) {
echo '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'">'; $show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" style="width:100%;">';
$show_filters .= '<table class="white_table" cellpadding="0" cellspacing="0" border="0" style="width:100%; border:none;">';
echo '<table class="databox filters" cellpadding="0" cellspacing="0" border="0" style="width:100%;">'; $show_filters .= '<tr>';
echo '<tr>'; $show_filters .= '<td>'.$filter_groups_label.'</td>';
echo '<td>'.$filter_groups_label.'</td>'; $show_filters .= '<td>'.$filter_groups.'&nbsp;&nbsp;&nbsp;'.$filter_recursion_label.$filter_recursion.'</td>';
echo '<td>'.$filter_groups.'&nbsp;&nbsp;&nbsp;'.$filter_recursion_label.$filter_recursion.'</td>'; $show_filters .= '<td></td>';
echo '<td></td>'; $show_filters .= '<td></td>';
echo '<td></td>'; $show_filters .= '<td>'.$filter_module_groups_label.'</td>';
echo '<td>'.$filter_module_groups_label.'</td>'; $show_filters .= '<td>'.$filter_module_groups.'</td>';
echo '<td>'.$filter_module_groups.'</td>'; $show_filters .= '</tr>';
echo '</tr>'; $show_filters .= '<tr>';
echo '<tr>'; $show_filters .= '<td>'.$filter_agents_label.'</td>';
echo '<td>'.$filter_agents_label.'</td>'; $show_filters .= '<td>'.$filter_agents.'</td>';
echo '<td>'.$filter_agents.'</td>'; $show_filters .= '<td>'.$filter_type_show_label.'</td>';
echo '<td>'.$filter_type_show_label.'</td>'; $show_filters .= '<td>'.$filter_type_show.'</td>';
echo '<td>'.$filter_type_show.'</td>'; $show_filters .= '<td>'.$filter_modules_label.'</td>';
echo '<td>'.$filter_modules_label.'</td>'; $show_filters .= '<td>'.$filter_modules.'</td>';
echo '<td>'.$filter_modules.'</td>'; $show_filters .= '</tr>';
echo '</tr>'; $show_filters .= '<tr>';
echo '<tr>'; $show_filters .= "<td colspan=6 ><span style='float: right; padding-right: 20px;'>".$filter_update.'</sapn></td>';
echo "<td colspan=6 ><span style='float: right; padding-right: 20px;'>".$filter_update.'</sapn></td>'; $show_filters .= '</tr>';
echo '</tr>'; $show_filters .= '</table>';
echo '</table>'; $show_filters .= '</form>';
echo '</form>'; ui_toggle($show_filters, __('Filters'));
} }
if ($agents_id[0] != -1) { if ($agents_id[0] != -1) {
@ -291,7 +308,7 @@ function mainAgentsModules()
$count = 0; $count = 0;
foreach ($agents as $agent) { foreach ($agents as $agent) {
// TODO TAGS agents_get_modules // TODO TAGS agents_get_modules.
$module = agents_get_modules( $module = agents_get_modules(
$agent, $agent,
false, false,
@ -339,7 +356,7 @@ function mainAgentsModules()
} }
} }
} else { } else {
// TODO TAGS agents_get_modules // TODO TAGS agents_get_modules.
$all_modules = agents_get_modules( $all_modules = agents_get_modules(
$agents, $agents,
false, false,
@ -414,11 +431,11 @@ function mainAgentsModules()
if ($hor_offset > 0) { if ($hor_offset > 0) {
$new_hor_offset = ($hor_offset - $block); $new_hor_offset = ($hor_offset - $block);
echo "<th width='20px' "."style='vertical-align:top; padding-top: 35px;' "."rowspan='".($nagents + 1)."'>"."<a href='index.php?".'extension_in_menu=estado&'.'sec=extensions&'.'sec2=extensions/agents_modules&'.'refr=0&'.'save_serialize=1&'.'selection_a_m='.$selection_a_m.'&'.'hor_offset='.$new_hor_offset.'&'.'offset='.$offset."'>".html_print_image( echo "<th width='20px' style='vertical-align: middle; text-align: center;' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&refr=0&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image(
'images/arrow_left.png', 'images/arrow_left_green.png',
true, true,
['title' => __('Previous modules')] ['title' => __('Previous modules')]
).'</a>'.'</th>'; ).'</a></th>';
} }
$nmodules = 0; $nmodules = 0;
@ -440,11 +457,11 @@ function mainAgentsModules()
if (($hor_offset + $block) < $nmodules) { if (($hor_offset + $block) < $nmodules) {
$new_hor_offset = ($hor_offset + $block); $new_hor_offset = ($hor_offset + $block);
echo "<th width='20px' "."style='vertical-align:top; padding-top: 35px;' "."rowspan='".($nagents + 1)."'>"."<a href='index.php?".'extension_in_menu=estado&'.'sec=extensions&'.'sec2=extensions/agents_modules&'.'save_serialize=1&'.'selection_a_m='.$selection_a_m.'&'.'hor_offset='.$new_hor_offset.'&'.'offset='.$offset."'>".html_print_image( echo "<th width='20px' style='vertical-align: middle; text-align: center;' rowspan='".($nagents + 1)."'><a href='index.php?".'extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&selection_a_m='.$selection_a_m.'&hor_offset='.$new_hor_offset.'&offset='.$offset."'>".html_print_image(
'images/arrow.png', 'images/arrow_right_green.png',
true, true,
['title' => __('More modules')] ['title' => __('More modules')]
).'</a>'.'</th>'; ).'</a></th>';
} }
echo '</tr>'; echo '</tr>';
@ -457,12 +474,12 @@ function mainAgentsModules()
$filter_agents['id_grupo'] = $group_id; $filter_agents['id_grupo'] = $group_id;
} }
// 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); ui_pagination($total_pagination, $url);
foreach ($agents as $agent) { foreach ($agents as $agent) {
// Get stats for this group // Get stats for this group.
$agent_status = agents_get_status($agent['id_agente']); $agent_status = agents_get_status($agent['id_agente']);
$alias = db_get_row('tagente', 'id_agente', $agent['id_agente']); $alias = db_get_row('tagente', 'id_agente', $agent['id_agente']);
if (empty($alias['alias'])) { if (empty($alias['alias'])) {
@ -471,29 +488,29 @@ function mainAgentsModules()
switch ($agent_status) { switch ($agent_status) {
case 4: case 4:
// Alert fired status // Alert fired status.
$rowcolor = 'group_view_alrm'; $rowcolor = 'group_view_alrm';
break; break;
case 1: case 1:
// Critical status // Critical status.
$rowcolor = 'group_view_crit'; $rowcolor = 'group_view_crit';
break; break;
case 2: case 2:
// Warning status // Warning status.
$rowcolor = 'group_view_warn'; $rowcolor = 'group_view_warn';
break; break;
case 0: case 0:
// Normal status // Normal status.
$rowcolor = 'group_view_ok'; $rowcolor = 'group_view_ok';
break; break;
case 3: case 3:
case -1: case -1:
default: default:
// Unknown status // Unknown status.
$rowcolor = 'group_view_unk'; $rowcolor = 'group_view_unk';
break; break;
} }
@ -502,7 +519,7 @@ function mainAgentsModules()
echo "<td class='$rowcolor'> echo "<td class='$rowcolor'>
<a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".$alias['alias'].'</a></td>'; <a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".$alias['alias'].'</a></td>';
// TODO TAGS agents_get_modules // TODO TAGS agents_get_modules.
$agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true); $agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true);
$nmodules = 0; $nmodules = 0;
@ -572,18 +589,23 @@ function mainAgentsModules()
echo '</table>'; echo '</table>';
echo "<div class='legend_basic' style='width: 96%'>"; $show_legend = "<div class='legend_white'>";
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></div>".__('Orange cell when the module has fired alerts').'</div>';
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></div>".__('Red cell when the module has a critical status').'
</div>';
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></div>".__('Yellow cell when the module has a warning status').'</div>';
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></div>".__('Green cell when the module has a normal status').'</div>';
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></div>".__('Grey cell when the module has an unknown status').'</div>';
$show_legend .= "<div style='display: flex;align-items: center;'>
<div class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></div>".__("Cell turns blue when the module is in 'not initialize' status").'</div>';
$show_legend .= '</div>';
ui_toggle($show_legend, __('Legend'));
echo '<table>';
echo "<tr><td colspan='2' style='padding-bottom: 10px;'><b>".__('Legend').'</b></td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_ALERTFIRED.";'></div></td><td>".__('Orange cell when the module has fired alerts').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_CRITICAL.";'></div></td><td>".__('Red cell when the module has a critical status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module has a warning status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></td><td>".__('Green cell when the module has a normal status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></td><td>".__('Grey cell when the module has an unknown status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></td><td>".__("Cell turns blue when the module is in 'not initialize' status").'</td></tr>';
echo '</table>';
echo '</div>';
$pure_var = $config['pure']; $pure_var = $config['pure'];
if ($pure_var) { if ($pure_var) {
$pure_var = 1; $pure_var = 1;
@ -627,15 +649,13 @@ $ignored_params['refresh'] = '';
$.each($('.th_class_module_r'), function (i, elem) { $.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', ''); id = $(elem).attr('id').replace('th_module_r_', '');
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px'); $("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
//$("#div_module_r_" + id).css('margin-top', (max_width - $("#div_module_r_" + id).width()) + 'px');
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px'); $("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
$("#div_module_r_" + id).show(); $("#div_module_r_" + id).show();
}); });
var refr =" . $refr . "; var refr = '<?php echo get_parameter('refresh', 0); ?>';
var pure =" . $pure_var . "; var pure = '<?php echo get_parameter('pure', 0); ?>';
var href ='" . ui_get_url_refresh ($ignored_params) . "'; var href =' <?php echo ui_get_url_refresh($ignored_params); ?>';
if (pure) { if (pure) {
var startCountDown = function (duration, cb) { var startCountDown = function (duration, cb) {
@ -646,7 +666,7 @@ $ignored_params['refresh'] = '';
$('div.vc-countdown').countdown({ $('div.vc-countdown').countdown({
until: t, until: t,
format: 'MS', format: 'MS',
layout: '(%M%nn%M:%S%nn%S Until refresh)', layout: '(%M%nn%M:%S%nn%S <?php echo __('Until next'); ?>) ',
alwaysExpire: true, alwaysExpire: true,
onExpiry: function () { onExpiry: function () {
$('div.vc-countdown').countdown('destroy'); $('div.vc-countdown').countdown('destroy');
@ -656,7 +676,10 @@ $ignored_params['refresh'] = '';
}); });
} }
startCountDown(refr, false); if(refr>0){
startCountDown(refr, false);
}
var controls = document.getElementById('vc-controls'); var controls = document.getElementById('vc-controls');
autoHideElement(controls, 1000); autoHideElement(controls, 1000);

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

@ -3108,6 +3108,15 @@ div.nodata_container {
border-radius: 3px; border-radius: 3px;
} }
.legend_white {
width: 100%;
background-color: #fff;
padding: 20px 50px;
display: grid;
grid-gap: 12px;
grid-template-columns: repeat(3, 1fr);
}
.legend_basic { .legend_basic {
background: #f4f4f4; background: #f4f4f4;
margin-top: 10px; margin-top: 10px;
@ -3116,12 +3125,13 @@ div.nodata_container {
} }
.agents_modules_table th { .agents_modules_table th {
background: #3f3f3f; background-color: #fff !important;
border: 1px solid #e2e2e2; border-right: 1px solid #e2e2e2;
color: #000;
} }
.agents_modules_table th * { .agents_modules_table th * {
color: #ffffff; color: #000;
} }
/* /*
@ -3425,9 +3435,12 @@ div.div_groups_status {
.agents_modules_table { .agents_modules_table {
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
border-spacing: 0px; border-spacing: 0px;
margin-bottom: 30px;
background-color: #fff;
} }
.agents_modules_table td { .agents_modules_table td {
border: 1px solid #e2e2e2; border-right: 1px solid #e2e2e2;
border-top: 1px solid #e2e2e2;
} }
.databox.filters, .databox.filters,