Merge remote-tracking branch 'origin/develop' into new-vc-line-element
This commit is contained in:
commit
9e01cb097c
|
@ -632,8 +632,24 @@ $row++;
|
||||||
$table_font->size[0] = '50%';
|
$table_font->size[0] = '50%';
|
||||||
$table_font->data = [];
|
$table_font->data = [];
|
||||||
|
|
||||||
$table_font->data[$row][0] = __('Font path');
|
$table_font->data[$row][0] = __('Graphs font family');
|
||||||
$fonts = load_fonts();
|
|
||||||
|
// Load font families.
|
||||||
|
$fonts = [];
|
||||||
|
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
||||||
|
foreach ($dirFonts as $entryDir) {
|
||||||
|
if (strstr($entryDir, '.ttf') !== false) {
|
||||||
|
$explode = explode('-', $entryDir);
|
||||||
|
if (count($explode) === 1) {
|
||||||
|
$fonts[$entryDir] = substr($entryDir, 0, (strlen($entryDir) - 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($explode[1] === 'Regular.ttf') {
|
||||||
|
$fonts[$explode[0].'.ttf'] = $explode[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$table_font->data[$row][1] = html_print_select(
|
$table_font->data[$row][1] = html_print_select(
|
||||||
$fonts,
|
$fonts,
|
||||||
'fontpath',
|
'fontpath',
|
||||||
|
@ -646,7 +662,7 @@ $row++;
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_font->data[$row][0] = __('Font size');
|
$table_font->data[$row][0] = __('Graphs font size');
|
||||||
|
|
||||||
$font_size_array = [
|
$font_size_array = [
|
||||||
1 => 1,
|
1 => 1,
|
||||||
|
@ -882,14 +898,6 @@ $row++;
|
||||||
$table_chars->data[$row][1] = html_print_select($options_zoom_graphs, 'zoom_graph', $config['zoom_graph'], '', '', 0, true, false, false);
|
$table_chars->data[$row][1] = html_print_select($options_zoom_graphs, 'zoom_graph', $config['zoom_graph'], '', '', 0, true, false, false);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_chars->data[$row][0] = __('Graph image height for HTML reports');
|
|
||||||
$table_chars->data[$row][0] .= ui_print_help_tip(
|
|
||||||
__('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'),
|
|
||||||
true
|
|
||||||
);
|
|
||||||
$table_chars->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
|
||||||
$row++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$table_font->data[$row][0] = __('Font path');
|
$table_font->data[$row][0] = __('Font path');
|
||||||
$fonts = load_fonts();
|
$fonts = load_fonts();
|
||||||
|
@ -996,21 +1004,20 @@ $row++;
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// OTHER CONFIGURATION
|
// Reports
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
$table_other = new stdClass();
|
$table_report = new stdClass();
|
||||||
$table_other->width = '100%';
|
$table_report->width = '100%';
|
||||||
$table_other->class = 'databox filters';
|
$table_report->class = 'databox filters';
|
||||||
$table_other->style[0] = 'font-weight: bold;';
|
$table_report->style[0] = 'font-weight: bold;';
|
||||||
$table_other->size[0] = '50%';
|
$table_report->size[0] = '50%';
|
||||||
$table_other->data = [];
|
$table_report->data = [];
|
||||||
|
|
||||||
// Enrique (27/01/2017) New feature: Show report info on top of reports
|
$table_report->data[$row][0] = __('Show report info with description').ui_print_help_tip(
|
||||||
$table_other->data[$row][0] = __('Show report info with description').ui_print_help_tip(
|
|
||||||
__('Custom report description info. It will be applied to all reports and templates by default.'),
|
__('Custom report description info. It will be applied to all reports and templates by default.'),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table_other->data[$row][1] = html_print_checkbox_switch(
|
$table_report->data[$row][1] = html_print_checkbox_switch(
|
||||||
'custom_report_info',
|
'custom_report_info',
|
||||||
1,
|
1,
|
||||||
$config['custom_report_info'],
|
$config['custom_report_info'],
|
||||||
|
@ -1018,13 +1025,11 @@ $row++;
|
||||||
);
|
);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
$table_report->data[$row][0] = __('Custom report front page').ui_print_help_tip(
|
||||||
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
|
||||||
$table_other->data[$row][0] = __('Custom report front page').ui_print_help_tip(
|
|
||||||
__('Custom report front page. It will be applied to all reports and templates by default.'),
|
__('Custom report front page. It will be applied to all reports and templates by default.'),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table_other->data[$row][1] = html_print_checkbox_switch(
|
$table_report->data[$row][1] = html_print_checkbox_switch(
|
||||||
'custom_report_front',
|
'custom_report_front',
|
||||||
1,
|
1,
|
||||||
$config['custom_report_front'],
|
$config['custom_report_front'],
|
||||||
|
@ -1033,11 +1038,19 @@ $row++;
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table_other->data[$row][0] = __('Font size for items reports');
|
$table_report->data[$row][0] = __('PDF font size');
|
||||||
$table_other->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
$table_report->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
$table_report->data[$row][0] = __('Graph image height for HTML reports');
|
||||||
|
$table_report->data[$row][0] .= ui_print_help_tip(
|
||||||
|
__('This is the height in pixels of the module graph or custom graph in the reports (only: HTML)'),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
||||||
|
$row++;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
||||||
foreach ($dirItems as $entryDir) {
|
foreach ($dirItems as $entryDir) {
|
||||||
|
@ -1046,25 +1059,10 @@ $row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_fonts = [];
|
|
||||||
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
|
||||||
foreach ($dirFonts as $entryDir) {
|
|
||||||
if (strstr($entryDir, '.ttf') !== false) {
|
|
||||||
$explode = explode('-', $entryDir);
|
|
||||||
if (count($explode) === 1) {
|
|
||||||
$fonts[$entryDir] = substr($entryDir, 0, (strlen($entryDir) - 4));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($explode[1] === 'Regular.ttf') {
|
|
||||||
$fonts[$explode[0].'.ttf'] = $explode[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Font
|
// Font
|
||||||
$table_other->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family');
|
$table_report->data['custom_report_front-font'][0] = __('Custom report front').' - '.__('Font family');
|
||||||
$table_other->data['custom_report_front-font'][1] = html_print_select(
|
$table_report->data['custom_report_front-font'][1] = html_print_select(
|
||||||
$_fonts,
|
$fonts,
|
||||||
'custom_report_front_font',
|
'custom_report_front_font',
|
||||||
$config['custom_report_front_font'],
|
$config['custom_report_front_font'],
|
||||||
false,
|
false,
|
||||||
|
@ -1074,11 +1072,11 @@ $row++;
|
||||||
);
|
);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$table_other->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip(
|
$table_report->data['custom_report_front-logo'][0] = __('Custom report front').' - '.__('Custom logo').ui_print_help_tip(
|
||||||
__("The dir of custom logos is in your www Console in 'images/custom_logo'. You can upload more files (ONLY JPEG AND PNG) in upload tool in console."),
|
__("The dir of custom logos is in your www Console in 'images/custom_logo'. You can upload more files (ONLY JPEG AND PNG) in upload tool in console."),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table_other->data['custom_report_front-logo'][1] = html_print_select(
|
$table_report->data['custom_report_front-logo'][1] = html_print_select(
|
||||||
$customLogos,
|
$customLogos,
|
||||||
'custom_report_front_logo',
|
'custom_report_front_logo',
|
||||||
io_safe_output($config['custom_report_front_logo']),
|
io_safe_output($config['custom_report_front_logo']),
|
||||||
|
@ -1088,16 +1086,16 @@ $row++;
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
// Preview
|
// Preview
|
||||||
$table_other->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview';
|
$table_report->data['custom_report_front-preview'][0] = __('Custom report front').' - '.'Preview';
|
||||||
if (empty($config['custom_report_front_logo'])) {
|
if (empty($config['custom_report_front_logo'])) {
|
||||||
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
|
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_other->data['custom_report_front-preview'][1] = '<span id="preview_image">'.html_print_image($config['custom_report_front_logo'], true).'</span>';
|
$table_report->data['custom_report_front-preview'][1] = '<span id="preview_image">'.html_print_image($config['custom_report_front_logo'], true).'</span>';
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
$table_other->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header');
|
$table_report->data['custom_report_front-header'][0] = __('Custom report front').' - '.__('Header');
|
||||||
$table_other->data['custom_report_front-header'][1] = html_print_textarea(
|
$table_report->data['custom_report_front-header'][1] = html_print_textarea(
|
||||||
'custom_report_front_header',
|
'custom_report_front_header',
|
||||||
5,
|
5,
|
||||||
15,
|
15,
|
||||||
|
@ -1107,13 +1105,13 @@ $row++;
|
||||||
);
|
);
|
||||||
|
|
||||||
// First page
|
// First page
|
||||||
$table_other->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page');
|
$table_report->data['custom_report_front-first_page'][0] = __('Custom report front').' - '.__('First page');
|
||||||
$custom_report_front_firstpage = str_replace(
|
$custom_report_front_firstpage = str_replace(
|
||||||
'(_URLIMAGE_)',
|
'(_URLIMAGE_)',
|
||||||
ui_get_full_url(false, true, false, false),
|
ui_get_full_url(false, true, false, false),
|
||||||
$config['custom_report_front_firstpage']
|
$config['custom_report_front_firstpage']
|
||||||
);
|
);
|
||||||
$table_other->data['custom_report_front-first_page'][1] = html_print_textarea(
|
$table_report->data['custom_report_front-first_page'][1] = html_print_textarea(
|
||||||
'custom_report_front_firstpage',
|
'custom_report_front_firstpage',
|
||||||
15,
|
15,
|
||||||
15,
|
15,
|
||||||
|
@ -1123,8 +1121,8 @@ $row++;
|
||||||
);
|
);
|
||||||
|
|
||||||
// Footer
|
// Footer
|
||||||
$table_other->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer');
|
$table_report->data['custom_report_front-footer'][0] = __('Custom report front').' - '.__('Footer');
|
||||||
$table_other->data['custom_report_front-footer'][1] = html_print_textarea(
|
$table_report->data['custom_report_front-footer'][1] = html_print_textarea(
|
||||||
'custom_report_front_footer',
|
'custom_report_front_footer',
|
||||||
5,
|
5,
|
||||||
15,
|
15,
|
||||||
|
@ -1133,6 +1131,22 @@ $row++;
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
echo '<fieldset>';
|
||||||
|
echo '<legend>'.__('Reports configuration').'</legend>';
|
||||||
|
html_print_table($table_report);
|
||||||
|
echo '</fieldset>';
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
// OTHER CONFIGURATION
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
$table_other = new stdClass();
|
||||||
|
$table_other->width = '100%';
|
||||||
|
$table_other->class = 'databox filters';
|
||||||
|
$table_other->style[0] = 'font-weight: bold;';
|
||||||
|
$table_other->size[0] = '50%';
|
||||||
|
$table_other->data = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,7 @@ function __($string /*, variable arguments */)
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $l10n->translate($string);
|
return str_replace('\'', '`', $l10n->translate($string));
|
||||||
}
|
}
|
||||||
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
@ -465,7 +465,7 @@ function __($string /*, variable arguments */)
|
||||||
return vsprintf($string, $args);
|
return vsprintf($string, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
return vsprintf($l10n->translate($string), $args);
|
return vsprintf(str_replace('\'', '`', $l10n->translate($string)), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1169,7 +1169,7 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
|
||||||
maxinum,
|
maxinum,
|
||||||
valor;
|
valor;
|
||||||
|
|
||||||
for (key in data) {
|
for (var key in data) {
|
||||||
nombre = data[key].gauge;
|
nombre = data[key].gauge;
|
||||||
|
|
||||||
label = data[key].label;
|
label = data[key].label;
|
||||||
|
@ -1189,8 +1189,8 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
|
||||||
mininum = round_with_decimals(parseFloat(data[key].min));
|
mininum = round_with_decimals(parseFloat(data[key].min));
|
||||||
maxinum = round_with_decimals(parseFloat(data[key].max));
|
maxinum = round_with_decimals(parseFloat(data[key].max));
|
||||||
|
|
||||||
critical_inverse = parseInt(data[key].critical_inverse);
|
var critical_inverse = parseInt(data[key].critical_inverse);
|
||||||
warning_inverse = parseInt(data[key].warning_inverse);
|
var warning_inverse = parseInt(data[key].warning_inverse);
|
||||||
|
|
||||||
valor = round_with_decimals(data[key].value);
|
valor = round_with_decimals(data[key].value);
|
||||||
|
|
||||||
|
|
|
@ -1763,7 +1763,7 @@ function round_with_decimals(value, multiplier) {
|
||||||
if (typeof multiplier === "undefined") multiplier = 1;
|
if (typeof multiplier === "undefined") multiplier = 1;
|
||||||
|
|
||||||
// Return non numeric types without modification
|
// Return non numeric types without modification
|
||||||
if (typeof value !== "number" || Number.isNaN(value)) {
|
if (typeof value !== "number" || isNaN(value)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20268,7 +20268,7 @@ msgid ""
|
||||||
"The alert would fire when the value matches <span id=\"value\"></span>"
|
"The alert would fire when the value matches <span id=\"value\"></span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"سيتم إطلاق التنبيه عندما تتطابق القيمة مع ما يلي <span id=\\\"value\\"
|
"سيتم إطلاق التنبيه عندما تتطابق القيمة مع ما يلي <span id=\\\"value\\"
|
||||||
"\"></span"
|
"\"></span>"
|
||||||
|
|
||||||
#: ../../include/functions_ui.php:1003 ../../godmode/alerts/alert_view.php:147
|
#: ../../include/functions_ui.php:1003 ../../godmode/alerts/alert_view.php:147
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -20284,9 +20284,7 @@ msgid ""
|
||||||
"The alert would fire when the value is between <span id=\"min\"></span> and "
|
"The alert would fire when the value is between <span id=\"min\"></span> and "
|
||||||
"<span id=\"max\"></span>"
|
"<span id=\"max\"></span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"سيتم إطلاق التنبيه عندما تكون القيمة بين <span id=\\\"min\\\"></span> and "
|
"سيتم إطلاق التنبيه عندما تكون القيمة بين <span id=\\\"min\\\"></span> and <span id=\\\"max\\\"></span>"
|
||||||
"\"\r\n"
|
|
||||||
"\"<span id=\\\"max\\\"></span>"
|
|
||||||
|
|
||||||
#: ../../include/functions_ui.php:1012
|
#: ../../include/functions_ui.php:1012
|
||||||
#: ../../godmode/alerts/configure_alert_template.php:808
|
#: ../../godmode/alerts/configure_alert_template.php:808
|
||||||
|
@ -20295,9 +20293,7 @@ msgid ""
|
||||||
"The alert would fire when the value is not between <span id=\"min\"></span> "
|
"The alert would fire when the value is not between <span id=\"min\"></span> "
|
||||||
"and <span id=\"max\"></span>"
|
"and <span id=\"max\"></span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"\" سيتم إطلاق التنبيه عندما لا تكون القيمة بين <span id=\\\"min\\\"></span> "
|
"سيتم إطلاق التنبيه عندما لا تكون القيمة بين <span id=\\\"min\\\"></span> and <span id=\\\"max\\\"></span>"
|
||||||
"\" \r\n"
|
|
||||||
"\"and <span id=\\\"max\\\"></span>"
|
|
||||||
|
|
||||||
#: ../../include/functions_ui.php:1016
|
#: ../../include/functions_ui.php:1016
|
||||||
msgid "The alert would fire when the value is over <span id=\"max\"></span>"
|
msgid "The alert would fire when the value is over <span id=\"max\"></span>"
|
||||||
|
|
Loading…
Reference in New Issue