Browse Source

Add enabled check in Backups panel

If enable_backup is False in OPENSTACK_CINDER_FEATURES
then we should not display the backups panel.

Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
Closes-Bug: #1778771
(cherry picked from commit 6c2225bab8)
Edward Hope-Morley 6 months ago
parent
commit
19865eec5b
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      openstack_dashboard/dashboards/project/backups/panel.py

+ 6
- 0
openstack_dashboard/dashboards/project/backups/panel.py View File

@@ -14,6 +14,8 @@
14 14
 
15 15
 from django.utils.translation import ugettext_lazy as _
16 16
 
17
+from openstack_dashboard import api
18
+
17 19
 import horizon
18 20
 
19 21
 
@@ -25,3 +27,7 @@ class Backups(horizon.Panel):
25 27
          'openstack.services.volumev3'),
26 28
     )
27 29
     policy_rules = (("volume", "backup:get_all"),)
30
+
31
+    @staticmethod
32
+    def can_register():
33
+        return api.cinder.volume_backup_supported(None)

Loading…
Cancel
Save