2009-06-24 Sancho Lerena <slerena@artica.es>

* operation/agentes/estado_generalagente.php,
        godmode/setup/setup.php: Added support for new option for have enabled or
        disabled the agent access data/graphs.

        * include/functions_db.php: Modified the agent_delete function to don't delete
        all data, just delete agent and mark modules for deletion. This increase a lot
        the massive agent deletion. This fixes bug #2809015.

        * include/config_process.php: Updated version/build.

        * include/functions_config.php: Added autoupdate to config check for
        non-existant values. Added new agentaccess config token.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1767 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-06-24 17:03:08 +00:00
parent d0667d7012
commit cd1e42b8c3
6 changed files with 47 additions and 12 deletions

View File

@ -1,3 +1,18 @@
2009-06-24 Sancho Lerena <slerena@artica.es>
* operation/agentes/estado_generalagente.php,
godmode/setup/setup.php: Added support for new option for have enabled or
disabled the agent access data/graphs.
* include/functions_db.php: Modified the agent_delete function to don't delete
all data, just delete agent and mark modules for deletion. This increase a lot
the massive agent deletion. This fixes bug #2809015.
* include/config_process.php: Updated version/build.
* include/functions_config.php: Added autoupdate to config check for
non-existant values. Added new agentaccess config token.
2009-06-24 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/pandora.css: fix sintaxis error in comment.

View File

@ -110,6 +110,10 @@ $table->data[14][1] = print_input_text ('attachment_store', $config["attachment_
enterprise_hook ('setup');
$table->data[18][0] = __('Use agent access graph');
$table->data[18][1] = __('Yes').'&nbsp;'.print_radio_button ('agentaccess', 1, '', $config["agentaccess"], true).'&nbsp;&nbsp;';
$table->data[18][1] .= __('No').'&nbsp;'.print_radio_button ('agentaccess', 0, '', $config["agentaccess"], true);
echo '<form id="form_setup" method="post">';
print_input_hidden ('update_config', 1);
print_table ($table);

View File

@ -15,7 +15,7 @@
// GNU General Public License for more details.
//Pandora Version
$build_version = 'PC090512';
$build_version = 'PC090623';
$pandora_version = 'v3.0-dev';
$config['start_time'] = microtime (true);

View File

@ -102,6 +102,7 @@ function update_config () {
update_config_value ('compact_header', (bool) get_parameter ('compact_header', $config["compact_header"]));
update_config_value ('round_corner', (bool) get_parameter ('round_corner', $config["round_corner"]));
update_config_value ('status_images_set', (string) get_parameter ('status_images_set', $config["status_images_set"]));
update_config_value ('agentaccess', (int) get_parameter ('agentaccess', $config['agentaccess']));
}
/**
@ -218,6 +219,14 @@ function process_config () {
update_config_value ('round_corner', false);
}
if (!isset ($config["agentaccess"])){
update_config_value ('agentaccess', true);
}
if (!isset ($config["autoupdate"])){
update_config_value ('autoupdate', true);
}
if (!isset ($config["auth"])) {
require_once ($config["homedir"]."/include/auth/mysql.php");
} else {

View File

@ -2662,9 +2662,11 @@ function delete_agent ($id_agents) {
//Alert
temp_sql_delete ("talert_compound", "id_agent", $id_agent);
temp_sql_delete ("talert_template_modules", "id_agent_module", $where_modules);
//Events (up/down monitors)
temp_sql_delete ("tevento", "id_agente", $id_agent);
// Dont delete here, could be very time-exausting, let the daily script
// delete them after XXX days
// temp_sql_delete ("tevento", "id_agente", $id_agent);
//Graphs, layouts & reports
temp_sql_delete ("tgraph_source", "id_agent_module", $where_modules);
@ -2675,21 +2677,23 @@ function delete_agent ($id_agents) {
temp_sql_delete ("tplanned_downtime_agents", "id_agent", $id_agent);
//The status of the module
temp_sql_delete ("tagente_estado", "id_agente_modulo", $where_modules);
temp_sql_delete ("tagente_estado", "id_agente", $id_agent);
//The actual modules, don't put anything based on
//tagente_modulo after this
temp_sql_delete ("tagente_modulo", "id_agente", $id_agent);
// DONT Delete this, just mark for deletion
// temp_sql_delete ("tagente_modulo", "id_agente", $id_agent);
process_sql_update ('tagente_modulo',
array ('delete_pending' => 1, 'disabled' => 1),
'id_agente = '. $id_agent);
//Access entries
temp_sql_delete ("tagent_access", "id_agent", $id_agent);
// Access entries
// Dont delete here, this records are deleted in daily script
// temp_sql_delete ("tagent_access", "id_agent", $id_agent);
//tagente_datos_inc
temp_sql_delete ("tagente_datos_inc", "id_agente_modulo", $where_modules);
// tagente_datos_inc
// Dont delete here, this records are deleted later, in database script
// temp_sql_delete ("tagente_datos_inc", "id_agente_modulo", $where_modules);
// Delete remote configuration
if (isset ($config["remote_config"])) {

View File

@ -42,8 +42,11 @@ echo '<div style="height: 10px">&nbsp;</div>';
//Floating div
echo '<div style="float:right; width:320px; padding-top:11px;">';
echo '<b>'.__('Agent access rate (24h)').'</b><br />';
echo '<img border="1" src="reporting/fgraph.php?id='.$id_agente.'&tipo=agentaccess&height=90&width=290" />';
if ($config["agentaccess"] == 1){
echo '<b>'.__('Agent access rate (24h)').'</b><br />';
echo '<img border="1" src="reporting/fgraph.php?id='.$id_agente.'&tipo=agentaccess&height=90&width=290" />';
}
echo '<div style="height:25px">&nbsp;</div>';
echo '<b>'.__('Events generated -by module-').'</b><br />';
echo '<img border="1" src="reporting/fgraph.php?tipo=event_module&width=290&height=180&id_agent='.$id_agente.'" />';