Tweak calendar z-index and uncomment type filters

This commit is contained in:
Mark Veidemanis 2022-08-12 20:45:25 +01:00
parent d6f47d0841
commit ddb737fdc6
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
7 changed files with 24 additions and 21 deletions

View File

@ -25,13 +25,13 @@ def construct_query(index, net, channel, src, num, size, nicks=None):
"net", "net",
"src", "src",
] ]
# if index == "int": if index == "int":
# fields.append("mtype") fields.append("mtype")
# for ctype in types: for ctype in types:
# extra_should.append({"match": {"mtype": ctype}}) extra_should.append({"match": {"mtype": ctype}})
# else: else:
# for ctype in types: for ctype in types:
# extra_should.append({"match": {"type": ctype}}) extra_should.append({"match": {"type": ctype}})
query = { query = {
"size": size, "size": size,
"query": { "query": {

View File

@ -204,8 +204,9 @@ def send_irc_message(net, num, channel, msg, nick=None):
messaged = threshold_request(url, payload, method="PUT") messaged = threshold_request(url, payload, method="PUT")
return messaged return messaged
def get_irc_nick(net, num): def get_irc_nick(net, num):
url = f"irc/nick/{net}/{num}" url = f"irc/nick/{net}/{num}"
payload = {} payload = {}
nick = threshold_request(url, payload, method="GET") nick = threshold_request(url, payload, method="GET")
return nick return nick

File diff suppressed because one or more lines are too long

View File

@ -90,10 +90,12 @@
height: 20em; height: 20em;
overflow: auto; overflow: auto;
} }
.datetimepicker-wrapper { /* @media screen and (min-width: 500px) {
position: absolute; .datetimepicker-wrapper {
z-index: 3; position: absolute;
} z-index: 100;
}
} */
</style> </style>
</head> </head>
<body> <body>

View File

@ -8,13 +8,13 @@
<tr> <tr>
<td>{{ item.time }}</td> <td>{{ item.time }}</td>
{% if query is True and item.type == 'self' %} {% if query is True and item.type == 'self' %}
<td <td
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}" class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</td> data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</td>
{% else %} {% else %}
<td <td
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}" class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td> data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
{% endif %} {% endif %}
<td class="wrap">{{ item.msg }}</td> <td class="wrap">{{ item.msg }}</td>
</tr> </tr>

View File

@ -318,6 +318,7 @@
"startTime": "{{ params.from_time|escapejs }}", "startTime": "{{ params.from_time|escapejs }}",
"endDate": "{{ params.to_date|escapejs }}", "endDate": "{{ params.to_date|escapejs }}",
"endTime": "{{ params.to_time|escapejs }}", "endTime": "{{ params.to_time|escapejs }}",
"displayMode": "dialog"
}; };
// Initialize all input of type date // Initialize all input of type date
var calendars = bulmaCalendar.attach('[type="date"]', options); var calendars = bulmaCalendar.attach('[type="date"]', options);

View File

@ -19,7 +19,7 @@ from core.lib.threshold import (
get_users, get_users,
) )
from core.views.ui.tables import DrilldownTable from core.views.ui.tables import DrilldownTable
from core.lib import threshold
def parse_dates(dates): def parse_dates(dates):
spl = dates.split(" - ") spl = dates.split(" - ")
@ -260,7 +260,6 @@ class DrilldownContextModal(APIView):
query_params["mtype"] = None query_params["mtype"] = None
if request.user.is_superuser: if request.user.is_superuser:
if query_params["type"] == "query": if query_params["type"] == "query":
#bot_nick = threshold.irc_get_nick(query_params["net"], query_params["num"])
print("BOT NICK", query_params["channel"]) print("BOT NICK", query_params["channel"])
print("QUERY NICK", query_params["nick"]) print("QUERY NICK", query_params["nick"])
nicks = [query_params["channel"], query_params["nick"]] nicks = [query_params["channel"], query_params["nick"]]