Merge branch 'ent-13608-error-de-estilos-en-selector-de-unidad-de-tiempo-de-dashboards' into 'develop'
Ent 13608 error de estilos en selector de unidad de tiempo de dashboards See merge request artica/pandorafms!7266
This commit is contained in:
commit
cd3634b857
|
@ -2505,7 +2505,8 @@ function html_print_extended_select_for_time(
|
|||
$no_change=false,
|
||||
$allow_zero=0,
|
||||
$units=null,
|
||||
$script_input=''
|
||||
$script_input='',
|
||||
$units_select2=false
|
||||
) {
|
||||
global $config;
|
||||
$admin = is_user_admin($config['id_user']);
|
||||
|
@ -2595,7 +2596,19 @@ function html_print_extended_select_for_time(
|
|||
echo '</div>';
|
||||
|
||||
echo '<div id="'.$uniq_name.'_manual" class="inline_flex">';
|
||||
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class, $script_input);
|
||||
html_print_input_text(
|
||||
$uniq_name.'_text',
|
||||
$selected,
|
||||
'',
|
||||
$size,
|
||||
255,
|
||||
false,
|
||||
$readonly,
|
||||
false,
|
||||
'',
|
||||
$class.(($units_select2 === true) ? ' w100p' : ''),
|
||||
$script_input
|
||||
);
|
||||
|
||||
html_print_input_hidden($name, $selected, false, $uniq_name);
|
||||
html_print_select(
|
||||
|
@ -2619,7 +2632,7 @@ function html_print_extended_select_for_time(
|
|||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
$units_select2
|
||||
);
|
||||
echo '  <a href="javascript:">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
|
@ -2632,6 +2645,7 @@ function html_print_extended_select_for_time(
|
|||
]
|
||||
).'</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<script type='text/javascript'>
|
||||
$(document).ready (function () {
|
||||
period_select_init('".$uniq_name."', ".(($allow_zero) ? 1 : 0).");
|
||||
|
@ -2652,6 +2666,18 @@ function html_print_extended_select_for_time(
|
|||
}, 100);
|
||||
}
|
||||
</script>";
|
||||
|
||||
if ($units_select2 === true) {
|
||||
echo '
|
||||
<script>
|
||||
$(document).ready (function () {
|
||||
$("#'.$uniq_name.'_units").select2();
|
||||
$("#'.$uniq_name.'_units").data("select2").$container.addClass("mrgn_lft_10px_imp");
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
|
||||
$returnString = ob_get_clean();
|
||||
|
||||
if ($return) {
|
||||
|
@ -6335,7 +6361,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||
((isset($data['no_change']) === true) ? $data['no_change'] : ''),
|
||||
((isset($data['allow_zero']) === true) ? $data['allow_zero'] : ''),
|
||||
((isset($data['units']) === true) ? $data['units'] : null),
|
||||
((isset($data['script_input']) === true) ? $data['script_input'] : '')
|
||||
((isset($data['script_input']) === true) ? $data['script_input'] : ''),
|
||||
((isset($data['units_select2']) === true) ? $data['units_select2'] : '')
|
||||
);
|
||||
break;
|
||||
|
||||
|
|
|
@ -423,6 +423,7 @@ class BasicChart extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -306,6 +306,7 @@ class BlockHistogram extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -317,6 +317,7 @@ class DataMatrix extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -335,6 +336,7 @@ class DataMatrix extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'slice\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -394,6 +394,7 @@ class CustomGraphWidget extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -373,6 +373,7 @@ class GraphModuleHistogramWidget extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
|
||||
],
|
||||
];
|
||||
|
|
|
@ -207,6 +207,7 @@ class Netflow extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
$chart_types = netflow_get_chart_types();
|
||||
|
|
|
@ -449,6 +449,7 @@ class SingleGraphWidget extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -527,99 +528,101 @@ class SingleGraphWidget extends Widget
|
|||
'id' => 'div_projection_period',
|
||||
'style' => $display_projection,
|
||||
'arguments' => [
|
||||
'name' => 'period_projection',
|
||||
'type' => 'interval',
|
||||
'value' => $values['period_projection'],
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Maximum'),
|
||||
'id' => 'div_period_maximum',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_maximum',
|
||||
'id' => 'period_maximum',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_maximum'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Minimum'),
|
||||
'id' => 'div_period_minimum',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_minimum',
|
||||
'id' => 'period_minimum',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_minimum'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Average'),
|
||||
'id' => 'div_period_average',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_average',
|
||||
'id' => 'period_average',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_average'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Summatory'),
|
||||
'id' => 'div_period_summatory',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_summatory',
|
||||
'id' => 'period_summatory',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_summatory'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Slice period'),
|
||||
'id' => 'div_period_slice_chart',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_slice_chart',
|
||||
'name' => 'period_projection',
|
||||
'type' => 'interval',
|
||||
'value' => (string) $values['period_slice_chart'],
|
||||
'custom_fields' => [
|
||||
SECONDS_1HOUR => __('1 hour'),
|
||||
SECONDS_1DAY => __('1 day'),
|
||||
SECONDS_1WEEK => __('1 week'),
|
||||
SECONDS_1MONTH => __('1 month'),
|
||||
'value' => $values['period_projection'],
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Maximum'),
|
||||
'id' => 'div_period_maximum',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_maximum',
|
||||
'id' => 'period_maximum',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_maximum'],
|
||||
],
|
||||
],
|
||||
];
|
||||
];
|
||||
|
||||
$options_period_mode = [
|
||||
CUSTOM_GRAPH_AREA => __('Area'),
|
||||
CUSTOM_GRAPH_LINE => __('Line'),
|
||||
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
||||
];
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Minimum'),
|
||||
'id' => 'div_period_minimum',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_minimum',
|
||||
'id' => 'period_minimum',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_minimum'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Type chart'),
|
||||
'id' => 'div_period_mode',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $options_period_mode,
|
||||
'name' => 'period_mode',
|
||||
'selected' => $values['period_mode'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Average'),
|
||||
'id' => 'div_period_average',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_average',
|
||||
'id' => 'period_average',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_average'],
|
||||
],
|
||||
];
|
||||
|
||||
return $inputs;
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Summatory'),
|
||||
'id' => 'div_period_summatory',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_summatory',
|
||||
'id' => 'period_summatory',
|
||||
'type' => 'switch',
|
||||
'value' => $values['period_summatory'],
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Slice period'),
|
||||
'id' => 'div_period_slice_chart',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'name' => 'period_slice_chart',
|
||||
'type' => 'interval',
|
||||
'value' => (string) $values['period_slice_chart'],
|
||||
'custom_fields' => [
|
||||
SECONDS_1HOUR => __('1 hour'),
|
||||
SECONDS_1DAY => __('1 day'),
|
||||
SECONDS_1WEEK => __('1 week'),
|
||||
SECONDS_1MONTH => __('1 month'),
|
||||
],
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$options_period_mode = [
|
||||
CUSTOM_GRAPH_AREA => __('Area'),
|
||||
CUSTOM_GRAPH_LINE => __('Line'),
|
||||
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Type chart'),
|
||||
'id' => 'div_period_mode',
|
||||
'style' => $display_periodicity_chart,
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $options_period_mode,
|
||||
'name' => 'period_mode',
|
||||
'selected' => $values['period_mode'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
return $inputs;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -383,6 +383,7 @@ class SLAPercentWidget extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -262,6 +262,7 @@ class TopNWidget extends Widget
|
|||
'style_icon' => 'flex-grow: 0',
|
||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||
'units_select2' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -1017,3 +1017,7 @@ ul.select2-selection__rendered > li.select2-selection__choice {
|
|||
.select2-results__option {
|
||||
line-break: anywhere;
|
||||
}
|
||||
|
||||
#period_manual > input[type="text"] {
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
|
|
@ -7273,6 +7273,10 @@ div.graph div.legend table {
|
|||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.mrgn_lft_10px_imp {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
|
||||
.mrgn_lft_15px {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue