diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-09-28 15:33:59 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-09-29 17:09:48 +0200 |
commit | bb0c0ee739ec64d81a335284674d10e49786a4ec (patch) | |
tree | ac9bf826d72777d5c09ab65a58832bb150934ecd /server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx | |
parent | 6124af646f98e53576f2bc5b6df3cd5da6311a3f (diff) | |
download | sonarqube-bb0c0ee739ec64d81a335284674d10e49786a4ec.tar.gz sonarqube-bb0c0ee739ec64d81a335284674d10e49786a4ec.zip |
SONAR-8747 Make in progress and pending background task status more visible
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx index 2e0f3f2a560..43540593843 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx @@ -20,60 +20,18 @@ import * as React from 'react'; import BranchStatus from '../../../../components/common/BranchStatus'; import { Branch, Component } from '../../../types'; -import Tooltip from '../../../../components/controls/Tooltip'; -import PendingIcon from '../../../../components/icons-components/PendingIcon'; import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; -import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { isShortLivingBranch } from '../../../../helpers/branches'; interface Props { branch?: Branch; component: Component; - isInProgress?: boolean; - isPending?: boolean; } export default function ComponentNavMeta(props: Props) { const metaList = []; - const canSeeBackgroundTasks = - props.component.configuration != undefined && props.component.configuration.showBackgroundTasks; - const backgroundTasksUrl = - (window as any).baseUrl + - `/project/background_tasks?id=${encodeURIComponent(props.component.key)}`; - const shortBranch = props.branch && isShortLivingBranch(props.branch); - if (props.isInProgress) { - const tooltip = canSeeBackgroundTasks - ? translateWithParameters('component_navigation.status.in_progress.admin', backgroundTasksUrl) - : translate('component_navigation.status.in_progress'); - metaList.push( - <Tooltip - key="isInProgress" - overlay={<div dangerouslySetInnerHTML={{ __html: tooltip }} />} - mouseLeaveDelay={2}> - <li> - <i className="spinner" style={{ marginTop: '-1px' }} />{' '} - <span className="text-info">{translate('background_task.status.IN_PROGRESS')}</span> - </li> - </Tooltip> - ); - } else if (props.isPending) { - const tooltip = canSeeBackgroundTasks - ? translateWithParameters('component_navigation.status.pending.admin', backgroundTasksUrl) - : translate('component_navigation.status.pending'); - metaList.push( - <Tooltip - key="isPending" - overlay={<div dangerouslySetInnerHTML={{ __html: tooltip }} />} - mouseLeaveDelay={2}> - <li> - <PendingIcon /> <span>{translate('background_task.status.PENDING')}</span> - </li> - </Tooltip> - ); - } - if (props.component.analysisDate) { metaList.push( <li key="analysisDate"> |