mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2013-03-15 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_ui.php operation/agentes/status_monitor: Added popup with data module, remove column 'tags' and changed font size to column 'timestamp'. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7855 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2f7b2abe28
commit
e4abe5c00e
@ -1,3 +1,10 @@
|
|||||||
|
2013-03-15 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
|
* 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 <vanessa.gil@artica.es>
|
2013-03-15 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* include/functions_treeview.php
|
* include/functions_treeview.php
|
||||||
|
@ -429,7 +429,7 @@ function ui_print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||||||
default:
|
default:
|
||||||
//Usually tags have title attributes, so by default we add,
|
//Usually tags have title attributes, so by default we add,
|
||||||
//then fall through to add attributes and data
|
//then fall through to add attributes and data
|
||||||
$output .= ' title="'.$title.'">'.$data.'</'.$tag.'>';
|
$output .= ' title="'.$title.'" '.$style.'>'.$data.'</'.$tag.'>';
|
||||||
break;
|
break;
|
||||||
case "h1":
|
case "h1":
|
||||||
case "h2":
|
case "h2":
|
||||||
|
@ -783,7 +783,9 @@ if (! defined ('METACONSOLE')) {
|
|||||||
'<a href="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&offset=' . $offset . '&ag_group=' . $ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=module_name&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectModuleNameDown, "alt" => "down")) . '</a>';
|
'<a href="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&offset=' . $offset . '&ag_group=' . $ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=module_name&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectModuleNameDown, "alt" => "down")) . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
$table->head[4] = __('Tags');
|
$table->head[4] = __('Tags');
|
||||||
|
*/
|
||||||
|
|
||||||
$table->head[5] = __('Interval');
|
$table->head[5] = __('Interval');
|
||||||
if (! defined ('METACONSOLE')) {
|
if (! defined ('METACONSOLE')) {
|
||||||
@ -911,8 +913,13 @@ foreach ($result as $row) {
|
|||||||
if ($row["extended_info"] != "") {
|
if ($row["extended_info"] != "") {
|
||||||
$data[3] .= ui_print_help_tip ($row["extended_info"], true, '/images/comments.png');
|
$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[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']);
|
$data[5] = ($row['module_interval'] == 0) ? human_time_description_raw($row['agent_interval']) : human_time_description_raw($row['module_interval']);
|
||||||
|
|
||||||
@ -973,7 +980,8 @@ foreach ($result as $row) {
|
|||||||
|
|
||||||
$data[7] = '<a href="javascript:'.$link.'">' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . '</a>';
|
$data[7] = '<a href="javascript:'.$link.'">' . html_print_image("images/chart_curve.png", true, array("border" => '0', "alt" => "")) . '</a>';
|
||||||
if (defined('METACONSOLE'))
|
if (defined('METACONSOLE'))
|
||||||
$data[7] .= " <a href='" . $row['server_url'] . "index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$row["id_agent"]."&tab=data_view&period=86400&loginhash=auto&loginhash_data=" . $row["hashdata"] . "&loginhash_user=" . $row["user"] . "&id=".$row["id_agente_modulo"]."'>" . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . "</a>";
|
//$data[7] .= " <a href='" . $row['server_url'] . "index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$row["id_agent"]."&tab=data_view&period=86400&loginhash=auto&loginhash_data=" . $row["hashdata"] . "&loginhash_user=" . $row["user"] . "&id=".$row["id_agente_modulo"]."'>" . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . "</a>";
|
||||||
|
$data[7] .= "<a href='javascript: show_module_detail_dialog(" . $row["id_agente_modulo"] . ", ". $row['id_agent'].", \"" . $row['server_name'] . "\", 0, 86400)'>". html_print_image ("images/binary.png", true, array ("border" => "0", "alt" => "")) . "</a>";
|
||||||
else
|
else
|
||||||
$data[7] .= " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$row["id_agent"]."&tab=data_view&period=86400&id=".$row["id_agente_modulo"]."'>" . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . "</a>";
|
$data[7] .= " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$row["id_agent"]."&tab=data_view&period=86400&id=".$row["id_agente_modulo"]."'>" . html_print_image('images/binary.png', true, array("style" => '0', "alt" => '')) . "</a>";
|
||||||
|
|
||||||
@ -1052,10 +1060,10 @@ foreach ($result as $row) {
|
|||||||
$interval = $row["agent_interval"];
|
$interval = $row["agent_interval"];
|
||||||
|
|
||||||
if ($row['estado'] == 3) {
|
if ($row['estado'] == 3) {
|
||||||
$option = array ("html_attr" => 'class="redb"');
|
$option = array ("html_attr" => 'class="redb"',"style" => 'font-size:7pt;');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$option = array ();
|
$option = array ("style" => 'font-size:7pt;');
|
||||||
}
|
}
|
||||||
$data[10] = ui_print_timestamp ($row["utimestamp"], true, $option);
|
$data[10] = ui_print_timestamp ($row["utimestamp"], true, $option);
|
||||||
|
|
||||||
@ -1067,6 +1075,10 @@ if (!empty ($table->data)) {
|
|||||||
else {
|
else {
|
||||||
echo "<div class='nf'>".__('This group doesn\'t have any monitor')."</div>";
|
echo "<div class='nf'>".__('This group doesn\'t have any monitor')."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "<div id='monitor_details_window'></div>";
|
||||||
|
ui_require_javascript_file('pandora_modules');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function toggle_full_value(id) {
|
function toggle_full_value(id) {
|
||||||
@ -1077,4 +1089,51 @@ else {
|
|||||||
|
|
||||||
$("#value_module_text_" + id).html(text);
|
$("#value_module_text_" + id).html(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user