From: Stas Vilchik Date: Mon, 28 Sep 2015 10:27:58 +0000 (+0200) Subject: SONAR-6799 Ability to access the logs of the computation of a project X-Git-Tag: 5.2-RC1~247 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=925bf13c71b77c1b7454862f4fdaa21dd0efd630;p=sonarqube.git SONAR-6799 Ability to access the logs of the computation of a project --- 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)} + ); },