Revert "RRD Graph optimization (#12735)" (#12805)

This reverts commit 2833d935e0.
This commit is contained in:
Tony Murray
2021-04-28 09:07:31 -05:00
committed by GitHub
parent 2833d935e0
commit 7de808a4e8
7 changed files with 100 additions and 160 deletions
+4 -3
View File
@@ -81,7 +81,8 @@ function api_get_graph(array $vars)
{
global $dur; // Needed for callback within graph code
$auth = true;
$auth = '1';
$base64_output = '';
// prevent ugly error for undefined graphs from being passed to the user
[$type, $subtype] = extract_graph_type($vars['type']);
@@ -98,10 +99,10 @@ function api_get_graph(array $vars)
ob_end_clean();
if ($vars['output'] === 'base64') {
return api_success(['image' => $image, 'content-type' => get_image_type(Config::get('webui.graph_type'))], 'image');
return api_success(['image' => $base64_output, 'content-type' => get_image_type()], 'image');
}
return response($image, 200, ['Content-Type' => get_image_type(Config::get('webui.graph_type'))]);
return response($image, 200, ['Content-Type' => get_image_type()]);
}
function check_bill_permission($bill_id, $callback)