mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Automated admin interface tabs
This commit is contained in:
parent
7f650e604e
commit
2a642c5f80
@ -107,7 +107,7 @@ def add_known_server(url):
|
|||||||
log("Authenticated Machines: " + ", ".join([k for k in apikeystore]))
|
log("Authenticated Machines: " + ", ".join([k for k in apikeystore]))
|
||||||
|
|
||||||
def checkAPIkey(key):
|
def checkAPIkey(key):
|
||||||
return any((key == apikeystore[k]) for k in apikeystore)
|
return apikeystore.check_key(key)
|
||||||
|
|
||||||
def allAPIkeys():
|
def allAPIkeys():
|
||||||
return [apikeystore[k] for k in apikeystore]
|
return [apikeystore[k] for k in apikeystore]
|
||||||
|
@ -16,36 +16,22 @@
|
|||||||
<h1>Admin Panel</h1>
|
<h1>Admin Panel</h1>
|
||||||
<br/>
|
<br/>
|
||||||
<span>
|
<span>
|
||||||
{% if page=='admin_overview' %}
|
{% for tab_url,tab_name in [
|
||||||
<span style="opacity:0.5;">Overview</span>
|
['overview','Overview'],
|
||||||
|
['setup','Setup'],
|
||||||
|
['manual','Manual Scrobbling'],
|
||||||
|
['issues','Database Maintenance'],
|
||||||
|
['settings','Settings'],
|
||||||
|
['apikeys','API Keys']
|
||||||
|
] %}
|
||||||
|
{% if page=='admin_' + tab_url %}
|
||||||
|
<span style="opacity:0.5;">{{ tab_name }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/admin_overview">Overview</a>
|
<a href="/admin_{{ tab_url }}">{{ tab_name }}</a>
|
||||||
{% endif %} |
|
{% endif %} {%- if not loop.last %}|{% endif %}
|
||||||
{% if page=='admin_setup' %}
|
{% endfor %}
|
||||||
<span style="opacity:0.5;">Server Setup</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="/admin_setup">Server Setup</a>
|
|
||||||
{% endif %} |
|
|
||||||
{% if page=='admin_manual' %}
|
|
||||||
<span style="opacity:0.5;">Manual Scrobbling</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="/admin_manual">Manual Scrobbling</a>
|
|
||||||
{% endif %} |
|
|
||||||
{% if page=='admin_issues' %}
|
|
||||||
<span style="opacity:0.5;">Database Maintenance</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="/admin_issues">Database Maintenance</a>
|
|
||||||
{% endif %} |
|
|
||||||
{% if page=='admin_settings' %}
|
|
||||||
<span style="opacity:0.5;">Settings</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="/admin_settings">Settings</a>
|
|
||||||
{% endif %} |
|
|
||||||
{% if page=='admin_apikeys' %}
|
|
||||||
<span style="opacity:0.5;">API Keys</span>
|
|
||||||
{% else %}
|
|
||||||
<a href="/admin_apikeys">API Keys</a>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
</span>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<span id="notification"></span>
|
<span id="notification"></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user