Merge remote-tracking branch 'origin/develop' into ent-13148-vistas-vacias

This commit is contained in:
Pablo Aragon 2024-04-05 08:28:46 +02:00
commit 20d06ee09f
8 changed files with 37 additions and 95 deletions

View File

@ -528,23 +528,6 @@ ServerTokens Prod
EO_CONFIG_F
# Add ws proxy options to apache.
cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD'
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
EO_HTTPD_MOD
cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Temporal quitar htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
@ -691,16 +674,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/
chmod +x /etc/init.d/pandora_websocket_engine
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> $LOGFILE
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> $LOGFILE
# Enable pandora ha service
systemctl enable pandora_server --now &>> $LOGFILE
execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server"

View File

@ -639,23 +639,6 @@ ServerTokens Prod
EO_CONFIG_F
# Add ws proxy options to apache.
cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD'
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
EO_HTTPD_MOD
cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Temporal quitar htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess
sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess
@ -813,16 +796,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> "$LOGFILE"
# Enable pandora ha service
systemctl enable pandora_server --now &>> "$LOGFILE"
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"

View File

@ -648,17 +648,6 @@ ServerTokens Prod
</Directory>
EO_CONFIG_F
#Enable quickshell proxy
cat >> /etc/apache2/mods-enabled/00-proxy.conf << 'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
# Fixing console permissions
chmod 600 $PANDORA_CONSOLE/include/config.php &>> "$LOGFILE"
chown -R www-data:www-data $PANDORA_CONSOLE &>> "$LOGFILE"
@ -813,16 +802,6 @@ EO_LRA
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"
# Configure websocket to be started at start.
systemctl enable pandora_websocket_engine &>> "$LOGFILE"
# Enable pandora ha service
execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server"
systemctl enable pandora_server &>> "$LOGFILE"

View File

@ -2713,6 +2713,7 @@ function events_print_type_img(
$icon = 'images/module_warning.png';
break;
case 'unknown':
case 'going_unknown':
$icon = 'images/module_unknown.png';
break;
@ -2741,7 +2742,6 @@ function events_print_type_img(
$icon = 'images/configuration@svg.svg';
break;
case 'unknown':
default:
$style .= ' invert_filter';
$icon = 'images/event.svg';
@ -2993,6 +2993,9 @@ function events_print_type_description($type, $return=false)
break;
case 'unknown':
$output .= __('Unknown');
break;
default:
$output .= __('Unknown type:').': '.$type;
break;
@ -5861,6 +5864,7 @@ function events_get_instructions($event, $max_text_length=300)
}
switch ($event['event_type']) {
case 'unknown':
case 'going_unknown':
if ($event['unknown_instructions'] != '') {
$value = str_replace(

View File

@ -584,3 +584,20 @@ div.container-filter-buttons {
#button-start-search {
width: 115px;
}
.events-refresh-pure {
position: fixed;
z-index: 1;
top: 10px;
right: 10px;
width: 450px;
height: 70px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: center;
background-color: #f2f6f7;
border-radius: 15px;
padding: 0px 10px;
}

View File

@ -1916,6 +1916,10 @@ div#dashboard-controls-slides
color: var(--text-color) !important;
}
div.events-refresh-pure {
background-color: #333;
}
.empty-view-buttons {
border-color: #94a1bb14;
}

View File

@ -1673,13 +1673,10 @@ $url .= '';
if ($pure) {
// Fullscreen.
// Floating menu - Start.
echo '<div id="vc-controls" class="zindex999"">';
echo '<div id="menu_tab" class="menu_tab_pure">';
echo '<ul class="mn">';
echo '<div id="vc-controls" class="events-refresh-pure"">';
echo '<div>';
// Quit fullscreen.
echo '<li class="nomn">';
echo '<a target="_top" href="'.$url.'&amp;pure=0">';
echo html_print_image(
'images/exit_fullscreen@svg.svg',
@ -1690,12 +1687,10 @@ if ($pure) {
]
);
echo '</a>';
echo '</li>';
echo '</div>';
// Countdown.
echo '<li class="nomn">';
echo '<div class="events-refr">';
echo '<div class="events-countdown"><span id="refrcounter"></span></div>';
echo '<div id="events-refr-form">';
echo __('Refresh').':';
echo html_print_select(
@ -1710,16 +1705,8 @@ if ($pure) {
false
);
echo '</div>';
echo '</div>';
echo '</li>';
// Console name.
echo '<li class="nomn">';
echo '<div class="vc-title">'.__('Event viewer').'</div>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '<div class="events-countdown"><span id="refrcounter"></span></div>';
echo '</div>';
// Floating menu - End.
@ -3867,4 +3854,9 @@ function show_events_graph(){
}
});
}
$(document).ready(function () {
var controls = document.querySelector('.events-refresh-pure');
autoHideElement(controls, 1000);
});
</script>

View File

@ -7916,7 +7916,7 @@ sub pandora_manage_main ($$$) {
'values' => [
'unknown','alert_fired','alert_recovered','alert_ceased',
'alert_manual_validation','recon_host_detected','system',
'error','new_agent','going_up_warning','going_up_critical','going_down_warning',
'error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_unknown',
'going_down_normal','going_down_critical','going_up_normal','configuration_change'
]
},