Change visual of any views
This commit is contained in:
parent
62c940986b
commit
16679256e9
|
@ -28,7 +28,7 @@ check_login ();
|
|||
require_once ("include/functions_reporting.php");
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
|
||||
ui_print_page_header (__('Welcome to Pandora FMS Web Console'));
|
||||
ui_print_page_header (__('Welcome to Pandora FMS Web Console'),'',false,"",false);
|
||||
|
||||
if (tags_has_user_acl_tags()) {
|
||||
ui_print_tags_warning();
|
||||
|
@ -36,7 +36,7 @@ if (tags_has_user_acl_tags()) {
|
|||
|
||||
|
||||
?>
|
||||
<table border="0" width="98%">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="30%" style="padding-right: 10px;" valign="top">
|
||||
|
@ -61,7 +61,13 @@ if (tags_has_user_acl_tags()) {
|
|||
|
||||
// Indicators
|
||||
$tdata = array();
|
||||
$tdata[0] = reporting_get_stats_indicators($data);
|
||||
$stats = reporting_get_stats_indicators($data, 120, 10,false);
|
||||
$status = '<table class="status_tactical">';
|
||||
foreach ( $stats as $stat ) {
|
||||
$status .= '<tr><td><b>' . $stat['title'] . '</b>' . '</td><td>' . $stat['graph'] . "</td></tr>" ;
|
||||
}
|
||||
$status .= '</table>';
|
||||
$table->data[0][0] = $status;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$table->data[] = $tdata;
|
||||
|
@ -74,7 +80,7 @@ if (tags_has_user_acl_tags()) {
|
|||
|
||||
// Modules by status
|
||||
$tdata = array();
|
||||
$tdata[0] = reporting_get_stats_modules_status($data);
|
||||
$tdata[0] = reporting_get_stats_modules_status($data,180, 100);
|
||||
$table->rowclass[] = '';
|
||||
$table->data[] = $tdata;
|
||||
|
||||
|
@ -114,7 +120,7 @@ if (tags_has_user_acl_tags()) {
|
|||
//////////////////NEWS BOARD/////////////////////////////
|
||||
echo '<div id="news_board">';
|
||||
|
||||
echo '<table cellpadding="4" cellspacing="4" class="databox">';
|
||||
echo '<table cellpadding="4" width=100% cellspacing="4" class="databox">';
|
||||
echo '<tr><th><span>' . __('News board') . '</span></th></tr>';
|
||||
if ($config["prominent_time"] == "timestamp") {
|
||||
$comparation_suffix = "";
|
||||
|
|
|
@ -242,9 +242,10 @@ $(document).ready( function() {
|
|||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
if( typeof(table_noHover) != 'undefined')
|
||||
if ("ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id)
|
||||
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
|
||||
}).mouseout(function(){
|
||||
table_noHover = $(this);
|
||||
handsIn = 0;
|
||||
|
@ -255,7 +256,6 @@ $(document).ready( function() {
|
|||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
}, 3500);
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
|
|
|
@ -77,11 +77,46 @@ if ($count == 1) {
|
|||
unset($result_groups[0]);
|
||||
}
|
||||
}
|
||||
|
||||
$total_agentes = 0;
|
||||
$monitor_ok = 0;
|
||||
$monitor_warning = 0;
|
||||
$monitor_critical = 0;
|
||||
$agents_unknown = 0;
|
||||
foreach ($result_groups as $data) {
|
||||
$total_agentes += $data["_total_agents_"];
|
||||
$monitor_ok += $data["_monitors_ok_"];
|
||||
$monitor_warning += $data["_monitors_warning_"];
|
||||
$monitor_critical += $data["_monitors_critical_"];
|
||||
$monitor_unknown += $data["_monitors_unknown_"];
|
||||
}
|
||||
$total = $monitor_ok + $monitor_warning + $monitor_critical;
|
||||
//$total_ok = format_numeric (($total_agentes / $monitor_ok / 100), 1);
|
||||
$total_ok = format_numeric (($monitor_ok*100)/$total,0);
|
||||
$total_warning = format_numeric (($monitor_warning*100)/$total,0);
|
||||
$total_critical = format_numeric (($monitor_critical*100)/$total,0);
|
||||
$total_unknown = format_numeric (($monitor_unknown*100)/$total,0);
|
||||
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">';
|
||||
echo "<tr>";
|
||||
echo "<th style='text-align: center;'>" . __("Summary of the status groups") . "</th>";
|
||||
echo "</tr>";
|
||||
echo "<tr height=70px'>";
|
||||
echo "<td align='center'>";
|
||||
echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>";
|
||||
echo "<span id='sumary' style='background-color:#FAD403;'>". $total_warning ."%</span>";
|
||||
echo "<span id='sumary' style='background-color:#80BA27;'>". $total_ok ."%</span>";
|
||||
echo "<span id='sumary' style='background-color:#B2B2B2;'>". $total_unknown ."%</span>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
|
||||
|
||||
ui_pagination($count);
|
||||
|
||||
if (!empty($result_groups)) {
|
||||
|
||||
echo '<table cellpadding="0" cellspacing="0" style="margin-top:10px;" class="databox" border="0" width="98%">';
|
||||
echo '<table cellpadding="0" cellspacing="0" style="margin-top:10px;" class="databox" border="0" width="100%">';
|
||||
echo "<tr>";
|
||||
echo "<th style='width: 26px;'>" . __("Force") . "</th>";
|
||||
echo "<th width='30%' style='min-width: 60px;'>" . __("Group") . "</th>";
|
||||
|
|
|
@ -49,7 +49,7 @@ else {
|
|||
}
|
||||
|
||||
// Header
|
||||
ui_print_page_header (__("Tactical view"), "images/op_monitoring.png", false, "", false, $updated_time);
|
||||
ui_print_page_header (__("Tactical view"), "", false, "", false, $updated_time);
|
||||
|
||||
$all_data = group_get_groups_list($config['id_user'], $user_strict, 'AR', true, false, 'tactical');
|
||||
|
||||
|
@ -172,23 +172,19 @@ $table->head = array ();
|
|||
$table->data = array ();
|
||||
$table->style = array ();
|
||||
|
||||
$table->data[0][0] = reporting_get_stats_indicators($data, 120, 20);
|
||||
$table->head[0] = '<span>' . __('Report of State') . '</span>';
|
||||
$stats = reporting_get_stats_indicators($data, 120, 10,false);
|
||||
$status = '<table class="status_tactical">';
|
||||
foreach ( $stats as $stat ) {
|
||||
$status .= '<tr><td><b>' . $stat['title'] . '</b>' . '</td><td>' . $stat['graph'] . "</td></tr>" ;
|
||||
}
|
||||
$status .= '</table>';
|
||||
$table->data[0][0] = $status;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table ($table);
|
||||
unset($table);
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Monitor checks
|
||||
// ---------------------------------------------------------------------
|
||||
$table->width = "100%";
|
||||
$table->class = "";
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->border = 0;
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->style = array ();
|
||||
|
||||
$data_agents = array(
|
||||
__('Critical') => $data['monitor_critical'],
|
||||
|
@ -198,36 +194,29 @@ $data_agents = array(
|
|||
__('Not init') => $data['monitor_not_init']
|
||||
);
|
||||
|
||||
$table->data[0][0] = reporting_get_stats_alerts($data);
|
||||
$table->data[0][0] .= reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
||||
$table->data[0][0] .= reporting_get_stats_agents_monitors($data);
|
||||
$table->data[1][0] = reporting_get_stats_alerts($data);
|
||||
$table->data[2][0] .= reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
||||
$table->data[3][0] .= reporting_get_stats_agents_monitors($data);
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Server performance
|
||||
// ---------------------------------------------------------------------
|
||||
if ($is_admin) {
|
||||
$table->width = "99%";
|
||||
$table->class = "";
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->border = 0;
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->style = array ();
|
||||
|
||||
$table->data[0][0] = reporting_get_stats_servers(false);
|
||||
$table->data[4][0] = reporting_get_stats_servers(false);
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
}
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
echo '</td>'; //Left column
|
||||
|
||||
echo '<td style="vertical-align: top; width: 75%; padding-top: 0px;" id="rightcolumn">';
|
||||
echo '<td style="vertical-align: top; width: 56%; padding-top: 0px;" id="rightcolumn">';
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
@ -240,7 +229,8 @@ if (!empty($acltags)) {
|
|||
$tags_condition = tags_get_acl_tags_event_condition($acltags, false, $user_strict);
|
||||
|
||||
if (!empty($tags_condition)) {
|
||||
events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%");
|
||||
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true);
|
||||
ui_toggle($events, __('Latest events'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue