From 0b8cca97186ebac370e2970186806f3f0de65a12 Mon Sep 17 00:00:00 2001 From: slerena Date: Fri, 10 Oct 2008 15:08:31 +0000 Subject: [PATCH] 2008-10-10 Sancho Lerena * ajax.php: removed carriage return from EOF. * index.php: Updated final version variable (YES!) * config_process: Updated final version variable (YES!) * libupdate_manager_client.php: Do not raise a notice (probably be hidden for user). Show error details with a simple echo. * footer.php: Bad reference to image, in help don't show properly fixed. * pandora_help.php: Fancy layout :) * manage_config.php: Now works fine. If target agents not defined used source agent. Module mass delete now works. Added help and better deletion of agents. Fixed bug #2157135. * pandora_textlogo.png: Added new icon for help header. * functions_db.php: Added delete_agent() used in manage_config. * help_alert_validation.php, help_manageconfig.php, help_planned_downtime.php: New help files (english only!). * datos_agente.php: Stupid bug that don't allow to delete string data. * estado_alertas.php: Added help to alert ACK button. * reporting_viewer.php: Added SLA legend label (limit) and fixed render of invalid SLA (was swapped bad for good). Combined graphs dimensions are used now on reports. * reporting_xml.php:; Fixed a small problem that renders header after contents. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 36 +++++ pandora_console/ajax.php | 2 +- .../lib/libupdate_manager_client.php | 4 +- pandora_console/general/footer.php | 2 +- pandora_console/general/pandora_help.php | 3 + .../godmode/agentes/manage_config.php | 138 +++++++++--------- pandora_console/images/pandora_textlogo.png | Bin 0 -> 3594 bytes pandora_console/include/config_process.php | 4 +- pandora_console/include/functions_db.php | 17 +++ .../include/help/en/help_alert_validation.php | 4 + .../include/help/en/help_manageconfig.php | 48 ++++++ .../include/help/en/help_planned_downtime.php | 8 + pandora_console/index.php | 4 +- .../operation/agentes/datos_agente.php | 15 +- .../operation/agentes/estado_alertas.php | 2 +- .../operation/reporting/reporting_viewer.php | 11 +- .../operation/reporting/reporting_xml.php | 5 +- 17 files changed, 213 insertions(+), 90 deletions(-) create mode 100644 pandora_console/images/pandora_textlogo.png create mode 100644 pandora_console/include/help/en/help_alert_validation.php create mode 100644 pandora_console/include/help/en/help_manageconfig.php create mode 100644 pandora_console/include/help/en/help_planned_downtime.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f0d77205c6..65a3df966f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,5 +1,41 @@ 2008-10-10 Sancho Lerena + * ajax.php: removed carriage return from EOF. + + * index.php: Updated final version variable (YES!) + + * config_process: Updated final version variable (YES!) + + * libupdate_manager_client.php: Do not raise a notice (probably be hidden + for user). Show error details with a simple echo. + + * footer.php: Bad reference to image, in help don't show properly fixed. + + * pandora_help.php: Fancy layout :) + + * manage_config.php: Now works fine. If target agents not defined used + source agent. Module mass delete now works. Added help and better deletion + of agents. Fixed bug #2157135. + + * pandora_textlogo.png: Added new icon for help header. + + * functions_db.php: Added delete_agent() used in manage_config. + + * help_alert_validation.php, help_manageconfig.php, help_planned_downtime.php: + New help files (english only!). + + * datos_agente.php: Stupid bug that don't allow to delete string data. + + * estado_alertas.php: Added help to alert ACK button. + + * reporting_viewer.php: Added SLA legend label (limit) and fixed render of + invalid SLA (was swapped bad for good). Combined graphs dimensions are used + now on reports. + + * reporting_xml.php:; Fixed a small problem that renders header after contents. + +2008-10-09 Sancho Lerena + * pandoradb_data.sql: Added support for autoupdate and trap2agent forward in tconfig. diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index 295d709d93..0bf4acfe28 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -41,4 +41,4 @@ if (file_exists ($page)) { } else { echo "
Sorry! I can't find the page $page!"; } -?> +?> \ No newline at end of file diff --git a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php index acd93a6250..8da336f591 100644 --- a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php +++ b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php @@ -32,11 +32,11 @@ function um_xml_rpc_client_call ($server_host, $server_path, $server_port, $prox $result = $client->send ($msg, XMLRPC_TIMEOUT); if (! $result) { - trigger_error ('Open Update Manager Server comunication error. '.$client->errstr); + echo 'Open Update Manager Server comunication error: '.$client->errstr; return false; } if ($result->faultCode ()) { - trigger_error ('Open Update Manager XML-RPC error. '.$result->faultString ()); + echo 'Open Update Manager XML-RPC error: '.$result->faultString (); return false; } diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index f6e7595d80..322488673a 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -32,7 +32,7 @@ if ((isset($develop_bypass)) AND ($develop_bypass == 1)) { echo ' - Saved '.format_numeric ($sql_cache["saved"]).' Queries'; } echo '
'; -echo ''; echo ""; diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index addf304043..d024495e44 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -46,6 +46,9 @@ if (! $id || ! file_exists ($help_file)) { /* Show help */ echo '
'; +echo ''; +echo ''; +echo ""; echo '

'.__('Pandora FMS Help System').'

'; echo '
'; echo '
'; diff --git a/pandora_console/godmode/agentes/manage_config.php b/pandora_console/godmode/agentes/manage_config.php index 2a43fbd118..6aa9950a5b 100644 --- a/pandora_console/godmode/agentes/manage_config.php +++ b/pandora_console/godmode/agentes/manage_config.php @@ -17,6 +17,8 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// WARNING: Do not use generic get_parameter() functions here, because some of the +// variables passed are arrays and are not supported by these functions. // Load global vars require ("include/config.php"); @@ -270,9 +272,13 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 // Initial checkings // if selected more than 0 agents - $destino = $_POST["destino"]; + if (isset($_POST["destino"])) + $destino = $_POST["destino"]; + else + $destino = array(); if (count($destino) <= 0) { - break; + echo "

" . __("Deleting source agent. No destination targets defined") . "

"; + $destino[0] = $origen; } // If selected modules or alerts @@ -283,44 +289,60 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 if (isset($_POST["alerts"])) $alertas = 1; else - $alertas = 0; - if (($alertas + $modulos) >= 0) - // Delete + $alertas = 0; + + if (isset($_POST["origen_modulo"])) + $origen_modulo = $_POST["origen_modulo"]; + else + $origen_modulo = array(); + if (count($origen_modulo) <= 0) + $allmodules = 1; + else + $allmodules = 0; + for ($a=0;$a ".__('Deleting data')." -> ".dame_nombre_agente($id_agente); - + echo "
".__('Deleting data')." -> ".dame_nombre_agente($id_agente); + if ($allmodules == 1){ // Deleting data - $sql1='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente; - $result1=mysql_query($sql1); - while ($row=mysql_fetch_array($result1)){ - $sql_delete1="DELETE FROM tagente_datos WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $sql_delete2="DELETE FROM tagente_datos_inc WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $sql_delete3="DELETE FROM tagente_datos_string WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $result=mysql_query($sql_delete1); - $result=mysql_query($sql_delete2); - $result=mysql_query($sql_delete3); + if ($modulos == 1){ + mysql_query ("DELETE FROM tagente_datos WHERE id_agente_modulo=$id_agente"); + mysql_query ("DELETE FROM tagente_datos_inc WHERE id_agente_modulo=$id_agente"); + mysql_query ("DELETE FROM tagente_datos_string WHERE id_agente_modulo=$id_agente"); + mysql_query ("DELETE FROM tagente_estado WHERE id_agente = $id_agente"); + mysql_query ("DELETE FROM tagente_modulo WHERE id_agente = $id_agente"); + } + if ($alertas == 1){ + mysql_query ("DELETE FROM talerta_agente_modulo WHERE id_agent = $id_agente"); + echo "DELETE talertas* where id_agente = $id_agente
"; + } + mysql_query ("DELETE FROM tevent WHERE id_agente = $id_agente"); + } else { + for ($i=0; $i < count($origen_modulo); $i++){ + $source_module = $origen_modulo[$i]; + $source_module_name = get_db_sql ("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = $source_module"); + $id_modulo = get_db_sql ("SELECT id_agente_modulo FROM tagente_modulo WHERE nombre = '$source_module_name' AND id_agente = $id_agente"); + if ($modulos == 1){ + mysql_query ("DELETE FROM tagente_datos WHERE id_agente_modulo=$id_modulo"); + mysql_query ("DELETE FROM tagente_datos_inc WHERE id_agente_modulo=$id_modulo"); + mysql_query ("DELETE FROM tagente_datos_string WHERE id_agente_modulo=$id_modulo"); + mysql_query ("DELETE FROM tagente_datos_string WHERE id_agente_modulo=$id_modulo"); + mysql_query ("DELETE FROM tagente_estado WHERE id_agente_modulo = $id_modulo"); + mysql_query ("DELETE FROM tagente_modulo WHERE id_agente_modulo = $id_modulo"); + } + if ($alertas == 1){ + mysql_query ("DELETE FROM talerta_agente_modulo WHERE id_agente_modulo = $id_modulo"); + } + mysql_query ("DELETE FROM tevent WHERE id_agentmodule = $id_modulo"); } - - // Delete conf - $sql_delete5 ="DELETE FROM tagente_modulo WHERE id_agente = ".$id_agente; // delete from table tagente_modulo - $sql_delete6 ="DELETE FROM tagente_estado WHERE id_agente = ".$id_agente; // detele from table tagente_estado - $result=mysql_query($sql_delete5); - $result=mysql_query($sql_delete6); } - // delete alerts definitions - if ($alertas == 1){ - // delete data - $sql1='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente; - $result1=mysql_query($sql1); - while ($row=mysql_fetch_array($result1)){ - $sql_delete1="DELETE FROM talerta_agente_modulo WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $result = mysql_query($sql_delete1); - } // while - }//if - }// for - }//delete + } + } + + // ----------- + // DELETE AGENT + // ----------- + elseif (isset($_POST["delete_agent"])) { echo "

".__('Delete agents')."

"; // Initial checkings @@ -328,7 +350,7 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 // if selected more than 0 agents $destino = $_POST["destino"]; if (count($destino) <= 0) { - break; + $destino[0]=$origen; } // Delete @@ -336,38 +358,7 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 $id_agente = $destino[$a]; echo "
".__('Deleting data')." -> ".dame_nombre_agente($id_agente); - - // Deleting data - $sql1='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente; - $result1=mysql_query($sql1); - while ($row=mysql_fetch_array($result1)){ - $sql_delete1="DELETE FROM tagente_datos WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $sql_delete2="DELETE FROM tagente_datos_inc WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $sql_delete3="DELETE FROM tagente_datos_string WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $result=mysql_query($sql_delete1); - $result=mysql_query($sql_delete2); - $result=mysql_query($sql_delete3); - } - - // Delete conf - $sql_delete5 ="DELETE FROM tagente_modulo WHERE id_agente = ".$id_agente; // delete from table tagente_modulo - $sql_delete6 ="DELETE FROM tagente_estado WHERE id_agente = ".$id_agente; // detele from table tagente_estado - $result=mysql_query($sql_delete5); - $result=mysql_query($sql_delete6); - - // delete alerts definitions - - // delete data - $sql1='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente; - $result1=mysql_query($sql1); - while ($row=mysql_fetch_array($result1)){ - $sql_delete1="DELETE FROM talerta_agente_modulo WHERE id_agente_modulo=".$row["id_agente_modulo"]; - $result = mysql_query($sql_delete1); - } // while - - // delete agent - $sql1='DELETE FROM tagente WHERE id_agente = '.$id_agente; - $result1=mysql_query($sql1); + delete_agent($id_agente); }// for }//delete @@ -377,7 +368,7 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 } else { // title - echo '

'.__('Agent configuration'). '>'. __('Configuration Management').'

'; + echo '

'.__('Agent configuration'). '>'. __('Configuration Management'). '

'; echo '
'; echo ""; @@ -432,7 +423,9 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 echo ""; echo '
'; - echo ''.__('Copy Configuration'). '

'; + echo ''.__('Targets'). ' '; + pandora_help ('manageconfig'); + echo '

'; echo ''; echo '"; - if ((give_acl ($config['id_user'], $id_group, "AW") ==1) && ($string_type == 0)) { + if (give_acl ($config['id_user'], $id_group, "AW") ==1) { echo " - "; + "; $color = 1; foreach ($result as $data) { if ($color == 1){ diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index aefbd1b4e4..ea4ed22a6b 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -174,9 +174,13 @@ foreach ($contents as $content) { array_push ($weights, $content2["weight"]); } + $graph_width = get_db_sql ("SELECT width FROM tgraph WHERE id_graph = ".$content["id_gs"]); + $graph_height= get_db_sql ("SELECT height FROM tgraph WHERE id_graph = ".$content["id_gs"]); + + $table->colspan[1][0] = 4; $data = array (); - $data[0] = ''; + $data[0] = ''; array_push ($table->data, $data); break; @@ -212,7 +216,8 @@ foreach ($contents as $content) { $data[0] .= $sla['sla_max']."
"; $data[0] .= ''.__('SLA Min. (value)')." : "; $data[0] .= $sla['sla_min']."
"; - + $data[0] .= ''.__('SLA Limit')." : "; + $data[0] .= $sla['sla_limit']; $sla_value = get_agent_module_sla ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $datetime); if ($sla_value === false) { @@ -233,7 +238,7 @@ foreach ($contents as $content) { } if (!empty ($slas)) { $data = array (); - if ($sla_failed !== false) + if ($sla_failed == false) $data[0] = ''.__('Ok').''; else $data[0] = ''.__('Fail').''; diff --git a/pandora_console/operation/reporting/reporting_xml.php b/pandora_console/operation/reporting/reporting_xml.php index 0901809a78..b46b28c372 100644 --- a/pandora_console/operation/reporting/reporting_xml.php +++ b/pandora_console/operation/reporting/reporting_xml.php @@ -121,7 +121,7 @@ if (! give_acl ($config['id_user'], $report['id_group'], "AR")) { if ($report['id_user'] != $config['id_user'] && ! dame_admin ($config['id_user']) && ! $report['private']) { return; } - +header ('Content-type: application/xml; charset="utf-8"', true); echo ''; $date = (string) get_parameter ('date', date ('Y-m-j')); @@ -288,9 +288,6 @@ foreach ($contents as $content) { array_push ($xml["reports"], $data); } -header ('Content-type: application/xml; charset="utf-8"',true); - - function xml_array ($array) { foreach ($array as $name => $value) { if (is_int ($name)) {
'.__('Modules'); echo ''; @@ -456,9 +449,12 @@ if ((isset($_GET["operacion"])) && ($update_agent == -1) && ($update_group == -1 // Form buttons echo ''; echo "

"; - echo ''; + echo ' '; + echo "      "; + pandora_help ('manageconfig'); echo "

"; echo ''; + echo "

"; echo ''; diff --git a/pandora_console/images/pandora_textlogo.png b/pandora_console/images/pandora_textlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..5ac8e1b140fc27286779350568e1339ec1e4e7a0 GIT binary patch literal 3594 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 literal 0 HcmV?d00001 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 73849f67db..aecc45fbd1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -18,9 +18,9 @@ //Pandora Version if (!isset ($build_version)) - $build_version = "PC080822"; + $build_version="PC081010"; if (!isset ($pandora_version)) - $pandora_version = "v2.0Beta1"; + $pandora_version="v2.0"; // This is directory where placed "/attachment" directory, to upload files stores. // This MUST be writtable by http server user, and should be in pandora root. diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index cb0d41fb70..0e78703dfe 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2172,4 +2172,21 @@ function server_status ($id_server) { return $serverinfo; } + +function delete_agent ($id_agente) { +/* + mysql_query ("DELETE FROM tagente_datos WHERE id_agente_modulo = $id_agente"); + mysql_query ("DELETE FROM tagente_datos_inc WHERE id_agente_modulo = $id_agente"); + mysql_query ("DELETE FROM tagente_datos_string WHERE id_agente_modulo = $id_agente"); + mysql_query ("DELETE FROM talerta_agente_modulo WHERE id_agent = $id_agente"); + mysql_query ("DELETE FROM tevent WHERE id_agente = $id_agente"); + mysql_query ("DELETE FROM tagent_access WHERE id_agent = $id_agente"); + mysql_query ("DELETE FROM tplanned_downtime_agents WHERE id_agent = $id_agente"); + mysql_query ("DELETE FROM tagente_estado WHERE id_agente = $id_agente"); + mysql_query ("DELETE FROM tagente_modulo WHERE id_agente = $id_agente"); + mysql_query ("DELETE FROM tagente WHERE id_agente = $id_agente"); + mysql_query ("DELETE FROM taddress_agent WHERE id_agent = $id_agente"); +*/ + echo "BORRANDO AGENTE A SACO $id_agente"; +} ?> diff --git a/pandora_console/include/help/en/help_alert_validation.php b/pandora_console/include/help/en/help_alert_validation.php new file mode 100644 index 0000000000..34f8c9a191 --- /dev/null +++ b/pandora_console/include/help/en/help_alert_validation.php @@ -0,0 +1,4 @@ +

Alert validation

+

+ACK an alert only changes it's current bit and clear the "fired", so if alert fired again, the process continues. It's oriented to alerts with a long threshold, for example 1 day. If you get an alarm, and you review and fix it, you probably want to set to green status and don't wait 1 day to get green again. +

\ No newline at end of file diff --git a/pandora_console/include/help/en/help_manageconfig.php b/pandora_console/include/help/en/help_manageconfig.php new file mode 100644 index 0000000000..27ec2e2df4 --- /dev/null +++ b/pandora_console/include/help/en/help_manageconfig.php @@ -0,0 +1,48 @@ +

Configuration management

+ +This tool is used to several purposes:

+ +
    +
  • Copy module and/or alert configuration from one agent to one or several destination agents. +
  • Delete module and/or alert configuration from a group of agents. +
  • Full deletion of agents selecting several at once. + +
+ +

Copy module / alert configuration

+ +
    +
  1. Select source group and click on "filter" button. +
  2. Select source agent and click on "get info" button +
  3. Select one or more modules in source agent. +
  4. Select destination agents for copy operation. +
  5. Select targets: Module for only copy modules, Alert for only copy alerts (if destination agents don't have a module with the same name defined in source agent, tool cannot replicate alert). You could select both to first create module and after replicate alert (if defined). +
  6. Click on "copy" button. +
+ +

Delete module / alert configuration

+ +

+This will delete all destination modules/alerts with the same name that has been selected in source agent / modules. All alerts associated to source modules will be deleted in destination agents if they have a module with the same name and alerts associated to them. +

+ +
    +
  1. Select source group and click on "filter" button. +
  2. Select source agent and click on "get info" button +
  3. Select one or more modules in source agent. +
  4. Select destination agents for delete operation. +
  5. Select targets: Modules, Alerts or both. +
  6. Click on "delete" button. +
+ +

Delete agents

+ +

+This will delete all agent information (modules, alerts, events..) from the list of agents selected in the listbox on the bottom. +

+ +
    +
  1. Select destination agents for delete operation in the listbox on the bottom. +
  2. Click on "delete agents" button. +
+ diff --git a/pandora_console/include/help/en/help_planned_downtime.php b/pandora_console/include/help/en/help_planned_downtime.php new file mode 100644 index 0000000000..3676d5439b --- /dev/null +++ b/pandora_console/include/help/en/help_planned_downtime.php @@ -0,0 +1,8 @@ +

Planned downtimes

+

+This tool is used to plan non-monitoring periods of time. This is useful if you know, for example, that a group of systems will be disconnected in a specific time. This helps to avoid false alarms. +

+It's very easy to setup, you specify start date/time of planned downtime and an end date/time. You can include in that downtime a list of agents. +

+When planned downtime starts, Pandora FMS automatically disable all agents assigned to this downtime and no alerts or data are processed. When downtime ends, Pandora FMS will be enable all agents assigned to this downtime. You cannot delete or modify a downtime definition when it's fired, you need to wait for ending before doing anything in this downtime definition. Of course you can manually, enable an agent using the agent configuration dialog. +

\ No newline at end of file diff --git a/pandora_console/index.php b/pandora_console/index.php index 746ffdef56..3bb839f257 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -20,8 +20,8 @@ // Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ // Pandora FMS uses Pear Image::Graph code -$build_version="PC080901"; -$pandora_version="v2.0Beta1 "; +$build_version="PC081010"; +$pandora_version="v2.0"; global $build_version; global $pandora_version; diff --git a/pandora_console/operation/agentes/datos_agente.php b/pandora_console/operation/agentes/datos_agente.php index 391f5f7ba0..ed071f967b 100644 --- a/pandora_console/operation/agentes/datos_agente.php +++ b/pandora_console/operation/agentes/datos_agente.php @@ -88,9 +88,12 @@ function datos_raw ($id_agente_modulo, $periodo) { $color = 1; } echo "
"; - echo ""; + if ($string_type == 0) + echo ""; + else + echo ""; } else { echo ""; } @@ -122,11 +125,17 @@ if (isset ($_GET["tipo"]) && isset ($_GET["id"])) { } if (isset($_GET["delete"])) { - $delete =$_GET["delete"]; + $delete = $_GET["delete"]; $sql = "DELETE FROM tagente_datos WHERE id_agente_datos = $delete"; $result = process_sql ($sql); } +if (isset($_GET["delete_text"])) { + $delete = $_GET["delete_text"]; + $sql = "DELETE FROM tagente_datos_string WHERE id_agente_datos = $delete"; + $result = process_sql ($sql); +} + datos_raw ($id, $tipo); ?> diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index f12caa2ec2..b50df4fbe5 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -64,7 +64,7 @@ if (isset($_GET["id_agente"])){ ".__('Last fired')." ".__('Times Fired')." ".__('Status')."".__('Validate')."
".__('Validate') ." " . pandora_help('alert_validation', true)."