X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fdashboard%2Fviews%2Fhome.py;h=3084c0eca061b0f84da2aefa973ab68a47255188;hb=149befce1a2f20730d6cce5f0b131e1cfc04cd24;hp=0d9ff74dd5545d8ba83271c66a82cd144f8a2aca;hpb=d39b34a4e7f3fc6e6c9c1b48d6b734a2095e924e;p=plstackapi.git diff --git a/planetstack/core/dashboard/views/home.py b/planetstack/core/dashboard/views/home.py index 0d9ff74..3084c0e 100644 --- a/planetstack/core/dashboard/views/home.py +++ b/planetstack/core/dashboard/views/home.py @@ -75,18 +75,26 @@ 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): - body = body + '' % i; + body = body + ''; for j,controllerdashboard in enumerate(view.controllerdashboardviews.all()): body = body + '' % (j, controllerdashboard.controller.name) - body = body + '' + body = body + '
    ' for j,controllerdashboard in enumerate(view.controllerdashboardviews.all()): body = body + '\n' % (i,j, self.embedDashboard(controllerdashboard.url)); @@ -96,11 +104,15 @@ class DashboardDynamicView(TemplateView): body = body + """ - """ % (i,i,i,i,i,i); + """ % (i,i,i,i,i,i,i); else: body = body + self.embedDashboard(url) body = body + '
    \n'