mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-10633-pantalla-de-timeout' into 'develop'
Ent 10633 pantalla de timeout See merge request artica/pandorafms!5600
This commit is contained in:
commit
6da2d233cc
@ -704,6 +704,17 @@ $table->data[$i][] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->data[$i][] = html_print_label_input_block(
|
||||||
|
__('Check conexion interval'),
|
||||||
|
html_print_input_number(
|
||||||
|
[
|
||||||
|
'name' => 'check_conexion_interval',
|
||||||
|
'min' => 90,
|
||||||
|
'value' => $config['check_conexion_interval'],
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||||
|
|
||||||
echo '<fieldset class="margin-bottom-10">';
|
echo '<fieldset class="margin-bottom-10">';
|
||||||
|
@ -386,6 +386,10 @@ function config_update_config()
|
|||||||
$error_update[] = __('Enable console report');
|
$error_update[] = __('Enable console report');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_update_value('check_conexion_interval', get_parameter('check_conexion_interval'), true) === false) {
|
||||||
|
$error_update[] = __('Check conexion interval');
|
||||||
|
}
|
||||||
|
|
||||||
if (config_update_value('unique_ip', get_parameter('unique_ip'), true) === false) {
|
if (config_update_value('unique_ip', get_parameter('unique_ip'), true) === false) {
|
||||||
$error_update[] = __('Unique IP');
|
$error_update[] = __('Unique IP');
|
||||||
}
|
}
|
||||||
@ -2359,6 +2363,10 @@ function config_process_config()
|
|||||||
config_update_value('reporting_console_enable', 0);
|
config_update_value('reporting_console_enable', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['check_conexion_interval'])) {
|
||||||
|
config_update_value('check_conexion_interval', 180);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['elasticsearch_ip'])) {
|
if (!isset($config['elasticsearch_ip'])) {
|
||||||
config_update_value('elasticsearch_ip', '');
|
config_update_value('elasticsearch_ip', '');
|
||||||
}
|
}
|
||||||
|
@ -7076,7 +7076,7 @@ function ui_print_message_dialog($title, $text, $id='', $img='', $text_button=''
|
|||||||
echo '<div id="message_dialog_'.$id.'" title="'.$title.'" style="'.$style.'">';
|
echo '<div id="message_dialog_'.$id.'" title="'.$title.'" style="'.$style.'">';
|
||||||
echo '<div class="content_dialog">';
|
echo '<div class="content_dialog">';
|
||||||
echo '<div class="icon_message_dialog">';
|
echo '<div class="icon_message_dialog">';
|
||||||
echo html_print_image($img, true, ['alt' => $title, 'border' => 0]);
|
echo html_print_image($img, true, ['alt' => $title, 'border' => 0, 'class' => 'icon_connection_check']);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="content_message_dialog">';
|
echo '<div class="content_message_dialog">';
|
||||||
echo '<div class="text_message_dialog">';
|
echo '<div class="text_message_dialog">';
|
||||||
|
@ -4,16 +4,17 @@
|
|||||||
* Connection Check
|
* Connection Check
|
||||||
* --------------------------------------
|
* --------------------------------------
|
||||||
*/
|
*/
|
||||||
|
$(document).ready(function() {
|
||||||
checkConnection(1);
|
checkConnection(get_php_value("check_conexion_interval"));
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs connection tests every minutes and add connection listeners
|
* Performs connection tests every minutes and add connection listeners
|
||||||
* @param {integer} time in minutes
|
* @param {integer} time in minutes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function checkConnection(minutes) {
|
function checkConnection(seconds) {
|
||||||
var cicle = minutes * 60 * 1000;
|
var cicle = seconds * 1000;
|
||||||
var checkConnection = setInterval(handleConnection, cicle);
|
var checkConnection = setInterval(handleConnection, cicle);
|
||||||
|
|
||||||
// Connection listeters.
|
// Connection listeters.
|
||||||
@ -48,7 +49,7 @@ function handleConnection() {
|
|||||||
// If test connection file is not found, do not show message.
|
// If test connection file is not found, do not show message.
|
||||||
if (err.status != 404) {
|
if (err.status != 404) {
|
||||||
connected = false;
|
connected = false;
|
||||||
msg = err;
|
msg = err.statusText;
|
||||||
} else {
|
} else {
|
||||||
connected = true;
|
connected = true;
|
||||||
}
|
}
|
||||||
|
@ -135,4 +135,6 @@ class Console extends Entity
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11779,6 +11779,12 @@ span.help_icon_15px > img {
|
|||||||
z-index: 1116 !important;
|
z-index: 1116 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon_connection_check {
|
||||||
|
width: 65px !important;
|
||||||
|
height: 65px !important;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ==== Spinner ==== */
|
/* ==== Spinner ==== */
|
||||||
.spinner-fixed {
|
.spinner-fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -1487,6 +1487,7 @@ echo html_print_div(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Connection lost alert.
|
// Connection lost alert.
|
||||||
|
set_js_value('check_conexion_interval', $config['check_conexion_interval']);
|
||||||
ui_require_javascript_file('connection_check');
|
ui_require_javascript_file('connection_check');
|
||||||
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false));
|
||||||
$conn_title = __('Connection with server has been lost');
|
$conn_title = __('Connection with server has been lost');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user