aboutsummaryrefslogtreecommitdiff
path: root/lava_scheduler_app/templates/lava_scheduler_app
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-04-05 15:54:21 +0200
committerNeil Williams <neil.williams@linaro.org>2018-04-06 13:46:17 +0000
commit30efadeb55a2bd8f45a2f51c1d942ec24fe6b691 (patch)
tree090037fb5e7e370b32950c8847447601351d3895 /lava_scheduler_app/templates/lava_scheduler_app
parentb286b6bd79ef2d3c65f9879066e4836d5fa42e23 (diff)
LAVA-1274 fix javascript exception
When a debug message is not a string nor an object (like a boolean) the javascript code, removed by this commit, will crash. The corresponding code was added to work around a bug in the log format that has been fixed 6 months ago. Change-Id: I4908d53aa1172b780b1e6a277a8ec07517b13769
Diffstat (limited to 'lava_scheduler_app/templates/lava_scheduler_app')
-rw-r--r--lava_scheduler_app/templates/lava_scheduler_app/job_pipeline.html34
1 files changed, 11 insertions, 23 deletions
diff --git a/lava_scheduler_app/templates/lava_scheduler_app/job_pipeline.html b/lava_scheduler_app/templates/lava_scheduler_app/job_pipeline.html
index c4e8c1152..94f65dc85 100644
--- a/lava_scheduler_app/templates/lava_scheduler_app/job_pipeline.html
+++ b/lava_scheduler_app/templates/lava_scheduler_app/job_pipeline.html
@@ -299,12 +299,8 @@
<div id="sectionlogs">
{% for line in log_data %}
{% if line.lvl == "debug" %}
- {% if "sending" in line.msg.keys %}{% comment %}TODO: Should be removed in 2017.9{% endcomment %}
- <code class="keyboard" id="L{{ forloop.counter0 }}" title="{{ line.dt }}"><kbd>{{ line.msg.sending }}</kbd></code>
- {% else %}
- {% get_action_id line.msg as act_id %}
+ {% get_action_id line.msg as act_id %}
<code class="debug" title="{{ line.dt }}" id="{% if act_id %}action_{{ act_id }}{% else %}L{{ forloop.counter0 }}{% endif %}">{{ line.msg|udecode }}</code>
- {% endif %}
{% elif line.lvl == "input" %}
<code class="keyboard" id="L{{ forloop.counter0 }}" title="{{ line.dt }}"><kbd>{{ line.msg|udecode }}</kbd></code>
{% elif line.lvl == "target" %}
@@ -764,26 +760,18 @@
var node;
if(level == 'debug') {
- // TODO: Should be removed in 2017.9
- if(typeof(d['msg']) != 'string' && 'sending' in d['msg']) {
- $('<code class="keyboard" id="' + id + '"></code>')
- .append($('<kbd></kbd>')
- .text(d['msg']['sending']))
- .insertBefore(progressNode);
- } else {
- var action_id = action_id_regexp.exec(d['msg']);
- if(action_id) {
- id = 'action_' + action_id[1].replace(/\./g, '-');
- }
- $('<code class="debug" id="' + id + '"></code>')
- .text(d['msg'])
- .insertBefore(progressNode);
+ var action_id = action_id_regexp.exec(d['msg']);
+ if(action_id) {
+ id = 'action_' + action_id[1].replace(/\./g, '-');
}
+ $('<code class="debug" id="' + id + '"></code>')
+ .text(d['msg'])
+ .insertBefore(progressNode);
} else if(level == 'input') {
- $('<code class="keyboard" id="' + id + '"></code>')
- .append($('<kbd></kbd>')
- .text(d['msg']))
- .insertBefore(progressNode);
+ $('<code class="keyboard" id="' + id + '"></code>')
+ .append($('<kbd></kbd>')
+ .text(d['msg']))
+ .insertBefore(progressNode);
} else if(level == 'target') {
$('<code class="target bg-success" id="' + id + '"></code>')
.text(d['msg'])