From 9e2214114a5d6cb535c23ad90a2036dcc116b9eb Mon Sep 17 00:00:00 2001
From: kaiyou <pierre@jaury.eu>
Date: Wed, 13 Nov 2019 16:06:43 +0100
Subject: [PATCH] Support basic service management

---
 hiboo/service/templates/service_details.html | 2 +-
 hiboo/service/templates/service_list.html    | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/hiboo/service/templates/service_details.html b/hiboo/service/templates/service_details.html
index 63e022fc..6ff9f024 100644
--- a/hiboo/service/templates/service_details.html
+++ b/hiboo/service/templates/service_details.html
@@ -28,7 +28,7 @@
 {% endblock %}
 
 {% block actions %}
-<a href="{{ url_for("profile.list", service_uuid=service.uuid) }}" class="btn btn-primary">{% trans %}View profiles{% endtrans %}</a>
+<a href="{{ url_for("profile.list_for_service", service_uuid=service.uuid) }}" class="btn btn-primary">{% trans %}View profiles{% endtrans %}</a>
 <a href="{{ url_for(".edit", service_uuid=service.uuid) }}" class="btn btn-primary">{% trans %}Edit this service{% endtrans %}</a>
 <a href="{{ url_for(".delete", service_uuid=service.uuid) }}" class="btn btn-danger">{% trans %}Delete this service{% endtrans %}</a>
 {% endblock %}
diff --git a/hiboo/service/templates/service_list.html b/hiboo/service/templates/service_list.html
index 7917d32d..6aa92836 100644
--- a/hiboo/service/templates/service_list.html
+++ b/hiboo/service/templates/service_list.html
@@ -12,15 +12,23 @@
           <tr>
             <th>{% trans %}Service{% endtrans %}</th>
             <th>{% trans %}Provider{% endtrans %}</th>
+            <th>{% trans %}Type{% endtrans %}</th>
             <th>{% trans %}Policy{% endtrans %}</th>
             <th>{% trans %}Max profiles{% endtrans %}</th>
+            <th>{% trans %}Actions{% endtrans %}</th>
           </tr>
           {% for service in services %}
           <tr>
             <td><a href="{{ url_for(".details", service_uuid=service.uuid) }}">{{ service.name }}</a></td>
             <td>{{ service.provider }}</td>
+            <td>{{ service.protocol }}</td>
             <td>{{ service.policy }}</td>
             <td>{{ service.max_profiles }}</td>
+            <td>
+              <a href="{{ url_for(".details", service_uuid=service.uuid)}}">Details</a>
+              <a href="{{ url_for("profile.list_for_service", service_uuid=service.uuid)}}">Profiles</a>
+              <a href="{{ url_for(".edit", service_uuid=service.uuid)}}">Edit</a>
+            </td>
           </tr>
           {% endfor %}
         </table>
-- 
GitLab