renderCancelButton(task) {
if (task.status === STATUSES.PENDING) {
return (
- <td className="thin">
- <a onClick={this.onTaskCanceled.bind(this, task)} className="icon-delete" title="Cancel Task"
- data-toggle="tooltip" href="#"></a>
- </td>
+ <a onClick={this.onTaskCanceled.bind(this, task)} className="icon-delete" title="Cancel Task"
+ data-toggle="tooltip" href="#"></a>
);
} else {
- return <td className="thin"></td>;
+ return null;
+ }
+ },
+
+ renderLogsLink(task) {
+ if (task.logs) {
+ let url = `${window.baseUrl}/api/ce/logs?taskId=${task.id}`;
+ return <a target="_blank" href={url}>Logs</a>;
+ } else {
+ return null;
}
},
{this.renderTaskDate(task, 'startedAt', 'LTS')}
{this.renderTaskDate(task, 'finishedAt', 'LTS')}
{this.renderTaskExecutionTime(task)}
- {this.renderCancelButton(task)}
+ <td className="thin nowrap text-right">
+ {this.renderLogsLink(task)}
+ {this.renderCancelButton(task)}
+ </td>
</tr>
);
},