summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSimon Rettberg2020-01-10 15:29:47 +0100
committerSimon Rettberg2020-01-10 15:30:31 +0100
commit2007ad4b8ec80ff822fb305859d1fac7e849ac1f (patch)
tree80854939b4d8d27bd6eae4181131c6934f089745 /script
parent[rebootcontrol] Don't pass string "false" to WOL task (diff)
downloadslx-admin-2007ad4b8ec80ff822fb305859d1fac7e849ac1f.tar.gz
slx-admin-2007ad4b8ec80ff822fb305859d1fac7e849ac1f.tar.xz
slx-admin-2007ad4b8ec80ff822fb305859d1fac7e849ac1f.zip
[taskmanager.js] Support only showing task log on TASK_ERROR
Diffstat (limited to 'script')
-rw-r--r--script/taskmanager.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/taskmanager.js b/script/taskmanager.js
index ae1d2f09..4be01c5b 100644
--- a/script/taskmanager.js
+++ b/script/taskmanager.js
@@ -127,9 +127,11 @@ function tmResult(data, status)
}
var log = obj.find('.data-tm-log');
if (log) {
- var lKey = obj.attr('data-tm-log');
- if (task.data && task.data[lKey]) {
- log.text(task.data[lKey]).show();
+ if (!obj.data('tm-log-fail-only') || task.statusCode === "TASK_ERROR") {
+ var lKey = obj.data('data-tm-log');
+ if (task.data && task.data[lKey]) {
+ log.text(task.data[lKey]).show();
+ }
}
}
var cb = obj.attr('data-tm-callback');