From dbdd3764624e42a073288558dcf825b4aab4878f Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 22 Apr 2024 23:46:52 +0200 Subject: [PATCH] Show availability zone for volume backups This adds availability zone fields to volume backup tables. Change-Id: I6bf7c3ef4f6d6b73a6fafcc9b7038ccc4782037f --- openstack_dashboard/dashboards/admin/backups/tables.py | 2 +- .../admin/backups/templates/backups/_detail_overview.html | 2 ++ openstack_dashboard/dashboards/project/backups/tables.py | 2 ++ .../project/backups/templates/backups/_detail_overview.html | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/admin/backups/tables.py b/openstack_dashboard/dashboards/admin/backups/tables.py index 4a17ae7b92..51991aa985 100644 --- a/openstack_dashboard/dashboards/admin/backups/tables.py +++ b/openstack_dashboard/dashboards/admin/backups/tables.py @@ -128,4 +128,4 @@ class AdminBackupsTable(project_tables.BackupsTable): row_actions = (AdminRestoreBackup, ForceDeleteBackup, AdminDeleteBackup, UpdateVolumeBackupStatusAction,) columns = ('project', 'name', 'description', 'size', 'status', - 'volume_name', 'snapshot',) + 'availability_zone', 'volume_name', 'snapshot',) diff --git a/openstack_dashboard/dashboards/admin/backups/templates/backups/_detail_overview.html b/openstack_dashboard/dashboards/admin/backups/templates/backups/_detail_overview.html index c878d33bf4..da3d48fdbe 100644 --- a/openstack_dashboard/dashboards/admin/backups/templates/backups/_detail_overview.html +++ b/openstack_dashboard/dashboards/admin/backups/templates/backups/_detail_overview.html @@ -18,6 +18,8 @@
{%trans "Fail reason"%}
{{ backup.fail_reason }}
{% endif %} +
{% trans "Availability Zone" %}
+
{{ backup.availability_zone }}
{% if volume %}
{% trans "Volume" %}
diff --git a/openstack_dashboard/dashboards/project/backups/tables.py b/openstack_dashboard/dashboards/project/backups/tables.py index 11f2e88411..be036d8b8a 100644 --- a/openstack_dashboard/dashboards/project/backups/tables.py +++ b/openstack_dashboard/dashboards/project/backups/tables.py @@ -181,6 +181,8 @@ class BackupsTable(tables.DataTable): status=True, status_choices=STATUS_CHOICES, display_choices=STATUS_DISPLAY_CHOICES) + availability_zone = tables.Column("availability_zone", + verbose_name=_("Availability Zone")) volume_name = BackupVolumeNameColumn("name", verbose_name=_("Volume Name"), link="horizon:project:volumes:detail") diff --git a/openstack_dashboard/dashboards/project/backups/templates/backups/_detail_overview.html b/openstack_dashboard/dashboards/project/backups/templates/backups/_detail_overview.html index 6567b88be8..d386ecc43c 100644 --- a/openstack_dashboard/dashboards/project/backups/templates/backups/_detail_overview.html +++ b/openstack_dashboard/dashboards/project/backups/templates/backups/_detail_overview.html @@ -16,6 +16,8 @@
{%trans "Fail reason"%}
{{ backup.fail_reason }}
{% endif %} +
{% trans "Availability Zone" %}
+
{{ backup.availability_zone }}
{% if volume %}
{% trans "Volume" %}