mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added a entry for viewing active API keys
This commit is contained in:
@@ -40,6 +40,11 @@ class EVEPlayerCorporation(EVEAPIModel):
|
|||||||
""" Returns the number of characters with stored API keys """
|
""" Returns the number of characters with stored API keys """
|
||||||
return self.eveplayercharacter_set.filter(eveaccount__isnull=False).count()
|
return self.eveplayercharacter_set.filter(eveaccount__isnull=False).count()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def active_api_keys(self):
|
||||||
|
""" Returns the number of characters with stored and active API keys """
|
||||||
|
return self.eveplayercharacter_set.filter(eveaccount__isnull=False, eveaccount__api_status=API_STATUS_OK).count()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def director_api_keys(self):
|
def director_api_keys(self):
|
||||||
return self.directors.filter(eveaccount__isnull=False, eveaccount__api_keytype=API_KEYTYPE_FULL, eveaccount__api_status=API_STATUS_OK)
|
return self.directors.filter(eveaccount__isnull=False, eveaccount__api_keytype=API_KEYTYPE_FULL, eveaccount__api_status=API_STATUS_OK)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
{% if view_members %}
|
{% if view_members %}
|
||||||
<li><b>Full Director API Available: {% if corporation.director_api_keys %}<span style="color: green;">Yes</span>{% else %}<span style="color: red;">No</span>{% endif %}</b></li>
|
<li><b>Full Director API Available: {% if corporation.director_api_keys %}<span style="color: green;">Yes</span>{% else %}<span style="color: red;">No</span>{% endif %}</b></li>
|
||||||
<li><b>Members with API Keys:</b> {{ corporation.api_keys }}</li>
|
<li><b>Members with API Keys:</b> {{ corporation.api_keys }}</li>
|
||||||
|
<li><b>Members with Active API Keys:</b> {{ corporation.active_api_keys }}</li>
|
||||||
<li><b>API Coverage:</b> {{ corporation.api_key_coverage|floatformat:2 }}%</li>
|
<li><b>API Coverage:</b> {{ corporation.api_key_coverage|floatformat:2 }}%</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user