-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dashboard #5
base: master
Are you sure you want to change the base?
Dashboard #5
Conversation
------------------ - display amount of issues at top (3xx, 4xx, 5xx and bad configured) - removed action dropdown - adds button to start link analysis
Really cool! 🎉 I added two small comments. Maybe we could also link to the link instance from within the list of unhealthy links? This would probably make fixing links a lot easier. Maybe as an "Inspect link" line-action or something like that. If that's something we want to do but which is not that easy, I'd say we merge this and open a separate issue for this feature. |
|
||
link_health_state_custom_urls = [ | ||
url(r'^update-health-states/$', self.admin_site.admin_view(self.update_health_states), | ||
name='%s_%s_update_health_state' % (self.model._meta.app_label, self.model._meta.model_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should use .format()
here, shouldn't we?
from django.utils.safestring import mark_safe | ||
from django.utils.translation import activate | ||
from django.utils.translation import ugettext as _ | ||
|
||
from cmsplugin_filer_link2.management.commands import check_links | ||
from .models import LinkHealthState | ||
|
||
|
||
class LinkStateAdmin(admin.ModelAdmin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link_name
in the list currently links to the link state of a link. There, the user could change the link or the status. I think both doesn't really make sense, so maybe we should not link to the health status of a link from within the list?
This should do the trick from within the __init__
of the LinkStateAdmin
:
self.list_display_links = (None, )
(http://stackoverflow.com/questions/1618728/disable-link-to-edit-object-in-djangos-admin-display-list-only)
Asynchronous link analysis would be great! We'd need some further dependencies for that and should decide on what to use (e.g. https://github.com/requests/requests-threads, https://github.com/ross/requests-futures, https://github.com/aio-libs/aiohttp). We may want to move that feature into it's own issue. |
Possible ToDo:
Make the link analysis asynchronous. Right now it is in the request - response cycle. That means the user could wait a pretty long time before all links have been analyze (because of low response times or timeouts...).