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

Dashboard #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dashboard #5

wants to merge 1 commit into from

Conversation

SteinRobert
Copy link
Member

  • display amount of issues at top (3xx, 4xx, 5xx and bad configured)
  • removed action dropdown
  • adds button to start link analysis

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...).

------------------
 - display amount of issues at top (3xx, 4xx, 5xx and bad configured)
 - removed action dropdown
 - adds button to start link analysis
@mammuth
Copy link

mammuth commented May 9, 2017

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))
Copy link

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):
Copy link

@mammuth mammuth May 9, 2017

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)

@SteinRobert SteinRobert changed the title Dasboard Dashboard May 13, 2017
@tschale
Copy link
Member

tschale commented Jan 30, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants