Merge "Remove "Delete Pool" button when a pool is connected to a VIP"

This commit is contained in:
Jenkins 2013-11-03 23:05:27 +00:00 committed by Gerrit Code Review
commit e17135f885
1 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,11 @@ class DeletePoolLink(tables.DeleteAction):
data_type_singular = _("Pool")
data_type_plural = _("Pools")
def allowed(self, request, datum=None):
if datum and datum.vip_id:
return False
return True
class DeleteMonitorLink(tables.DeleteAction):
name = "deletemonitor"