From d810a9d5ad62ea388ab92adff89fc25effe6ae5c Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 5 Oct 2015 08:28:59 -0700 Subject: [PATCH] Adding perm property to Datasource model --- panoramix/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panoramix/models.py b/panoramix/models.py index 14fb39b0d6a78..7a7534db3c610 100644 --- a/panoramix/models.py +++ b/panoramix/models.py @@ -617,6 +617,12 @@ def metrics_combo(self): def name(self): return self.datasource_name + @property + def perm(self): + return ( + "[{self.cluster_name}].[{self.datasource_name}]" + "(id:{self.id})").format(self=self) + def __repr__(self): return self.datasource_name