diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index abb23ecaaf..aaafa8e652 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-03-15 Vanessa Gil + + * include/functions_ui.php + operation/agentes/status_monitor: Added popup with data + module, remove column 'tags' and changed font size to + column 'timestamp'. + 2013-03-15 Vanessa Gil * include/functions_treeview.php diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 3ed7a177fb..ff7a27803f 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -429,7 +429,7 @@ function ui_print_timestamp ($unixtime, $return = false, $option = array ()) { default: //Usually tags have title attributes, so by default we add, //then fall through to add attributes and data - $output .= ' title="'.$title.'">'.$data.''; + $output .= ' title="'.$title.'" '.$style.'>'.$data.''; break; case "h1": case "h2": diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 70e7d53169..652744c63b 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -783,7 +783,9 @@ if (! defined ('METACONSOLE')) { '' . html_print_image("images/sort_down.png", true, array("style" => $selectModuleNameDown, "alt" => "down")) . ''; } +/* $table->head[4] = __('Tags'); +*/ $table->head[5] = __('Interval'); if (! defined ('METACONSOLE')) { @@ -911,8 +913,13 @@ foreach ($result as $row) { if ($row["extended_info"] != "") { $data[3] .= ui_print_help_tip ($row["extended_info"], true, '/images/comments.png'); } + if ($row["tags"] != "") { + $data[3] .= ui_print_help_tip ($row["tags"], true, '/images/tip.png'); + } +/* $data[4] = ui_print_truncate_text($row['tags'], 'agent_small', false, true, true, '[…]', 'font-size:7pt;'); +*/ $data[5] = ($row['module_interval'] == 0) ? human_time_description_raw($row['agent_interval']) : human_time_description_raw($row['module_interval']); @@ -973,12 +980,13 @@ foreach ($result as $row) { $data[7] = '' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . ''; if (defined('METACONSOLE')) - $data[7] .= " " . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . ""; + //$data[7] .= " " . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . ""; + $data[7] .= "". html_print_image ("images/binary.png", true, array ("border" => "0", "alt" => "")) . ""; else $data[7] .= " " . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . ""; } - + $data[8] = ui_print_module_warn_value($row['max_warning'], $row['min_warning'], $row['str_warning'], $row['max_critical'], $row['min_critical'], $row['str_critical']); if (is_numeric($row["datos"])) { @@ -1052,10 +1060,10 @@ foreach ($result as $row) { $interval = $row["agent_interval"]; if ($row['estado'] == 3) { - $option = array ("html_attr" => 'class="redb"'); + $option = array ("html_attr" => 'class="redb"',"style" => 'font-size:7pt;'); } else { - $option = array (); + $option = array ("style" => 'font-size:7pt;'); } $data[10] = ui_print_timestamp ($row["utimestamp"], true, $option); @@ -1067,6 +1075,10 @@ if (!empty ($table->data)) { else { echo "
".__('This group doesn\'t have any monitor')."
"; } + +echo "
"; +ui_require_javascript_file('pandora_modules'); + ?> \ No newline at end of file + + // Show the modal window of an module + function show_module_detail_dialog(module_id, id_agent, server_name, offset, period) { + if (period == -1) { + period = $('#period').val(); + } + $.ajax({ + type: "POST", + url: "", + data: "page=include/ajax/module&get_module_detail=1&server_name="+server_name+"&id_agent="+id_agent+"&id_module=" + module_id+"&offset="+offset+"&period="+period, + dataType: "html", + success: function(data){ + $("#monitor_details_window").hide () + .empty () + .append (data) + .dialog ({ + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 620, + height: 500 + }) + .show (); + refresh_pagination_callback (module_id, id_agent, server_name); + + } + }); + } + + function refresh_pagination_callback (module_id, id_agent, server_name) { + $(".pagination").click( function() { + var classes = $(this).attr('class'); + classes = classes.split(' '); + var offset_class = classes[1]; + offset_class = offset_class.split('_'); + var offset = offset_class[1]; + + var period = $('#period').val(); + + show_module_detail_dialog(module_id, id_agent, server_name, offset, period); + return false; + }); + } +