From a1b494f4338af67b76d396c4f712edf763e0bcb7 Mon Sep 17 00:00:00 2001 From: David TARDIVEL Date: Fri, 16 Sep 2016 15:57:49 +0200 Subject: [PATCH] Remove 'Go to Audit Template' from Audit view This is no more audit template foreign key in audit model. So we have to remove this button. Change-Id: I70dc493cf5bf373a43642dbeb7198c5840a1b185 Closes-bug: #1623533 --- watcher_dashboard/content/audits/tables.py | 27 ---------------------- 1 file changed, 27 deletions(-) diff --git a/watcher_dashboard/content/audits/tables.py b/watcher_dashboard/content/audits/tables.py index b8cd551..c1702d8 100644 --- a/watcher_dashboard/content/audits/tables.py +++ b/watcher_dashboard/content/audits/tables.py @@ -84,32 +84,6 @@ class GoToActionPlan(horizon.tables.Action): args=[action_plans[0].uuid])) -class GoToAuditTemplate(horizon.tables.Action): - name = "go_to_audit_template" - verbose_name = _("Go to Audit Template") - url = "horizon:admin:audit_templates:detail" - policy_rules = (("infra-optim", "audit:get_one"),) - # classes = ("ajax-modal", "btn-launch") - # icon = "send" - - def allowed(self, request, audit): - return audit or audit.state in ("SUCCEEEDED", ) - - def single(self, table, request, audit_id): - try: - audit = watcher.Audit.get( - request, audit_id=audit_id) - except Exception: - horizon.exceptions.handle( - request, - _("Unable to retrieve audit information.")) - return "javascript:void(0);" - - return shortcuts.redirect(urlresolvers.reverse( - self.url, - args=[audit.audit_template_uuid])) - - class DeleteAudits(horizon.tables.DeleteAction): verbose_name = _("Delete Audits") @@ -164,7 +138,6 @@ class AuditsTable(horizon.tables.DataTable): ) row_actions = ( GoToActionPlan, - GoToAuditTemplate, # CreateAudits, # ArchiveAudits, # CreateAudits,