';
}
if (isset($unknown_count) && $unknown_count > 0) {
- $out .= '
';
diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php
index 1a6b0061e2..37320a52e2 100644
--- a/pandora_console/mobile/operation/agents.php
+++ b/pandora_console/mobile/operation/agents.php
@@ -97,6 +97,7 @@ class Agents
$agent[6] = '
'.__('Status').''.$agent[6];
$agent[7] = '
'.__('Alerts').''.$agent[7];
$agent[8] = '
'.__('Last contact').''.$agent[8];
+ $agent[9] = '
'.__('Last status change').''.$agent[9];
$agents[$key] = $agent;
}
@@ -406,12 +407,12 @@ class Agents
$row[5] = $row[__('Status')] = '
'.__('S.').' '.$img_status;
$row[6] = $row[__('Alerts')] = '
'.__('A.').' '.$img_alert;
- $row[7] = $row[__('Modules')] = '
'.__('Modules').' '.'
'.reporting_tiny_stats($agent, true, 'agent', ' ').' ';
+ $row[7] = $row[__('Modules')] = '
'.reporting_tiny_stats($agent, true, 'agent', ':').' ';
$last_time = time_w_fixed_tz($agent['ultimo_contacto']);
$now = get_system_time();
$diferencia = ($now - $last_time);
- $time = ui_print_timestamp($last_time, true, ['style' => 'font-size: 12px; margin-left: 20px;', 'units' => 'tiny']);
+ $time = human_time_comparation($agent['ultimo_contacto'], 'tiny');
$style = '';
if ($diferencia > ($agent['intervalo'] * 2)) {
$row[8] = $row[__('Last contact')] = '
'.$time.'';
@@ -419,7 +420,10 @@ class Agents
$row[8] = $row[__('Last contact')] = $time;
}
- $row[8] = $row[__('Last contact')] = '
'.__('Last contact').' '.'
'.$row[__('Last contact')].'';
+ $row[8] = $row[__('Last contact')] = '
'.$row[__('Last contact')].'';
+
+ $last_status_change = human_time_comparation(agents_get_last_status_change($agent['id_agente']), 'tiny');
+ $row[9] = $row[__('Last status change')] = '
'.$last_status_change.'';
if (!$ajax) {
unset($row[0]);
@@ -431,6 +435,7 @@ class Agents
unset($row[6]);
unset($row[7]);
unset($row[8]);
+ unset($row[9]);
}
$agents[$agent['id_agente']] = $row;
@@ -513,6 +518,7 @@ class Agents
\"
\" + agent[6] + \" | \" +
\"
\" + agent[7] + \" | \" +
\"
\" + agent[8] + \" | \" +
+ \"
\" + agent[9] + \" | \" +
\"\");
});
diff --git a/pandora_console/mobile/operation/alerts.php b/pandora_console/mobile/operation/alerts.php
index 65971a52ea..43c6482264 100644
--- a/pandora_console/mobile/operation/alerts.php
+++ b/pandora_console/mobile/operation/alerts.php
@@ -345,7 +345,7 @@ class Alerts
);
$row[__('Last Fired')] = sprintf(
$disabled_style,
- ui_print_timestamp($alert['last_fired'], true)
+ human_time_comparation($alert['last_fired'], 'tiny')
);
$row[__('Status')] = ui_print_status_image($status, $title, true);
diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php
index 50e9aab8ba..16212053d2 100644
--- a/pandora_console/mobile/operation/events.php
+++ b/pandora_console/mobile/operation/events.php
@@ -326,10 +326,7 @@ class Events
$event['clean_tags'] = events_clean_tags(
$event['tags']
);
- $event['timestamp'] = date(
- $system->getConfig('date_format'),
- $event['utimestamp']
- );
+ $event['timestamp'] = human_time_comparation($event['utimestamp'], 'tiny');
if (empty($event['owner_user']) === true) {
$event['owner_user'] = '
'.__('N/A').'';
} else {
@@ -380,30 +377,30 @@ class Events
switch ($event['criticity']) {
default:
case 0:
- $img_sev = 'images/status_sets/default/severity_maintenance.png';
+ $img_sev = 'images/status_sets/default/severity_maintenance_rounded.png';
break;
case 1:
- $img_sev = 'images/status_sets/default/severity_informational.png';
+ $img_sev = 'images/status_sets/default/severity_informational_rounded.png';
break;
case 2:
- $img_sev = 'images/status_sets/default/severity_normal.png';
+ $img_sev = 'images/status_sets/default/severity_normal_rounded.png';
break;
case 3:
- $img_sev = 'images/status_sets/default/severity_warning.png';
+ $img_sev = 'images/status_sets/default/severity_warning_rounded.png';
break;
case 4:
- $img_sev = 'images/status_sets/default/severity_critical.png';
+ $img_sev = 'images/status_sets/default/severity_critical_rounded.png';
break;
case 5:
- $img_sev = 'images/status_sets/default/severity_minor.png';
+ $img_sev = 'images/status_sets/default/severity_minor_rounded.png';
break;
case 6:
- $img_sev = 'images/status_sets/default/severity_major.png';
+ $img_sev = 'images/status_sets/default/severity_major_rounded.png';
break;
}
@@ -412,9 +409,8 @@ class Events
$img_sev,
true,
[
- 'class' => 'image_status',
- 'width' => 12,
- 'height' => 12,
+ 'width' => 30,
+ 'height' => 15,
'title' => $event_criticity,
],
false,
@@ -879,7 +875,7 @@ class Events
$options['content_text'] .= '
'.__('Fail validate').'
';
- $options['button_close'] = false;
+ $options['button_close'] = true;
return $options;
}
@@ -1209,8 +1205,6 @@ class Events
if (data.correct) {
event = data.event;
//Fill the dialog
- $("#detail_event_dialog h1.dialog_title")
- .html(event["evento"]);
$("#detail_event_dialog .cell_event_name")
.html(event["evento"]);
$("#detail_event_dialog .cell_event_id")
@@ -1256,6 +1250,12 @@ class Events
$("#validate_button_correct").hide();
$.mobile.loading( "hide" );
$("#detail_event_dialog_hook").click();
+
+ $("#detail_event_dialog-button_close").html("X");
+ $("#detail_event_dialog-button_close").addClass("close-button-dialog");
+ $(".dialog_title").addClass("ml5px");
+ $(".dialog_title").parent().addClass("flex align-items-center space-between");
+ $(".dialog_title").parent().append($("#detail_event_dialog-button_close"));
}
else {
$.mobile.loading( "hide" );
diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php
index d610c5a13a..89f39912f0 100644
--- a/pandora_console/mobile/operation/modules.php
+++ b/pandora_console/mobile/operation/modules.php
@@ -591,7 +591,18 @@ class Modules
}
}
- $row[0] = $row[__('Module name')] = '
'.$image_status.''.'
'.ui_print_truncate_text($module['module_name'], 30, false).'';
+ $script = '';
+ if ($system->getRequest('page') === 'modules') {
+ if ($system->getConfig('metaconsole')) {
+ $script = 'onclick="openDialog('.$module['id_agente_modulo'].', '.$this->id_agent.' ,'.$module['server_id'].');"';
+ } else {
+ $script = 'onclick="openDialog('.$module['id_agente_modulo'].', '.$this->id_agent.', \'node\');"';
+ }
+
+ $row[0] = $row[__('Module name')] = '
'.$image_status.''.''.ui_print_truncate_text($module['module_name'], 30, false).'';
+ } else {
+ $row[0] = $row[__('Module name')] = '
'.$image_status.''.'
'.ui_print_truncate_text($module['module_name'], 30, false).'';
+ }
if ($this->columns['agent']) {
$row[1] = $row[__('Agent name')] = '
'.__('Agent').' '.ui_print_truncate_text($module['agent_alias'], 50, false).'';
@@ -658,7 +669,7 @@ class Modules
$row[4] = $row[__('Interval')] = '
'.__('Interval.').' '.$row[__('Interval')].'';
- $row[6] = $row[__('Timestamp')] = '
'.__('Last update.').' '.ui_print_timestamp($module['utimestamp'], true, ['units' => 'tiny']).'';
+ $row[6] = $row[__('Timestamp')] = '
'.__('Last update.').' '.human_time_comparation($module['utimestamp'], 'tiny').'';
if (is_numeric($module['datos'])) {
$output = format_numeric($module['datos']);
@@ -712,29 +723,50 @@ class Modules
);
// Row 7.
- $row[__('Data')] = ui_get_snapshot_image($link, $is_snapshot).' ';
+ $row[7] = $row[__('Data')] = ui_get_snapshot_image($link, $is_snapshot).' ';
} else {
- if ($system->getConfig('metaconsole')) {
- $row[__('Data')] = '
';
- $row[__('Data')] .= '';
- $row[__('Data')] .= $row[__('Status')].' ';
- $row[__('Data')] .= 'id_agent.'">';
- $row[__('Data')] .= $output.'';
- // Row 7.
- $row[__('Data')];
+ if ($system->getRequest('page') === 'modules') {
+ if ($system->getConfig('metaconsole')) {
+ $row[7] = $row[__('Data')] = '
';
+ $row[7] = $row[__('Data')] .= '';
+ $row[7] = $row[__('Data')] .= $row[__('Status')].' ';
+ $row[7] = $row[__('Data')] .= '';
+ // Row 7.
+ $row[7] = $row[__('Data')];
+ } else {
+ // Row 7.
+ $row[7] = $row[__('Data')] = '
';
+ $row[7] = $row[__('Data')] .= '';
+ $row[7] = $row[__('Data')] .= $row[__('Status')].' ';
+ $row[7] = $row[__('Data')] .= '';
+ }
} else {
- // Row 7.
- $row[__('Data')] = '
';
- $row[__('Data')] .= '';
- $row[__('Data')] .= $row[__('Status')].' ';
- $row[__('Data')] .= 'id_agent.'">';
- $row[__('Data')] .= $output.'';
+ if ($system->getConfig('metaconsole')) {
+ $row[__('Data')] = '
';
+ $row[__('Data')] .= '';
+ $row[__('Data')] .= $row[__('Status')].' ';
+ $row[__('Data')] .= 'id_agent.'">';
+ $row[__('Data')] .= $output.'';
+ // Row 7.
+ $row[__('Data')];
+ } else {
+ // Row 7.
+ $row[__('Data')] = '
';
+ $row[__('Data')] .= '';
+ $row[__('Data')] .= $row[__('Status')].' ';
+ $row[__('Data')] .= 'id_agent.'">';
+ $row[__('Data')] .= $output.'';
+ }
}
}
@@ -804,6 +836,30 @@ class Modules
}
}
+ $ui->contentAddHtml(
+ '
+
+
+
+
+
'.__('Choose option').'
+
+
+
+
'
+ );
+
$ui->contentAddLinkListener('list_Modules');
}
@@ -850,8 +906,8 @@ class Modules
\"
".__('Status')."\" + module[5] + \" | \" +
\"
".__('Interval')."\" + module[4] + \" | \" +
\"
".__('Timestamp')."\" + module[6] + \" | \" +
- \"
".__('Data').'" + module[7] + " | " +
- "");
+ \"
".__('Data')."\" + module[7] + \" | \" +
+ \"\");
});
load_more_rows = 1;
@@ -860,21 +916,36 @@ class Modules
},
- "json");
+ \"json\");
}
}
}
+
+ function openDialog(moduleId, agentId, serverId) {
+ console.log(1);
+ var graph = '';
+ var historical = '';
+ if (serverId === 'node') {
+ graph = 'index.php?page=module_graph&id='+moduleId+'&id_agent='+agentId;
+ } else {
+ graph = 'index.php?page=module_graph&id='+moduleId+'&id_agent='+agentId+'&server_id='+serverId;
+ }
+
+ $('#graph-option').attr('href', graph);
+
+ $('#module-dialog-button').click();
+ }
$(document).ready(function() {
- $(window).bind("scroll", function () {
+ $(window).bind(\"scroll\", function () {
custom_scroll();
});
- $(window).on("touchmove", function(event) {
+ $(window).on(\"touchmove\", function(event) {
custom_scroll();
});
- });
- '
+ });
+ "
);
}