2010-03-02 Sancho Leren <slerena@artica.es>

* include/functions_ui.php: Fixes default icon for operation
	mode in the title.

	* operation/incidents/incident.php
	operation/incidents/incident_detail.php
	operation/incidents/incident_statistics.php
	operation/snmpconsole/snmp_view.php
	operation/users/user.php
	operation/users/user_edit.php
	operation/users/user_statistics.php
	operation/events/event_statistics.php
	operation/events/export_csv.php
	operation/events/events_marquee.php
	operation/events/events.php
	operation/agentes/export_csv.php
	operation/agentes/datos_agente.php
	operation/agentes/estado_ultimopaquete.php
	operation/agentes/estado_generalagente.php
	operation/agentes/estado_agente.php
	operation/agentes/sla_view.php
	operation/agentes/gis_view.php
	operation/agentes/ver_agente.php
	operation/agentes/tactical.php
	operation/agentes/group_view.php
	operation/agentes/networkmap.php
	operation/messages/message.php
	operation/reporting/reporting_viewer.php
	operation/servers/view_server.php
	operation/servers/view_server_detail.php
	operation/search_results.php
	godmode/groups/configure_group.php
	godmode/groups/group_list.php
	godmode/agentes/agent_manager.php
	godmode/alerts/alert_list.php: Fixes with include(Config.php) in
	enterprise mode.:

	* general/header.php: Detection of Metaconsole to show less options.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2452 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-03-02 19:25:51 +00:00
parent d7c363c8ae
commit 2bd1fbae56
34 changed files with 121 additions and 62 deletions

View File

@ -1,3 +1,43 @@
2010-03-02 Sancho Leren <slerena@artica.es>
* include/functions_ui.php: Fixes default icon for operation
mode in the title.
* operation/incidents/incident.php
operation/incidents/incident_detail.php
operation/incidents/incident_statistics.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
operation/users/user_statistics.php
operation/events/event_statistics.php
operation/events/export_csv.php
operation/events/events_marquee.php
operation/events/events.php
operation/agentes/export_csv.php
operation/agentes/datos_agente.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/sla_view.php
operation/agentes/gis_view.php
operation/agentes/ver_agente.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/messages/message.php
operation/reporting/reporting_viewer.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/search_results.php
godmode/groups/configure_group.php
godmode/groups/group_list.php
godmode/agentes/agent_manager.php
godmode/alerts/alert_list.php: Fixes with include(Config.php) in
enterprise mode.:
* general/header.php: Detection of Metaconsole to show less options.
2010-03-02 Raúl Mateos <raulofpandora@gmail.com>
* godmode/agentes/*.php, godmode/group/*.php, godmode/modules/*.php:

View File

@ -14,6 +14,8 @@
require_once ("include/functions_messages.php");
$msg_cnt = 0;
?>
<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px;" border="0">
<tr>
@ -33,17 +35,20 @@ require_once ("include/functions_messages.php");
<img src="images/user_<?php if (is_user_admin ($config["id_user"]) == 1) echo 'suit'; else echo 'green'; ?>.png" class="bot" alt="user" />
<a href="index.php?sec=usuarios&sec2=operation/users/user_edit" class="white"> [<b><?php echo $config["id_user"];?></b>]</a>
<?php
$msg_cnt = get_message_count ($config["id_user"]);
if ($msg_cnt > 0) {
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"));
echo '</a>';
if ($config["metaconsole"] == 0){
$msg_cnt = get_message_count ($config["id_user"]);
if ($msg_cnt > 0) {
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"));
echo '</a>';
}
}
?>
&nbsp;
@ -51,8 +56,11 @@ require_once ("include/functions_messages.php");
</td>
<td width="20%">
<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">
<?php
<?php
if ($config["metaconsole"] == 0){
echo '<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">';
$servers["all"] = (int) get_db_value ('COUNT(id_server)','tserver');
$servers["up"] = (int) check_server_status ();
$servers["down"] = $servers["all"] - $servers["up"];
@ -69,8 +77,13 @@ require_once ("include/functions_messages.php");
echo '<img src="images/ok.png" alt="ok" class="bot" />&nbsp;'.__('All systems').': '.__('Ready');
}
unset ($servers); // Since this is the header, we don't like to trickle down variables.
?>
</a>
echo '</a>';
} else {
// TODO: Put here to remark this is a metaconsole
echo "";
}
?>
</td>
<td width="20%">
<?php
@ -111,6 +124,10 @@ require_once ("include/functions_messages.php");
</tr>
<tr>
<td colspan=2>
<?php
if ($config["metaconsole"] == 0){
?>
<form method="get" style="" valign="middle" name="quicksearch">
<script type="text/javascript" language="javascript">
var fieldKeyWordEmpty = true;
@ -128,9 +145,14 @@ require_once ("include/functions_messages.php");
<!-- onClick="javascript: document.quicksearch.submit()" -->
<input type='hidden' name='head_search_keywords' value='abc'>
</form>
<?php
}
?>
<td>
<?php
if ($config["metaconsole"] == 0){
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">&nbsp;'.__('Events').'</a>';
}
?>
</td>
</tr>

View File

@ -60,13 +60,6 @@ if ($new_agent) {
$nombre_agente = $direccion_agente;
}
// Header
if ($id_agente) {
print_page_header (__('Agent configuration')." &raquo; ".__('Update agent'), "", false, "", true);
} else {
print_page_header (__('Agent configuration')." &raquo; ".__('Create agent'), "", false, "", true);
}
echo '<div style="height: 5px">&nbsp;</div>';
if (!$new_agent) {

View File

@ -108,7 +108,6 @@ $enable_alert = (bool) get_parameter ('enable_alert');
// Header
if ($id_agente) {
print_page_header (__('Agent configuration').' &raquo; '.__('Alerts'), "images/god2.png", false, "", true);
$agents = array ($id_agente => get_agent_name ($id_agente));
} else {
print_page_header (__('Alerts').' &raquo; '.__('Manage alerts'), "images/god2.png", false, "", true);

View File

@ -14,7 +14,7 @@
// GNU General Public License for more details.
require ("include/config.php");
global $config;
check_login ();

View File

@ -15,7 +15,7 @@
// Load global vars
require ("include/config.php");
global $config;
check_login();
@ -117,6 +117,10 @@ if ($delete_group) {
$result = mysql_query ($sql);
$sql = sprintf ('DELETE FROM tgrupo WHERE id_grupo = %d', $id_group);
$result = mysql_query ($sql);
$sql = sprintf ('DELETE FROM tgroup_stat WHERE id_group = %d', $id_group);
$result = mysql_query ($sql);
if (! $result)
echo "<h3 class='error'>".__('There was a problem deleting group')."</h3>";
else

View File

@ -1372,6 +1372,10 @@ function print_page_header ($title, $icon = "", $return = false, $help = "", $go
$icon = "images/setup.png";
}
if (($icon == "") && ($godmode == false)){
$icon = "images/comments.png";
}
if ($godmode == true){
$type = "nomn";
$type2 = "menu_tab_frame";

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
check_login();

View File

@ -16,7 +16,8 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_reporting.php");
check_login ();

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_agents.php");

View File

@ -13,9 +13,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
require("include/config.php");
check_login();
if (isset($_GET["id_agente"])){

View File

@ -13,8 +13,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
session_start ();
require_once ("../../include/config.php");

View File

@ -14,7 +14,7 @@
*/
// Load global vars
require_once ("include/config.php");
global $config;
check_login ();

View File

@ -108,7 +108,7 @@ foreach ($groups as $id_group => $group_name) {
echo $group_name;
echo "</a>";
if (give_acl ($config['id_user'], $group_info["id_group"], "AW")) {
if (give_acl ($config['id_user'], $id_group, "AW")) {
echo '&nbsp;<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup='.$id_group.'"><img src="images/target.png" align="right"></a>';
echo "&nbsp;";
}

View File

@ -15,7 +15,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
check_login ();

View File

@ -15,7 +15,8 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_reporting.php");
check_login();

View File

@ -29,7 +29,10 @@ if (! give_acl ($config['id_user'], 0, "AR")) {
return;
}
$force_refresh = get_parameter ("force_refresh", "");
if ($force_refresh == 1){
process_sql ("UPDATE tgroup_stat SET utimestamp = 0");
}
//This is an intermediary function to print out a set of cells
//Cells is an array with the explanation, value, link and color
@ -46,12 +49,13 @@ function print_cells_temp ($cells) {
}
if ($config["realtimestats"] == 0){
$updated_time = __('Last update'). " : ". print_timestamp (get_db_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true);
$updated_time ="<a href='index.php?sec=estado&sec2=operation/agentes/tactical&force_refresh=1'>";
$updated_time .= __('Last update'). " : ". print_timestamp (get_db_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true);
$updated_time .= "</A>";
} else {
$updated_time = __("Updated at realtime");
}
// Header
print_page_header (__("Tactical view"), "images/bricks.png", false, "", false, $updated_time );

View File

@ -16,7 +16,8 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_gis.php");
require_javascript_file('openlayers.pandora');

View File

@ -17,7 +17,8 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/fgraph.php");
check_login ();

View File

@ -15,7 +15,8 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_events.php"); //Event processing functions
check_login ();

View File

@ -13,8 +13,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
error_reporting(E_ALL);
// Local settings for marquee extension

View File

@ -13,8 +13,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
session_start();
require_once ("../../include/config.php");

View File

@ -13,9 +13,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
require_once ("include/config.php");
global $config;
require_once ("include/functions_incidents.php");
check_login ();

View File

@ -13,12 +13,9 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_incidents.php");
require_once ("include/functions_events.php"); //To get events group information

View File

@ -15,7 +15,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/fgraph.php");
check_login ();

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_messages.php");
//First Queries - also inits the variables so it can be passed along

View File

@ -14,7 +14,7 @@
// GNU General Public License for more details.
// Login check
require ("include/config.php");
global $config;
check_login();

View File

@ -12,7 +12,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
require ("include/config.php");
global $config;
require_once ("include/functions_reporting.php");
// Load enterprise extensions

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/functions_servers.php");
check_login ();

View File

@ -15,7 +15,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
check_login ();

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
enterprise_include ("operation/snmpconsole/snmp_view.php");
check_login ();

View File

@ -16,7 +16,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
check_login ();

View File

@ -15,7 +15,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
check_login ();

View File

@ -17,7 +17,7 @@
// Load global vars
require_once ("include/config.php");
global $config;
require_once ("include/fgraph.php");
check_login ();