X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fmodels%2Fdashboard.py;h=39dcf07051b7797a49dde9e7c54839620ea738f2;hb=d6a61aef42561ea138fcb7b192f3082e018b852b;hp=f4e9fb156ad8bbd5d8265f5af920e60558728190;hpb=6832ef59451a3e9dac6bc9356dbd74fb2884a42e;p=plstackapi.git diff --git a/planetstack/core/models/dashboard.py b/planetstack/core/models/dashboard.py index f4e9fb1..39dcf07 100644 --- a/planetstack/core/models/dashboard.py +++ b/planetstack/core/models/dashboard.py @@ -7,15 +7,17 @@ from django.contrib.contenttypes import generic 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="dashboards", through='ControllerDashboard') + controllers = models.ManyToManyField(Controller, blank=True, related_name="dashboardviews", through='ControllerDashboardView') + enabled = models.BooleanField(default=True) def __unicode__(self): return u'%s' % (self.name) -class ControllerDashboard(PlCoreBase): +class ControllerDashboardView(PlCoreBase): objects = ControllerLinkManager() deleted_objects = ControllerLinkDeletionManager() - controller = models.ForeignKey(Controller, related_name='controllerdashboards') - dashboardView = models.ForeignKey(DashboardView, related_name='controllerdashboards') + 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")