2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
// Pandora FMS - the Flexible Monitoring System
|
|
|
|
// ============================================
|
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
2007-08-08 20:36:18 +02:00
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
2007-03-02 18:56:07 +01:00
|
|
|
|
2006-12-24 23:40:09 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2007-08-08 20:36:18 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-12-24 23:40:09 +01:00
|
|
|
// 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.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2009-02-19 22:34:27 +01:00
|
|
|
require_once ("include/functions_messages.php");
|
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
//First column (logo)
|
|
|
|
echo '<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px;" border="0"><tr><td>';
|
2008-04-03 17:43:34 +02:00
|
|
|
|
2009-05-13 19:00:58 +02:00
|
|
|
echo '<div id="pandora_logo_header"></div>';
|
2008-09-02 18:08:11 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
// First column (identifier)
|
2009-02-19 22:34:27 +01:00
|
|
|
echo '<td width="20%"><img src="images/user_'.((is_user_admin ($config["id_user"]) == 1) ? 'suit' : 'green' ).'.png" class="bot" alt="user" /> '.'<a href="index.php?sec=usuarios&sec2=operation/users/user_edit" class="white">'.__('You are').' [<b>'.$config["id_user"].'</b>]</a> ';
|
|
|
|
$msg_cnt = get_message_count ($config["id_user"]);
|
|
|
|
if ($msg_cnt > 0) {
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '<div id="dialog_messages" style="display: none"></div>';
|
|
|
|
|
|
|
|
require_css_file ('dialog');
|
|
|
|
require_jquery_file ('ui.core');
|
|
|
|
require_jquery_file ('ui.dialog');
|
|
|
|
echo '<a href="ajax.php?page=operation/messages/message" id="show_messages_dialog">';
|
|
|
|
print_image ("images/email.png", false,
|
|
|
|
array ("title" => __('You have %d unread message(s)', $msg_cnt),
|
|
|
|
"id" => "yougotmail",
|
|
|
|
"class" => "bot"));
|
2009-02-19 22:34:27 +01:00
|
|
|
echo '</a>';
|
|
|
|
}
|
2008-09-02 18:08:11 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
//First column, second row (logout button)
|
|
|
|
echo '<br /><br />';
|
2009-05-13 Esteban Sánchez <estebans@artica.es>
* images/clean.png, images/fullscreen.png, images/local_component.png,
images/log-out.png, images/normalscreen.png,
images/server_export.png: Added to repository. New tango icons.
* images/application_osx_terminal.png, images/arrow_refresh.png,
images/asterisk_yellow.png, images/attach.png,
images/drive_network.png, images/drive_user.png,
images/page_white_acrobat.png, images/rainbow.png,
images/telephone.png: Deleted from repository. Unused images.
* images/add.png, images/application_double.png,
images/application_edit.png, images/application.png,
images/book_edit.png, images/calendar_view_day.png,
images/camera.png, images/email_open.png, images/email.png,
images/god3.png, images/group.png, images/heart.png,
images/house.png, images/lupa.png, images/monitor.png,
images/mouse.png, images/package.png, images/page_white_magnify.png,
images/page_white.png, images/page_white_text.png,
images/paste_plain.png, images/pdf.png,
images/refresh.png, images/reporting.png, images/rosette.png,
images/script.png, images/server_database.png, images/server.png,
images/world.png, images/zoom.png: Updated to use tango icons.
* general/ui/agents_list.php: Added pagination.
* general/header.php: Logout icon replaced.
* include/styles/pandora.css: Some styles for tabs.
* include/functions_db.php: Changed export server icon.
* operation/events/events.php, operation/snmpconsole/snmp_view.php,
operation/visual_console/render_view.php,
operation/agentes/networkmap.php: Changed fullscreen icons.
* godmode/agentes/configurar_agente.php,
include/functions_modules.php,
include/functions_agents.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1686 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-05-13 14:29:37 +02:00
|
|
|
echo '<a class="white_bold" href="index.php?bye=bye"><img src="images/log-out.png" alt="logout" class="bot" /> '. __('Logout').'</a>';
|
2008-09-02 18:08:11 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
// Second column (link to main page)
|
2009-01-16 11:55:29 +01:00
|
|
|
echo '</td><td width="20%">';
|
2009-02-05 16:36:06 +01:00
|
|
|
echo '<a class="white_bold" href="index.php?sec=main"><img src="images/information.png" alt="info" class="bot" /> '.__('General information').'</a>';
|
2008-09-02 18:08:11 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
//Second column, second row (System up/down)
|
|
|
|
echo '<br /><br />';
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
echo '<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">';
|
2008-09-24 16:34:52 +02:00
|
|
|
$servers["all"] = (int) get_db_value ('COUNT(id_server)','tserver');
|
|
|
|
$servers["up"] = (int) check_server_status ();
|
|
|
|
$servers["down"] = $servers["all"] - $servers["up"];
|
|
|
|
if ($servers["up"] == 0) {
|
|
|
|
//All Servers down or no servers at all
|
2009-02-05 16:36:06 +01:00
|
|
|
echo '<img src="images/cross.png" alt="cross" class="bot" /> '.__('All systems').': '.__('Down');
|
2008-09-24 16:34:52 +02:00
|
|
|
} elseif ($servers["down"] != 0) {
|
|
|
|
//Some servers down
|
2009-02-05 16:36:06 +01:00
|
|
|
echo '<img src="images/error.png" alt="error" class="bot" /> '.$servers["down"].' '.__('servers down');
|
2008-09-24 16:34:52 +02:00
|
|
|
} else {
|
|
|
|
//All servers up
|
2009-02-05 16:36:06 +01:00
|
|
|
echo '<img src="images/ok.png" alt="ok" class="bot" /> '.__('All systems').': '.__('Ready');
|
2008-09-24 16:34:52 +02:00
|
|
|
}
|
|
|
|
unset ($servers); // Since this is the header, we don't like to trickle down variables.
|
2008-09-02 18:08:11 +02:00
|
|
|
echo "</a>";
|
|
|
|
|
|
|
|
|
|
|
|
// Third column
|
|
|
|
// Autorefresh
|
2009-01-16 11:55:29 +01:00
|
|
|
echo '</td><td width="20%">';
|
2009-05-27 13:04:11 +02:00
|
|
|
$ignored_params = array ('agent_config' => false, 'code' => false);
|
2009-02-19 22:34:27 +01:00
|
|
|
if ($config["refr"]) {
|
2009-05-11 15:24:27 +02:00
|
|
|
$ignored_params['refr'] = 0;
|
2009-05-14 Esteban Sanchez <estebans@artica.es>
* images/go_first.png, images/go_last.png, images/go_next.png
images/go_previous.png, images/page_refresh.png: Added to repository.
* images/b_blue.png, images/b_green.png, images/binary.png,
images/b_magenta.png, images/b_red.png, images/brick.png,
images/bricks.png, images/bug.png, images/b_white.png,
images/b_yellow.png, images/cog.png, images/comments.png,
images/computer_error.png, images/computer.png, images/database_gear.png,
images/database_lightning.png, images/database.png,
images/database_refresh.png, images/disk.png, images/god3.png,
images/god5.png, images/god7.png, images/god8.png,
images/lightbulb_off.png, images/lightbulb.png,
images/lightning.png, images/network.png, images/plugin.png,
images/reporting_edit.png, images/setup.png: Update to tango theme.
Some of them were repainted using tango palette.
* images/control_end_blue.png, images/control_fastforward_blue.png
images/control_rewind_blue.png, images/control_start_blue.png
images/transmit.png: Deleted. Unused icons.
* general/header.php: Changed refresh icon.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1691 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-05-14 16:21:37 +02:00
|
|
|
echo '<a id="autorefresh" class="white_grey_bold" href="'.get_url_refresh ($ignored_params).'"><img src="images/page_refresh.png" class="bot" alt="lightning" /> '. __('Autorefresh');
|
2009-02-19 22:34:27 +01:00
|
|
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
2009-01-16 11:55:29 +01:00
|
|
|
echo '</a>';
|
2009-05-11 15:24:27 +02:00
|
|
|
} else {
|
|
|
|
$ignored_params['refr'] = '';
|
2009-05-14 Esteban Sanchez <estebans@artica.es>
* images/go_first.png, images/go_last.png, images/go_next.png
images/go_previous.png, images/page_refresh.png: Added to repository.
* images/b_blue.png, images/b_green.png, images/binary.png,
images/b_magenta.png, images/b_red.png, images/brick.png,
images/bricks.png, images/bug.png, images/b_white.png,
images/b_yellow.png, images/cog.png, images/comments.png,
images/computer_error.png, images/computer.png, images/database_gear.png,
images/database_lightning.png, images/database.png,
images/database_refresh.png, images/disk.png, images/god3.png,
images/god5.png, images/god7.png, images/god8.png,
images/lightbulb_off.png, images/lightbulb.png,
images/lightning.png, images/network.png, images/plugin.png,
images/reporting_edit.png, images/setup.png: Update to tango theme.
Some of them were repainted using tango palette.
* images/control_end_blue.png, images/control_fastforward_blue.png
images/control_rewind_blue.png, images/control_start_blue.png
images/transmit.png: Deleted. Unused icons.
* general/header.php: Changed refresh icon.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1691 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-05-14 16:21:37 +02:00
|
|
|
echo '<a id="autorefresh" class="white_bold" href="'.get_url_refresh ($ignored_params).'"><img src="images/page_refresh.png" class="bot" alt="lightning" /> '.__('Autorefresh').'</a>';
|
2009-01-16 11:55:29 +01:00
|
|
|
$values = array ('5' => '5 '.__('seconds'),
|
|
|
|
'10' => '10 '.__('seconds'),
|
|
|
|
'15' => '15 '.__('seconds'),
|
|
|
|
'30' => '30 '.__('seconds'),
|
|
|
|
'60' => '1 '.__('minute'),
|
|
|
|
'120' => '2 '.__('minutes'),
|
|
|
|
'300' => '5 '.__('minutes'),
|
|
|
|
'900' => '15 '.__('minutes'),
|
|
|
|
'1800' => '30 '.__('minutes'),
|
|
|
|
'3600' => '1 '.__('hour'));
|
|
|
|
echo '<span id="combo_refr" style="display: none">';
|
|
|
|
print_select ($values, 'ref', '', '', __('Select'), '0', false, false, false);
|
2009-05-11 15:24:27 +02:00
|
|
|
unset ($values);
|
2009-01-16 11:55:29 +01:00
|
|
|
echo '</span>';
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
2008-08-21 23:07:20 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
//Events
|
|
|
|
echo '<br /><br />';
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
echo '<a class="white_bold" href="index.php?sec=eventos&sec2=operation/events/events&refr=5"><img src="images/lightning_go.png" alt="lightning_go" class="bot" /> '.__('Events').'</a>';
|
2007-05-18 11:29:54 +02:00
|
|
|
|
2008-09-24 16:34:52 +02:00
|
|
|
// Styled text
|
2009-05-13 19:00:58 +02:00
|
|
|
echo '</td><td width="20%"><div id="head_r"><span id="logo_text1">Pandora</span> <span id="logo_text2">FMS</span></div>';
|
|
|
|
|
|
|
|
/* Enterprise support */
|
|
|
|
if (file_exists (ENTERPRISE_DIR."/load_enterprise.php"))
|
|
|
|
echo '<div id="logo_text3">Enterprise</div>';
|
|
|
|
else
|
|
|
|
echo '<div id="logo_text3">OpenSource</div>';
|
|
|
|
|
|
|
|
echo '</td></tr></table>';
|
2009-02-09 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/header.php, general/footer.php: Made it comply with standards
* general/main_menu.php: Fixed some typo's.
* include/javascript/jquery.pandora.js: This was loading an extension
that has a separate file already
* include/functions.php: Added process_page_head and process_page_body
these are callback functions for ob_start and add functionality like
conditional loading and external scripts in the correct places. Also adds
override functionality to certain items (like refresh) from anywhere
* include/javascript/time_en.js: Added as a placeholder
* extensions/update_manager.php: Fixed some typos
* operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/events/events.php, operation/extensions.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/groups/configure_group.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php
godmode/snmpconsole/snmp_alert.php: Changed javascript, css and jquery
loading to the new buffer callback handlers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1436 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 19:41:54 +01:00
|
|
|
|
2009-02-19 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: Added require_css_file(),
require_javascript_file() and require_jquery_file() to add CSS,
javascript and jQuery files to the header easily without changing
config object. A path parameter is addded to allow the use on
enterprise code.
* include/functions_db.php: Added
get_db_value_filter(), get_db_all_rows_filter() and
process_sql_delete(). Fixed delete_agent() style and use these
functions. Added process_page_head() from functions_ui.php and changed
a bit the config javascript object part.
* include/functions_custom_graphs.php: Get results indexed by id on
get_user_custom_graphs().
* include/functions.php: Moved process_page_head to functions_ui.php.
* godmode/agentes/manage_delete.php: New interface to perform massive
agents deletion.
* godmode/menu.php: Added new option to massive agents deletion.
* general/main_menu.php, godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor.php,
godmode/agentes/planned_downtime.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/map_builder.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
operation/visual_console/render_view.php: Use new functions in include
CSS and javascript files.
* index.php: Bit of style when printing the header so the HTML can be
readed easily in a editor.
* include/javascript/pandora.js: Added a variable to determine the
enterprise directory.
* include/styles/pandora.css: Added style for manage_delete.php
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-19 17:10:04 +01:00
|
|
|
require_jquery_file ('countdown');
|
2007-05-18 14:56:05 +02:00
|
|
|
?>
|
2009-01-16 11:55:29 +01:00
|
|
|
|
|
|
|
<script language="javascript" type="text/javascript">
|
2009-02-05 16:36:06 +01:00
|
|
|
/* <![CDATA[ */
|
2009-01-16 11:55:29 +01:00
|
|
|
$(document).ready (function () {
|
2009-03-26 16:55:30 +01:00
|
|
|
<?php if ($msg_cnt > 0): ?>
|
2009-02-19 22:34:27 +01:00
|
|
|
$("#yougotmail").pulsate ();
|
2009-03-26 16:55:30 +01:00
|
|
|
<?php endif; ?>
|
2009-02-19 22:34:27 +01:00
|
|
|
<?php if ($config["refr"]): ?>
|
2009-01-16 11:55:29 +01:00
|
|
|
t = new Date();
|
2009-02-19 22:34:27 +01:00
|
|
|
t.setTime (t.getTime () + <?php echo $config["refr"] * 1000; ?>);
|
|
|
|
$("#refrcounter").countdown ({until: t,
|
2009-01-16 11:55:29 +01:00
|
|
|
layout: '%M%nn%M:%S%nn%S',
|
|
|
|
labels: ['', '', '', '', '', '', ''],
|
|
|
|
onExpiry: function () {
|
|
|
|
$(this).text ("...");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
<?php else: ?>
|
|
|
|
$("a#autorefresh").click (function () {
|
|
|
|
var a = this;
|
|
|
|
|
|
|
|
$(this).hide ().unbind ("click");
|
|
|
|
$("#combo_refr").show ();
|
|
|
|
$("select#ref").change (function () {
|
|
|
|
href = $(a).attr ("href");
|
|
|
|
$(document).attr ("location", href + this.value);
|
|
|
|
});
|
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
<?php endif; ?>
|
|
|
|
});
|
2009-02-05 16:36:06 +01:00
|
|
|
/* ]]> */
|
2009-01-16 11:55:29 +01:00
|
|
|
</script>
|