adagios
adagios copied to clipboard
Merging views engine
Hello ! I rebased PR #391. This PR doesn't include the possibility to use external commands (rescheduled, ask, ...). I will add this feature in other PR when this one will be merged.
@matthieucan could you confirm or not this ?
In adagios/status/templates/custom_views/widgets/link_host.html
The current line :
<a href="{% url "status.views.detail" %}?host_name={{ value }}&backend={{ line.backend }}">{{ line|hash:col_name }}</a>
Should be
<a href="{% url "status.views.detail" %}?host_name={{ line|hash:col_name }}&backend={{ line.backend }}">{{ line|hash:col_name }}</a>
Thanks !
@matthieucan do you have any idea about the build failed ? It happens only with django < 1.5 ...
For the changed line: yes, I confirm you're right, 'col_name' and 'line' are passed as arguments to the widgets.
For the build fail: definitely a feature somewhere in custom_*.py, which is not in Django 1.4. Are you able to reproduce the bug locally? It should point you to the correct line.
I get this error :
UnpicklingError at /status/custom/edit
invalid load key, '{'.
Request Method: GET
Request URL: http://127.0.0.1:8000/status/custom/edit?datasource=hosts
Django Version: 1.4.15
Exception Type: UnpicklingError
Exception Value:
invalid load key, '{'.
Exception Location: /home/titilambert/projets_opensource/adagios/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py in loads, line 21
Python Executable: /home/titilambert/projets_opensource/adagios/env/bin/python
Python Version: 2.7.8
Python Path:
['/home/titilambert/projets_opensource/adagios/adagios/..',
'/home/titilambert/projets_opensource/adagios/adagios',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7/plat-x86_64-linux-gnu',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7/lib-tk',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7/lib-old',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/titilambert/projets_opensource/adagios/env/local/lib/python2.7/site-packages',
'/home/titilambert/projets_opensource/adagios/env/lib/python2.7/site-packages']
Server time: Tue, 21 Oct 2014 09:12:47 -0400
The error is here (env/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py
):
def loads(self, data):
return pickle.loads(data)
With
data
=> {"django_language":"en"}
type(data)
=> <type 'str'>
No idea... don't you have a stack trace?
@titilambert we switched from using file backed session cookies to using Signed Cookies. You should remove any cookies when moving between pre-django16 and django16 based code.
@matthieucan did this help you ?
@titilambert Unless I'm mistaken, no cookies are used in the views engine. Can this be a problem within travis-ci?
FIXED !!!! @matthieucan I fixed some javascript calls. Could you valid this ?
Thanks !
@titilambert This looks good! I don't have any environment to test it right now, but if it works with you, that's perfect!
@palli @tomas-edwardsson it is correct for you ? Thank !
Any news about it ? thank
So, I am seeing a few problems with this patch, which have made me hesitant to merge it in. I think maybe we should discuss this a little more on our meeting tomorrow. Here are a few comments from the top of my head:
- It is still very big. Not a lot to be done about that now, but as a reminder for next time, maybe we should aim for getting a minimal working copy first, and then add on complexities
- Can we do this without datatable and jquery-ui dependencies? (We already have datatables, and we moved from jquery-ui in version 1.0)
- For me, applying the branch caused unhandled traceback on all adagios views because of unsafe code added to the context processors. Is it possible to do this without context processors ?
- The custom views backend code, is about the same size as the status app.. Please make it is own django app, called 'custom views'.
Are you guys still using this extension and/or actively developing it ?