export default React.createClass({
render() {
- let metaList = [];
+ let metaList = [],
+ // FIXME check right permission
+ canSeeBackgroundTasks = this.props.conf.showSettings,
+ backgroundTasksUrl = `${baseUrl}/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
if (this.props.isInProgress) {
+ let tooltip = canSeeBackgroundTasks ?
+ window.tp('component_navigation.status.in_progress.admin', backgroundTasksUrl) :
+ window.t('component_navigation.status.in_progress');
metaList.push(
- <li key="isInProgress" data-toggle="tooltip" title={window.t('component_navigation.status.in_progress')}>
+ <li key="isInProgress" data-toggle="tooltip" title={tooltip}>
<i className="spinner" style={{ marginTop: '-1px' }}/> <span className="text-info">{window.t('background_task.status.IN_PROGRESS')}</span>
</li>
);
} else if (this.props.isPending) {
+ let tooltip = canSeeBackgroundTasks ?
+ window.tp('component_navigation.status.pending.admin', backgroundTasksUrl) :
+ window.t('component_navigation.status.pending');
metaList.push(
- <li key="isPending" data-toggle="tooltip" title={window.t('component_navigation.status.pending')}>
+ <li key="isPending" data-toggle="tooltip" title={tooltip}>
<PendingIcon/> <span>{window.t('background_task.status.PENDING')}</span>
</li>
);
} else if (this.props.isFailed) {
+ let tooltip = canSeeBackgroundTasks ?
+ window.tp('component_navigation.status.failed.admin', backgroundTasksUrl) :
+ window.t('component_navigation.status.failed');
metaList.push(
- <li key="isFailed" data-toggle="tooltip" title={window.t('component_navigation.status.failed')}>
+ <li key="isFailed" data-toggle="tooltip" title={tooltip}>
<i className="icon-test-status-error"/> <span className="text-danger">{window.t('background_task.status.FAILED')}</span>
</li>
);
#
#------------------------------------------------------------------------------
component_navigation.status.failed=The last analysis has failed.
+component_navigation.status.failed.admin=The last analysis has failed.<br>More details available on the <a href="{0}">Background Tasks</a> page.
component_navigation.status.pending=There is a pending analysis.
+component_navigation.status.pending.admin=There is a pending analysis.<br>More details available on the <a href="{0}">Background Tasks</a> page.
component_navigation.status.in_progress=The analysis is in progress.
+component_navigation.status.in_progress.admin=The analysis is in progress.<br>More details available on the <a href="{0}">Background Tasks</a> page.
background_task.status.PENDING=Pending
background_task.status.IN_PROGRESS=In Progress