#12524 disable auto start alerts

This commit is contained in:
Jonathan 2024-02-15 13:54:14 +01:00
parent 097f945a7a
commit 5dd9acb02b
4 changed files with 6 additions and 6 deletions

View File

@ -2931,6 +2931,7 @@ function html_print_anchor(
'class', 'class',
'title', 'title',
'onClick', 'onClick',
'target',
]; ];
$output .= (isset($options['href']) === true) ? 'href="'.io_safe_input_html($options['href']).'"' : ui_get_full_url(); $output .= (isset($options['href']) === true) ? 'href="'.io_safe_input_html($options['href']).'"' : ui_get_full_url();

View File

@ -1445,11 +1445,13 @@ function ui_format_alert_row(
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
// Do not show link if user cannot access node // Do not show link if user cannot access node
if ((bool) can_user_access_node() === true) { if ((bool) can_user_access_node() === true) {
$url = $server['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agente['id_agente']; $hashdata = metaconsole_get_server_hashdata($server);
$url = $server['server_url'].'/index.php?sec=estado&sec2=operation/agentes/ver_agente&loginhash=auto&loginhash_data='.$hashdata.'&loginhash_user='.str_rot13($config['id_user']).'&id_agente='.$agente['id_agente'];
$data[$index['agent_name']] .= html_print_anchor( $data[$index['agent_name']] .= html_print_anchor(
[ [
'href' => $url, 'href' => $url,
'content' => '<span class="bolder" title="'.$agente['nombre'].'">'.$agente['alias'].'</span>', 'content' => '<span class="bolder" title="'.$agente['nombre'].'">'.$agente['alias'].'</span>',
'target' => '_blank',
], ],
true true
); );

View File

@ -402,6 +402,7 @@ if ($agent_view_page === true) {
'no_toggle' => true, 'no_toggle' => true,
'class' => 'flex', 'class' => 'flex',
], ],
'start_disabled' => true,
] ]
); );
} else { } else {
@ -585,10 +586,6 @@ function alerts_table_controls() {
} }
$(document).ready ( function () { $(document).ready ( function () {
if ($('#filter_applied').val() == 0){
$('#button-form_alerts_status_datatable_search_bt').trigger('click');
$('#filter_applied').val(1);
}
alerts_table_controls(); alerts_table_controls();
$('#button-alert_validate').on('click', function () { $('#button-alert_validate').on('click', function () {
validateAlerts(); validateAlerts();

View File

@ -1729,7 +1729,7 @@ if (empty($result) === false) {
false false
); );
echo '</form>'; echo '</form>';
$agent_link = "<a onclick='event.preventDefault(); document.getElementById(\"agent-redirection-".$inc_id."\").submit();' href='".$row['server_url'].'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agent']."'>"; $agent_link = "<a onclick='event.preventDefault(); document.getElementById(\"agent-redirection-".$inc_id."\").submit();' href='".$row['server_url'].'index.php?sec=estado&sec2=operation/agentes/ver_agente&loginhash=auto&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']).'&id_agente='.$row['id_agent']."'>";
$agent_alias = ui_print_truncate_text( $agent_alias = ui_print_truncate_text(
$agent_alias, $agent_alias,