2014-02-10 Sergio Martin <sergio.martin@artica.es>
* include/functions_groups.php: Fixed total agents count for group All * include/functions_graph.php mobile/operation/module_graph.php mobile/operation/modules.php mobile/operation/networkmaps.php mobile/operation/agent.php mobile/operation/agents.php mobile/operation/events.php mobile/operation/tactical.php mobile/operation/visualmaps.php mobile/include/ui.class.php mobile/include/style/main.css: A lot of fixes and improvements in mobile console git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9420 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c2e1270f11
commit
e6da51b41d
|
@ -1,3 +1,21 @@
|
|||
2014-02-10 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_groups.php: Fixed total agents
|
||||
count for group All
|
||||
|
||||
* include/functions_graph.php
|
||||
mobile/operation/module_graph.php
|
||||
mobile/operation/modules.php
|
||||
mobile/operation/networkmaps.php
|
||||
mobile/operation/agent.php
|
||||
mobile/operation/agents.php
|
||||
mobile/operation/events.php
|
||||
mobile/operation/tactical.php
|
||||
mobile/operation/visualmaps.php
|
||||
mobile/include/ui.class.php
|
||||
mobile/include/style/main.css: A lot of fixes
|
||||
and improvements in mobile console
|
||||
|
||||
2014-02-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_visual_map.php
|
||||
|
|
|
@ -690,7 +690,8 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
$show_alerts = false, $avg_only = 0, $pure = false,
|
||||
$date = 0, $unit = '', $baseline = 0, $return_data = 0,
|
||||
$show_title = true, $only_image = false, $homeurl = '', $ttl = 1,
|
||||
$projection = false, $adapt_key = '', $compare = false, $show_unknown = false) {
|
||||
$projection = false, $adapt_key = '', $compare = false, $show_unknown = false,
|
||||
$menu = true) {
|
||||
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
@ -781,19 +782,19 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str).
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
||||
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type_prev, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str);
|
||||
$series_type_prev, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
else {
|
||||
// Color commented not to restrict serie colors
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str);
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2879,7 +2880,8 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
|
||||
function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
||||
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
||||
$date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $compare = false, $show_unknown = false) {
|
||||
$date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $compare = false,
|
||||
$show_unknown = false, $menu = true) {
|
||||
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
@ -2958,20 +2960,20 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
|||
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str).
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
||||
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type_prev,
|
||||
$chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str);
|
||||
$chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
else {
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png"), "", $unit, $homeurl,
|
||||
$water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str);
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3181,7 +3183,7 @@ function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image =
|
|||
*/
|
||||
function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
||||
$width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0,
|
||||
$date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $ttl = 1) {
|
||||
$date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $ttl = 1, $menu = true) {
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
global $max_value;
|
||||
|
@ -3433,8 +3435,8 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, array(), '', "", $unit, $homeurl,
|
||||
$water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, array(), array(), 0, 0, $adapt_key, true);
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit,
|
||||
1, array(), array(), 0, 0, $adapt_key, true, '', $menu);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -734,19 +734,12 @@ function groups_get_group_row_data($id_group, $group_all, $group, &$printed_grou
|
|||
echo "</td>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Total agents
|
||||
if ($id_group != 0) {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente)
|
||||
FROM tagente
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente)
|
||||
FROM tagente
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
||||
// Total agents
|
||||
$row['links'][__('Agents')] = "index.php?" .
|
||||
|
@ -938,19 +931,12 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
//of this groups and its children. It was done to print empty fathers of children groups.
|
||||
//We need to recalculate the total agents for this group here to get only the total agents
|
||||
//for this group. Of course the group All (0) is a special case.
|
||||
|
||||
$data["total_agents"];
|
||||
|
||||
|
||||
if ($id_group != 0) {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente)
|
||||
FROM tagente
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente)
|
||||
FROM tagente
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
||||
echo $data["total_agents"];
|
||||
echo "</a>";
|
||||
|
|
|
@ -177,7 +177,10 @@ tr.group_view_unk, .group_view_unk {
|
|||
text-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.ui-btn-active:visited, .ui-btn-active:hover, .ui-btn-active a.ui-link-inherit {
|
||||
color: #888 !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
tr.group_view_data, .group_view_data {
|
||||
color: #000000 !important;
|
||||
|
@ -525,7 +528,7 @@ table.event_details td.cell_event_name {
|
|||
|
||||
#list_agents td:hover, #list_networkmaps td:hover,
|
||||
#list_events td:hover, #list_Modules td:hover,
|
||||
#list_visualmaps td:hover {
|
||||
#list_visualmaps td:hover, #last_agent_events td:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -889,6 +892,10 @@ ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text a {
|
|||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.ui-btn-inner {
|
||||
border: 0px solid #000!important;
|
||||
}
|
||||
|
||||
li.ui-btn {
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
|
@ -963,11 +970,6 @@ li.ui-btn {
|
|||
min-width: 50%;
|
||||
}
|
||||
|
||||
.untiny {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.agents_tiny_stats, .agents_last_contact {
|
||||
float: right;
|
||||
}
|
||||
|
@ -987,10 +989,6 @@ li.ui-btn {
|
|||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.tiny {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Common */
|
||||
|
@ -1025,6 +1023,10 @@ li.ui-btn {
|
|||
width: 185px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.untiny {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/* For tablets */
|
||||
@media screen and (min-width: 750px)
|
||||
|
@ -1063,6 +1065,10 @@ li.ui-btn {
|
|||
width: 300px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.tiny {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#login_container {
|
||||
|
@ -1195,6 +1201,10 @@ table.tactical_bars {
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.ui-btn-active * {
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
.ui-btn-active {
|
||||
background: #6db431 !important;
|
||||
}
|
||||
|
|
|
@ -711,6 +711,26 @@ class Ui {
|
|||
echo "</html>";
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
// Add a listener to set a link when a row of a table is clicked.
|
||||
// The target link will be the first <a> tag found into the row
|
||||
public function contentAddLinkListener ($table_name) {
|
||||
$this->contentAddHtml("<script type=\"text/javascript\">
|
||||
//Set link on entire row
|
||||
function refresh_link_listener_" . $table_name . "() {
|
||||
$('#" . $table_name . " tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
refresh_link_listener_" . $table_name . "();
|
||||
});
|
||||
</script>");
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
}
|
||||
|
|
|
@ -167,13 +167,28 @@ class Agent {
|
|||
$ui->contentEndCollapsible();
|
||||
|
||||
$events = new Events();
|
||||
$events->addJavascriptDialog();
|
||||
|
||||
$options = $events->get_event_dialog_options();
|
||||
$ui->addDialog($options);
|
||||
|
||||
$options = $events->get_event_dialog_error_options($options);
|
||||
$ui->addDialog($options);
|
||||
|
||||
$ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' style='display:none;'>detail_event_hook</a>");
|
||||
$ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' style='display:none;'>detail_event_dialog_error_hook</a>");
|
||||
|
||||
$ui->contentBeginCollapsible(sprintf(__('Last %s Events'), $system->getPageSize()));
|
||||
$tabledata = $events->listEventsHtml(0, true, 'last_agent_events');
|
||||
$ui->contentCollapsibleAddItem($tabledata['table']);
|
||||
$ui->contentCollapsibleAddItem($events->putEventsTableJS($this->id));
|
||||
$ui->contentEndCollapsible();
|
||||
}
|
||||
|
||||
|
||||
$ui->contentAddLinkListener('last_agent_events');
|
||||
$ui->contentAddLinkListener('list_events');
|
||||
$ui->contentAddLinkListener('list_Modules');
|
||||
|
||||
$ui->contentAddHtml("<script type=\"text/javascript\">
|
||||
$(document).ready(function(){
|
||||
function set_same_heigth() {
|
||||
|
@ -202,8 +217,12 @@ class Agent {
|
|||
if ($('.ui-block-a').css('float') != 'none') {
|
||||
set_same_heigth();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.ui-collapsible').bind('expand', function () {
|
||||
refresh_link_listener_last_agent_events();
|
||||
refresh_link_listener_list_Modules();
|
||||
});
|
||||
});
|
||||
</script>");
|
||||
|
||||
$ui->endContent();
|
||||
|
|
|
@ -343,6 +343,7 @@ class Agents {
|
|||
$this->addJavascriptAddBottom();
|
||||
}
|
||||
}
|
||||
$ui->contentAddLinkListener('list_agents');
|
||||
}
|
||||
|
||||
private function addJavascriptAddBottom() {
|
||||
|
@ -394,7 +395,7 @@ class Agents {
|
|||
});
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener();
|
||||
refresh_link_listener_list_agents();
|
||||
}
|
||||
|
||||
|
||||
|
@ -413,18 +414,6 @@ 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>");
|
||||
}
|
||||
|
||||
|
|
|
@ -406,107 +406,124 @@ class Events {
|
|||
$home->show($error);
|
||||
}
|
||||
|
||||
public function get_event_dialog_error_options($options) {
|
||||
$options['type'] = 'hidden';
|
||||
|
||||
$options['dialog_id'] = 'detail_event_dialog_error';
|
||||
$options['title_text'] = __('ERROR: Event detail');
|
||||
$options['content_text'] = '<span style="color: #ff0000;">' .
|
||||
__('Error connecting to DB pandora.') . '</span>';
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function get_event_dialog_options() {
|
||||
$ui = Ui::getInstance();
|
||||
|
||||
$options['type'] = 'hidden';
|
||||
|
||||
$options['dialog_id'] = 'detail_event_dialog';
|
||||
|
||||
$options['title_close_button'] = true;
|
||||
$options['title_text'] = __('Event detail');
|
||||
|
||||
//Content
|
||||
ob_start();
|
||||
?>
|
||||
<table class="pandora_responsive alternate event_details">
|
||||
<tbody>
|
||||
<tr class="event_name">
|
||||
<td class="cell_event_name" colspan="2"></td>
|
||||
</tr>
|
||||
<tr class="event_id">
|
||||
<th><?php echo __('Event ID');?></th>
|
||||
<td class="cell_event_id"></td>
|
||||
</tr>
|
||||
<tr class="event_timestamp">
|
||||
<th><?php echo __('Timestamp');?></th>
|
||||
<td class="cell_event_timestamp"></td>
|
||||
</tr>
|
||||
<tr class="event_owner">
|
||||
<th><?php echo __('Owner');?></th>
|
||||
<td class="cell_event_owner"></td>
|
||||
</tr>
|
||||
<tr class="event_type">
|
||||
<th><?php echo __('Type');?></th>
|
||||
<td class="cell_event_type"></td>
|
||||
</tr>
|
||||
<tr class="event_repeated">
|
||||
<th><?php echo __('Repeated');?></th>
|
||||
<td class="cell_event_repeated"></td>
|
||||
</tr>
|
||||
<tr class="event_severity">
|
||||
<th><?php echo __('Severity');?></th>
|
||||
<td class="cell_event_severity"></td>
|
||||
</tr>
|
||||
<tr class="event_status">
|
||||
<th><?php echo __('Status');?></th>
|
||||
<td class="cell_event_status"></td>
|
||||
</tr>
|
||||
<tr class="event_acknowledged_by">
|
||||
<th><?php echo __('Acknowledged by');?></th>
|
||||
<td class="cell_event_acknowledged_by"></td>
|
||||
</tr>
|
||||
<tr class="event_group">
|
||||
<th><?php echo __('Group');?></th>
|
||||
<td class="cell_event_group"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="event_module_graph">
|
||||
<th><?php echo __('Module Graph');?></th>
|
||||
<td class="cell_module_graph"></td>
|
||||
</tr>
|
||||
<tr class="event_agent">
|
||||
<th><?php echo __('Agent');?></th>
|
||||
<td class="cell_agent"></td>
|
||||
</tr>
|
||||
<tr class="event_tags">
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<td class="cell_event_tags"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$options['content_text'] = ob_get_clean();
|
||||
|
||||
$options_button = array(
|
||||
'text' => __('Validate'),
|
||||
'id' => 'validate_button',
|
||||
'href' => 'javascript: validateEvent();');
|
||||
$options['content_text'] .= $ui->createButton($options_button);
|
||||
$options_hidden = array(
|
||||
'id' => 'event_id',
|
||||
'value' => 0,
|
||||
'type' => 'hidden'
|
||||
);
|
||||
$options['content_text'] .= $ui->getInput($options_hidden);
|
||||
$options['content_text'] .= '<div id="validate_button_loading" style="display: none; text-align: center;">
|
||||
<img src="images/ajax-loader.gif" /></div>';
|
||||
$options['content_text'] .= '<div id="validate_button_correct" style="display: none; text-align: center;">
|
||||
<h3>' . __('Sucessful validate') . '</h3></div>';
|
||||
$options['content_text'] .= '<div id="validate_button_fail" style="display: none; text-align: center;">
|
||||
<h3 style="color: #ff0000;">' . __('Fail validate') . '</h3></div>';
|
||||
|
||||
$options['button_close'] = false;
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
private function show_events() {
|
||||
$ui = Ui::getInstance();
|
||||
|
||||
$ui->createPage();
|
||||
|
||||
$options['type'] = 'hidden';
|
||||
|
||||
$options['dialog_id'] = 'detail_event_dialog';
|
||||
|
||||
$options['title_close_button'] = true;
|
||||
$options['title_text'] = __('Event detail');
|
||||
|
||||
//Content
|
||||
ob_start();
|
||||
?>
|
||||
<table class="pandora_responsive alternate event_details">
|
||||
<tbody>
|
||||
<tr class="event_name">
|
||||
<td class="cell_event_name" colspan="2"></td>
|
||||
</tr>
|
||||
<tr class="event_id">
|
||||
<th><?php echo __('Event ID');?></th>
|
||||
<td class="cell_event_id"></td>
|
||||
</tr>
|
||||
<tr class="event_timestamp">
|
||||
<th><?php echo __('Timestamp');?></th>
|
||||
<td class="cell_event_timestamp"></td>
|
||||
</tr>
|
||||
<tr class="event_owner">
|
||||
<th><?php echo __('Owner');?></th>
|
||||
<td class="cell_event_owner"></td>
|
||||
</tr>
|
||||
<tr class="event_type">
|
||||
<th><?php echo __('Type');?></th>
|
||||
<td class="cell_event_type"></td>
|
||||
</tr>
|
||||
<tr class="event_repeated">
|
||||
<th><?php echo __('Repeated');?></th>
|
||||
<td class="cell_event_repeated"></td>
|
||||
</tr>
|
||||
<tr class="event_severity">
|
||||
<th><?php echo __('Severity');?></th>
|
||||
<td class="cell_event_severity"></td>
|
||||
</tr>
|
||||
<tr class="event_status">
|
||||
<th><?php echo __('Status');?></th>
|
||||
<td class="cell_event_status"></td>
|
||||
</tr>
|
||||
<tr class="event_acknowledged_by">
|
||||
<th><?php echo __('Acknowledged by');?></th>
|
||||
<td class="cell_event_acknowledged_by"></td>
|
||||
</tr>
|
||||
<tr class="event_group">
|
||||
<th><?php echo __('Group');?></th>
|
||||
<td class="cell_event_group"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class="event_module_graph">
|
||||
<th><?php echo __('Module Graph');?></th>
|
||||
<td class="cell_module_graph"></td>
|
||||
</tr>
|
||||
<tr class="event_agent">
|
||||
<th><?php echo __('Agent');?></th>
|
||||
<td class="cell_agent"></td>
|
||||
</tr>
|
||||
<tr class="event_tags">
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<td class="cell_event_tags"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$options['content_text'] = ob_get_clean();
|
||||
$options_button = array(
|
||||
'text' => __('Validate'),
|
||||
'id' => 'validate_button',
|
||||
'href' => 'javascript: validateEvent();');
|
||||
$options['content_text'] .= $ui->createButton($options_button);
|
||||
$options_hidden = array(
|
||||
'id' => 'event_id',
|
||||
'value' => 0,
|
||||
'type' => 'hidden'
|
||||
);
|
||||
$options['content_text'] .= $ui->getInput($options_hidden);
|
||||
$options['content_text'] .= '<div id="validate_button_loading" style="display: none; text-align: center;">
|
||||
<img src="images/ajax-loader.gif" /></div>';
|
||||
$options['content_text'] .= '<div id="validate_button_correct" style="display: none; text-align: center;">
|
||||
<h3>' . __('Sucessful validate') . '</h3></div>';
|
||||
$options['content_text'] .= '<div id="validate_button_fail" style="display: none; text-align: center;">
|
||||
<h3 style="color: #ff0000;">' . __('Fail validate') . '</h3></div>';
|
||||
|
||||
$options['button_close'] = false;
|
||||
|
||||
$options = $this->get_event_dialog_options();
|
||||
|
||||
$ui->addDialog($options);
|
||||
$options['type'] = 'hidden';
|
||||
|
||||
$options = $this->get_event_dialog_error_options($options);
|
||||
|
||||
$options['dialog_id'] = 'detail_event_dialog_error';
|
||||
$options['title_text'] = __('ERROR: Event detail');
|
||||
$options['content_text'] = '<span style="color: #ff0000;">' .
|
||||
__('Error connecting to DB pandora.') . '</span>';
|
||||
$ui->addDialog($options);
|
||||
|
||||
|
||||
|
@ -762,6 +779,8 @@ class Events {
|
|||
return array('table' => $table->getHTML(), 'data' => $events_db);
|
||||
}
|
||||
}
|
||||
|
||||
$ui->contentAddLinkListener('list_events');
|
||||
}
|
||||
|
||||
public function putEventsTableJS($id_agent) {
|
||||
|
@ -770,7 +789,7 @@ class Events {
|
|||
</script>";
|
||||
}
|
||||
|
||||
private function addJavascriptDialog() {
|
||||
public function addJavascriptDialog() {
|
||||
$ui = Ui::getInstance();
|
||||
|
||||
$ui->contentAddHtml("
|
||||
|
@ -900,18 +919,6 @@ 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>");
|
||||
}
|
||||
|
||||
|
@ -941,7 +948,7 @@ class Events {
|
|||
//$(\"table#list_events\").table().table('refresh');
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener();
|
||||
refresh_link_listener_list_events();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,8 +135,6 @@ class ModuleGraph {
|
|||
$time_compare = 'overlapped';
|
||||
}
|
||||
|
||||
|
||||
|
||||
ob_start();
|
||||
switch ($this->graph_type) {
|
||||
case 'boolean':
|
||||
|
@ -156,7 +154,7 @@ class ModuleGraph {
|
|||
$urlImage,
|
||||
'adapter_' . $this->graph_type,
|
||||
$time_compare,
|
||||
$this->unknown_graph);
|
||||
$this->unknown_graph, false);
|
||||
if ($this->draw_events) {
|
||||
$graph .= '<br>';
|
||||
$graph .= graphic_module_events(
|
||||
|
@ -189,7 +187,7 @@ class ModuleGraph {
|
|||
1,
|
||||
false,
|
||||
'adapter_' . $this->graph_type,
|
||||
$time_compare, $this->unknown_graph);
|
||||
$time_compare, $this->unknown_graph, false);
|
||||
if ($this->draw_events) {
|
||||
$graph .= '<br>';
|
||||
$graph .= graphic_module_events($this->id,
|
||||
|
@ -213,7 +211,9 @@ class ModuleGraph {
|
|||
$date,
|
||||
false,
|
||||
$urlImage,
|
||||
'adapter_' . $this->graph_type);
|
||||
'adapter_' . $this->graph_type,
|
||||
1,
|
||||
false);
|
||||
if ($this->draw_events) {
|
||||
$graph .= '<br>';
|
||||
$graph .= graphic_module_events($this->id,
|
||||
|
@ -276,13 +276,21 @@ class ModuleGraph {
|
|||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).bind('ready', function() {
|
||||
$("#graph_content")
|
||||
.height(($(window).height()
|
||||
- $(".ui-header").height()
|
||||
- $(".ui-collapsible").height()
|
||||
- 55) + "px");
|
||||
function load_graph() {
|
||||
$("#graph_content")
|
||||
.height(($(window).height()
|
||||
- $(".ui-header").height()
|
||||
- $(".ui-collapsible").height()
|
||||
- 55) + "px").width($(".ui-collapsible").width() + "px");
|
||||
|
||||
ajax_get_graph($("#id_module").val());
|
||||
}
|
||||
|
||||
ajax_get_graph($("#id_module").val());
|
||||
load_graph();
|
||||
|
||||
$( window ).resize(function() {
|
||||
load_graph();
|
||||
});
|
||||
});
|
||||
|
||||
function ajax_get_graph(id) {
|
||||
|
|
|
@ -338,6 +338,12 @@ class Modules {
|
|||
AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,100)";
|
||||
}
|
||||
|
||||
if ($this->status != AGENT_MODULE_STATUS_NOT_INIT) { //When filter is not "not init"
|
||||
// Not show not init modules. It's only operation view
|
||||
$sql_conditions .= " AND (tagente_estado.utimestamp != 0
|
||||
OR tagente_modulo.id_tipo_modulo IN (21,22,23,100))";
|
||||
}
|
||||
|
||||
if ($this->tag > 0) {
|
||||
$sql_conditions .= " AND tagente_modulo.id_agente_modulo IN (
|
||||
SELECT ttag_module.id_agente_modulo
|
||||
|
@ -564,7 +570,7 @@ class Modules {
|
|||
}
|
||||
|
||||
$table = new Table();
|
||||
$table->id = 'list_Modules_Embedded';
|
||||
$table->id = 'list_Modules';
|
||||
|
||||
$table->importFromHash($listModules['modules']);
|
||||
|
||||
|
@ -584,6 +590,8 @@ class Modules {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ui->contentAddLinkListener('list_Modules');
|
||||
}
|
||||
|
||||
private function addJavascriptAddBottom() {
|
||||
|
@ -632,7 +640,7 @@ class Modules {
|
|||
});
|
||||
|
||||
load_more_rows = 1;
|
||||
refresh_link_listener()
|
||||
refresh_link_listener_list_Modules()
|
||||
}
|
||||
|
||||
|
||||
|
@ -651,18 +659,6 @@ 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>");
|
||||
}
|
||||
|
||||
|
|
|
@ -199,16 +199,8 @@ 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>");
|
||||
|
||||
$ui->contentAddLinkListener('list_networkmaps');
|
||||
}
|
||||
|
||||
private function filterNetworkmapsGetString() {
|
||||
|
|
|
@ -68,30 +68,22 @@ class Tactical {
|
|||
<tr>
|
||||
<td>' . $formatted_data['server_health']['title'] . '</td>
|
||||
<td class="tiny tactical_bar">' . $formatted_data['server_health']['graph'] . '</td>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['server_health']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $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>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['monitor_health']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $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>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['module_sanity']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $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>
|
||||
</tr>
|
||||
<tr class="untiny tactical_bar">
|
||||
<td>' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
||||
<td class="untiny tactical_bar">' . $formatted_data_untiny['alert_level']['graph'] . '</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
|
|
|
@ -148,15 +148,7 @@ class Visualmaps {
|
|||
$ui->contentAddHtml($table->getHTML());
|
||||
}
|
||||
|
||||
$ui->contentAddHtml("<script type=\"text/javascript\">
|
||||
//Set link on entire row
|
||||
$('#list_visualmaps tr').click( function() {
|
||||
var link = $(this).find('a').attr('href');
|
||||
if (link != undefined) {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
}
|
||||
});
|
||||
</script>");
|
||||
$ui->contentAddLinkListener('list_visualmaps');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue