admin: dont show check when outpost hasnt connected

closes #263
This commit is contained in:
Jens Langhammer 2020-10-07 19:19:25 +02:00
parent b10912d8ba
commit 7a578e5e83
2 changed files with 5 additions and 7 deletions

View File

@ -60,12 +60,10 @@
<td role="cell">
<span>
{% with ver=outpost.deployment_version %}
{% if ver.outdated %}
{% if ver.version == "" %}
<i class="fas fa-times pf-m-danger"></i> -
{% else %}
{% if not ver.version %}
<i class="fas fa-question-circle"></i>
{% elif ver.outdated %}
<i class="fas fa-times pf-m-danger"></i> {% blocktrans with is=ver.version should=ver.should %}{{ is }}, should be {{ should }}{% endblocktrans %}
{% endif %}
{% else %}
<i class="fas fa-check pf-m-success"></i> {{ ver.version }}
{% endif %}

View File

@ -119,7 +119,7 @@ class Outpost(models.Model):
key = self.state_cache_prefix("version")
value = cache.get(key, None)
if not value:
return {"version": "", "outdated": False, "should": OUR_VERSION}
return {"version": None, "outdated": False, "should": OUR_VERSION}
try:
outpost_version = parse(value)
return {