Implement adding networks
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<div id="actions">
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
<div class="buttons">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
@@ -47,16 +43,6 @@
|
||||
<span>List</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-list"></i>
|
||||
</span>
|
||||
<span>Registration</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<form method="POST">
|
||||
<div class="field has-addons">
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<div id="channels">
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
{% if channels is not None %}
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<div class="table-container">
|
||||
|
||||
@@ -63,12 +63,13 @@
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="button is-primary">Submit</button>
|
||||
<button
|
||||
class="button is-primary"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'threshold_irc_network_info' net %}">
|
||||
Cancel
|
||||
</button>
|
||||
<button class="button is-primary">Submit</button>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<div id="info">
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
{% if network is not None %}
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<div class="table-container">
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
{% load index %}
|
||||
<div id="relays">
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
{% if relays is not None %}
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<div class="table-container">
|
||||
|
||||
42
core/templates/manage/threshold/irc/overview/actions.html
Normal file
42
core/templates/manage/threshold/irc/overview/actions.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div id="actions">
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
<div class="buttons">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'threshold_irc_actions_add-network' %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#modals-here-actions"
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</span>
|
||||
<span>Network</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-post="% url 'threshold_irc_actions_auto' %"
|
||||
hx-trigger="click"
|
||||
hx-target="#actions"
|
||||
hx-swap="outerHTML"
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-wrench"></i>
|
||||
</span>
|
||||
<span>Auto</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-list"></i>
|
||||
</span>
|
||||
<span>Registration</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +1,7 @@
|
||||
{% load joinsep %}
|
||||
|
||||
<div id="aliases">
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
{% if aliases is not None %}
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<div class="table-container">
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
{% load index %}
|
||||
{% load static %}
|
||||
|
||||
<script src="{% static 'modal.js' %}"></script>
|
||||
<div class="modal is-active is-clipped">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
<div class="box">
|
||||
<h4 class="subtitle is-4">Add network</h4>
|
||||
<form
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-put="{% url 'threshold_irc_actions_add-network' %}"
|
||||
hx-target="#networks"
|
||||
hx-swap="outerHTML">
|
||||
<div class="content">
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Network name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" name="net" placeholder="freenode">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Host</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" name="host" placeholder="irc.freenode.net">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Port</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" name="port" placeholder="6697">
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label">Security</label>
|
||||
<div class="control">
|
||||
<div class="select">
|
||||
<select name="security">
|
||||
<option>ssl</option>
|
||||
<option>plain</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label">Authentication</label>
|
||||
<div class="control">
|
||||
<div class="select">
|
||||
<select name="auth">
|
||||
<option>sasl</option>
|
||||
<option>ns</option>
|
||||
<option>none</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="button is-primary modal-close-button">
|
||||
Cancel
|
||||
</button>
|
||||
<button class="button is-primary modal-close-button">Submit</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<button class="modal-close is-large" aria-label="close"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div id="networks">
|
||||
{% include 'manage/threshold/partials/notify.html' %}
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<table class="table is-fullwidth is-hoverable">
|
||||
<thead>
|
||||
@@ -32,4 +33,6 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div id="modals-here-actions">
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,6 +28,15 @@
|
||||
hx-swap="outerHTML">
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="display: none;"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'threshold_irc_actions' %}"
|
||||
hx-trigger="load"
|
||||
hx-target="#actions"
|
||||
hx-swap="outerHTML">
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
@@ -53,8 +62,20 @@
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div id="alerts">
|
||||
Alerts here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"></div>
|
||||
<div class="column is-half">
|
||||
<div class="box">
|
||||
<div id="actions">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
5
core/templates/manage/threshold/partials/notify.html
Normal file
5
core/templates/manage/threshold/partials/notify.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% if message is not None %}
|
||||
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user