rmit-programming-club / network-vis

A tool to visualisation coding activity and collaboration within a Github Organisation
GNU General Public License v3.0
9 stars 2 forks source link

New route for grabbing organisation network data ready for D3 #22

Closed thundergolfer closed 7 years ago

thundergolfer commented 7 years ago

Description

This adds a GET endpoint that I'd like to call from the graph_controller and receive a JSON payload that I can pass almost directly to the D3.js code.

For the moment the organizations_controller can stub the returned json payload with whatever is in organisation_connections.json. That will at least get us something to work with.

ghost commented 7 years ago

Looks good, but could you add the stub code? It's pretty much this: @data = File.read(Rails.root.join('public', 'organization_connections.json')) render :json => @data

And please change the name of the file from organisations => organizations for consistency, I've used the Z spelling in my example above.

thundergolfer commented 7 years ago

I might add a comment about this being stub data and then merge it.

thundergolfer commented 7 years ago

Closing because @Raddus later implemented this himself.