summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/images.html
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-08-24 17:01:27 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-08-31 15:57:52 +0200
commit0b5dd659f1e5bb3487f58f34b778d90f6c33cebd (patch)
tree74ea9d3a748be06966fe90ec8dc29fd0cf804199 /ogcp/templates/images.html
parent4f02e545e4c049897fa793d4bfffb419189605ad (diff)
Adapt images tree to work with several ogServers
Images view fetch images from all ogServers configured and show them in the left tree as a nested list. ogServers are represented as the parents of their images.
Diffstat (limited to 'ogcp/templates/images.html')
-rw-r--r--ogcp/templates/images.html22
1 files changed, 14 insertions, 8 deletions
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index 7ef1efc..4231df2 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -11,14 +11,20 @@
{% endblock %}
{% block sidebar %}
- <ul id="images" class="nav flex-column nav-pills">
- {% for image in images %}
- <li id="{{ image["name"] }}_{{ image["id"] }}" class="nav-item">
- <input class="form-check-input" type="checkbox" form="imagesForm"
- value="{{ image["id"] }}"
- {% if image.get("selected", False) %}checked{% endif %}
- name="{{ image["name"] }}_{{ image["id"] }}" />
- {{ image["name"] }}
+ <ul id="servers" class="nav flex-column nav-pills">
+ {% for response in responses %}
+ <li class="nav-item"><b>{{ response["server"]["name"] }}</b>
+ <ul id="images" class="nav flex-column nav-pills">
+ {% for image in response["json"]["images"] %}
+ <li id="{{ image["name"] }}_{{ image["id"] }}" class="nav-item">
+ <input class="form-check-input" type="checkbox" form="imagesForm"
+ value="{{ image["id"] }}"
+ {% if image.get("selected", False) %}checked{% endif %}
+ name="{{ image["name"] }}_{{ image["id"] }}" />
+ {{ image["name"] }}
+ </li>
+ {% endfor %}
+ </ul>
</li>
{% endfor %}
</ul>