X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fdashboard%2Fviews%2Fhome.py;h=6f57666c161ade5ad264e64fc1d9d5d21b6f7574;hb=d6a61aef42561ea138fcb7b192f3082e018b852b;hp=7aaa9b37e10c9d10d5ece8abc94da78a42667b47;hpb=b04e2b490b5e9e48f0eea35d7b2b4d662fc1e401;p=plstackapi.git diff --git a/planetstack/core/dashboard/views/home.py b/planetstack/core/dashboard/views/home.py index 7aaa9b3..6f57666 100644 --- a/planetstack/core/dashboard/views/home.py +++ b/planetstack/core/dashboard/views/home.py @@ -75,11 +75,18 @@ class DashboardDynamicView(TemplateView): dashboards.append(customize[0]) for i,view in enumerate(dashboards): + # don't display disabled dashboards + if (not view.enabled): + continue body = body + '
  • %s
  • \n' % (i, view.name) body = body + "\n" for i,view in enumerate(dashboards): + # don't display disabled dashboards + if (not view.enabled): + continue + url = view.url body = body + '
    \n' % i if (view.controllers.all().count()>0): @@ -89,18 +96,16 @@ class DashboardDynamicView(TemplateView): body = body + '' for j,controllerdashboard in enumerate(view.controllerdashboardviews.all()): - body = body + '
    \n' % (i,j,i) - body = body + self.embedDashboard(controllerdashboard.url); - body = body + '
    \n'; + body = body + '\n' % (i,j, self.embedDashboard(controllerdashboard.url)); + + body = body + '
    \n' % i body = body + """ """ % (i,i,i,i,i,i); else: