Merge remote-tracking branch 'origin/ent-EDF' into ent-4774-welcome-to-pandorafms

This commit is contained in:
fbsanchez 2019-11-13 17:40:45 +01:00
commit 65d02d4529
10 changed files with 230 additions and 127 deletions

View File

@ -635,11 +635,6 @@ if ($config['menu_type'] == 'classic') {
* Loads modal from AJAX to add feedback. * Loads modal from AJAX to add feedback.
*/ */
function show_feedback() { function show_feedback() {
<?php
// Require specific CSS and JS.
ui_require_css_file('wizard');
ui_require_css_file('discovery');
?>
var btn_ok_text = '<?php echo __('Send'); ?>'; var btn_ok_text = '<?php echo __('Send'); ?>';
var btn_cancel_text = '<?php echo __('Cancel'); ?>'; var btn_cancel_text = '<?php echo __('Cancel'); ?>';
var title = '<?php echo __('Report an issue'); ?>'; var title = '<?php echo __('Report an issue'); ?>';
@ -718,6 +713,7 @@ if ($config['menu_type'] == 'classic') {
$("#agent_access").css("display",""); $("#agent_access").css("display","");
}); });
<?php if (enterprise_installed()) { ?>
// Feedback. // Feedback.
$("#feedback-header").click(function () { $("#feedback-header").click(function () {
// Clean DOM. // Clean DOM.
@ -725,6 +721,7 @@ if ($config['menu_type'] == 'classic') {
// Function charge Modal. // Function charge Modal.
show_feedback(); show_feedback();
}); });
<?php } ?>
function blinkpubli(){ function blinkpubli(){
$(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli); $(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 554 B

View File

@ -706,18 +706,34 @@ class Diagnostics extends Wizard
$bytes = 1048576; $bytes = 1048576;
$mega = 1024; $mega = 1024;
switch ($item['Variable_name']) { switch ($item['Variable_name']) {
case 'sql_mode': case 'innodb_buffer_pool_size':
$name = __('Sql mode'); $name = __('InnoDB buffer pool size');
$value = ($item['Value']); $value = ($item['Value'] / $bytes);
$status = (empty($item['Value']) === true) ? 1 : 0; $status = (($item['Value'] / $bytes) >= 250) ? 1 : 0;
$message = __('Must be empty'); $message = __(
'It has to be 40% of the server memory not recommended to be greater or less'
);
break; break;
case 'innodb_log_file_size': case 'innodb_file_per_table':
$name = __('InnoDB log file size'); $name = __('InnoDB file per table');
$value = ($item['Value'] / $bytes); $value = $item['Value'];
$status = (($item['Value'] / $bytes) >= 64) ? 1 : 0; $status = ($item['Value'] === 'ON') ? 1 : 0;
$message = __('Min. Recommended Value').' 64M'; $message = __('Recommended ON');
break;
case 'innodb_flush_log_at_trx_commit':
$name = __('InnoDB flush log at trx-commit');
$value = $item['Value'];
$status = ($item['Value'] == 2) ? 1 : 0;
$message = __('Recommended Value').' 2';
break;
case 'innodb_lock_wait_timeout':
$name = __('InnoDB lock wait timeout');
$value = $item['Value'];
$status = ($item['Value'] >= 90) ? 1 : 0;
$message = __('Min. Recommended Value').' 90s';
break; break;
case 'innodb_log_buffer_size': case 'innodb_log_buffer_size':
@ -727,13 +743,29 @@ class Diagnostics extends Wizard
$message = __('Min. Recommended Value').' 16M'; $message = __('Min. Recommended Value').' 16M';
break; break;
case 'innodb_flush_log_at_trx_commit': case 'innodb_log_file_size':
$name = __('InnoDB flush log at trx-commit'); $name = __('InnoDB log file size');
$value = $item['Value']; $value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 0) ? 1 : 0; $status = (($item['Value'] / $bytes) >= 64) ? 1 : 0;
$message = __('Min. Recommended Value').' 0'; $message = __('Min. Recommended Value').' 64M';
break; break;
/*
case 'join_buffer_size':
$name = __('Join buffer size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 265) ? 1 : 0;
$message = __('Min. Recommended Value 265');
break;
case 'key_buffer_size':
$name = __('Key buffer size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
$message = __('Min. Recommended Value').' 256';
break;
*/
case 'max_allowed_packet': case 'max_allowed_packet':
$name = __('Maximun allowed packet'); $name = __('Maximun allowed packet');
$value = ($item['Value'] / $bytes); $value = ($item['Value'] / $bytes);
@ -741,27 +773,34 @@ class Diagnostics extends Wizard
$message = __('Min. Recommended Value').' 32M'; $message = __('Min. Recommended Value').' 32M';
break; break;
case 'innodb_buffer_pool_size': case 'max_connections':
$name = __('InnoDB buffer pool size'); $name = __('Maximun connections');
$value = ($item['Value'] / $mega); $value = $item['Value'];
$status = (($item['Value'] / $mega) >= 250) ? 1 : 0; $status = (($item['Value']) >= 90) ? 1 : 0;
$message = __( $message = __('Min. Recommended Value');
'It has to be 40% of the server memory not recommended to be greater or less' $message .= ' 90 ';
); $message .= __('conections');
break; break;
case 'sort_buffer_size': case 'query_cache_limit':
$name = __('Sort buffer size'); $name = __('Query cache limit');
$value = number_format(($item['Value'] / $mega), 2); $value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 8) ? 1 : 0;
$message = __('Min. Recommended Value').' 8M';
break;
case 'query_cache_min_res_unit':
$name = __('Query cache min-res-unit');
$value = ($item['Value'] / $mega);
$status = (($item['Value'] / $mega) >= 2) ? 1 : 0;
$message = __('Min. Recommended Value').' 2M';
break;
case 'query_cache_size':
$name = __('Query cache size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0; $status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 32'; $message = __('Min. Recommended Value').' 32M';
break;
case 'join_buffer_size':
$name = __('Join buffer size');
$value = ($item['Value'] / $mega);
$status = (($item['Value'] / $bytes) >= 265) ? 1 : 0;
$message = __('Min. Recommended Value 265');
break; break;
case 'query_cache_type': case 'query_cache_type':
@ -771,83 +810,48 @@ class Diagnostics extends Wizard
$message = __('Recommended ON'); $message = __('Recommended ON');
break; break;
case 'query_cache_size': case 'read_buffer_size':
$name = __('Query cache size'); $name = __('Read buffer size');
$value = ($item['Value'] / $bytes); $value = ($item['Value'] / $mega);
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0; $status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 32MB'; $message = __('Min. Recommended Value').' 32K';
break; break;
case 'query_cache_limit': case 'read_rnd_buffer_size':
$name = __('Query cache limit'); $name = __('Read rnd-buffer size');
$value = ($item['Value'] / $bytes); $value = ($item['Value'] / $mega);
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0; $status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 256K'; $message = __('Min. Recommended Value').' 32K';
break; break;
case 'innodb_lock_wait_timeout': case 'sort_buffer_size':
$name = __('InnoDB lock wait timeout'); $name = __('Sort buffer size');
$value = $item['Value']; $value = ($item['Value'] / $mega);
$status = (($item['Value'] / $bytes) >= 90) ? 1 : 0; $status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 90s'; $message = __('Min. Recommended Value').' 32K';
break;
case 'sql_mode':
$name = __('Sql mode');
$value = ($item['Value']);
$status = (empty($item['Value']) === true) ? 1 : 0;
$message = __('Must be empty');
break; break;
case 'thread_cache_size': case 'thread_cache_size':
$name = __('Thread cache size'); $name = __('Thread cache size');
$value = $item['Value']; $value = $item['Value'];
$status = (($item['Value'] / $bytes) >= 8) ? 1 : 0; $status = ($item['Value'] >= 8) ? 1 : 0;
$message = __('Min. Recommended Value').' 8'; $message = __('Min. Recommended Value').' 8';
break; break;
case 'thread_stack': case 'thread_stack':
$name = __('Thread stack'); $name = __('Thread stack');
$value = ($item['Value'] / $bytes); $value = ($item['Value'] / $mega);
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0; $status = (($item['Value'] / $mega) >= 256) ? 1 : 0;
$message = __('Min. Recommended Value').' 256K';
break;
case 'max_connections':
$name = __('Maximun connections');
$value = $item['Value'];
$status = (($item['Value'] / $bytes) >= 90) ? 1 : 0;
$message = __('Min. Recommended Value').' 90';
break;
case 'key_buffer_size':
$name = __('Key buffer size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
$message = __('Min. Recommended Value').' 256'; $message = __('Min. Recommended Value').' 256';
break; break;
case 'read_buffer_size':
$name = __('Read buffer size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 32';
break;
case 'read_rnd_buffer_size':
$name = __('Read rnd-buffer size');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
$message = __('Min. Recommended Value').' 32';
break;
case 'query_cache_min_res_unit':
$name = __('Query cache min-res-unit');
$value = ($item['Value'] / $bytes);
$status = (($item['Value'] / $bytes) >= 2) ? 1 : 0;
$message = __('Min. Recommended Value').' 2k';
break;
case 'innodb_file_per_table':
$name = __('InnoDB file per table');
$value = $item['Value'];
$status = ($item['Value'] === 'ON') ? 1 : 0;
$message = __('Recommended ON');
break;
default: default:
$name = ''; $name = '';
$value = 0; $value = 0;
@ -1801,6 +1805,7 @@ class Diagnostics extends Wizard
'id' => 'modal_form_feedback', 'id' => 'modal_form_feedback',
'onsubmit' => 'return false;', 'onsubmit' => 'return false;',
'class' => 'modal', 'class' => 'modal',
'extra' => 'novalidate',
]; ];
$inputs = []; $inputs = [];

View File

@ -1905,7 +1905,7 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $
*/ */
function html_print_textarea($name, $rows, $columns, $value='', $attributes='', $return=false, $class='') function html_print_textarea($name, $rows, $columns, $value='', $attributes='', $return=false, $class='')
{ {
$output = '<textarea id="textarea_'.$name.'" name="'.$name.'" cols="'.$columns.'" rows="'.$rows.'" '.$attributes.'" class="'.$class.'">'; $output = '<textarea id="textarea_'.$name.'" name="'.$name.'" cols="'.$columns.'" rows="'.$rows.'" '.$attributes.' class="'.$class.'">';
// $output .= io_safe_input ($value); // $output .= io_safe_input ($value);
$output .= ($value); $output .= ($value);
$output .= '</textarea>'; $output .= '</textarea>';

View File

@ -3169,6 +3169,9 @@ function ui_print_datatable(array $parameters)
); );
} }
// Languages.
$processing = __('Processing');
// Extra html. // Extra html.
$extra = ''; $extra = '';
if (isset($parameters['extra_html']) && !empty($parameters['extra_html'])) { if (isset($parameters['extra_html']) && !empty($parameters['extra_html'])) {
@ -3233,6 +3236,9 @@ function ui_print_datatable(array $parameters)
searching: false, searching: false,
responsive: true, responsive: true,
dom: "plfrtiBp", dom: "plfrtiBp",
language: {
processing:"'.$processing.'"
},
buttons: [ buttons: [
{ {
extend: "csv", extend: "csv",

View File

@ -1984,13 +1984,34 @@ function load_modal(settings) {
$("#" + settings.form + " :input").each(function() { $("#" + settings.form + " :input").each(function() {
if (this.checkValidity() === false) { if (this.checkValidity() === false) {
$(this).prop("title", this.validationMessage); $(this).attr("title", this.validationMessage);
$(this).tooltip({ $(this).tooltip({
tooltipClass: "uitooltip", tooltipClass: "uitooltip",
position: { my: "right bottom", at: "right bottom" }, position: {
show: { duration: 200 } my: "right bottom",
at: "right top",
using: function(position, feedback) {
$(this).css(position);
$("<div>")
.addClass("arrow")
.addClass(feedback.vertical)
.addClass(feedback.horizontal)
.appendTo(this);
}
}
}); });
$(this).tooltip("open"); $(this).tooltip("open");
var element = $(this);
setTimeout(
function(element) {
element.tooltip("destroy");
element.removeAttr("title");
},
3000,
element
);
flagError = true; flagError = true;
} }

View File

@ -17,6 +17,10 @@
text-align: justify; text-align: justify;
} }
.dataTables_wrapper {
min-height: 150px;
}
.datatables-td-title { .datatables-td-title {
width: 25% !important; width: 25% !important;
font-weight: bolder; font-weight: bolder;
@ -56,3 +60,11 @@
margin: 30px; margin: 30px;
font-style: italic; font-style: italic;
} }
#modal_form_feedback {
margin: 10px;
}
#div-what-happened label {
margin-bottom: 10px;
}

View File

@ -273,20 +273,11 @@ a.ext_link {
font-size: 8pt; font-size: 8pt;
} }
input:invalid,
input[type="email"]:invalid {
border-bottom-color: #fb4444;
}
textarea:invalid {
border-color: #fb4444;
}
div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitooltip { div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitooltip {
background: grey; background: grey;
opacity: 0.9; opacity: 0.9;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 0 0px #fff; box-shadow: 6px 5px 9px -9px black;
padding: 6px; padding: 6px;
} }
@ -298,3 +289,37 @@ div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitool
letter-spacing: 0.03pt; letter-spacing: 0.03pt;
font-size: 8pt; font-size: 8pt;
} }
.arrow {
width: 70px;
height: 16px;
overflow: hidden;
position: absolute;
left: 50%;
margin-left: -35px;
bottom: -16px;
}
.arrow.top {
top: -16px;
bottom: auto;
}
.arrow.left {
left: 50%;
}
.arrow:after {
background: grey;
content: "";
position: absolute;
left: 20px;
top: -20px;
width: 25px;
height: 25px;
box-shadow: 6px 5px 9px -9px black;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrow.top:after {
bottom: -20px;
top: auto;
}

View File

@ -5917,6 +5917,47 @@ table.table_modal_alternate tr td:first-child {
width: 101%; width: 101%;
} }
/*Font header feedback*/
form#modal_form_feedback {
padding: 10px;
}
form#modal_form_feedback label {
margin-bottom: 10px;
color: #343434;
font-weight: bold;
font-size: 10pt;
}
form#modal_form_feedback input[type="email"] {
background-color: transparent;
border: none;
border-radius: 0;
border-bottom: 1px solid #ccc;
font-family: "lato-bolder", "Open Sans", sans-serif;
font-weight: lighter;
padding: 0px 0px 2px 0px;
box-sizing: border-box;
margin-bottom: 4px;
}
form#modal_form_feedback ul.wizard li {
padding-bottom: 10px;
padding-top: 10px;
}
form#modal_form_feedback ul.wizard li > label:not(.p-switch) {
width: 250px;
vertical-align: top;
display: inline-block;
}
form#modal_form_feedback ul.wizard li > textarea {
width: 600px;
height: 15em;
display: inline-block;
font-family: monospace;
}
/* /*
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* - FONT SIZES IN AGENT VIEW. This changes the font size of the agent * - FONT SIZES IN AGENT VIEW. This changes the font size of the agent

View File

@ -294,10 +294,6 @@ INSERT INTO `ttipo_modulo` VALUES
(31,'web_proc',9,'Remote HTTP module to check server response','mod_web_proc.png'), (31,'web_proc',9,'Remote HTTP module to check server response','mod_web_proc.png'),
(32,'web_content_data',9,'Remote HTTP module to retrieve numeric data','mod_web_data.png'), (32,'web_content_data',9,'Remote HTTP module to retrieve numeric data','mod_web_data.png'),
(33,'web_content_string',9,'Remote HTTP module to retrieve string data','mod_web_data.png'), (33,'web_content_string',9,'Remote HTTP module to retrieve string data','mod_web_data.png'),
(34,'remote_cmd', 10, 'Remote execution, numeric data', 'mod_remote_cmd.png'),
(35,'remote_cmd_proc', 10, 'Remote execution, boolean data', 'mod_remote_cmd_proc.png'),
(36,'remote_cmd_string', 10, 'Remote execution, alphanumeric data', 'mod_remote_cmd_string.png'),
(37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png'),
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'); (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png');
-- --