From 14ddd26e1400bfb8eec96e896c11768d1e65ec0a Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Wed, 15 Nov 2023 16:42:06 +0000 Subject: [PATCH] WebUI component: - Added Link Attributes to Details page - Added formatting of Schedule Constraints in Service and Slice Details page --- src/webui/service/templates/link/detail.html | 23 +++++++++++++++++++ .../service/templates/service/detail.html | 9 ++++++++ src/webui/service/templates/slice/detail.html | 9 ++++++++ 3 files changed, 41 insertions(+) diff --git a/src/webui/service/templates/link/detail.html b/src/webui/service/templates/link/detail.html index 8ca7faee3..864d0cdb2 100644 --- a/src/webui/service/templates/link/detail.html +++ b/src/webui/service/templates/link/detail.html @@ -79,6 +79,29 @@ </div> +<b>Attributes:</b> +<table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">Key</th> + <th scope="col">Value</th> + </tr> + </thead> + <tbody> + {% for field_descriptor, field_value in link.attributes.ListFields() %} + <tr> + <td> + {{ field_descriptor.name }} + </td> + <td> + {{ field_value }} + </td> + </tr> + {% endfor %} + </tbody> +</table> + + <!-- Modal --> <div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index 414aa19d0..9c27bc99a 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -166,6 +166,15 @@ {% if constraint.sla_availability.all_active %}all{% else %}single{% endif %}-active </td> </tr> + {% elif constraint.WhichOneof('constraint')=='schedule' %} + <tr> + <td>Schedule</td> + <td>-</td> + <td> + Start time: {{ constraint.schedule.start_timestamp }}, + Duration: {{ constraint.schedule.duration_days }} days. + </td> + </tr> {% elif constraint.WhichOneof('constraint')=='sla_isolation' %} <tr> <td>SLA Isolation</td> diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index 13b69defe..bbca18ecc 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -166,6 +166,15 @@ {% if constraint.sla_availability.all_active %}all{% else %}single{% endif %}-active </td> </tr> + {% elif constraint.WhichOneof('constraint')=='schedule' %} + <tr> + <td>Schedule</td> + <td>-</td> + <td> + Start time: {{ constraint.schedule.start_timestamp }}, + Duration: {{ constraint.schedule.duration_days }} days. + </td> + </tr> {% elif constraint.WhichOneof('constraint')=='sla_isolation' %} <tr> <td>SLA Isolation</td> -- GitLab