Updated templates from Live

This commit is contained in:
2011-05-29 13:57:49 +01:00
parent 071a21e704
commit 98b93b7b2d
4 changed files with 10 additions and 10 deletions

View File

@@ -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 %}

View File

@@ -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;
}
});