summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/servers.html
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-08-31 17:45:20 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-09-07 17:49:15 +0200
commitcf02e0c051e664cdfd77162fac3a7c8302620324 (patch)
tree494e05e3c118848770ae40beb9a8b11e001ec5f1 /ogcp/templates/servers.html
parent7039b2942611f605f610888e6c7970135f4b67e4 (diff)
Add Servers section
In Servers section/view, users can add or delete ogServers from ogCP configuration file. Replaces Repositories views and recycle some of its code.
Diffstat (limited to 'ogcp/templates/servers.html')
-rw-r--r--ogcp/templates/servers.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/ogcp/templates/servers.html b/ogcp/templates/servers.html
new file mode 100644
index 0000000..05b7c18
--- /dev/null
+++ b/ogcp/templates/servers.html
@@ -0,0 +1,38 @@
+{% extends 'base.html' %}
+
+{% block nav_servers %}active{% endblock %}
+
+{% block container %}
+ <form id="serversForm">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ </form>
+ {{ super() }}
+</form>
+{% endblock %}
+
+{% block sidebar %}
+ <ul id="servers-list" class="nav flex-column nav-pills">
+ {% for server in servers %}
+ {% set server_str = server["ip"] ~ ":" ~ server["port"] %}
+ <li class="nav-item">
+ <input class="form-check-input" type="checkbox" form="serversForm"
+ value="{{ server_str }}"
+ name="selected-server" />
+ {{ server["name"] }}
+ </li>
+ {% endfor %}
+ </ul>
+{% endblock %}
+
+{% block commands %}
+ <input class="btn btn-light {% block nav_server_add %}{% endblock %}" type="submit" value="{{ _('Add server') }}"
+ form="serversForm" formaction="{{ url_for('server_add_get') }}" formmethod="get">
+ <input class="btn btn-light {% block nav_server_delete %}{% endblock %}" type="submit" value="{{ _('Delete server') }}"
+ form="serversForm" formaction="{{ url_for('server_delete_get') }}" formmethod="get">
+ {% if btn_back %}
+ <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
+ {{ _("Back") }}
+ </button>
+ {% endif %}
+{% endblock %}
+