Retheme Insights page to not use panels

This commit is contained in:
Mark Veidemanis 2022-07-21 13:52:24 +01:00
parent ce3a871c46
commit e4487c8bf0
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
4 changed files with 122 additions and 109 deletions

View File

@ -1,19 +1,21 @@
<div id="channels"> <div id="channels">
<div class="content"> <div class="content" style="max-height: 30em; overflow: auto;">
<ol type="1"> <table class="table is-fullwidth is-hoverable">
{% for chan in chans %} {% for chan in chans %}
<li> <tr>
<span <td>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' <span
hx-post="{% url 'modal_drilldown' %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' hx-post="{% url 'modal_drilldown' %}"
hx-target="#modals-here" hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
hx-trigger="click" hx-target="#modals-here"
class="button is-small"> hx-trigger="click"
{{ chan }} class="button is-small">
</span> {{ chan }}
</li> </span>
</td>
</tr>
{% endfor %} {% endfor %}
</ol> </table>
</div> </div>
</div> </div>

View File

@ -29,77 +29,79 @@
</div> </div>
<div id="info"> <div id="info">
{% if item is not None %} {% if item is not None %}
<div class="table-container"> <div class="content" style="max-height: 30em; overflow: auto;">
<table class="table is-fullwidth is-hoverable"> <div class="table-container">
<tbody> <table class="table is-fullwidth is-hoverable">
<tr> <tbody>
<th>src</th> <tr>
<td> <th>src</th>
{% if item.src == 'irc' %} <td>
<span class="icon" data-tooltip="IRC"> {% if item.src == 'irc' %}
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> <span class="icon" data-tooltip="IRC">
</span> <i class="fa-solid fa-hashtag" aria-hidden="true"></i>
IRC </span>
{% elif item.src == 'dis' %} IRC
<span class="icon" data-tooltip="Discord"> {% elif item.src == 'dis' %}
<i class="fa-brands fa-discord" aria-hidden="true"></i> <span class="icon" data-tooltip="Discord">
</span> <i class="fa-brands fa-discord" aria-hidden="true"></i>
Discord </span>
{% endif %} Discord
</td> {% endif %}
</tr> </td>
<tr> </tr>
<th>nick</th> <tr>
<td> <th>nick</th>
{% if item.online is True %} <td>
<span class="icon has-text-success has-tooltip-success" data-tooltip="Online"> {% if item.online is True %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-success has-tooltip-success" data-tooltip="Online">
</span> <i class="fa-solid fa-circle"></i>
{{ item.nick }} </span>
{% elif item.online is False %} {{ item.nick }}
<span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline"> {% elif item.online is False %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline">
</span> <i class="fa-solid fa-circle"></i>
{{ item.nick }} </span>
{% else %} {{ item.nick }}
<span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown"> {% else %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown">
</span> <i class="fa-solid fa-circle"></i>
{{ item.nick }} </span>
{% endif %} {{ item.nick }}
{% if item.num_chans is not None %} {% endif %}
<span class="tag"> {% if item.num_chans is not None %}
{{ item.num_chans }} <span class="tag">
</span> {{ item.num_chans }}
{% endif %} </span>
</td> {% endif %}
</tr> </td>
<tr> </tr>
<th>host</th> <tr>
<td>{{ item.host }}</td> <th>host</th>
</tr> <td>{{ item.host }}</td>
<tr> </tr>
<th>actions</th> <tr>
<td> <th>actions</th>
{% if item.src == 'irc' %} <td>
<button {% if item.src == 'irc' %}
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' <button
hx-post="{% url 'modal_insights' %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}", "channel": "{{ item.channel }}"}' hx-post="{% url 'modal_insights' %}"
hx-target="#modals-here" hx-vals='{"net": "{{ item.net }}", "nick": "{{ item.nick }}", "channel": "{{ item.channel }}"}'
hx-trigger="click" hx-target="#modals-here"
class="button is-small"> hx-trigger="click"
Information class="button is-small">
</button> Information
{% endif %} </button>
</td> {% endif %}
</tr> </td>
<tr> </tr>
<th>net</th> <tr>
<td>{{ item.net }}</td> <th>net</th>
</tr> <td>{{ item.net }}</td>
</tbody> </tr>
</table> </tbody>
</table>
</div>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@ -1,12 +1,19 @@
<div id="meta"> <div id="meta">
<i class="fa-solid fa-hashtag" aria-hidden="true"></i> <div class="content" style="max-height: 30em; overflow: auto;">
<span <table class="table is-fullwidth is-hoverable">
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' <tr>
hx-post="{% url 'modal_drilldown' %}" <td>
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' <span
hx-target="#modals-here" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-trigger="click" hx-post="{% url 'modal_drilldown' %}"
class="button is-small"> hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
bbb hx-target="#modals-here"
</span> hx-trigger="click"
class="button is-small">
bbb
</span>
</td>
</tr>
</table>
</div>
</div> </div>

View File

@ -1,19 +1,21 @@
<div id="nicks"> <div id="nicks">
<div class="content"> <div class="content" style="max-height: 30em; overflow: auto;">
<ol type="1"> <table class="table is-fullwidth is-hoverable">
{% for nick in nicks %} {% for nick in nicks %}
<li> <tr>
<span <td>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' <span
hx-post="{% url 'modal_drilldown' %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' hx-post="{% url 'modal_drilldown' %}"
hx-target="#modals-here" hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
hx-trigger="click" hx-target="#modals-here"
class="button is-small"> hx-trigger="click"
{{ nick }} class="button is-small">
</span> {{ nick }}
</li> </span>
</td>
</tr>
{% endfor %} {% endfor %}
</ol> </table>
</div> </div>
</div> </div>