2009-01-29 Esteban Sanchez <estebans@artica.es>
* include/auth/mysql.php: Style correction on switch statements. * include/functions_ui.php: Added a flag to print_alert_template_example() to allow values replacement. * include/functions_reporting.php: Fixed a notice message for unitialized values. * operation/events/events.php: get_users() result can not be passed directly to print_select(). * pandoradb_migrate_20_to_21.sql: Style correction. Please, put each alter table in a row so it can be easier to read. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1410 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ebf6d9dadf
commit
95aea9312e
|
@ -1,3 +1,19 @@
|
|||
2009-01-29 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/auth/mysql.php: Style correction on switch statements.
|
||||
|
||||
* include/functions_ui.php: Added a flag to
|
||||
print_alert_template_example() to allow values replacement.
|
||||
|
||||
* include/functions_reporting.php: Fixed a notice message for
|
||||
unitialized values.
|
||||
|
||||
* operation/events/events.php: get_users() result can not be passed
|
||||
directly to print_select().
|
||||
|
||||
* pandoradb_migrate_20_to_21.sql: Style correction. Please, put each
|
||||
alter table in a row so it can be easier to read.
|
||||
|
||||
2009-01-28 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* estado_grupo.php: Async modules and keepalive module don't show as down
|
||||
|
@ -16,6 +32,7 @@
|
|||
include/languages/pt_BR.mo, include/languages/es.mo: Updated
|
||||
translations.
|
||||
|
||||
>>>>>>> .r1409
|
||||
2009-01-28 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_template.php: Removed a javascript
|
||||
|
|
|
@ -126,13 +126,13 @@ function get_user_info ($id_user) {
|
|||
*/
|
||||
function get_users ($order = "fullname") {
|
||||
switch ($order) {
|
||||
case "id_user":
|
||||
case "registered":
|
||||
case "last_connect":
|
||||
case "fullname":
|
||||
break;
|
||||
default:
|
||||
$order = "fullname";
|
||||
case "id_user":
|
||||
case "registered":
|
||||
case "last_connect":
|
||||
case "fullname":
|
||||
break;
|
||||
default:
|
||||
$order = "fullname";
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
@ -170,18 +170,17 @@ function create_user ($id_user, $password, $user_info) {
|
|||
|
||||
foreach ($user_info as $key => $value) {
|
||||
switch ($key) {
|
||||
case "fullname":
|
||||
case "firstname":
|
||||
case "lastname":
|
||||
case "middlename":
|
||||
case "comments":
|
||||
case "email":
|
||||
case "phone":
|
||||
$values[$key] = $value;
|
||||
break;
|
||||
default:
|
||||
continue; //ignore
|
||||
case "fullname":
|
||||
case "firstname":
|
||||
case "lastname":
|
||||
case "middlename":
|
||||
case "comments":
|
||||
case "email":
|
||||
case "phone":
|
||||
$values[$key] = $value;
|
||||
break;
|
||||
default:
|
||||
continue; //ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,18 +222,18 @@ function process_user_info ($id_user, $user_info) {
|
|||
$values = array ();
|
||||
foreach ($user_info as $key => $value) {
|
||||
switch ($key) {
|
||||
case "fullname":
|
||||
case "firstname":
|
||||
case "lastname":
|
||||
case "middlename":
|
||||
case "comments":
|
||||
case "email":
|
||||
case "phone":
|
||||
$values[$key] = $value;
|
||||
break;
|
||||
default:
|
||||
continue; //ignore
|
||||
break;
|
||||
case "fullname":
|
||||
case "firstname":
|
||||
case "lastname":
|
||||
case "middlename":
|
||||
case "comments":
|
||||
case "email":
|
||||
case "phone":
|
||||
$values[$key] = $value;
|
||||
break;
|
||||
default:
|
||||
continue; //ignore
|
||||
break;
|
||||
}
|
||||
}
|
||||
return process_sql_update ("tusuario", $values, array ("id_user" => $id_user));
|
||||
|
|
|
@ -132,6 +132,8 @@ function get_group_stats ($id_group) {
|
|||
$data["total_checks"] = 0;
|
||||
$data["total_alerts"] = 0;
|
||||
$data["total_agents"] = 0;
|
||||
$data["total_alerts"] = 0;
|
||||
$data["total_checks"] = 0;
|
||||
$data["monitor_health"] = 100;
|
||||
$data["alert_level"] = 100;
|
||||
$data["module_sanity"] = 100;
|
||||
|
|
|
@ -315,10 +315,11 @@ function print_string_substr ($string, $cutoff = 16, $return = false) {
|
|||
*
|
||||
* @param int Alert template id.
|
||||
* @param bool Wheter to return or print it out.
|
||||
* @param bool Wheter to put the values in the string or not.
|
||||
*
|
||||
* @return An HTML string if return was true.
|
||||
*/
|
||||
function print_alert_template_example ($id_alert_template, $return = false) {
|
||||
function print_alert_template_example ($id_alert_template, $return = false, $print_values = true) {
|
||||
$output = '';
|
||||
|
||||
$output .= '<img src="images/information.png" /> ';
|
||||
|
@ -362,12 +363,13 @@ function print_alert_template_example ($id_alert_template, $return = false) {
|
|||
break;
|
||||
}
|
||||
|
||||
/* Replace span elements with real values. This is done in such way to avoid
|
||||
duplicating strings and make it easily modificable via Javascript. */
|
||||
$output = str_replace ('<span id="value"></span>', $template['value'], $output);
|
||||
$output = str_replace ('<span id="max"></span>', $template['max_value'], $output);
|
||||
$output = str_replace ('<span id="min"></span>', $template['min_value'], $output);
|
||||
|
||||
if ($print_values) {
|
||||
/* Replace span elements with real values. This is done in such way to avoid
|
||||
duplicating strings and make it easily modificable via Javascript. */
|
||||
$output = str_replace ('<span id="value"></span>', $template['value'], $output);
|
||||
$output = str_replace ('<span id="max"></span>', $template['max_value'], $output);
|
||||
$output = str_replace ('<span id="min"></span>', $template['min_value'], $output);
|
||||
}
|
||||
$output .= '</span>';
|
||||
if ($return)
|
||||
return $output;
|
||||
|
|
|
@ -198,7 +198,11 @@ echo "<tr>";
|
|||
echo "<td>".__('User ack.')."</td>";
|
||||
echo "<td>";
|
||||
$users = get_users ();
|
||||
print_select ($users, "id_user_ack", $id_user_ack, '', __('Any'), 0);
|
||||
$values = array ();
|
||||
foreach ($users as $id_user => $user) {
|
||||
$values[$id_user] = $user['id_user'];
|
||||
}
|
||||
print_select ($values, "id_user_ack", $id_user_ack, '', __('Any'), 0);
|
||||
echo "</td>";
|
||||
|
||||
|
||||
|
|
|
@ -171,12 +171,14 @@ DEFAULT '0', ADD `min_critical` DOUBLE( 18, 2 ) NOT NULL DEFAULT
|
|||
`min_ff_event` INT( 4 ) UNSIGNED NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `tusuario` CHANGE `nombre_real` `fullname` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
|
||||
|
||||
ALTER TABLE `tusuario` CHANGE `comentarios` `comments` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
|
||||
|
||||
ALTER TABLE `tusuario` CHANGE `id_usuario` `id_user` VARCHAR( 60 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tusuario` CHANGE `fecha_registro` `last_connect` BIGINT( 20 ) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tusuario` ADD UNIQUE (`id_user`);
|
||||
ALTER TABLE `tusuario` ADD `registered` BIGINT( 20 ) NOT NULL DEFAULT '0' AFTER `last_connect` ;
|
||||
ALTER TABLE `tusuario` ADD `firstname` VARCHAR( 255 ) NOT NULL AFTER `fullname` , ADD `lastname` VARCHAR( 255 ) NOT NULL AFTER `firstname` , ADD `middlename` VARCHAR( 255 ) NOT NULL AFTER `lastname`;
|
||||
ALTER TABLE `tusuario` CHANGE `direccion` `email` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL , CHANGE `telefono` `phone` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL , CHANGE `nivel` `is_admin` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tusuario` ADD `firstname` VARCHAR( 255 ) NOT NULL AFTER `fullname`;
|
||||
ALTER TABLE `tusuario` ADD `lastname` VARCHAR( 255 ) NOT NULL AFTER `firstname`;
|
||||
ALTER TABLE `tusuario` ADD `middlename` VARCHAR( 255 ) NOT NULL AFTER `lastname`;
|
||||
ALTER TABLE `tusuario` CHANGE `direccion` `email` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
|
||||
ALTER TABLE `tusuario` CHANGE `telefono` `phone` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
|
||||
ALTER TABLE `tusuario` CHANGE `nivel` `is_admin` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0';
|
||||
|
|
Loading…
Reference in New Issue