Skip to content
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

HTTP handler to return graph as image #36

Open
jjd27 opened this issue Aug 8, 2012 · 5 comments
Open

HTTP handler to return graph as image #36

jjd27 opened this issue Aug 8, 2012 · 5 comments

Comments

@jjd27
Copy link
Member

jjd27 commented Aug 8, 2012

Can we have an HTTP handler that returns a PNG, please?

e.g. I'd like to go to http://perf/graph?width=640&height=480&som=41&xaxis=build_number&x_as_seq=on&legend_position=se&v_product=XenServer&f_branch=1&v_build_tag=&v_dom0_memory_static_max=752&v_machine_type=Dell+PowerEdge+2950&v_memsize=256&v_vmtype=dom0 and get just the graph as a PNG.

@chengsun
Copy link

chengsun commented Aug 9, 2012

This could be achieved with something like PhantomJS. We'd have to do the
rendering server-side.

On Aug 8, 2012 5:24 PM, "Jonathan Davies" [email protected] wrote:

Can we have an HTTP handler that returns a PNG, please?

e.g. I'd like to go to
http://perf/graph?som=41&xaxis=build_number&x_as_seq=on&legend_position=se&v_product=XenServer&f_branch=1&v_build_tag=&v_dom0_memory_static_max=752&v_machine_type=Dell+PowerEdge+2950&v_memsize=256&v_vmtype=dom0and
get just the graph as a PNG.


Reply to this email directly or view it on GitHub.

@rokstrnisa
Copy link
Contributor

This could be achieved by drawing the graph normally, and then automatically pressing the Get Image button. However, the file returned has a weird extension, and needs to be saved as a PNG.

@chengsun
Copy link

I thought that Jonathan meant an URL which can be embedded in another page, i.e. <img src="http://perf/graph?...">.

@jjd27
Copy link
Member Author

jjd27 commented Aug 16, 2012

Yes, that's what I mean. So the http handler for "graph" would actually return the PNG in the http response.

@rokstrnisa
Copy link
Contributor

Ah, then Cheng's suggestion is probably best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants