#9125 Fixed chart type

This commit is contained in:
Daniel Maya 2022-06-08 10:59:46 +02:00
parent 8a5847a225
commit 6a8140b36c
1 changed files with 94 additions and 96 deletions

View File

@ -53,7 +53,7 @@ $modules_networkmap_no_proc = agents_get_modules(
false,
[
'id_modulo' => 2,
// networkmap type
// Networkmap type.
'id_tipo_modulo' => [
'<>2',
// != generic_proc
@ -133,7 +133,7 @@ if (empty($modules_boolean)) {
$modules_boolean = [];
}
// Cleaned the duplicate $modules and other things
// Cleaned the duplicate $modules and other things.
$modules_others = array_diff_key(
$modules_others,
$modules_networkmap_no_proc
@ -278,7 +278,7 @@ if ($start_date != $current) {
}
if ($combined) {
// Pass the $modules before the ajax call
// Pass the $modules before the ajax call.
echo '<div class="combined-graph-container center w100p"'.'data-period="'.$period.'"'.'data-stacked="'.CUSTOM_GRAPH_LINE.'"'.'data-date="'.$date.'"'.'data-height="'.$height.'"'.'>'.html_print_image('images/spinner.gif', true).'</div>';
} else {
foreach ($modules as $id_module) {
@ -296,7 +296,7 @@ echo '<div id="graph-error-message" class="invisible">';
ui_print_error_message(__('There was an error loading the graph'));
echo '</div>';
// Dialog to save the custom graph
// Dialog to save the custom graph.
echo "<div id='dialog_save_custom_graph' class='invisible'>";
$table = new stdClass();
$table->width = '100%';
@ -373,7 +373,7 @@ echo "<div style='width: ".$table->width."; text-align: right;'>";
params["id_modules"] = <?php echo json_encode($modules); ?>;
params["name"] = $("input[name='name_custom_graph']").val();
params["description"] = "<?php echo __('Custom graph create from the tab graphs in the agent.'); ?>";
params["stacked"] = <?php echo CUSTOM_GRAPH_LINE; ?>;
params["stacked"] = parseInt($("#option_type").val());
params["width"] = <?php echo $width; ?>;
params["height"] = <?php echo $height; ?>;
params["events"] = <?php echo $draw_events; ?>;
@ -390,8 +390,7 @@ echo "<div style='width: ".$table->width."; text-align: right;'>";
$(".loading_save").hide();
if (data.correct) {
$(".ok_save").show();
}
else {
} else {
$(".error_save").show();
$(".button_save").enable();
}
@ -420,8 +419,7 @@ echo "<div style='width: ".$table->width."; text-align: right;'>";
value: 3,
text: "<?php echo __('Line stack'); ?>"
}));
}
else {
} else {
$('#option_type').empty();
$('#option_type').append($('<option>', {
value: 0,