add ability to disable dashboards
[plstackapi.git] / planetstack / core / models / dashboard.py
index 828acec..39dcf07 100644 (file)
@@ -8,6 +8,7 @@ class DashboardView(PlCoreBase):
     name = models.CharField(max_length=200, unique=True, help_text="Name of the View")
     url = models.CharField(max_length=1024, help_text="URL of Dashboard")
     controllers = models.ManyToManyField(Controller, blank=True, related_name="dashboardviews", through='ControllerDashboardView')
+    enabled = models.BooleanField(default=True)
 
     def __unicode__(self):  return u'%s' % (self.name)
 
@@ -16,6 +17,7 @@ class ControllerDashboardView(PlCoreBase):
     deleted_objects = ControllerLinkDeletionManager()
     controller = models.ForeignKey(Controller, related_name='controllerdashboardviews')
     dashboardView = models.ForeignKey(DashboardView, related_name='controllerdashboardviews')
+    enabled = models.BooleanField(default=True)
 
     url = models.CharField(max_length=1024, help_text="URL of Dashboard")