From 925bf13c71b77c1b7454862f4fdaa21dd0efd630 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 28 Sep 2015 12:27:58 +0200 Subject: [PATCH] SONAR-6799 Ability to access the logs of the computation of a project --- .../main/js/apps/background-tasks/tasks.js | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js index add7ff59612..2b347e2b24e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js @@ -84,13 +84,20 @@ export default React.createClass({ renderCancelButton(task) { if (task.status === STATUSES.PENDING) { return ( - - - + ); } else { - return ; + return null; + } + }, + + renderLogsLink(task) { + if (task.logs) { + let url = `${window.baseUrl}/api/ce/logs?taskId=${task.id}`; + return Logs; + } else { + return null; } }, @@ -105,7 +112,10 @@ export default React.createClass({ {this.renderTaskDate(task, 'startedAt', 'LTS')} {this.renderTaskDate(task, 'finishedAt', 'LTS')} {this.renderTaskExecutionTime(task)} - {this.renderCancelButton(task)} + + {this.renderLogsLink(task)} + {this.renderCancelButton(task)} + ); }, -- 2.39.5