2014-02-05 Sergio Martin <sergio.martin@artica.es>
* mobile/operation/events.php mobile/operation/tactical.php mobile/operation/networkmap.php mobile/operation/modules.php mobile/operation/alerts.php mobile/operation/networkmaps.php mobile/operation/agents.php mobile/include/style/main.css: A lot of improvements on the mobile console. Simplified views, more big tapping areas, etc. * include/functions_visual_map.php: Fix alert fired module when is in warning status in builder view of visual consoles. Incident #559 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9405 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
cd282f59f9
commit
a860085e63
|
@ -1,3 +1,20 @@
|
|||
2014-02-05 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* mobile/operation/events.php
|
||||
mobile/operation/tactical.php
|
||||
mobile/operation/networkmap.php
|
||||
mobile/operation/modules.php
|
||||
mobile/operation/alerts.php
|
||||
mobile/operation/networkmaps.php
|
||||
mobile/operation/agents.php
|
||||
mobile/include/style/main.css: A lot of improvements
|
||||
on the mobile console. Simplified views, more big tapping
|
||||
areas, etc.
|
||||
|
||||
* include/functions_visual_map.php: Fix alert fired
|
||||
module when is in warning status in builder view of
|
||||
visual consoles. Incident #559
|
||||
|
||||
2014-02-04 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_groups.php
|
||||
|
|
|
@ -778,7 +778,7 @@ function visual_map_get_image_status_element($layoutData) {
|
|||
break;
|
||||
case 4:
|
||||
//Critical (ALERT)
|
||||
$img .= "_bad.png";
|
||||
$img = "4" . $img . "_bad.png";
|
||||
break;
|
||||
case 0:
|
||||
//Normal (OK)
|
||||
|
@ -788,6 +788,10 @@ function visual_map_get_image_status_element($layoutData) {
|
|||
//Warning
|
||||
$img .= "_warning.png";
|
||||
break;
|
||||
case 10:
|
||||
//Warning (ALERT)
|
||||
$img = "4" . $img . "_warning.png";
|
||||
break;
|
||||
case 3:
|
||||
//Unknown
|
||||
default:
|
||||
|
@ -847,7 +851,6 @@ function visual_map_get_status_element($layoutData) {
|
|||
$real_status = db_get_row ("tagente_estado", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
||||
|
||||
if ($real_status['estado'] == 2) {
|
||||
|
||||
//This module has an alert fired and warning status
|
||||
$status = VISUAL_MAP_STATUS_WARNING_ALERT;
|
||||
}
|
||||
|
@ -934,7 +937,6 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
io_safe_input ($layout["background"]);
|
||||
}
|
||||
else {
|
||||
html_debug_print($config, true);
|
||||
$backgroundImage =
|
||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||
$config['homedir'] . '/images/console/background/' .
|
||||
|
@ -1269,7 +1271,6 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
|
||||
$endTagA = false;
|
||||
if ($show_links) {
|
||||
html_debug_print($layout_data['label'], true);
|
||||
$url_icon = "";
|
||||
if ($layout_data['id_layout_linked'] > 0) {
|
||||
// Link to a map
|
||||
|
|
|
@ -505,10 +505,6 @@ table.event_details td.cell_event_name {
|
|||
background: #222;
|
||||
}
|
||||
|
||||
.agents_tiny_stats * {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.agent_details {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
@ -522,6 +518,11 @@ table.event_details td.cell_event_name {
|
|||
float: left;
|
||||
}
|
||||
|
||||
#list_agents td:hover, #list_networkmaps td:hover,
|
||||
#list_events td:hover, #list_Modules td:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#list_agents td {
|
||||
height: 35px;
|
||||
padding-top: 20px;
|
||||
|
@ -584,11 +585,50 @@ table.event_details td.cell_event_name {
|
|||
#list_agents .cell_6 .show_collapside {
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
.agents_tiny_stats * {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* For mobiles */
|
||||
@media screen and (max-width: 750px)
|
||||
{
|
||||
.agents_tiny_stats * {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
/* For tablets */
|
||||
@media screen and (min-width: 750px)
|
||||
{
|
||||
.agents_tiny_stats * {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
}
|
||||
/*END-----------Agents styles-----------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*INIT-----------Alerts styles---------------------------------------*/
|
||||
|
||||
#list_alerts td {
|
||||
height: 35px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
/*END-----------Alerts styles---------------------------------------*/
|
||||
|
||||
/*INIT-----------Alerts styles---------------------------------------*/
|
||||
|
||||
#list_networkmaps td {
|
||||
height: 35px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
/*END-----------Alerts styles---------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*INIT-----------Modules styles---------------------------------------*/
|
||||
@media screen and (max-width: 25em) {
|
||||
#list_Modules .cell_1 .ui-table-cell-label,
|
||||
|
@ -602,12 +642,6 @@ table.event_details td.cell_event_name {
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#list_Modules .cell_3,
|
||||
#list_Modules .cell_4 {
|
||||
display: inline !important;
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
#list_Modules .cell_0 .ui-table-cell-label,
|
||||
#list_Modules .cell_1 .ui-table-cell-label,
|
||||
#list_Modules .cell_3 .ui-table-cell-label,
|
||||
|
@ -648,6 +682,15 @@ table.event_details td.cell_event_name {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
#list_Modules td {
|
||||
height: 35px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#list_Modules .cell_5 img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 25em) {
|
||||
#list_Modules_Embedded .cell_1 .ui-table-cell-label,
|
||||
#list_Modules_Embedded .cell_4 .ui-table-cell-label {
|
||||
|
@ -967,6 +1010,10 @@ table.tactical_bars {
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.cell_0 {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.cell_event_name {
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -273,7 +273,7 @@ class Agents {
|
|||
//~ '</span>';
|
||||
|
||||
$row[2] = $row[__('OS')] = ui_print_os_icon ($agent["id_os"], false, true);
|
||||
$row[3] = $row[__('Group')] = ui_print_group_icon ($agent["id_grupo"], true);
|
||||
$row[3] = $row[__('Group')] = ui_print_group_icon ($agent["id_grupo"], true, "groups_small", '', false);
|
||||
//~ $row[4] = $row[__('Interval')] = '<span class="show_collapside" style="vertical-align: 0%; display: none; font-weight: bolder;"> ' . __('I.') . ' </span>' .
|
||||
//~ '<span style="vertical-align: 0%;">' . human_time_description_raw($agent["intervalo"]) . '</span>';
|
||||
|
||||
|
@ -394,6 +394,7 @@ class Agents {
|
|||
});
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener();
|
||||
}
|
||||
|
||||
|
||||
|
@ -412,6 +413,18 @@ class Agents {
|
|||
custom_scroll();
|
||||
});
|
||||
});
|
||||
|
||||
//Set link on entire row
|
||||
function refresh_link_listener() {
|
||||
$('#list_agents tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
refresh_link_listener();
|
||||
</script>");
|
||||
}
|
||||
|
||||
|
|
|
@ -259,8 +259,7 @@ class Alerts {
|
|||
|
||||
$row = array();
|
||||
if (isset($this->columns['agent']) && $this->columns['agent']) {
|
||||
$row[__('Agent')] = sprintf($disabled_style,
|
||||
'<a class="ui-link" data-ajax="false" href="index.php?page=agent&id=' . $alert['id_agente'] . '">' . io_safe_output($alert['agent_name'])) . '</a>';
|
||||
$row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_name']));
|
||||
}
|
||||
$row[__('Module')] = sprintf($disabled_style,
|
||||
io_safe_output($alert['module_name']));
|
||||
|
|
|
@ -101,16 +101,8 @@ class Events {
|
|||
|
||||
$status_icon = html_print_image($img_st, true);
|
||||
|
||||
$open_link = '';
|
||||
$close_link = '';
|
||||
|
||||
if (!$this->readOnly) {
|
||||
$open_link = '<a href="javascript: openDetails(' . $event['id_evento'] . ')"><div style="height:100%;width:100%">';
|
||||
$close_link = '</div></a>';
|
||||
}
|
||||
|
||||
$row = array();
|
||||
$row[] = $open_link . '<b class="ui-table-cell-label">' . __('Event Name') . '</b><div class="event_name">' . io_safe_output($event['evento']) . '</div>' . $close_link;
|
||||
$row[] = '<b class="ui-table-cell-label">' . __('Event Name') . '</b><a href="javascript: openDetails(' . $event['id_evento'] . ')"><div class="event_name">' . io_safe_output($event['evento']) . '</div></a>';
|
||||
|
||||
if ($event["id_agente"] == 0) {
|
||||
$agent_name = __('System');
|
||||
|
@ -119,10 +111,8 @@ class Events {
|
|||
$agent_name = '<span class="nobold">' . ui_print_agent_name ($event["id_agente"], true, 'agent_small', '', false, '', '', false, false) . '</span>';
|
||||
}
|
||||
|
||||
$row_1 = $open_link;
|
||||
$row_1 .= '<span class="events_agent"><b class="ui-table-cell-label">' . __('Agent') . '</b>' . $agent_name . '</span>';
|
||||
$row_1 .= '<span class="events_timestamp">' . $status_icon . '<br>' . ui_print_timestamp ($event['timestamp_rep'], true) . '</span>';
|
||||
$row_1 .= $close_link;
|
||||
$row_1 = '<span class="events_agent"><b class="ui-table-cell-label">' . __('Agent') . '</b>' . $agent_name . '</span>';
|
||||
$row_1 .= '<span class="events_timestamp">' . $status_icon . '<br>' . ui_print_timestamp ($event['timestamp_rep'], true, array('units' => 'tiny')) . '</span>';
|
||||
|
||||
$row[] = $row_1;
|
||||
|
||||
|
@ -910,6 +900,18 @@ class Events {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Set link on entire row
|
||||
function refresh_link_listener() {
|
||||
$('#list_events tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
refresh_link_listener();
|
||||
</script>");
|
||||
}
|
||||
|
||||
|
@ -939,6 +941,7 @@ class Events {
|
|||
//$(\"table#list_events\").table().table('refresh');
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ class Modules {
|
|||
if ($this->columns['agent']) {
|
||||
$row[1] = $row[__('Agent name')] =
|
||||
'<span class="data"><span class="show_collapside" style="display: none; font-weight: bolder;">' . __('Agent') . ' </span>' .
|
||||
'<a class="ui-link" data-ajax="false" href="index.php?page=agent&id=' . $module["id_agent"] . '">' . ui_print_truncate_text($module['agent_name'], 50, false) . '</a>' .
|
||||
ui_print_truncate_text($module['agent_name'], 50, false) .
|
||||
'</span>';
|
||||
}
|
||||
if ($module['utimestamp'] == 0 && (($module['module_type'] < 21 ||
|
||||
|
@ -513,8 +513,7 @@ class Modules {
|
|||
'<span style="display: none;" class="show_collapside">' . $row[__('Status')] . ' </span>' .
|
||||
'<a data-ajax="false" class="ui-link" ' .
|
||||
'href="index.php?page=module_graph&id=' . $module['id_agente_modulo'] . '&id_agent=' . $this->id_agent . '">' .
|
||||
'<span style="vertical-align: 30%;">' . html_print_image('images/chart_curve.png', true, array ("style" => 'vertical-align: middle;')) . '</span>' .
|
||||
' ' . $output . '</a>' . '</span>';
|
||||
$output . '</a>' . '</span>';
|
||||
|
||||
if (!$ajax) {
|
||||
if ($this->columns['agent']) {
|
||||
|
@ -633,6 +632,7 @@ class Modules {
|
|||
});
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener()
|
||||
}
|
||||
|
||||
|
||||
|
@ -651,6 +651,18 @@ class Modules {
|
|||
custom_scroll();
|
||||
});
|
||||
});
|
||||
|
||||
//Set link on entire row
|
||||
function refresh_link_listener() {
|
||||
$('#list_Modules tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
refresh_link_listener();
|
||||
</script>");
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,6 @@ class Networkmap {
|
|||
fwrite ($fh, $graph);
|
||||
$cmd = $filter . " -Tcmapx -o" . $filename_map." -Tpng -o".$filename_img." ".$filename_dot;
|
||||
$result = system ($cmd);
|
||||
html_debug_print($cmd, true);
|
||||
fclose ($fh);
|
||||
//unlink ($filename_dot);
|
||||
}
|
||||
|
@ -219,7 +218,7 @@ class Networkmap {
|
|||
return;
|
||||
}
|
||||
$ui->contentAddHtml('<div style="width: auto; overflow-x: auto; text-align: center;">');
|
||||
$ui->contentAddHtml('<img width="500px" src="' . $url_img . '" />');
|
||||
$ui->contentAddHtml('<img style="width: 90%;" src="' . $url_img . '" />');
|
||||
$ui->contentAddHtml('</div>');
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -192,6 +192,16 @@ class Networkmaps {
|
|||
$table->importFromHash($list);
|
||||
$ui->contentAddHtml($table->getHTML());
|
||||
}
|
||||
|
||||
$ui->contentAddHtml("<script type=\"text/javascript\">
|
||||
//Set link on entire row
|
||||
$('#list_networkmaps tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
</script>");
|
||||
}
|
||||
|
||||
private function filterNetworkmapsGetString() {
|
||||
|
|
|
@ -68,22 +68,30 @@ class Tactical {
|
|||
<tr>
|
||||
<td>' . $formatted_data['server_health']['title'] . '</td>
|
||||
<td class="tiny tactical_bar">' . $formatted_data['server_health']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $formatted_data_untiny['server_health']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['server_health']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $formatted_data['monitor_health']['title'] . '</td>
|
||||
<td class="tiny tactical_bar">' . $formatted_data['monitor_health']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $formatted_data_untiny['monitor_health']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['monitor_health']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $formatted_data['module_sanity']['title'] . '</td>
|
||||
<td class="tiny tactical_bar">' . $formatted_data['module_sanity']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $formatted_data_untiny['module_sanity']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['module_sanity']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>' . $formatted_data['alert_level']['title'] . '</td>
|
||||
<td class="tiny tactical_bar">' . $formatted_data['alert_level']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
|
|
Loading…
Reference in New Issue