Begin implementing adding channel limits
This commit is contained in:
parent
ddb737fdc6
commit
52f3e8f1b2
|
@ -10,7 +10,6 @@ def construct_query(index, net, channel, src, num, size, nicks=None):
|
|||
if channel:
|
||||
extra_must.append({"match": {"channel": channel}})
|
||||
if nicks:
|
||||
print("NICKS", nicks)
|
||||
for nick in nicks:
|
||||
extra_should2.append({"match": {"nick": nick}})
|
||||
types = ["msg", "notice", "action", "kick", "topic", "mode"]
|
||||
|
|
|
@ -44,26 +44,53 @@
|
|||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<form method="POST">
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded has-icons-left">
|
||||
<input class="input" name="num" type="text" placeholder="Relay number">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa-brands fa-unity"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
class="button is-info is-fullwidth"
|
||||
hx-put="{% url 'threshold_irc_network_actions_add_relay' net %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#actions"
|
||||
hx-swap="outerHTML">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<form method="POST">
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded has-icons-left">
|
||||
<input class="input" name="num" type="text" placeholder="Relay number">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa-brands fa-unity"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
class="button is-info is-fullwidth"
|
||||
hx-put="{% url 'threshold_irc_network_actions_add_relay' net %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#actions"
|
||||
hx-swap="outerHTML">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
<div class="column">
|
||||
<form method="POST">
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded has-icons-left">
|
||||
<input class="input" name="num" type="text" placeholder="Channel limit">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa-brands fa-unity"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
class="button is-warning is-fullwidth"
|
||||
hx-put="{% url 'threshold_irc_network_actions_add_relay' net %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#actions"
|
||||
hx-swap="outerHTML">
|
||||
Set
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -59,6 +59,7 @@ class ThresholdIRCNetworkInfo(SuperUserRequiredMixin, View):
|
|||
def get(self, request, net):
|
||||
network = threshold.get_irc_network(net)
|
||||
context = {"network": network}
|
||||
print("CON", context)
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue