mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
wip reports alert actions
This commit is contained in:
parent
d030b3b924
commit
ec21d9d08a
@ -3071,44 +3071,57 @@ function alerts_get_alert_fired($filters=[], $groupsBy=[], $total=false)
|
|||||||
case 'module':
|
case 'module':
|
||||||
$fields[] = $table.'.id_agentmodule as module';
|
$fields[] = $table.'.id_agentmodule as module';
|
||||||
$group_array[] = $table.'.id_agentmodule';
|
$group_array[] = $table.'.id_agentmodule';
|
||||||
|
if ($total === false) {
|
||||||
$names_search = modules_get_agentmodule_name_array(
|
$names_search = modules_get_agentmodule_name_array(
|
||||||
array_values($filters['modules'])
|
array_values($filters['modules'])
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_metaconsole() === true && $total === false) {
|
if (is_metaconsole() === true) {
|
||||||
$fields[] = $table.'.server_id as server';
|
$fields[] = $table.'.server_id as server';
|
||||||
$group_array[] = $table.'.server_id';
|
$group_array[] = $table.'.server_id';
|
||||||
|
if ($total === false) {
|
||||||
$names_server = metaconsole_get_names();
|
$names_server = metaconsole_get_names();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'template':
|
case 'template':
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
$fields[] = 'talert_template_modules.id_alert_template as template';
|
$fields[] = 'talert_template_modules.id_alert_template as template';
|
||||||
$group_array[] = 'talert_template_modules.id_alert_template';
|
$group_array[] = 'talert_template_modules.id_alert_template';
|
||||||
|
if ($total === false) {
|
||||||
$names_search = alerts_get_templates_name_array(
|
$names_search = alerts_get_templates_name_array(
|
||||||
array_values($filters['templates'])
|
array_values($filters['templates'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'agent':
|
case 'agent':
|
||||||
$fields[] = $table.'.id_agente as agent';
|
$fields[] = $table.'.id_agente as agent';
|
||||||
$group_array[] = $table.'.id_agente';
|
$group_array[] = $table.'.id_agente';
|
||||||
|
if ($total === false) {
|
||||||
$names_search = agents_get_alias_array(
|
$names_search = agents_get_alias_array(
|
||||||
array_values($filters['agents'])
|
array_values($filters['agents'])
|
||||||
);
|
);
|
||||||
if (is_metaconsole() === true && $total === false) {
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
$fields[] = $table.'.server_id as server';
|
$fields[] = $table.'.server_id as server';
|
||||||
$group_array[] = $table.'.server_id';
|
$group_array[] = $table.'.server_id';
|
||||||
|
if ($total === false) {
|
||||||
$names_server = metaconsole_get_names();
|
$names_server = metaconsole_get_names();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'group':
|
case 'group':
|
||||||
$fields[] = $table.'.id_grupo as `group`';
|
$fields[] = $table.'.id_grupo as `group`';
|
||||||
$group_array[] = $table.'.id_grupo';
|
$group_array[] = $table.'.id_grupo';
|
||||||
|
if ($total === false) {
|
||||||
$names_search = users_get_groups($config['user'], 'AR', false);
|
$names_search = users_get_groups($config['user'], 'AR', false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -3154,6 +3167,8 @@ function alerts_get_alert_fired($filters=[], $groupsBy=[], $total=false)
|
|||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
|
%s
|
||||||
|
%s
|
||||||
%s',
|
%s',
|
||||||
implode(", \n", $fields),
|
implode(", \n", $fields),
|
||||||
$table,
|
$table,
|
||||||
@ -3161,8 +3176,8 @@ function alerts_get_alert_fired($filters=[], $groupsBy=[], $total=false)
|
|||||||
$table,
|
$table,
|
||||||
$filter_date,
|
$filter_date,
|
||||||
$filter_group,
|
$filter_group,
|
||||||
// $filter_agents,
|
$filter_agents,
|
||||||
// $filter_modules,
|
$filter_modules,
|
||||||
$filter_actions,
|
$filter_actions,
|
||||||
$filter_templates,
|
$filter_templates,
|
||||||
$group_by
|
$group_by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user