Browse Source

Web ui renamed zkill to killstream

ideas
sirgje 3 years ago
parent
commit
d7edfd1648
No known key found for this signature in database GPG Key ID: 9F326B1EC4A97073
  1. 2
      cogs/web/templates/base.html
  2. 0
      cogs/web/templates/killstream.html
  3. 6
      cogs/webserver.py

2
cogs/web/templates/base.html

@ -13,7 +13,7 @@
{% if current_user.is_authenticated %}
<a class="p-2 text-dark" href="{{ url_for('index') }}">Home</a>
<a class="p-2 text-dark" href="{{ url_for('logs') }}">Logs</a>
<a class="p-2 text-dark" href="{{ url_for('zkill') }}">zKillboard</a>
<a class="p-2 text-dark" href="{{ url_for('killstream') }}">Killstream</a>
<a class="btn btn-outline-danger" href="{{ url_for('logout') }}">Logout</a>
{% endif %}
</nav>

0
cogs/web/templates/zkill.html → cogs/web/templates/killstream.html

6
cogs/webserver.py

@ -29,11 +29,11 @@ class Webserver(commands.Cog):
content = f.readlines()
return await render_template('logs.html', logs=reversed([x.strip() for x in content]))
@app.route('/zkill/')
@app.route('/killstream/')
@login_required
async def zkill():
async def killstream():
killwatches = await self.bot.redis.execute("get", "killwatch_criteria")
return await render_template('zkill.html', killwatches=json.loads(killwatches.decode("utf-8")))
return await render_template('killstream.html', killwatches=json.loads(killwatches.decode("utf-8")))
@app.route('/send-message/<channel_id>')
@login_required

Loading…
Cancel
Save