mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#11691 Added the Show unknowns in graph token in the item editor view when creating the report item.
This commit is contained in:
parent
92b8446110
commit
fece93d38b
5
pandora_console/extras/mr/67.sql
Normal file
5
pandora_console/extras/mr/67.sql
Normal file
@ -0,0 +1,5 @@
|
||||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE treport_content ADD check_unknowns_graph tinyint DEFAULT 0 NULL;
|
||||
|
||||
COMMIT;
|
@ -150,6 +150,7 @@ $fullscale = false;
|
||||
$percentil = false;
|
||||
$image_threshold = false;
|
||||
$time_compare_overlapped = false;
|
||||
$unknowns_graph = false;
|
||||
|
||||
// Added for events items.
|
||||
$server_multiple = [0];
|
||||
@ -344,6 +345,7 @@ switch ($action) {
|
||||
$percentil = isset($style['percentil']) ? (bool) $style['percentil'] : 0;
|
||||
$image_threshold = (isset($style['image_threshold']) === true) ? (bool) $style['image_threshold'] : false;
|
||||
$graph_render = $item['graph_render'];
|
||||
$unknowns_graph = $item['check_unknowns_graph'];
|
||||
// The break hasn't be forgotten.
|
||||
case 'simple_baseline_graph':
|
||||
case 'projection_graph':
|
||||
@ -2799,6 +2801,23 @@ if (is_metaconsole() === true) {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_unknowns_graph" class="datos">
|
||||
<td class="bolder">
|
||||
<?php
|
||||
echo __('Show unknowns in graph');
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
html_print_checkbox_switch(
|
||||
'unknowns_graph',
|
||||
1,
|
||||
$unknowns_graph
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_time_compare_overlapped" class="datos">
|
||||
<td class="bolder">
|
||||
<?php
|
||||
@ -6630,6 +6649,7 @@ function chooseType() {
|
||||
$("#row_group_by").hide();
|
||||
$("#row_type_show").hide();
|
||||
$("#row_use_prefix_notation").hide();
|
||||
$("#row_unknowns_graph").hide();
|
||||
|
||||
// SLA list default state.
|
||||
$("#sla_list").hide();
|
||||
@ -6716,6 +6736,7 @@ function chooseType() {
|
||||
$("#row_image_threshold").show();
|
||||
$("#row_graph_render").show();
|
||||
$("#row_percentil").show();
|
||||
$("#row_unknowns_graph").show();
|
||||
|
||||
// Force type.
|
||||
if('<?php echo $action; ?>' === 'new'){
|
||||
|
@ -1917,6 +1917,7 @@ switch ($action) {
|
||||
$values['graph_render'] = (int) get_parameter(
|
||||
'graph_render'
|
||||
);
|
||||
$values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0);
|
||||
case 'simple_baseline_graph':
|
||||
// HACK it is saved in show_graph field.
|
||||
$values['show_graph'] = (int) get_parameter(
|
||||
@ -2800,6 +2801,7 @@ switch ($action) {
|
||||
$values['graph_render'] = (int) get_parameter(
|
||||
'graph_render'
|
||||
);
|
||||
$values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0);
|
||||
case 'simple_baseline_graph':
|
||||
// HACK it is saved in show_graph field.
|
||||
$values['show_graph'] = (int) get_parameter(
|
||||
|
@ -11105,7 +11105,7 @@ function reporting_simple_graph(
|
||||
),
|
||||
'ttl' => $ttl,
|
||||
'compare' => $time_compare_overlapped,
|
||||
'show_unknown' => true,
|
||||
'show_unknown' => $content['check_unknowns_graph'],
|
||||
'percentil' => ($content['style']['percentil'] == 1) ? $config['percentil'] : null,
|
||||
'fullscale' => $fullscale,
|
||||
'server_id' => $id_meta,
|
||||
|
@ -1674,6 +1674,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
|
||||
`macros_definition` TEXT,
|
||||
`render_definition` TEXT,
|
||||
`use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||
`check_unknowns_graph` tinyint DEFAULT '0',
|
||||
PRIMARY KEY(`id_rc`),
|
||||
FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
|
Loading…
x
Reference in New Issue
Block a user