Merged monitorig API to backend

Installation scripts have to be modified to include dotm_monitor module deployment from dotm_backend/dotm_monitor.
Nope… bad idea.
Mon API code doesn’t use json.dump in most cases, because there is already json in Redis.

On 14 Jun 2014, at 23:22, Anry <koanry@gmail.com> wrote:

> might be a good idea, will think about it tomorrow… can’t think today anymore :D
> 
> On 14 Jun 2014, at 23:09, Lars Windolf <notifications@github.com> wrote:
> 
>> In dotm_backend/dotm_backend.py:
>> 
>> > @@ -19,20 +76,15 @@ def get_connections():
>> >  
>> >  
>> >  @route('/nodes')
>> > -def nodes():
>> > -    response.set_header('Cache-Control', 'max-age=30,must-revalidate')
>> > -    response.content_type = 'application/json'
>> > -    return json.dumps({'nodes': rdb.lrange("dotm::nodes", 0, -1),
>> > -                       'connections': get_connections()})
>> > +def get_nodes():
>> > +    return resp_or_404(json.dumps({'nodes': rdb.lrange("dotm::nodes", 0, -1),
>> Wondering about all those resp_or_404() call which all call json.dumps() being totally repetetive for a JSON API. Moving json.dumps() into resp_or_404() might be good...
>> 
>> —
>> Reply to this email directly or view it on GitHub.
>> 
>