2011-08-17 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_visual_map.php,
	godmode/reporting/visual_console_builder.php,
	godmode/reporting/visual_console_builder.editor.js,
	godmode/reporting/visual_console_builder.editor.php: fixes more things, see
	the item in sourceforge tracker.
	
	Fixes: #3389987



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4751 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-08-17 12:44:26 +00:00
parent 44d2e50f37
commit 5ec529eda7
5 changed files with 95 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2011-08-17 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php: fixes more things, see
the item in sourceforge tracker.
Fixes: #3389987
2011-08-17 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* pandoradb.oracle.sql: Added columns 'module_action_threshold' and

View File

@ -306,6 +306,52 @@ function createAction() {
validate = false;
}
break;
case 'percentile_bar':
if ((values['agent'] == '')) {
alert($("#message_alert_no_agent").html());
validate = false;
}
if ((values['module'] == 0)) {
alert($("#message_alert_no_module").html());
validate = false;
}
if ((values['max_percentile'] == '')) {
alert($("#message_alert_no_max_percentile").html());
validate = false;
}
if ((values['width_percentile'] == '')) {
alert($("#message_alert_no_width_percentile").html());
validate = false;
}
break;
case 'module_graph':
if ((values['agent'] == '')) {
alert($("#message_alert_no_agent").html());
validate = false;
}
if ((values['module'] == 0)) {
alert($("#message_alert_no_module").html());
validate = false;
}
if ((values['period'] == 0)) {
alert($("#message_alert_no_period").html());
validate = false;
}
break;
case 'simple_value':
if ((values['agent'] == '')) {
alert($("#message_alert_no_agent").html());
validate = false;
}
if ((values['module'] == 0)) {
alert($("#message_alert_no_module").html());
validate = false;
}
if ((values['process_simple_value'] == 0)) {
alert($("#message_alert_no_process").html());
validate = false;
}
break;
}
if (validate) {
@ -524,6 +570,9 @@ function hiddenFields(item) {
$("#agent_row").css('display', 'none');
$("#agent_row." + item).css('display', '');
$("#module_row").css('display', 'none');
$("#module_row." + item).css('display', '');
$("#process_value_row").css('display', 'none');
$("#process_value_row." + item).css('display', '');
@ -974,6 +1023,7 @@ function updateDB(type, idElement , values, event) {
{
switch (type) {
case 'module_graph':
$("#image_" + idElement).attr("src", getModuleGraph(idElement));
case 'static_graph':
case 'percentile_bar':
case 'simple_value':
@ -990,8 +1040,10 @@ function updateDB(type, idElement , values, event) {
$("#" + idElement).css('left', '0px').css('margin-left', left + 'px');
}
$("#" + idElement).css('color', values['label_color']);
found = false;
jQuery.each(lines, function(i, line) {
if (lines[i]['id'] == idElement) {
found = true;
if (values['parent'] == 0) {
lines.splice(i);
}
@ -1005,6 +1057,15 @@ function updateDB(type, idElement , values, event) {
}
}
});
if (!found) {
var line = {"id": idElement,
"node_begin": values['parent'],
"node_end": idElement,
"color": visual_map_get_color_line_status(idElement) };
lines.push(line);
}
refresh_lines(lines, 'background');
break;
case 'background':

View File

@ -295,6 +295,12 @@ echo "</form>";
echo '<span style="display: none" id="message_alert_no_label_no_image">' . __('No image or name defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_label">' . __('No label defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_image">' . __('No image defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_process">' . __('No process defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_max_percentile">' . __('No Max value defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_width_percentile">' . __('No width defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_period">' . __('No period defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_agent">' . __('No agent defined.') .'</span>';
echo '<span style="display: none" id="message_alert_no_module">' . __('No module defined.') .'</span>';
ui_require_css_file ('color-picker');

View File

@ -126,6 +126,10 @@ switch ($activeTab) {
$values['height'] = get_parameter('height_' . $id, 0);
$values['pos_x'] = get_parameter('left_' . $id, 0);
$values['pos_y'] = get_parameter('top_' . $id, 0);
$type = db_get_value('type', 'tlayout_data', 'id', $id);
if ($type == 1) {
$values['period'] = get_parameter('period_' . $id, 0);
}
$agentName = get_parameter('agent_' . $id, '');
$values['id_agent'] = agents_get_agent_id($agentName);
$values['id_agente_modulo'] = get_parameter('module_' . $id, 0);

View File

@ -794,7 +794,13 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo '<a href="index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
$id_service . '&offset=0">';
$endTagA = true;
}
}
elseif ($layout_data['id_layout_linked'] > 0) {
// Link to a map
echo '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;pure='.$config["pure"].'&amp;id='.$layout_data["id_layout_linked"].'">';
$endTagA = true;
}
}
echo '<strong>'.$layout_data['label']. ' ';
@ -870,7 +876,13 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo '<a href="index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' .
$id_service . '&offset=0">';
$endTagA = true;
}
}
elseif ($layout_data['id_layout_linked'] > 0) {
// Link to a map
echo '<a href="index.php?sec=visualc&amp;sec2=operation/visual_console/render_view&amp;pure='.$config["pure"].'&amp;id='.$layout_data["id_layout_linked"].'">';
$endTagA = true;
}
}
echo $layout_data['label'];