mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Updated templates from Live
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
<h3>API Keys</h3>
|
||||
<table>
|
||||
<tr><th>User ID</th><th>API Key</th><th>Description</th><th>Type</th><th>Active</th><th>Last Updated</th></tr>
|
||||
{% for acc in user.eveaccount_set.all %}
|
||||
{% for acc in app.user.eveaccount_set.all %}
|
||||
<tr><td>{{ acc.api_user_id }}</td>
|
||||
<td>{{ acc.api_key }}</td>
|
||||
<td>{{ acc.description }}</td>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
</div>
|
||||
</p>
|
||||
|
||||
{% if is_admin %}
|
||||
<br/>
|
||||
{% if services %}
|
||||
<h2>Service Accounts</h2>
|
||||
@@ -127,6 +126,5 @@
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,23 +14,23 @@ function refresh_apikey(key) {
|
||||
$("#api-status-" + key).html("<center><img src='{{ STATIC_URL }}img/spinner.gif'/></center>");
|
||||
$("#api-time-" + key).html("<center><img src='{{ STATIC_URL }}img/spinner.gif'/></center>");
|
||||
$.getJSON("/eve/eveapi/refresh/" + key + "/", function(json) {
|
||||
$("#api-time-" + json[0].fields.api_user_id).html("a moment ago");
|
||||
$("#api-time-" + json[0].pk).html("a moment ago");
|
||||
|
||||
switch(json[0].fields.api_status) {
|
||||
case 0:
|
||||
$("#api-status-" + json[0].fields.api_user_id).html("Unknown");
|
||||
$("#api-status-" + json[0].pk).html("Unknown");
|
||||
break;
|
||||
case 1:
|
||||
$("#api-status-" + json[0].fields.api_user_id).html("OK");
|
||||
$("#api-status-" + json[0].pk).html("OK");
|
||||
break;
|
||||
case 2:
|
||||
$("#api-status-" + json[0].fields.api_user_id).html("Other Error");
|
||||
$("#api-status-" + json[0].pk).html("Other Error");
|
||||
break;
|
||||
case 3:
|
||||
$("#api-status-" + json[0].fields.api_user_id).html("Account Expired");
|
||||
$("#api-status-" + json[0].pk).html("Account Expired");
|
||||
break;
|
||||
default:
|
||||
$("#api-status-" + json[0].fields.api_user_id).html("Error");
|
||||
$("#api-status-" + json[0].pk).html("Error");
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
<li><a href="{% url hr.views.index %}">HR</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url eve_api.views.eveapi_character %}">Characters</a></li>
|
||||
{% if request.user.is_staff %}
|
||||
{% if perms.sso.can_search_users %}
|
||||
<li><a href="{% url sso.views.user_lookup %}">Lookup User</a></li>
|
||||
{% endif %}
|
||||
{% if request.user.is_staff %}
|
||||
<li><a href="/admin/">Admin</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>
|
||||
|
||||
Reference in New Issue
Block a user