mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge branch 'ent-12344-problemas-detectado-nueva-vista-de-logs' into 'develop'
Ent 12344 problemas detectado nueva vista de logs See merge request artica/pandorafms!6609
This commit is contained in:
commit
e02cbb10f2
@ -1718,3 +1718,5 @@ operation/incidents/list_integriaims_incidents.php
|
|||||||
include/functions_incidents.php
|
include/functions_incidents.php
|
||||||
include/functions_integriaims.php
|
include/functions_integriaims.php
|
||||||
include/ajax/integria_incidents.ajax.php
|
include/ajax/integria_incidents.ajax.php
|
||||||
|
enterprise/operation/log/log_source.php
|
||||||
|
enterprise/include/class/LogSource.class.php
|
||||||
|
@ -16,6 +16,8 @@ global $config;
|
|||||||
// Login check.
|
// Login check.
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
|
enterprise_include('include/functions_elasticsearch.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@ -62,30 +64,26 @@ $table->style['source'] = 'width: 80%;';
|
|||||||
|
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
|
|
||||||
|
$sources = get_sources_by_agent($agent_id);
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
|
if (empty($sources) === false) {
|
||||||
|
foreach ($sources as $key => $source) {
|
||||||
// Get most recent sources for active agent.
|
$row['source'] = $source;
|
||||||
$sql = "select source, MAX(utimestamp) AS last_contact from tagent_module_log where id_agent=$agent_id GROUP BY source";
|
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$source."')"]).'</a>';
|
||||||
|
$row['last_contact'] = html_print_image(
|
||||||
$logs = mysql_db_get_all_rows_sql($sql);
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
foreach ($logs as $log) {
|
[
|
||||||
$row['source'] = $log['source'];
|
'id' => 'img-'.$source,
|
||||||
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
'border' => '0',
|
||||||
$row['last_contact'] = html_print_image(
|
'width' => '20px',
|
||||||
'images/spinner.gif',
|
'heigth' => '20px',
|
||||||
true,
|
'onload' => "get_last_contact('".$source."', '".$agent_id."')",
|
||||||
[
|
]
|
||||||
'id' => 'img-'.$log['source'],
|
);
|
||||||
'border' => '0',
|
$table->data[$source] = $row;
|
||||||
'width' => '20px',
|
}
|
||||||
'heigth' => '20px',
|
|
||||||
'onload' => "get_last_contact('".$log['source']."', '".$agent_id."')",
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$table->data[$log['source']] = $row;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user