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

View File

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