diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 83697dd1a3..54165a14ca 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,57 @@ +2009-03-04 Sancho Lerena + + * extras/: New directory with extra contents (scripts, tools, samples) + + * index.php: Add new permission check for /attachment directory. Probably + could be extended and wrapped into a function. This should be only called + once, this is the reason why is placed here and not in config_process. + + * pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful + for applying over a older 3.0 version for example). + + * pandoradb_data.sql: Was missing some tconfig variables. + + * extras/*.sql: Missing somre tconfig variables and other minor issues fixed + + * extensions/update_manager/main.php: Description of update manager patch + wider. Probably needs more formatting in the future. + + * extras/sample_login.php: Sample on how to implement autologin feature. + + * footer.php: I hope solve the frakkin image problem. + + * godmode/agents/agent_manager.php: proper ACL check notice. + + * godmode/alerts/alert_list.php: Fixed notice. + + * godmode/reporting/map_builder.php: Added link to wizard and item count. + + * godmode/reporting/map_builder_wizard.php: Added new feature, a wizard + to populate the visual map, using agents from a combo, depending on the + map selected. Could have a lot of improvements, it's a basic start. Allow + to choose agents and image maps and space between images. Puts in a reticle + automatically adjusting at 600px width. + + * godmode/setup.php: Checkbox for trap_forward was bad, fixed. + + * config_process.php: Fixed version to 3.0-dev + + * functions_html.php: Default of 0 in text boxes makes them unusable on + default values, funny :-) + + * include/functions_reporting.php: Fixed a notice on unknown variable + on function get_group_stat(). + + * operation/agentes/alerts_status.php: Filter on module status is made now + with combos, like the rest of the filters in the GUI. + + * operation/events/events.php: a missing div makes graph float outside the + filter box. TODO: Hidder filter makes free-width style buggy here. + + * operation/reporting/reporting_viewer.php: Fixed layout issue. + + * operation/visual_console/render_view.php: Added ACL check. + 2009-03-04 Esteban Sanchez * godmode/agentes/manage_config.php: Fixed a javascript error that diff --git a/pandora_console/extensions/update_manager/main.php b/pandora_console/extensions/update_manager/main.php index 10c53d1532..6a6dd8eae1 100644 --- a/pandora_console/extensions/update_manager/main.php +++ b/pandora_console/extensions/update_manager/main.php @@ -71,7 +71,7 @@ if (is_int ($package) && $package == 1) { } else { echo '
'.__('There\'s a new update for Pandora FMS')."
"; - $table->width = '50%'; + $table->width = '80%'; $table->data = array (); $table->data[0][0] = ''.__('Id').''; diff --git a/pandora_console/pandoradb_migrate_20_to_21.sql b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql similarity index 96% rename from pandora_console/pandoradb_migrate_20_to_21.sql rename to pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql index ecfac1bfdf..345ee4767f 100644 --- a/pandora_console/pandoradb_migrate_20_to_21.sql +++ b/pandora_console/extras/pandoradb_migrate_v2.x_to_v3.0.sql @@ -1,3 +1,11 @@ +INSERT INTO `tconfig` VALUES (21, 'trap2agent', '0'); +INSERT INTO `tconfig` VALUES (22, 'date_format', 'F j, Y, g:i a'); +INSERT INTO `tconfig` VALUES (23, 'event_view_hr', 8); +INSERT INTO `tconfig` VALUES (24, 'loginhash_pwd', ''); +INSERT INTO `tconfig` VALUES (25, 'trap2agent', 0); +INSERT INTO `tconfig` VALUES (26, 'prominent_time', 0); +INSERT INTO `tconfig` VALUES (27, 'timesource', 'system'); + ALTER TABLE tagente ADD `custom_id` varchar(255) default ''; ALTER TABLE tagente_modulo ADD `custom_id` varchar(255) default ''; ALTER TABLE tgrupo ADD `custom_id` varchar(255) default ''; @@ -273,8 +281,8 @@ ALTER TABLE treport_content ADD `id_agent` int(10) unsigned NOT NULL default 0; -- Changes added 19 February 2009 -ALTER TABLE `tmensajes` CHANGE `timestamp` `timestamp` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' +ALTER TABLE `tmensajes` CHANGE `timestamp` `timestamp` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0'; -- Changes added 20 February 2009 -ALTER TABLE `tevento` CHANGE `event_type` `event_type` ENUM( 'unknown', 'alert_fired', 'alert_recovered', 'alert_ceased', 'alert_manual_validation', 'recon_host_detected', 'system', 'error', 'new_agent', 'going_up_warning', 'going_up_critical', 'going_down_warning', 'going_down_normal', 'going_down_critical', 'going_up_normal' ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'unknown' +ALTER TABLE `tevento` CHANGE `event_type` `event_type` ENUM( 'unknown', 'alert_fired', 'alert_recovered', 'alert_ceased', 'alert_manual_validation', 'recon_host_detected', 'system', 'error', 'new_agent', 'going_up_warning', 'going_up_critical', 'going_down_warning', 'going_down_normal', 'going_down_critical', 'going_up_normal' ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'unknown'; diff --git a/pandora_console/extras/sample_login.php b/pandora_console/extras/sample_login.php new file mode 100644 index 0000000000..c4cf3b2589 --- /dev/null +++ b/pandora_console/extras/sample_login.php @@ -0,0 +1,15 @@ +"; +echo '
'; +echo ''; +echo ''; +echo ''; +echo '
'; diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index fa5475042b..81010d759f 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -2,8 +2,8 @@ // Pandora FMS - the Flexible Monitoring System // ============================================= -// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es -// Please see http://pandora.sourceforge.net for full contribution list +// Copyright (c) 2009 Artica Soluciones Tecnologicas, http://www.artica.es +// Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -31,6 +31,7 @@ if (isset ($config['debug'])) { } echo '
'; echo ''; -print_image ("images/firefox.png", false, array ("align" => "middle", "title" => __('Pandora FMS console is best viewed with Firefox web browser'), "alt" => __('Get Firefox'))); +if (file_exists("images/firefox.png")) + print_image ("images/firefox.png", false, array ("align" => "middle", "title" => __('Pandora FMS console is best viewed with Firefox web browser'), "alt" => __('Get Firefox'))); echo ''; ?> diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index d498427242..8bfdd06a8c 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -20,7 +20,9 @@ enterprise_include ('godmode/agentes/agent_manager.php'); if (!isset ($id_agente)) { - die ("Not Authorized"); + audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access agent manager witout an agent"); + require ("general/noaccess.php"); + exit; } // ======================== @@ -171,4 +173,4 @@ if ($new_agent) { print_input_hidden ('id_agente', $id_agente); } echo ''; -?> \ No newline at end of file +?> diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 5322c76e83..3830ec6527 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -123,7 +123,7 @@ if ($create_alert) { $values = array (); if (isset ($fires_min[$id_action])) $values['fires_min'] = @max ($fires_min[$id_action], 0); - if ($fires_max != -1) + if (($fires_max != -1) && (isset ($fires_min[$id_action]))) $values['fires_max'] = @max ($fires_max[$id_action], 0); add_alert_agent_module_action ($id, $id_action, $values); } diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 9c0e1cc133..0fc4e673c9 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -266,9 +266,12 @@ if (! $edit_layout && ! $id_layout) { $table->head = array (); $table->head[0] = __('Map name'); $table->head[1] = __('Group'); - $table->head[2] = __('Delete'); + $table->head[2] = __('Items'); + $table->head[3] = __('Wizard'); + $table->head[4] = __('Delete'); $table->align = array (); - $table->align[2] = 'center'; + $table->align[3] = 'center'; + $table->align[4] = 'center'; $maps = get_db_all_rows_in_table ('tlayout','name'); if (!$maps) { @@ -278,9 +281,14 @@ if (! $edit_layout && ! $id_layout) { $data = array (); $data[0] = ''.$map['name'].''; + $data[1] = ' '; $data[1] .= get_group_name ($map['id_group']); - $data[2] = ' + $data[2] = get_db_sql ("SELECT COUNT(id) FROM tlayout_data WHERE id_layout = ".$map['id']); + $data[3] = ' + '; + + $data[4] = ' '; array_push ($table->data, $data); } @@ -302,6 +310,13 @@ if (! $edit_layout && ! $id_layout) { $table->data = array (); $table->data[0][0] = __('Name'); $table->data[0][1] = print_input_text ('name', $name, '', 15, 50, true); + + if ($id_layout){ + $table->data[0][1] .= '  '; + + $table->data[0][1] .= '  '; + } + $table->data[1][0] = __('Group'); $table->data[1][1] = print_select ($groups, 'id_group', $id_group, '', '', '', true); $table->data[2][0] = __('Background'); @@ -394,7 +409,7 @@ if (! $edit_layout && ! $id_layout) { $table->data[1][0] = __('Label color'); $table->data[1][1] = print_input_text ('label_color', '#000000', '', 7, 7, true); $table->data[2][0] = __('Type'); - $table->data[2][1] = print_select (get_layout_data_types (), 'type', '', '', '', '', true); + $table->data[2][1] = print_select (get_layout_data_types (), 'type', '', '', '', 0, true, false, false); // Dont want to be sorted ! $table->data[3][0] = __('Height'); $table->data[3][1] = print_input_text ('height', '', '', 5, 5, true); $table->data[4][0] = __('Width'); diff --git a/pandora_console/godmode/reporting/map_builder_wizard.php b/pandora_console/godmode/reporting/map_builder_wizard.php new file mode 100644 index 0000000000..e54225a6cf --- /dev/null +++ b/pandora_console/godmode/reporting/map_builder_wizard.php @@ -0,0 +1,128 @@ +'.__('Visual map wizard').' - '.$layout["name"].''; +function process_wizard_add ($id_agents, $image, $id_layout, $range) { + if (empty ($id_agents)) { + echo '

'.__('No agents selected').'

'; + return false; + } + + $id_agents = (array) $id_agents; + + $error = false; + $pos_y = 10; + $pos_x = 10; + foreach ($id_agents as $id_agent) { + + if ($pos_x > 600){ + $pos_x = 10; + $pos_y = $pos_y + $range; + } + + $label = get_db_sql ("SELECT nombre FROM tagente WHERE id_agente = $id_agent"); + $sql = "INSERT INTO tlayout_data (id_layout, pos_x, pos_y, label, image, id_agent, label_color) VALUES ($id_layout, $pos_x, $pos_y, '$label', '$image', $id_agent, '#000000')"; + process_sql ($sql); + + $pos_x = $pos_x + $range; + } + + echo '

'.__('Successfully added').'

'; + echo '

'.__('Map builder').'

'; +} + +$id_agents = get_parameter ('id_agents'); +$image = get_parameter ('image'); +$add = (bool) get_parameter ('add', false); +$range = get_parameter ("range", 50); + +if ($add) { + process_wizard_add ($id_agents, $image, $layout["id"], $range); +} + +$table->id = 'wizard_table'; +$table->width = '65%'; +$table->data = array (); +$table->style = array (); +$table->style[0] = 'font-weight: bold; vertical-align:top'; +$table->style[2] = 'font-weight: bold'; +$table->size = array (); + +$table->data = array (); + +// CRAP HERE + +$images_list = array (); +$all_images = list_files ('images/console/icons/', "png", 1, 0); +foreach ($all_images as $image_file) { + if (strpos ($image_file, "_bad")) + continue; + if (strpos ($image_file, "_ok")) + continue; + if (strpos ($image_file, "_warning")) + continue; + $image_file = substr ($image_file, 0, strlen ($image_file) - 4); + $images_list[$image_file] = $image_file; +} + +$table->data[0][0] = __('Image'); +$table->data[0][1] = print_select ($images_list, 'image', '', '', 'None', '', true); + +$table->data[1][0] = __('Image range (px)'); +$table->data[1][1] = print_input_text ('range', $range, '', 5, 5, true); + + +$table->data[2][0] = __('Agents'); +$table->data[2][1] = print_select (get_group_agents ($layout_group, false, "none"), + 'id_agents[]', 0, false, '', '', true, true); + +echo '
'; +print_table ($table); + +echo '
'; +print_input_hidden ('add', 1); +print_input_hidden ('id_layout', $layout["id"]); +print_submit_button (__('Add'), 'go', false, 'class="sub wizard"'); +echo '
'; +echo '
'; + +echo ''; + +?> + diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 669e06ee0e..3b77d39ca9 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -46,7 +46,7 @@ if ($update_settings) { $config["graph_color3"] = (string) get_parameter ('graph_color3', $config["graph_color3"]); $config["sla_period"] = (int) get_parameter ('sla_period', $config["sla_period"]); $config["date_format"] = (string) get_parameter ('date_format', $config["date_format"]); - $config["trap2agent"] = (string) get_parameter ('trap2agent', $config["trap2agent"]); + $config["trap2agent"] = (string) get_parameter ('trap2agent', 0); $config["autoupdate"] = (bool) get_parameter ('autoupdate', 0); //If not passed, it's 0 $config["prominent_time"] = (string) get_parameter ('prominent_time', $config["prominent_time"]); $config["loginhash_pwd"] = (string) get_parameter ('loginhash_pwd', $config["loginhash_pwd"]); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ad92ae075a..b87bbb718d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -3,7 +3,7 @@ // Pandora FMS - the Flexible Monitoring System // ============================================ // Copyright (c) 2009 Artica Soluciones Tecnologicas, http://www.artica.es -// Please see http://pandora.sourceforge.net for full contribution list +// Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -18,7 +18,7 @@ //Pandora Version $build_version = 'PC090303'; -$pandora_version = 'v2.1-dev'; +$pandora_version = 'v3.0-dev'; $config['start_time'] = microtime (true); @@ -195,8 +195,6 @@ if (!isset ($config["https"])) { } if (!isset ($config["compact_header"])) { - // Sets whether or not we want to enforce https. We don't want to go to a - // potentially unexisting config by default $config["compact_header"] = false; process_sql_insert ('tconfig', array ('token' => 'compact_header', 'value' => $config["compact_header"])); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 5315ebc409..143313dda0 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -222,7 +222,7 @@ function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, * * @return string HTML code if return parameter is true. */ -function print_input_password ($name, $value, $alt = '', $size = 50, $maxlength = 0, $return = false) { +function print_input_password ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false) { $output = print_input_text_extended ($name, $value, 'password-'.$name, $alt, $size, $maxlength, false, '', '', true, true); if ($return) @@ -244,7 +244,7 @@ function print_input_password ($name, $value, $alt = '', $size = 50, $maxlength * * @return string HTML code if return parameter is true. */ -function print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 0, $return = false) { +function print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false) { return print_input_text_extended ($name, $value, 'text-'.$name, '', $size, $maxlength, false, '', '', $return); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 8e27531536..c584d3dec5 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -142,7 +142,7 @@ function get_group_stats ($id_group = 0) { $data["monitor_alerts"]++; if ($row["times_fired"] > 0) { $data["monitor_alerts_fired"]++; - $data["monitor_alerts_fire_count"] += $fired; + $data["monitor_alerts_fire_count"] += $row["times_fired"]; } } diff --git a/pandora_console/index.php b/pandora_console/index.php index 2883148a63..67733b4c27 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -77,6 +77,7 @@ if (file_exists (ENTERPRISE_DIR."/load_enterprise.php")) { load_extensions ($config['extensions']); + if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) { $query = 'https://' . $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; if (sizeof ($_REQUEST)) @@ -85,7 +86,6 @@ if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) { //We don't clean these variables up as they're only being passed along foreach ($_GET as $key => $value) { - /* Avoid the 1=1 */ if ($key == 1) continue; $query .= '&'.$key.'='.$value; @@ -214,6 +214,14 @@ if ($config["pure"] == 0) { require_jquery_file ('overlay'); } +// Check permissions +if (!is_writable("attachment")){ + echo "

".__('Attachment directory is not writtable by HTTP Server')."

"; + echo '

'; + echo __('Please check that {HOMEDIR}/attachment directory has write rights for HTTP server'); + echo "

"; +} + // Page loader / selector if ($page != "") { $page .= '.php'; diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 4adb7ba534..168eee9e08 100644 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -20,7 +20,7 @@ check_login (); require_once ("include/functions_agents.php"); -$filter = get_parameter_get ("filter", "all"); +$filter = get_parameter ("filter", "all"); $offset = (int) get_parameter_get ("offset", 0); $id_group = (int) get_parameter ("ag_group", 1); //1 is the All group (selects all groups) @@ -111,28 +111,18 @@ if ($print_agent) { $table->data[0][0] = __('Group'); $table->data[0][1] = print_select (get_user_groups (), "ag_group", $id_group, 'javascript:this.form.submit();', '', '', true); - - $table->data[0][2] = ''.__('Alert fired').''; - $table->data[0][3] = ''.__('Alert not fired').''; - $table->data[0][4] = ''.__('Alert disabled').''; - - switch ($filter) { - case 'fired': - $table->style[2] = 'font-weight: bold'; - break; - case 'notfired': - $table->style[3] = 'font-weight: bold'; + $alert_status_filter = array(); + $alert_status_filter['all'] = __('All'); + $alert_status_filter['fired'] = __('Fired'); + $alert_status_filter['notfired'] = __('Not fired'); + $alert_status_filter['disabled'] = __('Disabled'); - break; - case 'disabled': - $table->style[4] = 'font-weight: bold'; - - break; - } - + $table->data[0][2] = __('Status'); + $table->data[0][3] = print_select ($alert_status_filter, "filter", $filter, 'javascript:this.form.submit();', '', '', true); print_table ($table); } +echo ''; $table->width = '90%'; $table->class = "databox"; diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index d8116a87f2..b812b0c636 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -103,7 +103,7 @@ print_select ($fields, "ag_modulename", $ag_modulename, 'this.form.submit();', _ echo ''.__('Free text').''; echo ''; -print_input_text ("ag_freestring", $ag_freestring, '', 15); +print_input_text ("ag_freestring", $ag_freestring, '', 15,30, false); echo ''; print_submit_button (__('Show'), "uptbutton", false, 'class="sub"'); diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index fe34f07652..5ebf7f589d 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -276,10 +276,10 @@ echo '  __('RSS Events'))); echo ''; -echo ""; //This is the filter div +echo ""; //This is the filter div echo '
'; print_image ("reporting/fgraph.php?tipo=group_events&width=220&height=180&url=".rawurlencode ($sql_post), false, array ("border" => 0)); -echo '
 
'; +echo '
 
'; if ($group_rep == 0) { $sql = "SELECT * FROM tevento WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination; @@ -340,7 +340,7 @@ $table->align[5] = 'center'; if ($group_rep == 0) { $table->head[6] = __('User ID'); } else { - $table->head[6] = __('Rep'); + $table->head[6] = __('Count'); } $table->align[6] = 'center'; diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index f306d1fa7b..e855a6bdfc 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -191,7 +191,7 @@ foreach ($contents as $content) { break; case 3: case 'SLA': - $table->colspan[0][0] = 2; + $table->style[1] = 'text-align: right'; $data = array (); $data[0] = '

'.__('S.L.A.').'

'; @@ -220,7 +220,6 @@ foreach ($contents as $content) { foreach ($slas as $sla) { $data = array (); - $table->colspan[$n][0] = 3; $data[0] = ''.__('Agent')." : "; $data[0] .= get_agentmodule_agent_name ($sla['id_agent_module'])."
"; $data[0] .= ''.__('Module')." : "; diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 7de417bc44..11c85e0865 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -66,6 +66,9 @@ if ($config["pure"] == 0) { echo ""; } +if (give_acl ($config["id_user"], $id_group, "AW")) + echo ""; + echo ''; print_pandora_visual_map ($id_layout); diff --git a/pandora_console/pandora_console_upgrade b/pandora_console/pandora_console_upgrade index 09b10c18dd..f1217769f0 100644 --- a/pandora_console/pandora_console_upgrade +++ b/pandora_console/pandora_console_upgrade @@ -32,7 +32,7 @@ pandora_upgrade () { DBPASS=`cat $PANDORAPATH/include/config.php | grep dbpass | grep -v "^\/" | grep -o "\=\"[a-zA-Z0-9]*\"" | grep -o "[A-Za-z0-9]*"` DBHOST=`cat $PANDORAPATH/include/config.php | grep dbhost | grep -v "^\/" | grep -o "\=\"[a-zA-Z0-9]*\"" | grep -o "[A-Za-z0-9]*"` DBNAME=`cat $PANDORAPATH/include/config.php | grep dbname | grep -v "^\/" | grep -o "\=\"[a-zA-Z0-9]*\"" | grep -o "[A-Za-z0-9]*"` - cat pandoradb_migrate_20_to_21.sql | mysql -u $DBUSER -p$DBPASS -h $DBHOST -D $DBNAME + cat extras/pandoradb_migrate_v2.x_to_v3.0.sql | mysql -f -u $DBUSER -p$DBPASS -h $DBHOST -D $DBNAME fi WWWUSER=`ls -la $PANDORAPATH/index.php | awk '{ print $3 }'` diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 611c3384b0..8b4a0526c9 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -61,7 +61,13 @@ INSERT INTO `tconfig` VALUES (19, 'graph_color3', '#89FF09'), (20, 'sla_period', '604800'), (21, 'trap2agent', '0'), -(22, 'date_format', 'F j, Y, g:i a'); +(22, 'date_format', 'F j, Y, g:i a'), +(23, 'event_view_hr', 8), +(24, 'loginhash_pwd', ''), +(25, 'trap2agent', 0), +(26, 'prominent_time', 0), +(27, 'timesource', 'system'); + UNLOCK TABLES; --