Tweak calendar z-index and uncomment type filters

master
Mark Veidemanis 2 years ago
parent d6f47d0841
commit ddb737fdc6
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

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

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

File diff suppressed because one or more lines are too long

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

@ -8,13 +8,13 @@
<tr>
<td>{{ item.time }}</td>
{% if query is True and item.type == 'self' %}
<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 %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</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 %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</td>
{% else %}
<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 %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</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 %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
{% endif %}
<td class="wrap">{{ item.msg }}</td>
</tr>

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

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

Loading…
Cancel
Save