2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
* operation/tree.php: Changes in tab os. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6032 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7b8a15e7f2
commit
cbf2fc44c4
|
@ -1,3 +1,7 @@
|
||||||
|
2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
|
* operation/tree.php: Changes in tab os.
|
||||||
|
|
||||||
2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
|
2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* godmode/setup/setup.php
|
* godmode/setup/setup.php
|
||||||
|
|
|
@ -51,25 +51,7 @@ if (is_ajax ())
|
||||||
require_once ("general/noaccess.php");
|
require_once ("general/noaccess.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blank space below title, DONT remove this, this
|
|
||||||
// Breaks the layout when Flash charts are enabled :-o
|
|
||||||
echo '<div id="id_div" style="height: 10px"> </div>';
|
|
||||||
|
|
||||||
//Floating div
|
|
||||||
echo '<div id="agent_access" width:35%; padding-top:11px;">';
|
|
||||||
|
|
||||||
if ($config["agentaccess"]){
|
|
||||||
echo '<b>'.__('Agent access rate (24h)').'</b><br />';
|
|
||||||
|
|
||||||
graphic_agentaccess($id_agente, 280, 110, 86400);
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '<br>';
|
|
||||||
graph_graphic_agentevents ($id_agente, 290, 15, 86400, '');
|
|
||||||
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div id="id_div3" width="450px">';
|
echo '<div id="id_div3" width="450px">';
|
||||||
echo '<table cellspacing="4" cellpadding="4" border="0" class="databox" style="width:15%">';
|
echo '<table cellspacing="4" cellpadding="4" border="0" class="databox" style="width:15%">';
|
||||||
//Agent name
|
//Agent name
|
||||||
|
@ -184,6 +166,25 @@ if (is_ajax ())
|
||||||
|
|
||||||
//End of table
|
//End of table
|
||||||
echo '</table></div>';
|
echo '</table></div>';
|
||||||
|
|
||||||
|
// Blank space below title, DONT remove this, this
|
||||||
|
// Breaks the layout when Flash charts are enabled :-o
|
||||||
|
echo '<div id="id_div" style="height: 10px"> </div>';
|
||||||
|
|
||||||
|
//Floating div
|
||||||
|
echo '<div id="agent_access" width:35%; padding-top:11px;">';
|
||||||
|
|
||||||
|
if ($config["agentaccess"]){
|
||||||
|
echo '<b>'.__('Agent access rate (24h)').'</b><br />';
|
||||||
|
|
||||||
|
graphic_agentaccess($id_agente, 280, 110, 86400);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<br>';
|
||||||
|
graph_graphic_agentevents ($id_agente, 290, 15, 86400, '');
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
echo '<form id="agent_detail" method="post" action="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">';
|
echo '<form id="agent_detail" method="post" action="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">';
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
html_print_submit_button (__('Go to agent detail'), 'upd_button', false, 'class="sub upd"');
|
html_print_submit_button (__('Go to agent detail'), 'upd_button', false, 'class="sub upd"');
|
||||||
|
@ -380,7 +381,7 @@ if (is_ajax ())
|
||||||
html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;'));
|
html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;'));
|
||||||
|
|
||||||
echo $img;
|
echo $img;
|
||||||
ui_print_group_icon ($row["id_grupo"], false, "groups_small", "vertical-align: middle; width: 16px; height: 16px;", false);
|
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo " ";
|
echo " ";
|
||||||
echo str_replace('.png' ,'_ball.png',
|
echo str_replace('.png' ,'_ball.png',
|
||||||
|
@ -391,9 +392,9 @@ if (is_ajax ())
|
||||||
str_replace('img', 'img style="vertical-align: middle;"', $agent_info["alert_img"])
|
str_replace('img', 'img style="vertical-align: middle;"', $agent_info["alert_img"])
|
||||||
);
|
);
|
||||||
echo "<a onfocus='JavaScript: this.blur()'
|
echo "<a onfocus='JavaScript: this.blur()'
|
||||||
href='javascript: loadTable(\"". $row["id_agente"]. "\")'>";
|
href='javascript: loadTable(\"agent_" . $type . "\"," . $row["id_agente"] . ", " . $less . ", \"" . $id . "\")'>";
|
||||||
echo " ";
|
echo " ";
|
||||||
|
|
||||||
echo $row["nombre"];
|
echo $row["nombre"];
|
||||||
|
|
||||||
echo " (";
|
echo " (";
|
||||||
|
@ -598,6 +599,7 @@ if (is_ajax ())
|
||||||
echo "</span><span style='margin-left: 20px;'>";
|
echo "</span><span style='margin-left: 20px;'>";
|
||||||
echo $data;
|
echo $data;
|
||||||
if ($row['utimestamp'] != '') {
|
if ($row['utimestamp'] != '') {
|
||||||
|
echo " ";
|
||||||
ui_print_help_tip ($row["timestamp"], '', 'images/clock2.png');
|
ui_print_help_tip ($row["timestamp"], '', 'images/clock2.png');
|
||||||
}
|
}
|
||||||
echo "</span></li>";
|
echo "</span></li>";
|
||||||
|
@ -625,7 +627,7 @@ function printTree_($type) {
|
||||||
$select_status = get_parameter('status', -1);
|
$select_status = get_parameter('status', -1);
|
||||||
|
|
||||||
echo '<table class="databox" style="width:98%">';
|
echo '<table class="databox" style="width:98%">';
|
||||||
echo '<tr><td style="width:60%">';
|
echo '<tr><td style="width:60%" valign="top">';
|
||||||
$avariableGroups = users_get_groups(); //db_get_all_rows_in_table('tgrupo', 'nombre');
|
$avariableGroups = users_get_groups(); //db_get_all_rows_in_table('tgrupo', 'nombre');
|
||||||
$avariableGroupsIds = implode(',',array_keys($avariableGroups));
|
$avariableGroupsIds = implode(',',array_keys($avariableGroups));
|
||||||
if($avariableGroupsIds == ''){
|
if($avariableGroupsIds == ''){
|
||||||
|
@ -917,21 +919,24 @@ function printTree_($type) {
|
||||||
$img = html_print_image ("operation/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "3"));
|
$img = html_print_image ("operation/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "3"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (($type == 'os') && ($num_ok == 0) && ($num_critical == 0) && ($num_warning == 0) && ($num_unknown == 0)) {
|
||||||
echo "<li style='margin: 0px 0px 0px 0px;'>
|
continue;
|
||||||
<a onfocus='JavaScript: this.blur()' href='javascript: loadSubTree(\"" . $type . "\",\"" . $id . "\", " . $lessBranchs . ", \"\")'>" .
|
} else {
|
||||||
$img . $iconImg . __($name) . ' ('.
|
echo "<li style='margin: 0px 0px 0px 0px;'>
|
||||||
'<span class="green">'.'<b>'.$num_ok.'</b>'.'</span>'.
|
<a onfocus='JavaScript: this.blur()' href='javascript: loadSubTree(\"" . $type . "\",\"" . $id . "\", " . $lessBranchs . ", \"\")'>" .
|
||||||
' : <span class="red">'.$num_critical.'</span>' .
|
$img . $iconImg ." " . __($name) . ' ('.
|
||||||
' : <span class="yellow">'.$num_warning.'</span>'.
|
'<span class="green">'.'<b>'.$num_ok.'</b>'.'</span>'.
|
||||||
' : <span class="grey">'.$num_unknown.'</span>'.') '. "</a>";
|
' : <span class="red">'.$num_critical.'</span>' .
|
||||||
|
' : <span class="yellow">'.$num_warning.'</span>'.
|
||||||
echo "<div hiddenDiv='1' loadDiv='0' style='margin: 0px; padding: 0px;' class='tree_view' id='tree_div_" . $type . "_" . $id . "'></div>";
|
' : <span class="grey">'.$num_unknown.'</span>'.') '. "</a>";
|
||||||
echo "</li>\n";
|
|
||||||
|
echo "<div hiddenDiv='1' loadDiv='0' style='margin: 0px; padding: 0px;' class='tree_view' id='tree_div_" . $type . "_" . $id . "'></div>";
|
||||||
|
echo "</li>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td style="width:38%">';
|
echo '<td style="width:38%" valign="top">';
|
||||||
echo '<div id="cont">';
|
echo '<div id="cont">';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo'</div>';
|
echo'</div>';
|
||||||
|
@ -1130,7 +1135,8 @@ printTree_($activeTab);
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTable(id_agent) {
|
function loadTable(type, div_id, less_branchs, id_father) {
|
||||||
|
id_agent = div_id;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "ajax.php",
|
url: "ajax.php",
|
||||||
|
@ -1138,7 +1144,8 @@ printTree_($activeTab);
|
||||||
id_agent, success: function(data){
|
id_agent, success: function(data){
|
||||||
$('#cont').html(data);
|
$('#cont').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
loadSubTree(type, div_id, less_branchs, id_father);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue