s/eventlog/doorlog/

This commit is contained in:
2026-06-11 21:28:47 +03:00
parent 4b2c2f6368
commit 6d8a7101ed
2 changed files with 5 additions and 7 deletions

View File

@@ -89,8 +89,7 @@ def view_doorboy_hold():
user = read_user()
form = HoldDoorForm(request.form)
if form.validate_on_submit():
db.eventlog.insert_one({
"component": "doorboy",
db.doorlog.insert_one({
"method": "hold",
"timestamp": datetime.utcnow(),
"door": form.door_name.data,
@@ -116,8 +115,7 @@ def view_doorboy_open(door):
else:
access_group = "k-space:floor"
approved = access_group in g.users_lookup.get(user["username"], User()).groups
db.eventlog.insert_one({
"component": "doorboy",
db.doorlog.insert_one({
"method": "web",
"timestamp": datetime.utcnow(),
"door": door,
@@ -165,5 +163,5 @@ def view_user_cards_inner(username):
@page_doorboy.route("/m/doorboy/log/<username>")
@login_required(groups=["k-space:board", "k-space:kubernetes:admins"])
def view_user_events(username):
latest_events = db.eventlog.find({"component": "doorboy", "inventory.owner_id": username}).sort([("timestamp", -1)])
latest_events = db.doorlog.find({"inventory.owner_id": username}).sort([("timestamp", -1)])
return render_template("doorboy_log.html", latest_events=latest_events)

View File

@@ -2,8 +2,8 @@
{% block content %}
<h3>This page only shows UID opens!</h3>
<p>Does not include Slack opens, Web opens (via Doorboy/Inventory). Formats need to be unified. <b>Use #door-log Slack channel Ctrl-f instead!</b></p>
<h3>This page only shows Card and Webhook (inventory) opens!</h3>
<p>Does not include Slack opens. Formats need to be unified. <b>Use #door-log Slack channel Ctrl-f instead!</b></p>
<table>
<thead>