Merge remote-tracking branch 'origin/develop' into ent-10849-cambiar-modo-del-servidor-un-solo-proceso-muchos-hilos-varios-procesos-algunos-hilos

This commit is contained in:
Ramon Novoa 2024-01-22 11:09:01 +01:00
commit ddebb9ca7c
4 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,8 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `tncm_agent_data`
ADD COLUMN `id_agent_data` int not null default 0 AFTER `script_type`;
ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ; ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ;
ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`; ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`;

View File

@ -96,7 +96,8 @@ function ui_print_truncate_text(
$showTextInTitle=true, $showTextInTitle=true,
$suffix='…', $suffix='…',
$style=false, $style=false,
$forced_title=false $forced_title=false,
$text_title=''
) { ) {
global $config; global $config;
$truncate_at_end = false; $truncate_at_end = false;
@ -211,7 +212,11 @@ function ui_print_truncate_text(
} }
if ($forced_title === true) { if ($forced_title === true) {
$truncateText = '<span class="forced_title" style="'.$style.'" data-title="'.$text.'" data-use_title_for_force_title="1>'.$truncateText.'</span>'; if ($text_title !== '') {
$truncateText = '<span class="forced_title" style="'.$style.'" data-title="'.$text_title.'" data-use_title_for_force_title="1">'.$truncateText.'</span>';
} else {
$truncateText = '<span class="forced_title" style="'.$style.'" data-title="'.$text.'" data-use_title_for_force_title="1">'.$truncateText.'</span>';
}
} }
if ($return == true) { if ($return == true) {

View File

@ -522,6 +522,7 @@ if (is_ajax() === true) {
$tmp->event_title = $output_event_name; $tmp->event_title = $output_event_name;
$tmp->b64 = base64_encode(json_encode($tmp)); $tmp->b64 = base64_encode(json_encode($tmp));
$tmp->evento = $output_event_name; $tmp->evento = $output_event_name;
$tmp->event_force_title = (strlen($output_event_name) >= 300) ? substr($output_event_name, 0, 300).'...' : $output_event_name;
if (empty($tmp->module_name) === false) { if (empty($tmp->module_name) === false) {
$tmp->module_name = ui_print_truncate_text( $tmp->module_name = ui_print_truncate_text(
@ -768,6 +769,7 @@ if (is_ajax() === true) {
'&hellip;', '&hellip;',
true, true,
true, true,
$tmp->event_force_title
); );
$evn .= $tmp->evento.'</a>'; $evn .= $tmp->evento.'</a>';

View File

@ -105,7 +105,11 @@ sub run ($$$$$) {
# Run the server in a new process. # Run the server in a new process.
if ($self->{'_fork'} == 1) { if ($self->{'_fork'} == 1) {
# Ignore SIGCHLD.
$SIG{CHLD} = 'IGNORE'; $SIG{CHLD} = 'IGNORE';
# Fork!
$self->{'_child_pid'} = fork(); $self->{'_child_pid'} = fork();
die($!) unless defined($self->{'_child_pid'}); die($!) unless defined($self->{'_child_pid'});
} }
@ -116,6 +120,9 @@ sub run ($$$$$) {
if ($self->{'_child_pid'} != 0) { if ($self->{'_child_pid'} != 0) {
return; return;
} else { } else {
# Restore the SIGCHLD handler.
$SIG{CHLD} = 'DEFAULT';
# Rename the process to prevent conflicts. # Rename the process to prevent conflicts.
my $suffix = lc(get_server_name($self->getServerType())); my $suffix = lc(get_server_name($self->getServerType()));
$0 =~ s/pandora_server/pandora_$suffix/; $0 =~ s/pandora_server/pandora_$suffix/;