2009-03-04 Sancho Lerena <slerena@artica.es>

* 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.
	


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-03-04 17:57:00 +00:00
parent aebe7da984
commit 1b19caa4f1
21 changed files with 276 additions and 49 deletions

View File

@ -1,3 +1,57 @@
2009-03-04 Sancho Lerena <slerena@artica.es>
* 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 <estebans@artica.es>
* godmode/agentes/manage_config.php: Fixed a javascript error that

View File

@ -71,7 +71,7 @@ if (is_int ($package) && $package == 1) {
} else {
echo '<h5 class="suc">'.__('There\'s a new update for Pandora FMS')."</h5>";
$table->width = '50%';
$table->width = '80%';
$table->data = array ();
$table->data[0][0] = '<strong>'.__('Id').'</strong>';

View File

@ -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';

View File

@ -0,0 +1,15 @@
<?php
// Password estatica, se define en ambos extremos
$pwd = "sistemas";
$user = "admin";
$data = $user.$pwd;
$data = md5($data);
echo "DEBUG md5sum $data user $user Pass $pwd<br>";
echo '<form name=test method=post action="http://192.168.61.41/pandora_console/index.php?loginhash=auto&sec=estado&sec2=operation/agentes/estado_agente&refr=60">';
echo '<input type="hidden" name="loginhash_data" value="'.$data.'">';
echo '<input type="hidden" name="loginhash_user" value="'.$user.'">';
echo '<input type="submit">';
echo '</form>';

View File

@ -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 '</a><br />';
echo '<a href="http://www.mozilla-europe.org/en/firefox/">';
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 '</a>';
?>

View File

@ -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 '</div></form>';
?>
?>

View File

@ -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);
}

View File

@ -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] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'">'.$map['name'].'</a>';
$data[1] = '<img src="images/'.get_group_icon ($map['id_group']).'.png" /> ';
$data[1] .= get_group_name ($map['id_group']);
$data[2] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">
$data[2] = get_db_sql ("SELECT COUNT(id) FROM tlayout_data WHERE id_layout = ".$map['id']);
$data[3] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder_wizard&id_layout='.$map['id'].'">
<img src="images/pill.png"></a>';
$data[4] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">
<img src="images/cross.png"></a>';
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] .= '&nbsp;&nbsp;<a href="http://localhost/pandora_console/index.php?sec=greporting&sec2=godmode/reporting/map_builder_wizard&id_layout='.$id_layout.'"><img src="images/pill.png"></a>';
$table->data[0][1] .= '&nbsp;&nbsp;<a href="http://localhost/pandora_console/index.php?sec=visualc&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr=60"><img src="images/eye.png"></a>';
}
$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');

View File

@ -0,0 +1,128 @@
<?php
// 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
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributepd in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder wizard");
require ("general/noaccess.php");
exit;
}
$layout_id = get_parameter ("id_layout", 0);
$layout = get_db_row_sql ("SELECT * FROM tlayout WHERE id = $layout_id");
$layout_group = $layout["id_group"];
if (! give_acl ($config['id_user'], $layout_group, "AW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder wizard (forget URL parameter)");
require ("general/noaccess.php");
exit;
}
echo '<h2>'.__('Visual map wizard').' - '.$layout["name"].'</h2>';
function process_wizard_add ($id_agents, $image, $id_layout, $range) {
if (empty ($id_agents)) {
echo '<h3 class="error">'.__('No agents selected').'</h3>';
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 '<h3 class="suc">'.__('Successfully added').'</h3>';
echo '<h3><a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$id_layout.'">'.__('Map builder').'</a></h3>';
}
$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 '<form method="post" onsubmit="if (! confirm(\''.__('Are you sure').'\')) return false;">';
print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('add', 1);
print_input_hidden ('id_layout', $layout["id"]);
print_submit_button (__('Add'), 'go', false, 'class="sub wizard"');
echo '</div>';
echo '</form>';
echo '<h3 class="error invisible" id="message"> </h3>';
?>

View File

@ -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"]);

View File

@ -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"]));

View File

@ -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);
}

View File

@ -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"];
}
}

View File

@ -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 "<h3 class='error'>".__('Attachment directory is not writtable by HTTP Server')."</h3>";
echo '<p>';
echo __('Please check that {HOMEDIR}/attachment directory has write rights for HTTP server');
echo "</p>";
}
// Page loader / selector
if ($page != "") {
$page .= '.php';

View File

@ -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] = '<a href="'.$url.'&filter=fired"><img src="images/pixel_red.png" width="18" height="18" title="'.__('Click to filter').'">'.__('Alert fired').'</a>';
$table->data[0][3] = '<a href="'.$url.'&filter=notfired"><img src="images/pixel_green.png" width="18" height="18" title="'.__('Click to filter').'">'.__('Alert not fired').'</a>';
$table->data[0][4] = '<a href="'.$url.'&filter=disabled"><img src="images/pixel_gray.png" width="18" height="18" title="'.__('Click to filter').'">'.__('Alert disabled').'</a>';
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 '</form>';
$table->width = '90%';
$table->class = "databox";

View File

@ -103,7 +103,7 @@ print_select ($fields, "ag_modulename", $ag_modulename, 'this.form.submit();', _
echo '</td><td valign="middle">'.__('Free text').'</td>';
echo '<td valign="middle">';
print_input_text ("ag_freestring", $ag_freestring, '', 15);
print_input_text ("ag_freestring", $ag_freestring, '', 15,30, false);
echo '</td><td valign="middle">';
print_submit_button (__('Show'), "uptbutton", false, 'class="sub"');

View File

@ -276,10 +276,10 @@ echo '&nbsp;<a target="_top" href="operation/events/events_rss.php?ev_group='.$e
print_image ("images/transmit.png", false, array ("title" => __('RSS Events')));
echo '</a>';
echo "</td></tr></table></form></div>"; //This is the filter div
echo "</td></tr></table></form>"; //This is the filter div
echo '<div style="width:220px; float:left;">';
print_image ("reporting/fgraph.php?tipo=group_events&width=220&height=180&url=".rawurlencode ($sql_post), false, array ("border" => 0));
echo '</div><div style="clear:both">&nbsp;</div>';
echo '</div><div style="clear:both">&nbsp;</div></div>';
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';

View File

@ -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] = '<h4>'.__('S.L.A.').'</h4>';
@ -220,7 +220,6 @@ foreach ($contents as $content) {
foreach ($slas as $sla) {
$data = array ();
$table->colspan[$n][0] = 3;
$data[0] = '<strong>'.__('Agent')."</strong> : ";
$data[0] .= get_agentmodule_agent_name ($sla['id_agent_module'])."<br />";
$data[0] .= '<strong>'.__('Module')."</strong> : ";

View File

@ -66,6 +66,9 @@ if ($config["pure"] == 0) {
echo "</a>";
}
if (give_acl ($config["id_user"], $id_group, "AW"))
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout=$id_layout'><img src='images/setup.png' title='".__("Setup")."'></a>";
echo '</h1>';
print_pandora_visual_map ($id_layout);

View File

@ -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 }'`

View File

@ -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;
--