aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-07-13 11:16:33 +0200
committerNeil Williams <neil.williams@linaro.org>2018-07-16 08:33:24 +0000
commitd5c05e3c51f2b25885775be5ffd4b54d05bbcb21 (patch)
tree5bdd3059252e2e917216258f75b5eddfafdd4d18
parentbad4d83c8be069fc8c56ca39bfc84fcf27ed8a9b (diff)
dt: improve the warning when hc are disabled
Change-Id: Ic435a3334c626475ad834ac4f478c773764f5f84
-rw-r--r--lava_scheduler_app/templates/lava_scheduler_app/device_type.html2
-rw-r--r--lava_scheduler_app/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lava_scheduler_app/templates/lava_scheduler_app/device_type.html b/lava_scheduler_app/templates/lava_scheduler_app/device_type.html
index 877ad0e9a..d8dc61811 100644
--- a/lava_scheduler_app/templates/lava_scheduler_app/device_type.html
+++ b/lava_scheduler_app/templates/lava_scheduler_app/device_type.html
@@ -30,7 +30,7 @@
<dt>Description</dt>
<dd>{{ dt.description|default:"<i>...</i>" }}</dd>
<dt>Health Checks</dt>
- <dd>{{ health_freq }} <a href="{% url 'lava.scheduler.device_type_report' dt %}" title="device-type health report"><span class="glyphicon glyphicon-stats"></span></a></dd>
+ <dd>{% if dt.disable_health_check %}<span class="text-danger">{{ health_freq }}</span>{% else %}{{ health_freq }}{% endif %} <a href="{% url 'lava.scheduler.device_type_report' dt %}" title="device-type health report"><span class="glyphicon glyphicon-stats"></span></a></dd>
<dt>Aliases</dt>
<dd>{{ aliases|default:"<i>...</i>" }}</dd>
</div>
diff --git a/lava_scheduler_app/views.py b/lava_scheduler_app/views.py
index 890bb15b0..77dccedff 100644
--- a/lava_scheduler_app/views.py
+++ b/lava_scheduler_app/views.py
@@ -827,7 +827,7 @@ def device_type_detail(request, pk):
available_devices_label = "danger"
if dt.disable_health_check:
- health_freq_str = "Disabled"
+ health_freq_str = "disabled"
elif dt.health_denominator == DeviceType.HEALTH_PER_JOB:
health_freq_str = "one every %d jobs" % dt.health_frequency
else: