2012-04-02 Dario Rodriguez <dario.rodriguez@artica.es>
*operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/networkmap.php, operation/servers/view_server.php, operation/servers/recon_view.php, operation/servers/view_server_detail.php, operation/menu.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, general/header.php, godmode/servers/modificar_server.php, godmode/reporting/visual_console_builder.wizard.php, godmode/reporting/graph_builder.main.php, godmode/reporting/visual_console_builder.php, godmode/reporting/visual_console_builder.elements.php, godmode/reporting/graph_builder.php, godmode/reporting/graph_builder.graph_editor.php, godmode/reporting/reporting_builder.php, godmode/reporting/visual_console_builder.editor.php, godmode/reporting/map_builder.php, godmode/reporting/graphs.php: Merged changes in menu structure from 4.0.2 to trunk version git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
582c135fe3
commit
c96cfbb9f6
|
@ -1,3 +1,28 @@
|
|||
2012-04-02 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
*operation/visual_console/render_view.php,
|
||||
operation/visual_console/index.php,
|
||||
operation/agentes/networkmap.php,
|
||||
operation/servers/view_server.php,
|
||||
operation/servers/recon_view.php,
|
||||
operation/servers/view_server_detail.php,
|
||||
operation/menu.php,
|
||||
operation/reporting/reporting_viewer.php,
|
||||
operation/reporting/graph_viewer.php,
|
||||
general/header.php,
|
||||
godmode/servers/modificar_server.php,
|
||||
godmode/reporting/visual_console_builder.wizard.php,
|
||||
godmode/reporting/graph_builder.main.php,
|
||||
godmode/reporting/visual_console_builder.php,
|
||||
godmode/reporting/visual_console_builder.elements.php,
|
||||
godmode/reporting/graph_builder.php,
|
||||
godmode/reporting/graph_builder.graph_editor.php,
|
||||
godmode/reporting/reporting_builder.php,
|
||||
godmode/reporting/visual_console_builder.editor.php,
|
||||
godmode/reporting/map_builder.php,
|
||||
godmode/reporting/graphs.php: Merged changes in menu structure
|
||||
from 4.0.2 to trunk version
|
||||
|
||||
2012-04-02 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||
|
||||
* include/functions_api.php: Added new functions
|
||||
|
|
|
@ -88,7 +88,7 @@ config_check();
|
|||
echo '<td width="20%">';
|
||||
|
||||
if ($config["metaconsole"] == 0){
|
||||
echo '<a class="white_bold" href="index.php?sec=estado_server&sec2=operation/servers/view_server&refr=60">';
|
||||
echo '<a class="white_bold" href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60">';
|
||||
|
||||
$servers["all"] = (int) db_get_value ('COUNT(id_server)','tserver');
|
||||
$servers["up"] = (int) servers_check_status ();
|
||||
|
|
|
@ -99,14 +99,14 @@ if(count($module_array) > 0){
|
|||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<table><tr>";
|
||||
$new_weight = $weight_array[$a]-0.125;
|
||||
echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/down.png', true, array ('title' => __('Decrease Weight')))."</a></td>";
|
||||
echo "<td align='center'><a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/down.png', true, array ('title' => __('Decrease Weight')))."</a></td>";
|
||||
echo "<td align='center'>$weight_array[$a]</td>";
|
||||
$new_weight = $weight_array[$a]+0.125;
|
||||
echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/up.png', true, array ('title' => __('Increase Weight')))."</a></td>";
|
||||
echo "<td align='center'><a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/up.png', true, array ('title' => __('Increase Weight')))."</a></td>";
|
||||
echo "</tr></table>";
|
||||
echo "</td>";
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id ."&delete=" . $idgs_array[$a] . "'>".html_print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>";
|
||||
echo "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id ."&delete=" . $idgs_array[$a] . "'>".html_print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>";
|
||||
|
||||
echo "</td></tr>";
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ if(count($module_array) > 0){
|
|||
//Configuration form
|
||||
|
||||
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
|
||||
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=" . $id . "'>";
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=" . $id . "'>";
|
||||
|
||||
echo "<table width='98%' cellpadding='4' cellpadding='4' class='databox_color'>";
|
||||
echo "<tr>";
|
||||
|
|
|
@ -89,9 +89,9 @@ else {
|
|||
echo "<table width='98%' cellpadding=4 cellspacing=4 class='databox_color'>";
|
||||
|
||||
if ($edit_graph)
|
||||
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&update_graph=1&id=" . $id_graph . "'>";
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&update_graph=1&id=" . $id_graph . "'>";
|
||||
else
|
||||
echo "<form method='post' action='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&add_graph=1'>";
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&add_graph=1'>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td class='datos'><b>".__('Name')."</b></td>";
|
||||
|
|
|
@ -161,10 +161,10 @@ if($change_weight){
|
|||
if($edit_graph) {
|
||||
$buttons = array(
|
||||
'main' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' .
|
||||
html_print_image("images/setup.png", true, array ("title" => __('Setup'))) .'</a>'),
|
||||
'graph_editor' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' .
|
||||
html_print_image("images/config.png", true, array ("title" => __('Graph editor'))) .'</a>'),
|
||||
'view' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id=' . $id_graph . '">' .
|
||||
|
|
|
@ -20,7 +20,7 @@ require_once ('include/functions_custom_graphs.php');
|
|||
// Check user credentials
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "IW")) {
|
||||
if (! check_acl ($config['id_user'], 0, "IR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Inventory Module Management");
|
||||
require ("general/noaccess.php");
|
||||
|
@ -65,7 +65,7 @@ $id = (int) get_parameter ('id');
|
|||
$multiple_delete = (bool)get_parameter('multiple_delete', 0);
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('Graphs management'), "", false, "", true, $buttons);
|
||||
ui_print_page_header (__('Reporting')." » ".__('Custom graphs'), "images/reporting", false, "");
|
||||
|
||||
// Delete module SQL code
|
||||
if ($delete_graph) {
|
||||
|
@ -141,22 +141,19 @@ if (! empty ($graphs)) {
|
|||
$table->width = '98%';
|
||||
$tale->class = 'databox_frame';
|
||||
$table->align = array ();
|
||||
$table->align[0] = 'center';
|
||||
$table->align[3] = 'right';
|
||||
$table->align[4] = 'center';
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('View');
|
||||
$table->head[1] = __('Graph name');
|
||||
$table->head[2] = __('Description');
|
||||
$table->head[3] = __('Number of Graphs');
|
||||
$table->head[4] = __('Group');
|
||||
$table->size[0] = '20px';
|
||||
$table->size[3] = '125px';
|
||||
$table->size[4] = '50px';
|
||||
$table->head[0] = __('Graph name');
|
||||
$table->head[1] = __('Description');
|
||||
$table->head[2] = __('Number of Graphs');
|
||||
$table->head[3] = __('Group');
|
||||
$table->size[2] = '125px';
|
||||
$table->size[3] = '50px';
|
||||
$table->align[2] = 'center';
|
||||
$table->align[3] = 'center';
|
||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||
$table->align[5] = 'center';
|
||||
$table->head[5] = __('Delete'). html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();');
|
||||
$table->size[5] = '60px';
|
||||
$table->align[4] = 'center';
|
||||
$table->head[4] = __('Op.');
|
||||
$table->size[4] = '50px';
|
||||
}
|
||||
$table->data = array ();
|
||||
|
||||
|
@ -164,16 +161,20 @@ if (! empty ($graphs)) {
|
|||
$data = array ();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.
|
||||
$graph['id_graph'].'">' . html_print_image('images/eye.png', true) . "</a>" . '</a>';
|
||||
$data[1] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.
|
||||
$graph['id_graph'].'">'.$graph['name'].'</a>';
|
||||
$data[2] = $graph["description"];
|
||||
$graph['id_graph'].'">' . $graph['name'] . '</a>';
|
||||
|
||||
$data[3] = $graph["graphs_count"];
|
||||
$data[4] = ui_print_group_icon($graph['id_group'],true);
|
||||
$data[1] = $graph["description"];
|
||||
|
||||
$data[2] = $graph["graphs_count"];
|
||||
$data[3] = ui_print_group_icon($graph['id_group'],true);
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||
$data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graphs&delete_graph=1&id='
|
||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.
|
||||
$graph['id_graph'].'">'.html_print_image("images/config.png", true).'</a>';
|
||||
|
||||
$data[4] .= ' ';
|
||||
|
||||
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='
|
||||
.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||
return false;">' . html_print_image("images/cross.png", true) . '</a>' .
|
||||
html_print_checkbox_extended ('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete"', true);
|
||||
|
@ -194,11 +195,13 @@ else {
|
|||
echo "<div class='nf'>".__('There are no defined reportings')."</div>";
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/graph_builder">';
|
||||
echo '<div class="action-buttons" style="width: 98%;">';
|
||||
html_print_submit_button (__('Create graph'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||
echo '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/graph_builder">';
|
||||
echo '<div class="action-buttons" style="width: 98%;">';
|
||||
html_print_submit_button (__('Create graph'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -17,7 +17,7 @@ global $config;
|
|||
|
||||
require_once ('include/functions_visual_map.php');
|
||||
|
||||
ui_print_page_header (__('Visual console builder'), "", false, "map_builder", true);
|
||||
ui_print_page_header (__('Reporting').' » '.__('Visual Console'), "images/reporting.png", false, "map_builder");
|
||||
|
||||
$id_layout = (int) get_parameter ('id_layout');
|
||||
$copy_layout = (bool) get_parameter ('copy_layout');
|
||||
|
@ -135,8 +135,13 @@ $table->head = array ();
|
|||
$table->head[0] = __('Map name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('Items');
|
||||
$table->head[3] = __('Copy');
|
||||
$table->head[4] = __('Delete');
|
||||
|
||||
//Only for IW flag
|
||||
if(check_acl ($config['id_user'], 0, "IW")) {
|
||||
$table->head[3] = __('Copy');
|
||||
$table->head[4] = __('Delete');
|
||||
}
|
||||
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
$table->align[2] = 'center';
|
||||
|
@ -152,20 +157,24 @@ else
|
|||
|
||||
if (!$maps) {
|
||||
echo '<div class="nf">'.('No maps defined').'</div>';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($maps as $map) {
|
||||
if (check_acl ($config['id_user'], $map['id_group'], "IW")) {
|
||||
$data = array ();
|
||||
$data[0] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&action=edit&id_visual_console='.$map['id'].'">'.$map['name'].'</a>';
|
||||
|
||||
$data[1] = ui_print_group_icon ($map['id_group'], true);
|
||||
$data[2] = db_get_sql ("SELECT COUNT(*) FROM tlayout_data WHERE id_layout = ".$map['id']);
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.
|
||||
$map['id'].'&refr=' . $refr . '">'.$map['name'].'</a>';
|
||||
|
||||
$data[3] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
|
||||
$data[4] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">'.html_print_image ("images/cross.png", true).'</a>';
|
||||
array_push ($table->data, $data);
|
||||
$data[1] = ui_print_group_icon ($map['id_group'], true);
|
||||
$data[2] = db_get_sql ("SELECT COUNT(*) FROM tlayout_data WHERE id_layout = ".$map['id']);
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
|
||||
$data[3] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
|
||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">'.html_print_image ("images/cross.png", true).'</a>';
|
||||
}
|
||||
array_push ($table->data, $data);
|
||||
|
||||
}
|
||||
html_print_table ($table);
|
||||
}
|
||||
|
@ -175,9 +184,13 @@ if (!$maps) {
|
|||
else {
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
}
|
||||
echo '<form action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder" method="post">';
|
||||
html_print_input_hidden ('edit_layout', 1);
|
||||
html_print_submit_button (__('Create'), '', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
|
||||
//Only for IW flag
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
echo '<form action="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder" method="post">';
|
||||
html_print_input_hidden ('edit_layout', 1);
|
||||
html_print_submit_button (__('Create'), '', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
@ -25,6 +25,9 @@ if (! check_acl ($config['id_user'], 0, "IW")) {
|
|||
|
||||
require_once ("include/functions_reports.php");
|
||||
|
||||
// Load enterprise extensions
|
||||
enterprise_include ('operation/reporting/custom_reporting.php');
|
||||
|
||||
$enterpriseEnable = false;
|
||||
if (enterprise_include_once('include/functions_reporting.php') !== ENTERPRISE_NOT_HOOK) {
|
||||
$enterpriseEnable = true;
|
||||
|
@ -155,7 +158,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
// Report LIST
|
||||
ui_print_page_header (__('Reporting') . $subsection, "images/reporting_edit.png", false, "", true, $buttons);
|
||||
ui_print_page_header (__('Reporting').' » '.__('Custom reporting'), "images/reporting.png", false, "");
|
||||
|
||||
if ($action == 'delete_report') {
|
||||
$result = reports_delete_report ($idReport);
|
||||
|
@ -176,7 +179,8 @@ switch ($action) {
|
|||
$return_all_group = false;
|
||||
|
||||
$reports = reports_get_reports (array ('order' => 'name'),
|
||||
array ('name', 'id_report', 'description', 'private', 'id_user', 'id_group'), $return_all_group, 'IW');
|
||||
array ('name', 'id_report', 'description', 'private', 'id_user', 'id_group'), $return_all_group, 'IR');
|
||||
|
||||
$table->width = '0px';
|
||||
if (sizeof ($reports)) {
|
||||
$table->id = 'report_list';
|
||||
|
@ -189,43 +193,91 @@ switch ($action) {
|
|||
$table->data = array ();
|
||||
$table->head[0] = __('Report name');
|
||||
$table->head[1] = __('Description');
|
||||
$table->head[2] = __('Private');
|
||||
$table->head[3] = __('Group');
|
||||
$table->head[4] = '<span title="Operations">' . __('Op.') . '</span>';
|
||||
$table->size = array ();
|
||||
$table->size[4] = '60px';
|
||||
$table->head[2] = __('HTML');
|
||||
$table->head[3] = __('XML');
|
||||
|
||||
$next = 4;
|
||||
//Calculate dinamically the number of the column
|
||||
if (enterprise_hook ('load_custom_reporting_1') !== ENTERPRISE_NOT_HOOK) {
|
||||
$next = 6;
|
||||
}
|
||||
|
||||
//Admin options only for IW flag
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
|
||||
$table->head[$next] = __('Private');
|
||||
$table->size[$next] = '40px';
|
||||
$table->align[$next] = 'center';
|
||||
$next++;
|
||||
$table->head[$next] = __('Group');
|
||||
$table->align[$next] = 'center';
|
||||
$next++;
|
||||
$table->head[$next] = '<span title="Operations">' . __('Op.') . '</span>';
|
||||
$table->size = array ();
|
||||
$table->size[$next] = '60px';
|
||||
|
||||
}
|
||||
|
||||
foreach ($reports as $report) {
|
||||
|
||||
if (!is_user_admin ($config["id_user"])){
|
||||
if ($report["private"] && $report["id_user"] != $config['id_user'])
|
||||
if (!check_acl ($config["id_user"], $report["id_group"], "AW"))
|
||||
if (!check_acl ($config["id_user"], $report["id_group"], "AR"))
|
||||
continue;
|
||||
if (!check_acl ($config["id_user"], $report["id_group"], "AW"))
|
||||
if (!check_acl ($config["id_user"], $report["id_group"], "AR"))
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = array ();
|
||||
$data[0] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report='.
|
||||
$report['id_report'].'">'.$report['name'].'</a>';
|
||||
$data[1] = $report['description'];
|
||||
if ($report["private"] == 1)
|
||||
$data[2] = __('Yes');
|
||||
else
|
||||
$data[2] = __('No');
|
||||
|
||||
$data[3] = ui_print_group_icon($report['id_group'], true);
|
||||
$data[4] = '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&action=edit" style="display:inline">';
|
||||
$data[4] .= html_print_input_hidden ('id_report', $report['id_report'], true);
|
||||
$data[4] .= html_print_input_image ('edit', 'images/config.png', 1, '', true, array ('title' => __('Edit')));
|
||||
$data[4] .= '</form>';
|
||||
if (check_acl ($config["id_user"], $report["id_group"], "AW")) {
|
||||
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report='.
|
||||
$report['id_report'].'">'.$report['name'].'</a>';
|
||||
|
||||
$data[4] .= ' <form method="post" style="display:inline" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
$data[4] .= html_print_input_hidden ('id_report', $report['id_report'], true);
|
||||
$data[4] .= html_print_input_hidden ('action','delete_report', true);
|
||||
$data[4] .= html_print_input_image ('delete', 'images/cross.png', 1, '',
|
||||
true, array ('title' => __('Delete')));
|
||||
$data[4] .= '</form>';
|
||||
} else {
|
||||
$data[0] = $report['name'];
|
||||
}
|
||||
|
||||
|
||||
$data[1] = $report['description'];
|
||||
|
||||
$data[2] = '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'">' .
|
||||
html_print_image("images/reporting.png", true) . '</a>';
|
||||
$data[3] = '<a href="ajax.php?page=operation/reporting/reporting_xml&id='.$report['id_report'].'">' . html_print_image("images/database_lightning.png", true) . '</a>'; //I chose ajax.php because it's supposed to give XML anyway
|
||||
|
||||
|
||||
//Calculate dinamically the number of the column
|
||||
$next = 4;
|
||||
if (enterprise_hook ('load_custom_reporting_2') !== ENTERPRISE_NOT_HOOK) {
|
||||
$next = 6;
|
||||
}
|
||||
|
||||
//Admin options only for IW flag
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
if ($report["private"] == 1)
|
||||
$data[$next] = __('Yes');
|
||||
else
|
||||
$data[$next] = __('No');
|
||||
|
||||
$next++;
|
||||
|
||||
|
||||
$data[$next] = ui_print_group_icon($report['id_group'], true);
|
||||
$next++;
|
||||
|
||||
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit" style="display:inline">';
|
||||
$data[$next] .= html_print_input_hidden ('id_report', $report['id_report'], true);
|
||||
$data[$next] .= html_print_input_image ('edit', 'images/config.png', 1, '', true, array ('title' => __('Edit')));
|
||||
$data[$next] .= '</form>';
|
||||
|
||||
$data[$next] .= ' <form method="post" style="display:inline" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
$data[$next] .= html_print_input_hidden ('id_report', $report['id_report'], true);
|
||||
$data[$next] .= html_print_input_hidden ('action','delete_report', true);
|
||||
$data[$next] .= html_print_input_image ('delete', 'images/cross.png', 1, '',
|
||||
true, array ('title' => __('Delete')));
|
||||
$data[$next] .= '</form>';
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
||||
|
@ -235,11 +287,14 @@ switch ($action) {
|
|||
echo "<div class='nf'>".__('There are no defined reportings')."</div>";
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new">';
|
||||
echo '<div class="action-buttons" style="width: 98%;">';
|
||||
html_print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
echo '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new">';
|
||||
echo '<div class="action-buttons" style="width: 98%;">';
|
||||
html_print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case 'new':
|
||||
|
@ -826,13 +881,13 @@ if ($enterpriseEnable) {
|
|||
|
||||
$buttons = array(
|
||||
'main' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/reporting_edit.png", true, array ("title" => __('Main'))) .'</a>'),
|
||||
'list_items' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/god6.png", true, array ("title" => __('List items'))) .'</a>'),
|
||||
'item_editor' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/config.png", true, array ("title" => __('Item editor'))) .'</a>')
|
||||
);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ echo '<div id="editor" style="margin-top: -10px;">';
|
|||
echo '</div>';
|
||||
echo '<div style="clear: right; margin-bottom: 10px;"></div>';
|
||||
|
||||
echo "<form id='form_visual_map' method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
|
||||
echo "<form id='form_visual_map' method='post' action='index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
|
||||
html_print_input_hidden('action', 'update');
|
||||
$background = $visualConsole['background'];
|
||||
$widthBackground = $visualConsole['width'];
|
||||
|
|
|
@ -150,7 +150,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true);
|
||||
|
||||
//Delete row button
|
||||
$table->data[$i + 1][5] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' .
|
||||
$table->data[$i + 1][5] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=' .
|
||||
$activeTab . '&action=delete&id_visual_console=' . $visualConsole["id"] . '&id_element=' . $idLayoutData . '" ' .
|
||||
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' . html_print_image('images/cross.png', true) . '</a>';
|
||||
|
||||
|
@ -208,7 +208,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
}
|
||||
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '">';
|
||||
echo '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '">';
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_input_hidden ('action', 'update');
|
||||
html_print_input_hidden ('id_visual_console', $visualConsole["id"]);
|
||||
|
|
|
@ -242,19 +242,19 @@ switch ($activeTab) {
|
|||
|
||||
$buttons = array(
|
||||
'data' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=data&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
html_print_image ("images/god9.png", true, array ("title" => __('Data'))) .'</a>'),
|
||||
'list_elements' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=list_elements&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=list_elements&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
html_print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'),
|
||||
'wizard' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=wizard&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=wizard&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'),
|
||||
'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 . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&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>'),
|
||||
'view' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=60">' .
|
||||
'text' => '<a href="index.php?sec=reporting&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){
|
||||
|
@ -265,8 +265,8 @@ if ($action == 'new' || $idVisualConsole === false){
|
|||
}
|
||||
|
||||
$buttons[$activeTab]['active'] = true;
|
||||
|
||||
ui_print_page_header(__('Visual console builder') . " " . $visualConsoleName, "", false, "visual_console_editor_" . $activeTab . "_tab", true, $buttons);
|
||||
|
||||
ui_print_page_header(__('Visual console') . " » " . $visualConsoleName, "images/reporting_edit", false, "visual_console_editor_" . $activeTab . "_tab", true, $buttons);
|
||||
|
||||
//The source code for PAINT THE PAGE
|
||||
if ($statusProcessInDB !== null) {
|
||||
|
|
|
@ -126,7 +126,7 @@ $label_type = array ('agent_module' => __('Agent - Module'),
|
|||
$table->data["all_5"][1] = html_print_select ($label_type, 'label_type', 'agent_module', '', '', '', true);
|
||||
|
||||
echo '<form method="post"
|
||||
action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '"
|
||||
action="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '"
|
||||
onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">';
|
||||
$table->size[0] = "20%";
|
||||
$table->size[1] = "80%";
|
||||
|
|
|
@ -53,8 +53,9 @@ if (isset($_GET["server"])) {
|
|||
|
||||
}
|
||||
else {
|
||||
ui_print_page_header (__('Manage servers'), "", false, "servers", true);
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('Pandora servers'), "", false, "servers", true);
|
||||
|
||||
if (isset ($_GET["delete"])) {
|
||||
$id_server = get_parameter_get ("server_del");
|
||||
|
||||
|
@ -82,89 +83,104 @@ else {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$servers = servers_get_info ();
|
||||
if ($servers !== false) {
|
||||
$table->width = "98%";
|
||||
$table->class = "databox";
|
||||
$table->data = array ();
|
||||
if ($servers === false) {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
return;
|
||||
}
|
||||
|
||||
$table->width = '98%';
|
||||
$table->size = array ();
|
||||
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
$table->align[8] = 'center';
|
||||
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Status');
|
||||
$table->head[2] = __('Type');
|
||||
$table->head[3] = __('Load') . ui_print_help_tip (__("Modules running on this server / Total modules of this type"), true);
|
||||
$table->head[4] = __('Modules');
|
||||
$table->head[5] = __('Lag') . ui_print_help_tip (__("Modules delayed / Max. Delay (sec)"), true);
|
||||
$table->head[6] = __('T/Q') . ui_print_help_tip (__("Threads / Queued modules currently"), true);
|
||||
// This will have a column of data such as "6 hours"
|
||||
$table->head[7] = __('Updated');
|
||||
|
||||
//Only Pandora Administrator can delete servers
|
||||
if (check_acl ($config["id_user"], 0, "PM")) {
|
||||
$table->head[8] = '<span title="Operations">' . __('Op.') . '</span>';
|
||||
}
|
||||
|
||||
$table->data = array ();
|
||||
|
||||
|
||||
foreach ($servers as $server) {
|
||||
$data = array ();
|
||||
|
||||
$table->align = array ();
|
||||
$table->align[1] = "center";
|
||||
$table->align[2] = "center";
|
||||
$table->align[3] = "center";
|
||||
$table->align[4] = "center";
|
||||
$table->align[5] = "center";
|
||||
$table->align[6] = "left";
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Status');
|
||||
$table->head[2] = __('Description');
|
||||
$table->head[3] = __('Type');
|
||||
$table->head[4] = __('Started');
|
||||
$table->head[5] = __('Updated');
|
||||
$data[0] = '<span title="'.$server['version'].'">'.$server['name'].'</span>';
|
||||
$data[0] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server["id_server"].'">'.$server["name"].'</a>';
|
||||
|
||||
$table->size = array();
|
||||
$table->size[6] = '50px';
|
||||
if ($server['status'] == 0) {
|
||||
$data[1] = ui_print_status_image (STATUS_SERVER_DOWN, '', true);
|
||||
}
|
||||
else {
|
||||
$data[1] = ui_print_status_image (STATUS_SERVER_OK, '', true);
|
||||
}
|
||||
|
||||
// Type
|
||||
$data[2] = '<span style="white-space:nowrap;">'.$server["img"].'</span> ('.ucfirst($server["type"]).")";
|
||||
if ($server["master"] == 1)
|
||||
$data[2] .= ui_print_help_tip (__("This is a master server"), true);
|
||||
|
||||
// Load
|
||||
$data[3] =
|
||||
progress_bar($server["load"], 60, 20, $server["lag_txt"], 0);
|
||||
$data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"];
|
||||
$data[5] = '<span style="white-space:nowrap;">'.$server["lag_txt"].'</span>';
|
||||
$data[6] = $server['threads'].' : '.$server['queued_modules'];
|
||||
$data[7] = ui_print_timestamp ($server['keepalive'], true);
|
||||
|
||||
//Only Pandora Administrator can delete servers
|
||||
if (check_acl ($config["id_user"], 0, "PM")) {
|
||||
$table->head[6] = '<span title="Operations">' . __('Op.') . '</span>';
|
||||
}
|
||||
$data[8] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server["id_server"].'">';
|
||||
$data[8] .= html_print_image ('images/config.png', true, array ('title' => __('Edit')));
|
||||
$data[8] .= '</a>';
|
||||
|
||||
foreach ($servers as $server) {
|
||||
if ($server['status'] == 0) {
|
||||
$server_status = ui_print_status_image (STATUS_SERVER_DOWN, '', true);
|
||||
} else {
|
||||
$server_status = ui_print_status_image (STATUS_SERVER_OK, '', true);
|
||||
}
|
||||
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server["id_server"].'">'.$server["name"].'</a>';
|
||||
$data[1] = $server_status;
|
||||
$data[2] = ui_print_string_substr ($server["description"], 25, true);
|
||||
$data[3] = $server['img'];
|
||||
$data[4] = human_time_comparation ($server["laststart"]);
|
||||
$data[5] = human_time_comparation ($server["keepalive"]);
|
||||
|
||||
$data[6] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server["id_server"].'">';
|
||||
$data[6] .= html_print_image ('images/config.png', true, array ('title' => __('Edit')));
|
||||
$data[6] .= '</a>';
|
||||
|
||||
//Only Pandora Administrator can delete servers
|
||||
if (check_acl ($config["id_user"], 0, "PM")) {
|
||||
$data[6] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server["id_server"].'&delete=1">';
|
||||
$data[6] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" . __('Modules run by this server will stop working. Do you want to continue?') ."')) return false"));
|
||||
$data[6] .= '</a>';
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
html_print_table ($table);
|
||||
$data[8] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server["id_server"].'&delete=1">';
|
||||
$data[8] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" . __('Modules run by this server will stop working. Do you want to continue?') ."')) return false"));
|
||||
$data[8] .= '</a>';
|
||||
}
|
||||
|
||||
//Legend
|
||||
echo "<table>";
|
||||
echo "<tr><td colspan='5'>" . __('Legend') . "</td></tr>";
|
||||
echo "<tr>";
|
||||
echo '<td><span class="net">'.__('Network server').'</span></td>';
|
||||
echo '<td><span class="master">'.__('Master').'</span></td>';
|
||||
echo '<td><span class="data">'.__('Data server').'</span></td>';
|
||||
echo '<td><span class="binary">'.__('MD5 check').'</span></td>';
|
||||
echo '<td><span class="snmp">'.__('SNMP console').'</span></td>';
|
||||
echo '<td><span class="plugin">'.__('Plugin server').'</span></td>';
|
||||
echo "</tr><tr>";
|
||||
echo '<td><span class="recon_server">'.__('Recon server').'</span></td>';
|
||||
echo '<td><span class="wmi_server">'.__('WMI server').'</span></td>';
|
||||
echo '<td><span class="export_server">'.__('Export server').'</span></td>';
|
||||
echo '<td><span class="inventory_server">'.__('Inventory server').'</span></td>';
|
||||
echo '<td><span class="web_server">'.__('Web server').'</span></td>';
|
||||
echo '<td><span class="prediction">'.__('Prediction server').'</span></td>';
|
||||
echo "</tr></table>";
|
||||
} else {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
html_print_table ($table);
|
||||
|
||||
//Legend
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr><td colspan='5'>" . __('Legend') . "</td></tr>";
|
||||
echo "<tr>";
|
||||
echo '<td><span class="net">'.__('Network server').'</span></td>';
|
||||
echo '<td><span class="master">'.__('Master').'</span></td>';
|
||||
echo '<td><span class="data">'.__('Data server').'</span></td>';
|
||||
echo '<td><span class="binary">'.__('MD5 check').'</span></td>';
|
||||
echo '<td><span class="snmp">'.__('SNMP console').'</span></td>';
|
||||
echo '<td><span class="plugin">'.__('Plugin server').'</span></td>';
|
||||
echo "</tr><tr>";
|
||||
echo '<td><span class="recon_server">'.__('Recon server').'</span></td>';
|
||||
echo '<td><span class="wmi_server">'.__('WMI server').'</span></td>';
|
||||
echo '<td><span class="export_server">'.__('Export server').'</span></td>';
|
||||
echo '<td><span class="inventory_server">'.__('Inventory server').'</span></td>';
|
||||
echo '<td><span class="web_server">'.__('Web server').'</span></td>';
|
||||
echo '<td><span class="prediction">'.__('Prediction server').'</span></td>';
|
||||
echo "</tr></table>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -171,31 +171,31 @@ if($recenter_networkmap) {
|
|||
/* Main code */
|
||||
if ($pure == 1) {
|
||||
$buttons['screen'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&tab='.$activeTab.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab='.$activeTab.'">' .
|
||||
html_print_image("images/normalscreen.png", true, array ('title' => __('Normal screen'))) .'</a>');
|
||||
|
||||
} else {
|
||||
$buttons['screen'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&pure=1&tab='.$activeTab.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&pure=1&tab='.$activeTab.'">' .
|
||||
html_print_image("images/fullscreen.png", true, array ('title' => __('Full screen'))) .'</a>');
|
||||
}
|
||||
if($config['enterprise_installed']) {
|
||||
$buttons['policies'] = array('active' => $activeTab == 'policies',
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&tab=policies&pure='.$pure.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=policies&pure='.$pure.'">' .
|
||||
html_print_image("images/policies.png", true, array ("title" => __('Policies view'))) .'</a>');
|
||||
}
|
||||
|
||||
$buttons['groups'] = array('active' => $activeTab == 'groups',
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&tab=groups&pure='.$pure.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=groups&pure='.$pure.'">' .
|
||||
html_print_image("images/group.png", true, array ("title" => __('Groups view'))) .'</a>');
|
||||
|
||||
$buttons['topology'] = array('active' => $activeTab == 'topology',
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&tab=topology&pure='.$pure.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=topology&pure='.$pure.'">' .
|
||||
html_print_image("images/recon.png", true, array ("title" => __('Topology view'))) .'</a>');
|
||||
|
||||
$buttons['separator'] = array('separator' => '');
|
||||
|
||||
$combolist = '<form name="query_sel" method="post" action="index.php?sec=estado&sec2=operation/agentes/networkmap">';
|
||||
$combolist = '<form name="query_sel" method="post" action="index.php?sec=network&sec2=operation/agentes/networkmap">';
|
||||
|
||||
$combolist .= html_print_select($networkmaps, 'id_networkmap', $id_networkmap, 'onchange:this.form.submit()', __('No selected'), 0, true, false, false, '', false, 'margin-top:4px; margin-left:3px; width:150px;');
|
||||
|
||||
|
@ -206,16 +206,16 @@ $combolist .= '</form>';
|
|||
$buttons['combolist'] = $combolist;
|
||||
|
||||
$buttons['addmap'] = array('active' => $activeTab == false,
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&add_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&add_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
html_print_image("images/add.png", true, array ("title" => __('Add map'))) .'</a>');
|
||||
|
||||
if(!$nomaps && $id_networkmap != 0) {
|
||||
$buttons['deletemap'] = array('active' => $activeTab == false,
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&delete_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&delete_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||
html_print_image("images/cross.png", true, array ("title" => __('Delete map'))) .'</a>');
|
||||
|
||||
$buttons['savemap'] = array('active' => $activeTab == false,
|
||||
'text' => '<a href="index.php?sec=estado&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&save_networkmap=1
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&save_networkmap=1
|
||||
&tab='.$activeTab.'&save_networkmap=1&name='.$name.'&group='.$group.'
|
||||
&layout='.$layout.'&nooverlap='.$nooverlap.'&simple='.$simple.'&regen='.$regen.'
|
||||
&zoom='.$zoom.'&ranksep='.$ranksep.'&fontsize='.$font_size.'&depth='.$depth.'
|
||||
|
@ -264,7 +264,7 @@ $layout_array = array (
|
|||
'spring2' => 'spring 2',
|
||||
'flat' => 'flat');
|
||||
|
||||
$options_form = '<form action="index.php?sec=estado&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&tab='.$activeTab.'&pure='.$pure.'&center='.$center.'" method="post">';
|
||||
$options_form = '<form action="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&tab='.$activeTab.'&pure='.$pure.'&center='.$center.'" method="post">';
|
||||
$options_form .= '<table cellpadding="4" cellspacing="4" class="databox" width="99%">';
|
||||
$options_form .= '<tr><td>';
|
||||
$options_form .= '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
||||
|
|
|
@ -30,11 +30,9 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
|
||||
enterprise_hook ('metaconsole_menu');
|
||||
enterprise_hook ('dashboard_menu');
|
||||
enterprise_hook ('services_menu');
|
||||
enterprise_hook ('networkmap_console');
|
||||
|
||||
//View agents
|
||||
$menu["estado"]["text"] = __('View agents');
|
||||
$menu["estado"]["text"] = __('Monitoring');
|
||||
$menu["estado"]["sec2"] = "operation/agentes/tactical";
|
||||
$menu["estado"]["refr"] = 0;
|
||||
$menu["estado"]["id"] = "oper-agents";
|
||||
|
@ -46,8 +44,6 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub["operation/agentes/group_view"]["text"] = __('Group view');
|
||||
$sub["operation/agentes/group_view"]["refr"] = 0;
|
||||
|
||||
$sub["operation/agentes/networkmap"]["text"] = __('Network map');
|
||||
|
||||
$sub["operation/agentes/estado_agente"]["text"] = __('Agent detail');
|
||||
$sub["operation/agentes/estado_agente"]["refr"] = 0;
|
||||
|
||||
|
@ -57,12 +53,110 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub["operation/agentes/status_monitor"]["text"] = __('Monitor detail');
|
||||
$sub["operation/agentes/status_monitor"]["refr"] = 0;
|
||||
|
||||
$sub["operation/agentes/exportdata"]["text"] = __('Export data');
|
||||
$sub["operation/agentes/exportdata"]["refr"] = 0;
|
||||
|
||||
enterprise_hook ('services_menu');
|
||||
|
||||
enterprise_hook ('inventory_menu');
|
||||
|
||||
$sub["operation/servers/recon_view"]["text"] = __('Recon View');
|
||||
$sub["operation/servers/recon_view"]["refr"] = 0;
|
||||
|
||||
$menu["estado"]["sub"] = $sub;
|
||||
//End of view agents
|
||||
|
||||
//Start network view
|
||||
|
||||
$menu["network"]["text"] = __('Network View');
|
||||
$menu["network"]["sec2"] = "operation/agentes/networkmap";
|
||||
$menu["network"]["refr"] = 0;
|
||||
$menu["network"]["id"] = "oper-networkconsole";
|
||||
|
||||
$sub = array();
|
||||
|
||||
$sub["operation/agentes/networkmap"]["text"] = __('Network map');
|
||||
$sub["operation/agentes/networkmap"]["refr"] = 0;
|
||||
|
||||
enterprise_hook ('networkmap_console');
|
||||
|
||||
$menu["network"]["sub"] = $sub;
|
||||
//End networkview
|
||||
|
||||
// Reporting
|
||||
$menu["reporting"]["text"] = __('Reporting');
|
||||
$menu["reporting"]["sec2"] = "godmode/reporting/map_builder";
|
||||
$menu["reporting"]["id"] = "oper-reporting";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
//Visual console
|
||||
$sub["godmode/reporting/map_builder"]["text"] = __('Visual console');
|
||||
//Set godomode path
|
||||
$sub["godmode/reporting/map_builder"]["subsecs"] = array("godmode/reporting/map_builder",
|
||||
"godmode/reporting/visual_console_builder");
|
||||
|
||||
if (!empty($config['vc_refr'])){
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['vc_refr'];
|
||||
}
|
||||
else if (!empty($config['refr'])){
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = 60;
|
||||
}
|
||||
|
||||
$sub2 = array ();
|
||||
|
||||
$layouts = db_get_all_rows_in_table ('tlayout', 'name');
|
||||
if ($layouts === false) {
|
||||
$layouts = array ();
|
||||
}
|
||||
$id = (int) get_parameter ('id', -1);
|
||||
|
||||
$firstLetterNameVisualToShow = array('_', ',', '[', '(');
|
||||
|
||||
$sub2 = array();
|
||||
|
||||
foreach ($layouts as $layout) {
|
||||
if (! check_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
$name = io_safe_output($layout['name']);
|
||||
if (empty($name)) {
|
||||
$firstLetter = '';
|
||||
}
|
||||
else {
|
||||
$firstLetter = $name[0];
|
||||
}
|
||||
if (!in_array($firstLetter, $firstLetterNameVisualToShow)) {
|
||||
continue;
|
||||
}
|
||||
$sub2["operation/visual_console/render_view&id=".$layout["id"]]["text"] = mb_substr ($name, 0, 19);
|
||||
$sub2["operation/visual_console/render_view&id=".$layout["id"]]["title"] = $name;
|
||||
if (!empty($config['vc_refr'])){
|
||||
$sub2["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = $config['vc_refr'];
|
||||
}
|
||||
elseif (!empty($config['refr'])){
|
||||
$sub2["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
$sub2["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sub["godmode/reporting/map_builder"]["sub2"] = $sub2;
|
||||
|
||||
$sub["godmode/reporting/reporting_builder"]["text"] = __('Custom reporting');
|
||||
//Set godomode path
|
||||
$sub["godmode/reporting/reporting_builder"]["subsecs"] = array("godmode/reporting/reporting_builder",
|
||||
"operation/reporting/reporting_viewer");
|
||||
|
||||
$sub["godmode/reporting/graphs"]["text"] = __('Custom graphs');
|
||||
//Set godomode path
|
||||
$sub["godmode/reporting/graphs"]["subsecs"] = array("operation/reporting/graph_viewer",
|
||||
"godmode/reporting/graph_builder");
|
||||
|
||||
$menu["reporting"]["sub"] = $sub;
|
||||
//End reporting
|
||||
|
||||
//INI GIS Maps
|
||||
if ($config['activate_gis']) {
|
||||
$menu["gismaps"]["text"] = __('GIS Maps');
|
||||
|
@ -100,90 +194,8 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$menu["gismaps"]["sub"] = $sub;
|
||||
}
|
||||
//END GIS Maps
|
||||
|
||||
//Visual console
|
||||
$menu["visualc"]["text"] = __('Visual console');
|
||||
$menu["visualc"]["sec2"] = "operation/visual_console/index";
|
||||
if (!empty($config['vc_refr'])){
|
||||
$menu["visualc"]["refr"] = $config['vc_refr'];
|
||||
}
|
||||
else if (!empty($config['refr'])){
|
||||
$menu["visualc"]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
$menu["visualc"]["refr"] = 60;
|
||||
}
|
||||
$menu["visualc"]["id"] = "oper-visualc";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$layouts = db_get_all_rows_in_table ('tlayout', 'name');
|
||||
if ($layouts === false) {
|
||||
$layouts = array ();
|
||||
}
|
||||
$id = (int) get_parameter ('id', -1);
|
||||
|
||||
$firstLetterNameVisualToShow = array('_', ',', '[', '(');
|
||||
|
||||
foreach ($layouts as $layout) {
|
||||
if (! check_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
$name = io_safe_output($layout['name']);
|
||||
if (empty($name)) {
|
||||
$firstLetter = '';
|
||||
}
|
||||
else {
|
||||
$firstLetter = $name[0];
|
||||
}
|
||||
if (!in_array($firstLetter, $firstLetterNameVisualToShow)) {
|
||||
continue;
|
||||
}
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["text"] = mb_substr ($name, 0, 19);
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["title"] = $name;
|
||||
if (!empty($config['vc_refr'])){
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = $config['vc_refr'];
|
||||
}
|
||||
elseif (!empty($config['refr'])){
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
$sub["operation/visual_console/render_view&id=".$layout["id"]]["refr"] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$menu["visualc"]["sub"] = $sub;
|
||||
//End of visual console
|
||||
}
|
||||
|
||||
// Agent read, Server read
|
||||
if (check_acl ($config['id_user'], 0, "AR")) {
|
||||
|
||||
// Server view
|
||||
$menu["estado_server"]["text"] = __('Pandora servers');
|
||||
$menu["estado_server"]["sec2"] = "operation/servers/view_server";
|
||||
$menu["estado_server"]["id"] = "oper-servers";
|
||||
|
||||
$sub = array ();
|
||||
// Show all recon servers, and generate menu for details
|
||||
|
||||
$servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3');
|
||||
if ($servers === false) {
|
||||
$servers = array ();
|
||||
}
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
|
||||
foreach ($servers as $serverItem) {
|
||||
$sub["operation/servers/view_server_detail&server_id=".$serverItem["id_server"]]["text"] = ui_print_string_substr($serverItem["name"], 16, true);
|
||||
}
|
||||
|
||||
$menu["estado_server"]["sub"] = $sub;
|
||||
}
|
||||
//End of server view
|
||||
}
|
||||
|
||||
enterprise_hook ('inventory_menu');
|
||||
|
||||
//Incidents
|
||||
if (check_acl ($config['id_user'], 0, "IR") == 1) {
|
||||
$temp_sec2 = $sec2;
|
||||
|
@ -293,18 +305,7 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub["operation/messages/message_edit&new_msg=1"]["text"] = __('New message');
|
||||
|
||||
$menu["messages"]["sub"] = $sub;
|
||||
|
||||
// Reporting
|
||||
$menu["reporting"]["text"] = __('Reporting');
|
||||
$menu["reporting"]["sec2"] = "operation/reporting/custom_reporting";
|
||||
$menu["reporting"]["id"] = "oper-reporting";
|
||||
|
||||
$sub = array ();
|
||||
$sub["operation/reporting/custom_reporting"]["text"] = __('Custom reporting');
|
||||
$sub["operation/reporting/graph_viewer"]["text"] = __('Custom graphs');
|
||||
|
||||
$menu["reporting"]["sub"] = $sub;
|
||||
|
||||
|
||||
// Extensions menu additions
|
||||
if (is_array ($config['extensions'])) {
|
||||
$menu["extensions"]["text"] = __('Extensions');
|
||||
|
@ -312,6 +313,10 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$menu["extensions"]["id"] = "oper-extensions";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$sub["operation/agentes/exportdata"]["text"] = __('Export data');
|
||||
$sub["operation/agentes/exportdata"]["refr"] = 0;
|
||||
|
||||
foreach ($config["extensions"] as $extension) {
|
||||
if ($extension["operation_menu"] == '') {
|
||||
continue;
|
||||
|
|
|
@ -106,7 +106,7 @@ if ($view_graph) {
|
|||
$url = "index.php?sec=reporting&sec2=operation/reporting/graph_viewer&id=$id_graph&view_graph=1";
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
$options['setup'] = "<a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=$id_graph'>"
|
||||
$options['setup'] = "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=$id_graph'>"
|
||||
. html_print_image ("images/setup.png", true, array ("title" => __('Setup')))
|
||||
. "</a>";
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ if ($view_graph) {
|
|||
}
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__('Reporting'). " » ". __('Combined image render'), "images/reporting.png", false, "", false, $options);
|
||||
ui_print_page_header (__('Reporting'). " » ". __('Custom graphs')." - ".$graph['name'], "images/reporting.png", false, "", false, $options);
|
||||
|
||||
echo "<table class='databox_frame' cellpadding='0' cellspacing='0' width='98%'>";
|
||||
echo "<tr><td>";
|
||||
|
|
|
@ -67,7 +67,7 @@ $enable_init_date = get_parameter('enable_init_date', 0);
|
|||
|
||||
$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time";
|
||||
|
||||
$options['setup'] = "<a href='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&action=new&tab=item_editor&id_report=$id_report'>"
|
||||
$options['setup'] = "<a href='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=new&tab=item_editor&id_report=$id_report'>"
|
||||
. html_print_image ("images/setup.png", true, array ("title" => __('Setup')))
|
||||
. "</a>";
|
||||
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
<?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.
|
||||
|
||||
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
require_once ($config["homedir"] . '/include/functions_servers.php');
|
||||
require_once ($config['homedir'] . "/include/functions_network_profiles.php");
|
||||
|
||||
$options = "<li><a href='index.php?sec=estado&sec2=operation/servers/recon_view'>" . html_print_image("images/refresh.png", true) . "</a></li>";
|
||||
|
||||
ui_print_page_header (__('Recon View'), "images/server.png", false, "", false, $options);
|
||||
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access recon task viewer");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$modules_server = 0;
|
||||
$total_modules = 0;
|
||||
$total_modules_data = 0;
|
||||
|
||||
// --------------------------------
|
||||
// FORCE A RECON TASK
|
||||
// --------------------------------
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
if (isset ($_GET["force"])) {
|
||||
$id = (int) get_parameter_get ("force", 0);
|
||||
|
||||
servers_force_recon_task($id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Get all recon servers
|
||||
$servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3');
|
||||
if ($servers === false) {
|
||||
$servers = array ();
|
||||
|
||||
}
|
||||
|
||||
foreach ($servers as $serverItem) {
|
||||
$id_server = $serverItem["id_server"];
|
||||
|
||||
|
||||
$server_name = servers_get_name ($id_server);
|
||||
$recon_tasks = db_get_all_rows_field_filter ("trecon_task", "id_recon_server", $id_server);
|
||||
|
||||
// Show network tasks for Recon Server
|
||||
if ($recon_tasks === false) {
|
||||
$recon_tasks = array ();
|
||||
}
|
||||
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->width = "99%";
|
||||
$table->class = "databox";
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->align = array ();
|
||||
|
||||
$table->head[0] = __('Force');
|
||||
$table->align[0] = "center";
|
||||
|
||||
$table->head[1] = __('Task name');
|
||||
$table->align[1] = "center";
|
||||
|
||||
$table->head[2] = __('Interval');
|
||||
$table->align[2] = "center";
|
||||
|
||||
$table->head[3] = __('Network');
|
||||
$table->align[3] = "center";
|
||||
|
||||
$table->head[4] = __('Status');
|
||||
$table->align[4] = "center";
|
||||
|
||||
$table->head[5] = __('Recon module');
|
||||
$table->align[5] = "center";
|
||||
|
||||
$table->head[6] = __('Progress');
|
||||
$table->align[6] = "center";
|
||||
|
||||
$table->head[7] = __('Updated at');
|
||||
$table->align[7] = "center";
|
||||
|
||||
$table->head[8] = __('Edit');
|
||||
$table->align[8] = "center";
|
||||
|
||||
foreach ($recon_tasks as $task) {
|
||||
$data = array ();
|
||||
|
||||
if($task["disabled"] == 0) {
|
||||
$data[0] = '<a href="index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id='.$id_server.'&force='.$task["id_rt"].'">';
|
||||
$data[0] .= html_print_image ("images/target.png", true, array ("title" => __('Force')));
|
||||
$data[0] .= '</a>';
|
||||
}
|
||||
else {
|
||||
$data[0] = '';
|
||||
}
|
||||
|
||||
$data[1] = '<b>'. $task["name"].'</b>';
|
||||
|
||||
$data[2] = human_time_description_raw ($task["interval_sweep"]);
|
||||
|
||||
if ($task["id_recon_script"] == 0){
|
||||
$data[3] = $task["subnet"];
|
||||
}
|
||||
else {
|
||||
$data[3] = __("N/A");
|
||||
}
|
||||
|
||||
if ($task["status"] <= 0) {
|
||||
$data[4] = __('Done');
|
||||
}
|
||||
else {
|
||||
$data[4] = __('Pending');
|
||||
}
|
||||
|
||||
if ($task["id_recon_script"] == 0){
|
||||
// Network recon task
|
||||
$data[5] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))." ";
|
||||
$data[5] .= network_profiles_get_name ($task["id_network_profile"]);
|
||||
}
|
||||
else {
|
||||
// APP recon task
|
||||
$data[5] = html_print_image ("images/plugin.png", true). " ";
|
||||
$data[5] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $task["id_recon_script"]));
|
||||
}
|
||||
|
||||
if ($task["status"] <= 0 || $task["status"] > 100) {
|
||||
$data[6] = "-";
|
||||
}
|
||||
else {
|
||||
$data[6] = progress_bar($task['status'], 100, 20, __('Progress').':'.$task["status"].'%', 1);
|
||||
}
|
||||
|
||||
$data[7] = ui_print_timestamp ($task["utimestamp"], true);
|
||||
|
||||
if (check_acl ($config["id_user"], $task["id_group"], "PM")) {
|
||||
$data[8] = '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update='.$task["id_rt"].'">'.html_print_image ("images/wrench_orange.png", true).'</a>';
|
||||
}
|
||||
else {
|
||||
$data[8] = '';
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
if (empty ($table->data)) {
|
||||
echo '<div class="nf">'.__("This server has no recon tasks assigned").'</div>';
|
||||
}
|
||||
else {
|
||||
html_print_table ($table);
|
||||
}
|
||||
unset ($table);
|
||||
}
|
||||
?>
|
|
@ -1,115 +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.
|
||||
|
||||
|
||||
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
require_once ("include/functions_servers.php");
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
include_graphs_dependencies();
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "AR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Server view");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__("Pandora servers"), "images/server.png");
|
||||
|
||||
$servers = servers_get_info ();
|
||||
if ($servers === false) {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
return;
|
||||
}
|
||||
|
||||
$table->width = '98%';
|
||||
$table->size = array ();
|
||||
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Status');
|
||||
$table->head[2] = __('Type');
|
||||
$table->head[3] = __('Load') . ui_print_help_tip (__("Modules running on this server / Total modules of this type"), true);
|
||||
$table->head[4] = __('Modules');
|
||||
$table->head[5] = __('Lag') . ui_print_help_tip (__("Modules delayed / Max. Delay (sec)"), true);
|
||||
$table->head[6] = __('T/Q') . ui_print_help_tip (__("Threads / Queued modules currently"), true);
|
||||
// This will have a column of data such as "6 hours"
|
||||
$table->head[7] = __('Updated');
|
||||
$table->data = array ();
|
||||
|
||||
|
||||
foreach ($servers as $server) {
|
||||
$data = array ();
|
||||
$data[0] = '<span title="'.$server['version'].'">'.$server['name'].'</span>';
|
||||
|
||||
if ($server['status'] == 0) {
|
||||
$data[1] = ui_print_status_image (STATUS_SERVER_DOWN, '', true);
|
||||
}
|
||||
else {
|
||||
$data[1] = ui_print_status_image (STATUS_SERVER_OK, '', true);
|
||||
}
|
||||
|
||||
// Type
|
||||
$data[2] = '<span style="white-space:nowrap;">'.$server["img"].'</span> ('.ucfirst($server["type"]).")";
|
||||
if ($server["master"] == 1)
|
||||
$data[2] .= ui_print_help_tip (__("This is a master server"), true);
|
||||
|
||||
// Load
|
||||
$data[3] =
|
||||
progress_bar($server["load"], 60, 20, $server["lag_txt"], 0);
|
||||
$data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"];
|
||||
$data[5] = '<span style="white-space:nowrap;">'.$server["lag_txt"].'</span>';
|
||||
$data[6] = $server['threads'].' : '.$server['queued_modules'];
|
||||
$data[7] = ui_print_timestamp ($server['keepalive'], true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
html_print_table ($table);
|
||||
|
||||
//Legend
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr><td colspan='5'>" . __('Legend') . "</td></tr>";
|
||||
echo "<tr>";
|
||||
echo '<td><span class="net">'.__('Network server').'</span></td>';
|
||||
echo '<td><span class="master">'.__('Master').'</span></td>';
|
||||
echo '<td><span class="data">'.__('Data server').'</span></td>';
|
||||
echo '<td><span class="binary">'.__('MD5 check').'</span></td>';
|
||||
echo '<td><span class="snmp">'.__('SNMP console').'</span></td>';
|
||||
echo '<td><span class="plugin">'.__('Plugin server').'</span></td>';
|
||||
echo "</tr><tr>";
|
||||
echo '<td><span class="recon_server">'.__('Recon server').'</span></td>';
|
||||
echo '<td><span class="wmi_server">'.__('WMI server').'</span></td>';
|
||||
echo '<td><span class="export_server">'.__('Export server').'</span></td>';
|
||||
echo '<td><span class="inventory_server">'.__('Inventory server').'</span></td>';
|
||||
echo '<td><span class="web_server">'.__('Web server').'</span></td>';
|
||||
echo '<td><span class="prediction">'.__('Prediction server').'</span></td>';
|
||||
echo "</tr></table>";
|
||||
|
||||
?>
|
|
@ -1,165 +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.
|
||||
|
||||
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
require_once ($config["homedir"] . '/include/functions_servers.php');
|
||||
require_once ($config['homedir'] . "/include/functions_network_profiles.php");
|
||||
|
||||
$id_server = (int) get_parameter ("server_id", -1);
|
||||
|
||||
$options = "<li><a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=$id_server'>" . html_print_image("images/refresh.png", true) . "</a></li>";
|
||||
|
||||
ui_print_page_header (__('Pandora servers'), "images/server.png", false, "", false, $options);
|
||||
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access recon task viewer");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$modules_server = 0;
|
||||
$total_modules = 0;
|
||||
$total_modules_data = 0;
|
||||
|
||||
// --------------------------------
|
||||
// FORCE A RECON TASK
|
||||
// --------------------------------
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
if (isset ($_GET["force"])) {
|
||||
$id = (int) get_parameter_get ("force", 0);
|
||||
|
||||
servers_force_recon_task($id);
|
||||
}
|
||||
}
|
||||
|
||||
$server_name = servers_get_name ($id_server);
|
||||
$recon_tasks = db_get_all_rows_field_filter ("trecon_task", "id_recon_server", $id_server);
|
||||
|
||||
// Show network tasks for Recon Server
|
||||
if ($recon_tasks === false) {
|
||||
$recon_tasks = array ();
|
||||
}
|
||||
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->width = "99%";
|
||||
$table->class = "databox";
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->align = array ();
|
||||
|
||||
$table->head[0] = __('Force');
|
||||
$table->align[0] = "center";
|
||||
|
||||
$table->head[1] = __('Task name');
|
||||
$table->align[1] = "center";
|
||||
|
||||
$table->head[2] = __('Interval');
|
||||
$table->align[2] = "center";
|
||||
|
||||
$table->head[3] = __('Network');
|
||||
$table->align[3] = "center";
|
||||
|
||||
$table->head[4] = __('Status');
|
||||
$table->align[4] = "center";
|
||||
|
||||
$table->head[5] = __('Recon module');
|
||||
$table->align[5] = "center";
|
||||
|
||||
$table->head[6] = __('Progress');
|
||||
$table->align[6] = "center";
|
||||
|
||||
$table->head[7] = __('Updated at');
|
||||
$table->align[7] = "center";
|
||||
|
||||
$table->head[8] = __('Edit');
|
||||
$table->align[8] = "center";
|
||||
|
||||
foreach ($recon_tasks as $task) {
|
||||
$data = array ();
|
||||
|
||||
if($task["disabled"] == 0) {
|
||||
$data[0] = '<a href="index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id='.$id_server.'&force='.$task["id_rt"].'">';
|
||||
$data[0] .= html_print_image ("images/target.png", true, array ("title" => __('Force')));
|
||||
$data[0] .= '</a>';
|
||||
}
|
||||
else {
|
||||
$data[0] = '';
|
||||
}
|
||||
|
||||
$data[1] = '<b>'. $task["name"].'</b>';
|
||||
|
||||
$data[2] = human_time_description_raw ($task["interval_sweep"]);
|
||||
|
||||
if ($task["id_recon_script"] == 0){
|
||||
$data[3] = $task["subnet"];
|
||||
}
|
||||
else {
|
||||
$data[3] = __("N/A");
|
||||
}
|
||||
|
||||
if ($task["status"] <= 0) {
|
||||
$data[4] = __('Done');
|
||||
}
|
||||
else {
|
||||
$data[4] = __('Pending');
|
||||
}
|
||||
|
||||
if ($task["id_recon_script"] == 0){
|
||||
// Network recon task
|
||||
$data[5] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))." ";
|
||||
$data[5] .= network_profiles_get_name ($task["id_network_profile"]);
|
||||
}
|
||||
else {
|
||||
// APP recon task
|
||||
$data[5] = html_print_image ("images/plugin.png", true). " ";
|
||||
$data[5] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $task["id_recon_script"]));
|
||||
}
|
||||
|
||||
if ($task["status"] <= 0 || $task["status"] > 100) {
|
||||
$data[6] = "-";
|
||||
}
|
||||
else {
|
||||
$data[6] = progress_bar($task['status'], 100, 20, __('Progress').':'.$task["status"].'%', 1);
|
||||
}
|
||||
|
||||
$data[7] = ui_print_timestamp ($task["utimestamp"], true);
|
||||
|
||||
if (check_acl ($config["id_user"], $task["id_group"], "PM")) {
|
||||
$data[8] = '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update='.$task["id_rt"].'">'.html_print_image ("images/wrench_orange.png", true).'</a>';
|
||||
}
|
||||
else {
|
||||
$data[8] = '';
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
if (empty ($table->data)) {
|
||||
echo '<div class="nf">'.__("This server has no recon tasks assigned").'</div>';
|
||||
}
|
||||
else {
|
||||
html_print_table ($table);
|
||||
}
|
||||
unset ($table);
|
||||
?>
|
|
@ -1,71 +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
|
||||
check_login ();
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__("Visual console"), "images/monitor.png", false, "operation_visual_console");
|
||||
|
||||
require_once ('include/functions_visual_map.php');
|
||||
require_once ('include/functions_groups.php');
|
||||
|
||||
$refr = get_parameter('refr', $config['vc_refr']);
|
||||
|
||||
$layouts = visual_map_get_user_layouts ();
|
||||
|
||||
$table->width = "98%";
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('Elements');
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
$table->align[2] = 'center';
|
||||
|
||||
$rowPair = true;
|
||||
$iterator = 0;
|
||||
foreach ($layouts as $layout) {
|
||||
if ($rowPair)
|
||||
$table->rowclass[$iterator] = 'rowPair';
|
||||
else
|
||||
$table->rowclass[$iterator] = 'rowOdd';
|
||||
$rowPair = !$rowPair;
|
||||
$iterator++;
|
||||
|
||||
if (!check_acl ($config["id_user"], $layout["id_group"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&id='.
|
||||
$layout['id'].'&refr=' . $refr . '">'.$layout['name'].'</a> ';
|
||||
$data[1] = ui_print_group_icon ($layout["id_group"], true);
|
||||
$data[2] = db_get_value ('COUNT(*)', 'tlayout_data', 'id_layout', $layout['id']);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
if (!empty ($table->data)) {
|
||||
html_print_table ($table);
|
||||
} else {
|
||||
echo '<div class="nf">'.__('No layouts found').'</div>';
|
||||
}
|
||||
unset ($table);
|
||||
|
||||
?>
|
|
@ -64,24 +64,23 @@ 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=editor&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=reporting&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;
|
||||
}
|
||||
|
||||
if ($config["pure"] == 0) {
|
||||
$options['pure']['text'] = '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'&pure=1">'
|
||||
. html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||
$options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'&pure=1">' . html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||
. "</a>";
|
||||
}
|
||||
else {
|
||||
$options['pure']['text'] = '<a href="index.php?sec=visualc&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'">'
|
||||
$options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$config["refr"].'">'
|
||||
. html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
||||
. "</a>";
|
||||
}
|
||||
$options['pure']['active'] = false;
|
||||
|
||||
|
||||
ui_print_page_header (__("Visual console") . " » " . $layout_name, "images/monitor.png", false, '', false, $options);
|
||||
ui_print_page_header (__("Visual console") . " » " . $layout_name, "images/reporting.png", false, '', false, $options);
|
||||
|
||||
visual_map_print_visual_map ($id_layout);
|
||||
|
||||
|
|
Loading…
Reference in New Issue