From fdbbe8cc9a34faede4416ab9d92a014d1fbb6b44 Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Tue, 14 Aug 2018 12:15:47 -0400 Subject: [PATCH] Don't show host field in project tables We already suppress this information in non-admin contexts in manila itself [1] so drop the field from the project view tables. Closes-Bug: #1664370 [1] I799bb7378927b6c3ee0f9fe88fd9876a03dd85b5 Change-Id: I00b99b082a4188e0e95c7a055da0fa28c5541338 (cherry picked from commit ad27411eb416202468cd3f937d02a0e68f4ffeb5) (cherry picked from commit 97441440e098d06166299e811504fe26eb3b16aa) --- manila_ui/dashboards/project/shares/replicas/tables.py | 1 - .../project/shares/templates/shares/_detail.html | 2 ++ .../shares/templates/shares/replicas/_detail_overview.html | 2 ++ ...host-field-in-project-view-tables-20b7a67023d57d35.yaml | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1664370-drop-host-field-in-project-view-tables-20b7a67023d57d35.yaml diff --git a/manila_ui/dashboards/project/shares/replicas/tables.py b/manila_ui/dashboards/project/shares/replicas/tables.py index 97c163f3..9c532650 100644 --- a/manila_ui/dashboards/project/shares/replicas/tables.py +++ b/manila_ui/dashboards/project/shares/replicas/tables.py @@ -165,7 +165,6 @@ class ReplicasTable(tables.DataTable): replica_state = tables.Column( "replica_state", verbose_name=_("Replica State")) - host = tables.Column("host", verbose_name=_("Host")) created_at = tables.Column( "created_at", verbose_name=_("Created At"), filters=(filters.parse_isotime,)) diff --git a/manila_ui/dashboards/project/shares/templates/shares/_detail.html b/manila_ui/dashboards/project/shares/templates/shares/_detail.html index fa41ce32..a139a2a3 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/_detail.html +++ b/manila_ui/dashboards/project/shares/templates/shares/_detail.html @@ -70,8 +70,10 @@
{{ share.mount_snapshot_support }}
{% trans "Created" %}
{{ share.created_at|parse_date }}
+ {% if share.host %}
{% trans "Host" %}
{{ share.host }}
+ {% endif %}
{% trans "Task state" %}
{{ share.task_state }}
diff --git a/manila_ui/dashboards/project/shares/templates/shares/replicas/_detail_overview.html b/manila_ui/dashboards/project/shares/templates/shares/replicas/_detail_overview.html index 9833608e..e709a933 100644 --- a/manila_ui/dashboards/project/shares/templates/shares/replicas/_detail_overview.html +++ b/manila_ui/dashboards/project/shares/templates/shares/replicas/_detail_overview.html @@ -34,7 +34,9 @@
{{ replica.created_at|parse_date }}
{% trans "Updated" %}
{{ replica.updated_at|parse_date }}
+ {% if replica.host %}
{% trans "Host" %}
{{ replica.host }}
+ {% endif %} diff --git a/releasenotes/notes/bug-1664370-drop-host-field-in-project-view-tables-20b7a67023d57d35.yaml b/releasenotes/notes/bug-1664370-drop-host-field-in-project-view-tables-20b7a67023d57d35.yaml new file mode 100644 index 00000000..4b96aba4 --- /dev/null +++ b/releasenotes/notes/bug-1664370-drop-host-field-in-project-view-tables-20b7a67023d57d35.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Drop the ``host`` field from project view tables since this information is + only visible to administrators. This is the UI side of `Launchpad bug 1664370 + `_ and completes the fix for + that bug.