<div dir="ltr"><div><div><div>Hi Federico<br><br></div>Thank you for information but at current I don't have skill in python and django framework for this reason I can not do this <br><br></div>Regards<br><br></div>Waldek</div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-29 15:16 GMT+02:00 Nemesis <span dir="ltr"><<a href="mailto:nemesis@ninux.org" target="_blank">nemesis@ninux.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At the moment the only way you can solve your need it to use django signals:<br>
<a href="https://github.com/interop-dev/django-netjsongraph#netjsongraph_signals" rel="noreferrer" target="_blank">https://github.com/interop-dev/django-netjsongraph#netjsongraph_signals</a><br>
<br>
You can write a python file in which you define the action to perform<br>
each time a link is saved.<br>
In that action you check the geographic coordinates, calculate the<br>
distance and save it.<br>
<br>
I'm using django-signal to fill node information from a whois service:<br>
<a href="https://gist.github.com/nemesisdesign/c1d7cb31831461b61ec0" rel="noreferrer" target="_blank">https://gist.github.com/nemesisdesign/c1d7cb31831461b61ec0</a><br>
<br>
You have to do something similar, but you'll have to use the Link model<br>
instead of the Node model.<br>
Refer to django-signals documentation for more information:<br>
<a href="https://docs.djangoproject.com/en/1.9/topics/signals/" rel="noreferrer" target="_blank">https://docs.djangoproject.com/en/1.9/topics/signals/</a><br>
<br>
Federico<br>
<div><div class="h5"><br>
<br>
On 04/29/2016 02:32 PM, <a href="mailto:sp2ong@wp.pl">sp2ong@wp.pl</a> wrote:<br>
> Hi Federico,<br>
><br>
> Yes, now I can add any filed in properties.<br>
><br>
> I am back to my question about put in properties information on XY<br>
> coordinates.<br>
><br>
> When we click on green line links we have in right top cornet<br>
> information for example:<br>
><br>
> ================================<br>
><br>
> source: SP2IAZ<br>
><br>
> target: SP2MSF<br>
><br>
> cost: 1<br>
><br>
> status: up<br>
><br>
> neighbor link quality: 1<br>
><br>
> link quality: 0.874<br>
><br>
> created: 2016-04-28T15:38:34.517Z<br>
><br>
> modified: 2016-04-29T12:20:03.972Z<br>
><br>
> ============================<br>
><br>
> When we put XY coordinates in properties for example:<br>
><br>
> lat: 53.12345<br>
><br>
> lon: 18.12345<br>
><br>
> it will be nice to have additional information about distance between<br>
> nodes for this link for example:<br>
><br>
> ===================<br>
><br>
> source: SP2IAZ<br>
><br>
> target: SP2MSF<br>
><br>
> distance 3.6 km<br>
><br>
> cost: 1<br>
><br>
> status: up<br>
><br>
> neighbor link quality: 1<br>
><br>
> link quality: 0.874<br>
><br>
> created: 2016-04-28T15:38:34.517Z<br>
><br>
> modified: 2016-04-29T12:20:03.972Z<br>
><br>
> ==========================================<br>
><br>
> it will be useful information haw far are the nodes in the selected link<br>
><br>
> But this must be calculated by django-netjsongraph framework if find<br>
> information about lat/lon in properties links<br>
><br>
> Bets regards<br>
><br>
><br>
> 2016-04-29 10:51 GMT+02:00 Nemesis <<a href="mailto:nemesis@ninux.org">nemesis@ninux.org</a><br>
</div></div>> <mailto:<a href="mailto:nemesis@ninux.org">nemesis@ninux.org</a>>>:<br>
<div class="HOEnZb"><div class="h5">><br>
><br>
>     Use instead:<br>
><br>
>     {<br>
>         "hardware": "Nanostation M2"<br>
>     }<br>
><br>
>     A visual editor like the one I'm using on django-netjsonconfig [1] would<br>
>     surely prevent to do these mistakes, hopefully in the near future I'll<br>
>     add something similar.<br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div>