Merge branch 'ent-10119-vista-de-alertas-fallo-en-la-version-open' into 'develop'

Ent 10119 vista de alertas fallo en la version open

See merge request artica/pandorafms!5381
This commit is contained in:
Daniel Rodriguez 2023-01-09 09:26:40 +00:00
commit 5d667f4952
2 changed files with 242 additions and 224 deletions

View File

@ -915,7 +915,6 @@ if ($get_agent_alerts_datatable === true) {
$data[] = ui_format_alert_row($alert, true, $url, 'font-size: 7pt;');
}
$data = array_reduce(
$data,
function ($carry, $row) {
@ -923,7 +922,7 @@ if ($get_agent_alerts_datatable === true) {
// of objects, making a post-process of certain fields.
$tmp = new stdClass();
// Standby.
if (enterprise_installed() === true) {
$tmp->policy = $row[0];
$tmp->standby = $row[1];
$tmp->force = $row[2];
@ -934,6 +933,18 @@ if ($get_agent_alerts_datatable === true) {
$tmp->last_fired = $row[7];
$tmp->status = $row[8];
$tmp->validate = $row[9];
} else {
// Open.
$tmp->standby = $row[0];
$tmp->force = $row[1];
$tmp->agent_name = $row[2];
$tmp->agent_module_name = $row[3];
$tmp->template_name = $row[4];
$tmp->action = $row[5];
$tmp->last_fired = $row[6];
$tmp->status = $row[7];
$tmp->validate = $row[8];
}
$carry[] = $tmp;
return $carry;

View File

@ -227,10 +227,7 @@ if ($free_search != '') {
$url .= '&free_search='.$free_search;
}
$columns = ['standby'];
$column_names = [
[
'title' => 'Standby',
@ -238,7 +235,8 @@ if ($free_search != '') {
],
];
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
if (enterprise_installed() === true) {
array_unshift(
$column_names,
[
@ -325,6 +323,7 @@ if ($free_search != '') {
5,
];
} else {
if (enterprise_installed() === true) {
$no_sortable_columns = [
0,
1,
@ -332,6 +331,14 @@ if ($free_search != '') {
3,
7,
];
} else {
$no_sortable_columns = [
0,
1,
2,
6,
];
}
}