From c8723091ed7f6ce19511f3ab666b2d7757557b2c Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Tue, 2 Apr 2019 16:53:49 -0700 Subject: [PATCH] Add share servers to share network detail We're missing share servers in the network detailed view. Also, it's not helpful to show either Share Servers or Security Services when none exist (or are not retrievable). Change-Id: Iacb8145f7865d73c479130cbe94078b4cc5c831a Partial-Bug: #1702396 --- .../templates/share_networks/_detail.html | 53 +++++++++++++------ ...hare-network-details-1cff66010817f1a8.yaml | 6 +++ 2 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/bug-1702396-add-share-servers-to-share-network-details-1cff66010817f1a8.yaml diff --git a/manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html b/manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html index 51858c01..855b9597 100644 --- a/manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html +++ b/manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html @@ -16,7 +16,7 @@
-

{% trans "Net Details" %}

+

{% trans "Network Details" %}


{% trans "Network" %}
@@ -31,19 +31,38 @@
-
-

{% trans "Security Services" %}

-
- {% for sec_service in share_network.sec_services %} - {% url 'horizon:project:security_services:security_service_detail' sec_service.id as sec_service_url%} -
-
{% trans "Id" %}
-
{{ sec_service.id }}
-
{% trans "Name" %}
-
{{ sec_service.name }}
-
{% trans "Type" %}
-
{{ sec_service.type }}
-
-
- {% endfor %} -
+ +{% if share_network.share_servers %} +
+

{% trans "Share Servers" %}

+
+
+ {% for server in share_network.share_servers %} +
    + {% url 'horizon:admin:share_servers:share_server_detail' server.id as server_url %} +
  • {{ server.id }}
  • +
+ {% endfor %} +
+
+{% endif %} + + +{% if share_network.sec_services %} +
+

{% trans "Security Services" %}

+
+ {% for sec_service in share_network.sec_services %} + {% url 'horizon:project:security_services:security_service_detail' sec_service.id as sec_service_url%} +
+
{% trans "Id" %}
+
{{ sec_service.id }}
+
{% trans "Name" %}
+
{{ sec_service.name }}
+
{% trans "Type" %}
+
{{ sec_service.type }}
+
+
+ {% endfor %} +
+{% endif %} diff --git a/releasenotes/notes/bug-1702396-add-share-servers-to-share-network-details-1cff66010817f1a8.yaml b/releasenotes/notes/bug-1702396-add-share-servers-to-share-network-details-1cff66010817f1a8.yaml new file mode 100644 index 00000000..01e4bdb0 --- /dev/null +++ b/releasenotes/notes/bug-1702396-add-share-servers-to-share-network-details-1cff66010817f1a8.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Share servers are added to the share network details page. The page has + been modified to show share servers and security services only if any + exist, or are retrievable from the server.