2007-05-20 19:12:31 +02:00
|
|
|
<?PHP
|
|
|
|
|
|
|
|
// Pandora FMS - the Free monitoring system
|
|
|
|
// ========================================
|
2008-02-21 16:16:54 +01:00
|
|
|
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
|
2007-05-20 19:12:31 +02:00
|
|
|
// Main PHP/SQL code development and project architecture and management
|
2008-02-21 16:16:54 +01:00
|
|
|
// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas, info@artica.es
|
2007-05-20 19:12:31 +02:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
|
|
|
|
// Login check
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
global $config;
|
2007-05-20 19:12:31 +02:00
|
|
|
global $REMOTE_ADDR;
|
|
|
|
|
|
|
|
if (comprueba_login() != 0) {
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to access graph builder");
|
2007-05-20 19:12:31 +02:00
|
|
|
include ("general/noaccess.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get input parameter for layout id
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if (isset($_GET["id"])){
|
|
|
|
$id_layout = $_GET["id"];
|
|
|
|
$sql="SELECT * FROM tlayout WHERE id = $id_layout";
|
|
|
|
$res=mysql_query($sql);
|
|
|
|
if ($row = mysql_fetch_array($res)){
|
|
|
|
$id_group = $row["id_group"];
|
|
|
|
$layout_name = $row["name"];
|
|
|
|
$fullscreen = $row["fullscreen"];
|
|
|
|
$background = $row["background"];
|
|
|
|
$bwidth = $row["width"];
|
|
|
|
$bheight = $row["height"];
|
|
|
|
} else {
|
|
|
|
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access visual console without id layout");
|
|
|
|
include ("general/noaccess.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access visual console without id layout");
|
|
|
|
include ("general/noaccess.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$refr = get_parameter ("refr", 0);
|
|
|
|
$pure_url = "&pure=".$config["pure"];
|
|
|
|
|
2007-05-20 19:12:31 +02:00
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// RENDER MAP !
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
echo "<h1>".$layout_name;
|
|
|
|
|
|
|
|
if ($config["pure"] == 0){
|
|
|
|
echo lang_string("Full screen mode");
|
|
|
|
echo " ";
|
|
|
|
echo "<a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$id_layout&refr=$refr&pure=1'>";
|
|
|
|
echo "<img src='images/monitor.png' title='".lang_string("Full screen mode")."'>";
|
|
|
|
echo "</a>";
|
|
|
|
} else {
|
|
|
|
echo lang_string("Back to normal mode");
|
|
|
|
echo " ";
|
|
|
|
echo "<a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$id_layout&pure=0&refr=$refr'>";
|
|
|
|
echo "<img src='images/monitor.png' title='".lang_string("Back to normal mode")."'>";
|
|
|
|
echo "</a>";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "</h1>";
|
2007-05-20 19:12:31 +02:00
|
|
|
|
|
|
|
echo "<div id='layout_db' style='z-index: 0; position:relative; background: url(images/console/background/".$background."); width:".$bwidth."px; height:".$bheight."px;'>";
|
|
|
|
$sql="SELECT * FROM tlayout_data WHERE id_layout = $id_layout";
|
|
|
|
$res=mysql_query($sql);
|
|
|
|
$lines = 0;
|
|
|
|
while ($row = mysql_fetch_array($res)){
|
|
|
|
$id_agentmodule = $row["id_agente_modulo"];
|
|
|
|
$pos_x = $row["pos_x"];
|
|
|
|
$pos_y = $row["pos_y"];
|
|
|
|
$height = $row["height"];
|
|
|
|
$width = $row["width"];
|
|
|
|
$period = $row["period"];
|
|
|
|
$image = $row["image"];
|
|
|
|
$type = $row["type"];
|
|
|
|
$label = $row["label"];
|
|
|
|
$label_color = $row["label_color"];
|
|
|
|
$parent_item = $row["parent_item"];
|
|
|
|
$link_layout = $row["id_layout_linked"];
|
|
|
|
$no_link_color = $row["no_link_color"];
|
|
|
|
|
2007-07-28 20:11:48 +02:00
|
|
|
// Linked to other layout ?? - Only if not module defined
|
|
|
|
if (($link_layout != 0) && ($id_agentmodule == 0)) {
|
|
|
|
$status = return_status_layout ($link_layout);
|
|
|
|
} else {
|
2008-06-19 15:50:52 +02:00
|
|
|
$id_agent = get_db_value ("id_agente", "tagente_estado", "id_agente_modulo", $id_agentmodule);
|
|
|
|
$id_agent_module_parent = get_db_value ("id_agente_modulo", "tlayout_data", "id", $parent_item);
|
2007-07-28 20:11:48 +02:00
|
|
|
// Item value
|
|
|
|
$status = return_status_agent_module ($id_agentmodule);
|
|
|
|
if ($no_link_color == 1)
|
|
|
|
$status_parent = -1;
|
|
|
|
else
|
|
|
|
$status_parent = return_status_agent_module ($id_agent_module_parent);
|
|
|
|
}
|
2007-05-20 19:12:31 +02:00
|
|
|
|
|
|
|
// STATIC IMAGE (type = 0)
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if ($type == 0) {
|
|
|
|
// Link image
|
|
|
|
//index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1
|
|
|
|
if (($link_layout == "") OR ($link_layout == 0)){
|
|
|
|
$link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>";
|
|
|
|
} else {
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$link_string = "<a href='index.php?sec=visualc&sec2=operation/visual_console/render_view$pure_url&id=$link_layout'>";
|
2007-05-20 19:12:31 +02:00
|
|
|
}
|
|
|
|
// Draw image
|
|
|
|
echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>";
|
|
|
|
echo $link_string;
|
|
|
|
if ($status == 0){
|
2008-02-21 16:16:54 +01:00
|
|
|
if (($width != "") AND ($width != 0))
|
|
|
|
echo "<img src='images/console/icons/".$image."_bad.png' width='$width' height='$height' title='$label'>";
|
|
|
|
else
|
|
|
|
echo "<img src='images/console/icons/".$image."_bad.png' title='$label'>";
|
2007-05-20 19:12:31 +02:00
|
|
|
} else {
|
2008-02-21 16:16:54 +01:00
|
|
|
if (($width != "") AND ($width != 0))
|
|
|
|
echo "<img src='images/console/icons/".$image."_ok.png' width='$width' height='$height' title='$label'>";
|
|
|
|
else
|
|
|
|
echo "<img src='images/console/icons/".$image."_ok.png' title='$label'>";
|
2007-05-20 19:12:31 +02:00
|
|
|
}
|
|
|
|
echo "</A>";
|
|
|
|
|
|
|
|
// Draw label
|
|
|
|
echo "<br>";
|
|
|
|
echo $label;
|
|
|
|
echo "</div>";
|
|
|
|
}
|
|
|
|
// SINGLE GRAPH (type = 1)
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if ($type == 1) { // single graph
|
|
|
|
if (($link_layout == "") OR ($link_layout == 0)){
|
|
|
|
$link_string = "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agent&tab=data'>";
|
|
|
|
} else {
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$link_string = "<a href='http://index.php?sec=visualc&sec2=operation/visual_console/render_view$pure_url&id=$link_layout'>";
|
2007-05-20 19:12:31 +02:00
|
|
|
}
|
|
|
|
// Draw image
|
|
|
|
echo "<div style='z-index: 1; color: #".$label_color."; position: absolute; margin-left: ".$pos_x."px; margin-top:".$pos_y."px; '>";
|
|
|
|
echo $link_string;
|
|
|
|
echo "<img src='reporting/fgraph.php?tipo=sparse&id=$id_agentmodule&label=$label&height=$height&width=$width&period=$period' border=0>";
|
|
|
|
echo "</A>";
|
|
|
|
echo "</div>";
|
|
|
|
}
|
2007-06-21 17:48:47 +02:00
|
|
|
if ($type == 2){
|
|
|
|
$lines_data[$lines][0]=$pos_x;
|
|
|
|
$lines_data[$lines][1]=$pos_y;
|
|
|
|
$lines_data[$lines][2]=$width;
|
|
|
|
$lines_data[$lines][3]=$height;
|
|
|
|
$lines_data[$lines][4]="#".$label_color;
|
|
|
|
$lines++;
|
|
|
|
}
|
|
|
|
|
2007-05-20 19:12:31 +02:00
|
|
|
// Get parent relationship - Create line data
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if (($parent_item != "") AND ($parent_item != 0)){
|
|
|
|
$ppos_x = return_coordinate_X_layoutdata($parent_item);
|
|
|
|
$ppos_y = return_coordinate_Y_layoutdata($parent_item);
|
|
|
|
$lines_data[$lines][0]=$pos_x+15;
|
|
|
|
$lines_data[$lines][1]=$pos_y+15;
|
|
|
|
$lines_data[$lines][2]=$ppos_x+15;
|
|
|
|
$lines_data[$lines][3]=$ppos_y+15;
|
|
|
|
$lines_data[$lines][4]=$status_parent;
|
|
|
|
$lines++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Javascript code generated on realtime to draw lines
|
|
|
|
// http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm#docu
|
|
|
|
echo '<script type="text/javascript">';
|
|
|
|
echo 'function myDrawFunction(){';
|
|
|
|
|
|
|
|
for ($a=0; $a < $lines; $a++){
|
|
|
|
echo " jg_doc_$a.setStroke(2);";
|
2007-06-21 17:48:47 +02:00
|
|
|
|
|
|
|
if (substr($lines_data[$a][4],0,1) == "#")
|
|
|
|
echo " jg_doc_$a.setColor('".$lines_data[$a][4]."');"; // CUSTOM COLOR
|
|
|
|
elseif ($lines_data[$a][4] >= 1)
|
2007-05-20 19:12:31 +02:00
|
|
|
echo " jg_doc_$a.setColor('00dd00');"; // GREEN
|
|
|
|
elseif ($lines_data[$a][4] == 0)
|
|
|
|
echo " jg_doc_$a.setColor('#dd0000');"; // RED
|
|
|
|
else
|
|
|
|
echo " jg_doc_$a.setColor('#BBBBBB');"; // GREY
|
|
|
|
echo " jg_doc_$a.drawLine(".$lines_data[$a][0].",".$lines_data[$a][1].",".$lines_data[$a][2].",".$lines_data[$a][3].");";
|
|
|
|
echo " jg_doc_$a.paint();";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '}';
|
|
|
|
|
|
|
|
echo "var cnv = document.getElementById('layout_db');";
|
|
|
|
for ($a=0; $a < $lines; $a++){
|
|
|
|
echo "var jg_doc_$a = new jsGraphics(cnv);";
|
|
|
|
}
|
|
|
|
echo "myDrawFunction();";
|
|
|
|
echo "//--></script>";
|
|
|
|
|
|
|
|
// End main div
|
|
|
|
echo "</div>";
|
|
|
|
|
|
|
|
echo "<div style='height:30px'>";
|
|
|
|
echo "</div>";
|
|
|
|
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
echo "<form method='post' action='index.php?sec=visualc&sec2=operation/visual_console/render_view$pure_url&id=$id_layout'>";
|
2007-05-20 19:12:31 +02:00
|
|
|
echo "<table width=300 cellpadding=4 cellspacing=4 class='databox'>";
|
|
|
|
echo "<tr><td>";
|
|
|
|
echo $lang_label["auto_refresh_time"];
|
|
|
|
echo "<td>";
|
|
|
|
echo "<select name='refr'>";
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
if ($refr > 0){
|
2007-05-20 19:12:31 +02:00
|
|
|
echo "<option value=$refr> $refr ".$lang_label["seconds"];
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<option value=0>".$lang_label["N/A"];
|
|
|
|
echo "<option value=5>5 ".$lang_label["seconds"];
|
|
|
|
echo "<option value=30>30 ".$lang_label["seconds"];
|
|
|
|
echo "<option value=60>1 ".$lang_label["minutes"];
|
|
|
|
echo "<option value=120>2 ".$lang_label["minutes"];
|
|
|
|
echo "<option value=300>5 ".$lang_label["minutes"];
|
|
|
|
echo "<option value=600>10 ".$lang_label["minutes"];
|
|
|
|
echo "<option value=1800>30 ".$lang_label["minutes"];
|
|
|
|
echo "</select>";
|
|
|
|
echo "<td>";
|
|
|
|
echo "<input type='submit' class='sub next' value='".$lang_label["refresh"]."'>";
|
|
|
|
echo "</table>";
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
|
2007-05-20 19:12:31 +02:00
|
|
|
echo "</form>";
|