mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-23 18:08:49 +02:00
[SQL Graph reports] Added dynamic height configuration option
This commit is contained in:
parent
52e6503018
commit
d7cbcd012f
@ -132,6 +132,7 @@ switch ($action) {
|
|||||||
$hide_notinit_agents = 0;
|
$hide_notinit_agents = 0;
|
||||||
$server_name = '';
|
$server_name = '';
|
||||||
$server_id = 0;
|
$server_id = 0;
|
||||||
|
$dyn_height = 230;
|
||||||
break;
|
break;
|
||||||
case 'save':
|
case 'save':
|
||||||
default:
|
default:
|
||||||
@ -173,6 +174,7 @@ switch ($action) {
|
|||||||
$server_name = '';
|
$server_name = '';
|
||||||
$server_id = 0;
|
$server_id = 0;
|
||||||
$get_data_editor = false;
|
$get_data_editor = false;
|
||||||
|
$dyn_height = 230;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +198,7 @@ switch ($action) {
|
|||||||
$show_in_two_columns = $style['show_in_two_columns'];
|
$show_in_two_columns = $style['show_in_two_columns'];
|
||||||
$show_in_landscape = $style['show_in_landscape'];
|
$show_in_landscape = $style['show_in_landscape'];
|
||||||
$hide_notinit_agents = $style['hide_notinit_agents'];
|
$hide_notinit_agents = $style['hide_notinit_agents'];
|
||||||
|
$dyn_height = $style['dyn_height'];
|
||||||
$type = $item['type'];
|
$type = $item['type'];
|
||||||
$name = $item['name'];
|
$name = $item['name'];
|
||||||
|
|
||||||
@ -1541,6 +1544,11 @@ You can of course remove the warnings, that's why we include the source and do n
|
|||||||
<td><?php html_print_checkbox('show_in_two_columns', 1, $show_in_two_columns);?></td>
|
<td><?php html_print_checkbox('show_in_two_columns', 1, $show_in_two_columns);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="row_dyn_height" style="" class="datos">
|
||||||
|
<td style="font-weight:bold;"><?php echo __('Height (dynamic graphs)');?></td>
|
||||||
|
<td><?php html_print_input_text('dyn_height', $dyn_height, '', 7, 7);?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr id="row_show_in_same_row" style="" class="datos">
|
<tr id="row_show_in_same_row" style="" class="datos">
|
||||||
<td style="font-weight:bold;" class="datos">
|
<td style="font-weight:bold;" class="datos">
|
||||||
<?php
|
<?php
|
||||||
@ -2785,6 +2793,7 @@ function chooseType() {
|
|||||||
$("#row_exception_condition_value").hide();
|
$("#row_exception_condition_value").hide();
|
||||||
$("#row_exception_condition").hide();
|
$("#row_exception_condition").hide();
|
||||||
$("#row_show_in_two_columns").hide();
|
$("#row_show_in_two_columns").hide();
|
||||||
|
$("#row_dyn_height").hide();
|
||||||
$("#row_show_in_same_row").hide();
|
$("#row_show_in_same_row").hide();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
$("#row_lapse_calc").hide();
|
$("#row_lapse_calc").hide();
|
||||||
@ -3060,36 +3069,19 @@ function chooseType() {
|
|||||||
$("#row_custom").show();
|
$("#row_custom").show();
|
||||||
$("#row_custom_example").show();
|
$("#row_custom_example").show();
|
||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
|
$("#row_dyn_height").show();
|
||||||
$("#row_servers").show();
|
$("#row_servers").show();
|
||||||
$("#row_historical_db_check").show();
|
$("#row_historical_db_check").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'sql_graph_pie':
|
case 'sql_graph_pie':
|
||||||
$("#row_description").show();
|
|
||||||
$("#row_query").show();
|
|
||||||
$("#row_max_items").show();
|
|
||||||
$("#row_show_in_two_columns").show();
|
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_servers").show();
|
|
||||||
$("#row_historical_db_check").show();
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'sql_graph_hbar':
|
case 'sql_graph_hbar':
|
||||||
$("#row_description").show();
|
|
||||||
$("#row_query").show();
|
|
||||||
$("#row_max_items").show();
|
|
||||||
$("#row_show_in_two_columns").show();
|
|
||||||
$("#row_show_in_landscape").show();
|
|
||||||
$("#row_servers").show();
|
|
||||||
$("#row_historical_db_check").show();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'sql_graph_vbar':
|
case 'sql_graph_vbar':
|
||||||
$("#row_description").show();
|
$("#row_description").show();
|
||||||
$("#row_query").show();
|
$("#row_query").show();
|
||||||
$("#row_max_items").show();
|
$("#row_max_items").show();
|
||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
|
$("#row_dyn_height").show();
|
||||||
$("#row_show_in_landscape").show();
|
$("#row_show_in_landscape").show();
|
||||||
$("#row_servers").show();
|
$("#row_servers").show();
|
||||||
$("#row_historical_db_check").show();
|
$("#row_historical_db_check").show();
|
||||||
|
@ -1212,6 +1212,7 @@ switch ($action) {
|
|||||||
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
||||||
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
||||||
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
||||||
|
$style['dyn_height'] = get_parameter('dyn_height', 230);
|
||||||
|
|
||||||
switch ($values['type']) {
|
switch ($values['type']) {
|
||||||
case 'event_report_agent':
|
case 'event_report_agent':
|
||||||
@ -1551,6 +1552,7 @@ switch ($action) {
|
|||||||
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
||||||
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
||||||
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
||||||
|
$style['dyn_height'] = get_parameter('dyn_height', 230);
|
||||||
|
|
||||||
switch ($values['type']) {
|
switch ($values['type']) {
|
||||||
case 'event_report_agent':
|
case 'event_report_agent':
|
||||||
|
@ -6767,7 +6767,9 @@ function reporting_set_conf_charts(&$width, &$height, &$only_image, $type,
|
|||||||
case 'dinamic':
|
case 'dinamic':
|
||||||
$only_image = false;
|
$only_image = false;
|
||||||
$width = 900;
|
$width = 900;
|
||||||
$height = 230;
|
$height = isset($content['style']['dyn_height'])
|
||||||
|
? $content['style']['dyn_height']
|
||||||
|
: 230;
|
||||||
$ttl = 1;
|
$ttl = 1;
|
||||||
break;
|
break;
|
||||||
case 'static':
|
case 'static':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user