diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-12-19 14:51:07 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-12-19 14:51:07 +0100 |
commit | ebaa0c3179c4321a5546332d953143e476ae13b6 (patch) | |
tree | 74084b295ec53c3aac9706bbc4e4184ffdb300ac | |
parent | 0757e818e0ee82d5fc4ed5d41cb9dfac207282b9 (diff) |
Show boot result description only on fail.
Change-Id: If88d4a5e5cdb52b90353375050052913d35c69a5
-rw-r--r-- | app/dashboard/static/js/linaro-boots-job-kernel-defconfig-0.0.6.js | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/app/dashboard/static/js/linaro-boots-job-kernel-defconfig-0.0.6.js b/app/dashboard/static/js/linaro-boots-job-kernel-defconfig-0.0.6.js index 478ff52..e836c90 100644 --- a/app/dashboard/static/js/linaro-boots-job-kernel-defconfig-0.0.6.js +++ b/app/dashboard/static/js/linaro-boots-job-kernel-defconfig-0.0.6.js @@ -25,6 +25,8 @@ function populateBootPage(data) { arch, bootLog, bootLogHtml, + status, + localResult = null, fileServerUrl, fileServerResource, pathUrl = '', @@ -34,14 +36,16 @@ function populateBootPage(data) { if (dataLen > 0) { for (i; i < dataLen; i = i + 1) { - labName = localData[i].lab_name; - createdOn = new Date(localData[i].created_on.$date); - resultDescription = localData[i].boot_result_description; - fileServerUrl = localData[i].file_server_url; - fileServerResource = localData[i].file_server_resource; - arch = localData[i].arch; - bootLog = localData[i].boot_log; - bootLogHtml = localData[i].boot_log_html; + localResult = localData[i]; + labName = localResult.lab_name; + createdOn = new Date(localResult.created_on.$date); + resultDescription = localResult.boot_result_description; + fileServerUrl = localResult.file_server_url; + fileServerResource = localResult.file_server_resource; + arch = localResult.arch; + bootLog = localResult.boot_log; + bootLogHtml = localResult.boot_log_html; + status = localResult.status; if (fileServerUrl !== null && fileServerUrl !== undefined) { fileServer = fileServerUrl; @@ -58,7 +62,7 @@ function populateBootPage(data) { fileServerUri = new URI(fileServer); uriPath = fileServerUri.path() + '/' + pathUrl; - switch (localData[i].status) { + switch (status) { case 'PASS': statusDisplay = '<span rel="tooltip" ' + 'data-toggle="tooltip"' + @@ -93,7 +97,7 @@ function populateBootPage(data) { col0 = '<td><a class="table-link" ' + 'href="/boot/all/lab/' + labName + '/">' + labName + '</a></td>'; - if (resultDescription !== null) { + if (resultDescription !== null && staus !== 'PASS') { if (resultDescription.length > 64) { col1 = '<td>' + '<span rel="tooltip" data-toggle="tooltip"' + @@ -149,7 +153,7 @@ function populateBootPage(data) { rowHref = '/boot/' + boardName + '/job/' + jobName + '/kernel/' + kernelName + '/defconfig/' + defconfigFull + - '/lab/' + labName + '/?_id=' + localData[i]._id.$oid; + '/lab/' + labName + '/?_id=' + localResult._id.$oid; col5 = '<td><span rel="tooltip" data-toggle="tooltip"' + 'title="Details for board ' + boardName + 'with ' + |