Improved handling of Swift panel detection
The initial handling of the Swift panel detection can be improved by more closely following the way the detection is done in the Swift Horizon code. Namely, if the setting is not angular then the original default Django panel will be enabled. Also added code to detect if the setting is missing which would also result in the default Django panel being the default. Change-Id: I8d7a44c84405f291780a6767bcb375ba980f3a7a
This commit is contained in:
parent
c2e42436ad
commit
a3c2ee6f83
@ -87,8 +87,11 @@ class DownloadBackup(tables.LinkAction):
|
||||
'object_path': object_path})
|
||||
|
||||
def allowed(self, request, datum):
|
||||
return ((settings.HORIZON_CONFIG['swift_panel'] == 'legacy') and
|
||||
datum.status == 'COMPLETED')
|
||||
legacy_swift_panel_enabled = True
|
||||
if ('swift_panel' in settings.HORIZON_CONFIG and
|
||||
settings.HORIZON_CONFIG['swift_panel'] == 'angular'):
|
||||
legacy_swift_panel_enabled = False
|
||||
return legacy_swift_panel_enabled and datum.status == 'COMPLETED'
|
||||
|
||||
|
||||
class DeleteBackup(tables.DeleteAction):
|
||||
|
Loading…
Reference in New Issue
Block a user