#10622 add action full name
This commit is contained in:
parent
631a247f19
commit
e986ac27d6
|
@ -68,8 +68,9 @@ if (is_ajax() === true) {
|
||||||
|
|
||||||
$alerts = [];
|
$alerts = [];
|
||||||
foreach ($ids_policies as $policie) {
|
foreach ($ids_policies as $policie) {
|
||||||
foreach (policies_get_alerts($policie) as $row) {
|
foreach (policies_get_alerts($policie, ['id_policy_module' => '<>0']) as $row) {
|
||||||
$alerts[$row['id']] = io_safe_output(alerts_get_alert_template_name($row['id_alert_template']).' - '.policies_get_module_name($row['id_policy_module']));
|
$name = io_safe_output(alerts_get_alert_template_name($row['id_alert_template']).' - '.policies_get_module_name($row['id_policy_module']));
|
||||||
|
$alerts[$row['id'].'__'.policies_get_name($policie).' - '.$name] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +83,9 @@ if (is_ajax() === true) {
|
||||||
|
|
||||||
$actions = [];
|
$actions = [];
|
||||||
foreach ($array_alerts as $alert) {
|
foreach ($array_alerts as $alert) {
|
||||||
|
$alert_policie = explode('__', $alert);
|
||||||
|
$alert_id = $alert_policie[0];
|
||||||
|
$alert_name = $alert_policie[1];
|
||||||
$array_actions = db_get_all_rows_filter(
|
$array_actions = db_get_all_rows_filter(
|
||||||
'tpolicy_alerts_actions',
|
'tpolicy_alerts_actions',
|
||||||
['id_policy_alert' => $alert]
|
['id_policy_alert' => $alert]
|
||||||
|
@ -91,7 +95,7 @@ if (is_ajax() === true) {
|
||||||
'talert_actions',
|
'talert_actions',
|
||||||
['id' => $row['id_alert_action']]
|
['id' => $row['id_alert_action']]
|
||||||
);
|
);
|
||||||
$actions[$row['id']] = $action['name'];
|
$actions[$row['id']] = $alert_name.' - '.$action['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,6 +197,7 @@ $table->data[1][1] = html_print_label_input_block(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->colspan[2][0] = 2;
|
||||||
$table->data[2][0] = html_print_label_input_block(
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
__('Actions'),
|
__('Actions'),
|
||||||
html_print_select(
|
html_print_select(
|
||||||
|
|
|
@ -69,7 +69,8 @@ if (is_ajax() === true) {
|
||||||
$alerts = [];
|
$alerts = [];
|
||||||
foreach ($ids_policies as $policie) {
|
foreach ($ids_policies as $policie) {
|
||||||
foreach (policies_get_alerts($policie, ['id_policy_module' => '0']) as $row) {
|
foreach (policies_get_alerts($policie, ['id_policy_module' => '0']) as $row) {
|
||||||
$alerts[$row['id']] = io_safe_output(alerts_get_alert_template_name($row['id_alert_template']).' - '.$row['name_extern_module']);
|
$name = io_safe_output(alerts_get_alert_template_name($row['id_alert_template']).' - '.$row['name_extern_module']);
|
||||||
|
$alerts[$row['id'].'__'.policies_get_name($policie).' - '.$name] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +83,9 @@ if (is_ajax() === true) {
|
||||||
|
|
||||||
$actions = [];
|
$actions = [];
|
||||||
foreach ($array_alerts as $alert) {
|
foreach ($array_alerts as $alert) {
|
||||||
|
$alert_policie = explode('__', $alert);
|
||||||
|
$alert_id = $alert_policie[0];
|
||||||
|
$alert_name = $alert_policie[1];
|
||||||
$array_actions = db_get_all_rows_filter(
|
$array_actions = db_get_all_rows_filter(
|
||||||
'tpolicy_alerts_actions',
|
'tpolicy_alerts_actions',
|
||||||
['id_policy_alert' => $alert]
|
['id_policy_alert' => $alert]
|
||||||
|
@ -91,7 +95,7 @@ if (is_ajax() === true) {
|
||||||
'talert_actions',
|
'talert_actions',
|
||||||
['id' => $row['id_alert_action']]
|
['id' => $row['id_alert_action']]
|
||||||
);
|
);
|
||||||
$actions[$row['id']] = $action['name'];
|
$actions[$row['id']] = $alert_name.' - '.$action['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,6 +197,7 @@ $table->data[1][1] = html_print_label_input_block(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->colspan[2][0] = 2;
|
||||||
$table->data[2][0] = html_print_label_input_block(
|
$table->data[2][0] = html_print_label_input_block(
|
||||||
__('Actions'),
|
__('Actions'),
|
||||||
html_print_select(
|
html_print_select(
|
||||||
|
|
Loading…
Reference in New Issue