New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Add option to output graphs as base64 #8535

merged 5 commits into from Apr 11, 2018


None yet
4 participants

pheinrichs commented Apr 10, 2018

Let me know what you would like updated.


Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.


If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@@ -244,6 +245,10 @@ function get_graph_generic_by_hostname()
include 'includes/graphs/';
if ($vars['output'] === 'base64') {
api_success(['image' => $base64_output, 'content-type' => get_image_type()], 'image');

This comment has been minimized.


laf Apr 10, 2018


Do you need to add this to the other functions which return graphs?

This comment has been minimized.


pheinrichs Apr 10, 2018


Yep, does the format and names seem ok? If so, i'll append it to the port methods as well


This comment has been minimized.


laf commented Apr 10, 2018

Yeah seems fine to me :)


This comment has been minimized.

scrutinizer-notifier commented Apr 10, 2018

The inspection completed: 3 new issues, 1 updated code elements


laf approved these changes Apr 10, 2018

LGTM. Tested fine both WebUI and API.

@murrant murrant merged commit ff0063b into librenms:master Apr 11, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
license/cla Contributor License Agreement is signed.

TheMysteriousX added a commit to TheMysteriousX/librenms that referenced this pull request May 20, 2018

api: Add option to output graphs as base64 (librenms#8535)
* Allow 'option' param in graph endpoint

* Update lint and update docs

* Uncomment api response

* Add imagedestroy on 'tobias_trim' section

* Add base64 to port endpoints also

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.