2013-02-11 Miguel de Dios <miguel.dedios@artica.es>

* godmode/menu.php, godmode/alerts/configure_alert_template.php,
	godmode/alerts/alert_actions.php,
	godmode/agentes/agent_template.php,
	godmode/massive/massive_delete_agents.php: cleaned source code.
	
	* include/functions_html.php: added the weeks in the input for
	times.
	
	* operation/agentes/stat_win.php: fixed the malformated table when
	show extended options in the time widget.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7617 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-11 10:26:16 +00:00
parent 50d963745a
commit ebfd1535fe
8 changed files with 82 additions and 55 deletions

View File

@ -1,3 +1,16 @@
2013-02-11 Miguel de Dios <miguel.dedios@artica.es>
* godmode/menu.php, godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_actions.php,
godmode/agentes/agent_template.php,
godmode/massive/massive_delete_agents.php: cleaned source code.
* include/functions_html.php: added the weeks in the input for
times.
* operation/agentes/stat_win.php: fixed the malformated table when
show extended options in the time widget.
2013-02-11 Sergio Martin <sergio.martin@artica.es>
* operation/gis_maps/index.php

View File

@ -106,13 +106,14 @@ if (isset ($_POST["template_id"])) {
$error_count++;
}
else {
$id_agente_modulo = db_process_sql_insert('tagente_modulo', $values);
// Set the initial module status
if ($row2["type"] == 21 || $row2["type"] == 22 || $row2["type"] == 23) {
$status = 0;
} else {
}
else {
$status = 4;
}
@ -131,10 +132,11 @@ if (isset ($_POST["template_id"])) {
// Update module status count
if ($status == 4) {
db_process_sql ('UPDATE tagente SET total_count=total_count+1, notinit_count=notinit_count+1 WHERE id_agente=' . (int)$id_agente);
} else {
}
else {
db_process_sql ('UPDATE tagente SET total_count=total_count+1, normal_count=normal_count+1 WHERE id_agente=' . (int)$id_agente);
}
}
}
else
$error_count++;
}

View File

@ -81,13 +81,13 @@ if ($copy_action) {
exit;
}
else {
// Header
// Header
if (defined('METACONSOLE')) {
alerts_meta_print_header ();
}
else {
else {
ui_print_page_header (__('Alerts').' &raquo; '.__('Alert actions'), "images/god2.png", false, "alert_action", true);
}
}
}
} // If user tries to copy an action of others groups
else {
@ -99,13 +99,13 @@ if ($copy_action) {
$is_in_group = in_array($al_action['id_group'], $own_groups);
// Then action group have to be in his own groups
if ($is_in_group) {
// Header
// Header
if (defined('METACONSOLE')) {
alerts_meta_print_header ();
}
else {
else {
ui_print_page_header (__('Alerts').' &raquo; '.__('Alert actions'), "images/god2.png", false, "alert_action", true);
}
}
}
else {
db_pandora_audit("ACL Violation",
@ -113,13 +113,14 @@ if ($copy_action) {
require ("general/noaccess.php");
exit;
}
}
} else {
// Header
}
}
else {
// Header
if (defined('METACONSOLE')) {
alerts_meta_print_header ();
}
else {
else {
ui_print_page_header (__('Alerts').' &raquo; '.__('Alert actions'), "images/god2.png", false, "alert_action", true);
}
}

View File

@ -412,7 +412,7 @@ if ($create_template) {
}
else {
$result = '';
}
}
if ($result) {
//db_pandora_audit("Command management", "Create alert command " . $result, false, false, json_encode($values));
db_pandora_audit("Template alert management", "Create alert template #" . $result, false, false, json_encode($values));

View File

@ -49,7 +49,7 @@ function process_manage_delete ($id_agents) {
if (! $success) {
$agent_id_restore = $id_agent;
break;
}
}
$count_deleted++;
}

View File

@ -274,7 +274,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
if (array_key_exists('fatherId',$extmenu)) {
if (strlen($extmenu['fatherId']) > 0) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
if ($extmenu["name"] != 'DB interface'){
if ($extmenu["name"] != 'DB interface') {
if (!empty($config['refr'])) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr'];
}

View File

@ -448,6 +448,7 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
SECONDS_1MINUTE => __('minutes'),
SECONDS_1HOUR => __('hours'),
SECONDS_1DAY => __('days'),
SECONDS_1WEEK => __('weeks'),
SECONDS_1MONTH => __('months'),
SECONDS_1YEAR => __('years'));

View File

@ -37,7 +37,7 @@ if (! isset ($config['id_user']) && get_parameter("loginhash", 0)) {
db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $loginhash_user;
$config["id_user"] = $loginhash_user;
$hash_connection_data = true;
}
@ -283,18 +283,18 @@ $label = base64_decode(get_parameter('label', ''));
<?php
echo __('Please, make your changes and apply with the <i>Reload</i> button');
?>
<div style="float: left; width: 80%;">
<div style="float: left; width: 85%;">
<form method="get" action="stat_win.php">
<?php
<form method="get" action="stat_win.php">
<?php
html_print_input_hidden ("id", $id);
html_print_input_hidden ("label", $label);
if (isset($hash_connection_data)) {
html_print_input_hidden("loginhash", "auto");
html_print_input_hidden("loginhash_data", $loginhash_data);
html_print_input_hidden("loginhash_user", $loginhash_user);
html_print_input_hidden("loginhash", "auto");
html_print_input_hidden("loginhash_data", $loginhash_data);
html_print_input_hidden("loginhash_user", $loginhash_user);
}
html_print_input_hidden ("id", $id);
@ -305,10 +305,10 @@ $label = base64_decode(get_parameter('label', ''));
html_print_input_hidden ("type", $type);
}
?>
<table class="databox_frame" cellspacing="5" width="100%">
<table class="databox_frame" cellspacing="2" width="100%">
<tr>
<td><?php echo __('Refresh time');?></td>
<td>
<td width="50%">
<?php
html_print_extended_select_for_time(
"refresh", $refresh, '', '', 0, 7);
@ -390,33 +390,43 @@ $label = base64_decode(get_parameter('label', ''));
case 'boolean':
case 'sparse':
?>
<tr>
<td><?php echo __('Time compare').' ('.__('Overlapped').')';?></td>
<td>
<?php
html_print_checkbox ("time_compare_overlapped",
1, (bool) $time_compare_overlapped);
?>
</td>
</tr>
<tr>
<td><?php echo __('Time compare').' ('.__('Separated').')';?></td>
<td>
<?php
html_print_checkbox ("time_compare_separated",
1, (bool) $time_compare_separated);
?>
</td>
</tr>
<tr>
<td><?php echo __('Show unknown graph');?></td>
<td>
<?php
html_print_checkbox ("unknown_graph",
1, (bool) $unknown_graph);
?>
</td>
</tr>
<tr>
<td>
<?php
echo __('Time compare') . ' (' .
__('Overlapped') . ')';
?>
</td>
<td>
<?php
html_print_checkbox ("time_compare_overlapped",
1, (bool) $time_compare_overlapped);
?>
</td>
</tr>
<tr>
<td>
<?php
echo __('Time compare') . ' ('.
__('Separated').')';
?>
</td>
<td>
<?php
html_print_checkbox ("time_compare_separated",
1, (bool) $time_compare_separated);
?>
</td>
</tr>
<tr>
<td><?php echo __('Show unknown graph');?></td>
<td>
<?php
html_print_checkbox ("unknown_graph",
1, (bool) $unknown_graph);
?>
</td>
</tr>
<?php
break;
}