mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2012-09-05 Vanessa Gil <vanessa.gil@artica.es>
* general/header.php include/functions_ui.php: Enable/disable autorefresh. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6933 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9fb1c6bbe2
commit
a69fec2102
@ -1,3 +1,8 @@
|
|||||||
|
2012-09-05 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
|
* general/header.php
|
||||||
|
include/functions_ui.php: Enable/disable autorefresh.
|
||||||
|
|
||||||
2012-09-04 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-09-04 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_graph.php
|
* include/functions_graph.php
|
||||||
|
@ -130,40 +130,22 @@ config_check();
|
|||||||
<?php
|
<?php
|
||||||
// Autorefresh
|
// Autorefresh
|
||||||
$ignored_params = array ('agent_config' => false, 'code' => false);
|
$ignored_params = array ('agent_config' => false, 'code' => false);
|
||||||
if ($config["refr"]) {//autorefresh interval
|
|
||||||
|
if ($config['enable_refr']) {
|
||||||
$ignored_params['refr'] = 0;
|
$ignored_params['refr'] = 0;
|
||||||
if (($config['enable_refr']) || (($_GET['sec2'] == 'operation/agentes/tactical') || ($_GET['sec2'] == 'operation/agentes/estado_agente') ||
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
||||||
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
|
echo '</a>';
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (($config['refr']) && (($_GET['sec2'] == 'operation/agentes/tactical') || ($_GET['sec2'] == 'operation/agentes/estado_agente') ||
|
||||||
($_GET['sec2'] == 'operation/agentes/group_view') || ($_GET['sec2'] == 'operation/events/events') ||
|
($_GET['sec2'] == 'operation/agentes/group_view') || ($_GET['sec2'] == 'operation/events/events') ||
|
||||||
($_GET['sec2'] == 'enterprise/dashboard/main_dashboard'))) { //enable autorefresh to all pages or default pages
|
($_GET['sec2'] == 'enterprise/dashboard/main_dashboard'))) {
|
||||||
|
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
||||||
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
$ignored_params['refr'] = '';
|
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
|
||||||
$values = array (
|
|
||||||
'5' => __('5 seconds'),
|
|
||||||
'10' => __('10 seconds'),
|
|
||||||
'15' => __('15 seconds'),
|
|
||||||
'30' => __('30 seconds'),
|
|
||||||
(string)SECONDS_1MINUTE => __('1 minute'),
|
|
||||||
(string)SECONDS_2MINUTES => __('2 minutes'),
|
|
||||||
(string)SECONDS_5MINUTES => __('5 minutes'),
|
|
||||||
(string)SECONDS_15MINUTES => __('15 minutes'),
|
|
||||||
(string)SECONDS_30MINUTES => __('30 minutes'),
|
|
||||||
(string)SECONDS_1HOUR => __('1 hour'));
|
|
||||||
echo '<span id="combo_refr" style="display: none">';
|
|
||||||
html_print_select ($values, 'ref', '', '', __('Select'), '0', false, false, false);
|
|
||||||
unset ($values);
|
|
||||||
echo '</span>';
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
||||||
$values = array (
|
$values = array (
|
||||||
@ -182,6 +164,8 @@ config_check();
|
|||||||
unset ($values);
|
unset ($values);
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td width='20%' rowspan='2'>
|
<td width='20%' rowspan='2'>
|
||||||
|
@ -1108,9 +1108,14 @@ function ui_process_page_head ($string, $bitfield) {
|
|||||||
|
|
||||||
// If user is logged or displayed view is the public view of visual console
|
// If user is logged or displayed view is the public view of visual console
|
||||||
if ($config["refr"] > 0 && (isset($config['id_user']) || $vc_public_view == 1)) {
|
if ($config["refr"] > 0 && (isset($config['id_user']) || $vc_public_view == 1)) {
|
||||||
$query = ui_get_url_refresh (false);
|
if ($config['enable_refr'] || $GET['sec2'] == "operation/agentes/estado_agente" || $GET['sec2'] == "operation/agentes/tactical"||
|
||||||
|
$_GET['sec2'] == "operation/agentes/group_view" || $_GET['sec2'] == 'operation/events/events' ||
|
||||||
|
$_GET['sec2'] == "enterprise/dashboard/main_dashboard") {
|
||||||
|
|
||||||
|
$query = ui_get_url_refresh (false);
|
||||||
$output .= '<meta http-equiv="refresh" content="'.$config["refr"].'; URL=' . $query . '" />';
|
$output .= '<meta http-equiv="refresh" content="'.$config["refr"].'; URL=' . $query . '" />';
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$output .= "\n\t";
|
$output .= "\n\t";
|
||||||
$output .= '<title>Pandora FMS - '.__('the Flexible Monitoring System').'</title>
|
$output .= '<title>Pandora FMS - '.__('the Flexible Monitoring System').'</title>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user