2012-03-20 Sergio Martin <sergio.martin@artica.es>

* operation/visual_console/render_view.php
	godmode/reporting/visual_console_builder.wizard.php
	godmode/reporting/visual_console_builder.php
	godmode/reporting/visual_console_builder.preview.php: Removed
	preview section from visual map in godmode. Now is a link
	to operation mode.
	Change the link from op to godmode, now is to edition view,
	not to main setup.
	Added advanced period control to visual map setup



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5791 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-03-20 10:44:03 +00:00
parent ec8ea7dff9
commit b29485f3af
5 changed files with 18 additions and 68 deletions

View File

@ -1,3 +1,15 @@
2012-03-20 Sergio Martin <sergio.martin@artica.es>
* operation/visual_console/render_view.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/visual_console_builder.php
godmode/reporting/visual_console_builder.preview.php: Removed
preview section from visual map in godmode. Now is a link
to operation mode.
Change the link from op to godmode, now is to edition view,
not to main setup.
Added advanced period control to visual map setup
2012-03-20 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora.js

View File

@ -29,7 +29,7 @@ require_once('godmode/reporting/visual_console_builder.constans.php');
require_once($config['homedir'] . "/include/functions_agents.php");
$action = get_parameterBetweenListValues('action', array('new', 'save', 'edit', 'update', 'delete'), 'new');
$activeTab = get_parameterBetweenListValues('tab', array('data', 'list_elements', 'wizard', 'editor', 'preview'), 'data');
$activeTab = get_parameterBetweenListValues('tab', array('data', 'list_elements', 'wizard', 'editor'), 'data');
$idVisualConsole = get_parameter('id_visual_console', 0);
//Save/Update data in DB
@ -238,10 +238,6 @@ switch ($activeTab) {
break;
}
break;
case 'preview':
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
$visualConsoleName = $visualConsole['name'];
break;
}
$buttons = array(
@ -257,9 +253,9 @@ $buttons = array(
'editor' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=editor&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
html_print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'),
'preview' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=preview&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
html_print_image ("images/eye.png", true, array ("title" => __('Preview'))) .'</a>'),);
'view' => array('active' => false,
'text' => '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=60">' .
html_print_image ("images/eye.png", true, array ("title" => __('View'))) .'</a>'),);
if ($action == 'new' || $idVisualConsole === false){
$buttons = array('data' => $buttons['data']); //Show only the data tab
@ -290,8 +286,5 @@ switch ($activeTab) {
case 'editor':
require_once('godmode/reporting/visual_console_builder.editor.php');
break;
case 'preview':
require_once('godmode/reporting/visual_console_builder.preview.php');
break;
}
?>

View File

@ -1,40 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// 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
// as published by the Free Software Foundation for version 2.
// This program is distributed 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.
// Login check
global $config;
check_login ();
if (! check_acl ($config['id_user'], 0, "IW")) {
db_pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");
exit;
}
require_once ('include/functions_visual_map.php');
visual_map_print_visual_map ($visualConsole['id']);
ui_require_javascript_file ('wz_jsgraphics');
ui_require_javascript_file ('pandora_visual_console');
?>
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
$(document).ready (function () {
draw_lines (lines, 'layout_map');
});
/* ]]> */
</script>

View File

@ -57,21 +57,6 @@ $type_list = array(
SIMPLE_VALUE => __('Simple value')
);
/* Layout_data editor form */
$intervals = array ();
$intervals[3600] = "1 ".__('hour');
$intervals[7200] = "2 ".__('hours');
$intervals[10800] = "3 ".__('hours');
$intervals[21600] = "6 ".__('hours');
$intervals[43200] = "12 ".__('hours');
$intervals[86400] = __('Last day');
$intervals[172800] = "2 ". __('days');
$intervals[604800] = __('Last week');
$intervals[1209600] = "14 ".__('days');
$intervals[2592000] = __('Last month');
$intervals[5184000] = "2 ".__('months');
$intervals[15552000] = "6 ".__('months');
$table->rowstyle["all_0"] = 'display: none;';
$table->data["all_0"][0] = __('Type');
$table->data["all_0"][1] = html_print_select ($type_list, 'type', '', 'hidden_rows()', '', '', true);
@ -91,7 +76,7 @@ $table->data["staticgraph_modulegraph"][1] .= '<br />'.__('Height').': '.html_pr
$table->rowstyle["modulegraph"] = 'display: none;';
$table->data["modulegraph"][0] = __('Period');
$table->data["modulegraph"][1] = html_print_select ($intervals, 'period', '', '', '--', 0, true);
$table->data["modulegraph"][1] = html_print_extended_select_for_time ('period', '', '', '', '', false, true);
$table->rowstyle["simplevalue"] = 'display: none;';
$table->data["simplevalue"][0] = __('Process');

View File

@ -64,7 +64,7 @@ if (check_acl ($config["id_user"], $id_group, "AW")) {
html_print_image ("images/camera.png", true, array ("title" => __('Show link to public Visual Console'))).'</a>';
$options['setup']['text'] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&action=edit&id_visual_console='.$id_layout.'">'.html_print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';
$options['setup']['text'] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=editor&action=edit&id_visual_console='.$id_layout.'">'.html_print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';
$options['setup']['active'] = false;
}