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

JSON redesign #28

Closed
genofire opened this issue Mar 19, 2016 · 6 comments
Closed

JSON redesign #28

genofire opened this issue Mar 19, 2016 · 6 comments

Comments

@genofire
Copy link

Hi,
we what to develop a respondd collector for some things
and also for the meshviewer (and influxdb for interesting people).
I recognise that there are a few unbeautif things in there.

  1. the nodes.json has not the structur like the respondd answer
    (we know Redesign API for respondd freifunk-gluon/gluon#522, nothing matter).
    As example, there are multiple statistics.clients like total, wifi, wifi24 and wifi5.

  2. the graph.json works with array positions.
    It is only necessary to use the nodeid like:

    "links":[
        {
            "source":"feedl33d",
            "target":"1001110d",
            "bidirect":true,
            "vpn":true,
            "tq":32
        }
    ]

I would make a PR to make this meshviewer compatible with this changes
if somebody agree with it.

@tcatm
Copy link

tcatm commented Mar 19, 2016

  1. This is by design. The idea was to make the meshviewer API independent from the node's data structures. If anything, a redesign should make it match the NetJSON format (once it's finalized). From what I've gathered, NetJSON might not yet be suitable for meshviewer.

  2. This is also by design. It does not suffice to use the node id directly as the links do only refer to nodes within the nodes list from graph.json. This node list does refer to node ids. There may be nodes within the graph that do not have a corresponding node id (e.g. nodes seen via weak wifi links).

@genofire
Copy link
Author

I should make two issues:

  1. okay i got it. (a change to show the different clients would be accepted? ) -> closed

  2. I does not understand:
    I have not seen any code, where the node id would not be in a answer.
    Okay the mac could be different as the node id in a answer, but the had to replace by the node id.

@tcatm
Copy link

tcatm commented Mar 19, 2016

@genofire
Copy link
Author

This is no answer :(
I know how you make it to manage your json tree ^^
Sorry that i am wasting your time.

i have make it for testing, maybe you could just look :D
https://github.com/FreifunkBremen/meshviewer/blob/JSONv2/lib/main.js#L45

@tcatm
Copy link

tcatm commented Mar 23, 2016

I see. Well, I think it's best to keep the format as is for maximum compatibility until we can be sure that for each node within the graph a nodeinfo object is present.

@genofire
Copy link
Author

genofire commented Apr 4, 2016

okay that is a answer.
Not beautiful but acceptable.

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

2 participants