aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2020-09-14 15:40:23 +0200
committersonartech <sonartech@sonarsource.com>2020-09-29 20:07:42 +0000
commit626469caaa8b060f79f101cffff214d23c7e611b (patch)
treece4793e5b9fc7cad42b76adb6c82ffb6bf37251e /server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
parentdae0f392c72132be88af4a73d98875fdf477de50 (diff)
downloadsonarqube-626469caaa8b060f79f101cffff214d23c7e611b.tar.gz
sonarqube-626469caaa8b060f79f101cffff214d23c7e611b.zip
Update background task related types
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
index c0da78bb3cc..3454c4c7464 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
@@ -24,11 +24,12 @@ import { Alert } from 'sonar-ui-common/components/ui/Alert';
import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n';
import { STATUSES } from '../../../../apps/background-tasks/constants';
import { getComponentBackgroundTaskUrl } from '../../../../helpers/urls';
+import { Task, TaskStatuses } from '../../../../types/tasks';
import ComponentNavLicenseNotif from './ComponentNavLicenseNotif';
interface Props {
component: T.Component;
- currentTask?: T.Task;
+ currentTask?: Task;
currentTaskOnSameBranch?: boolean;
isInProgress?: boolean;
isPending?: boolean;
@@ -79,7 +80,7 @@ export default class ComponentNavBgTaskNotif extends React.PureComponent<Props>
{this.renderMessage('component_navigation.status.pending', STATUSES.ALL)}
</Alert>
);
- } else if (currentTask && currentTask.status === STATUSES.FAILED) {
+ } else if (currentTask && currentTask.status === TaskStatuses.Failed) {
if (
currentTask.errorType &&
hasMessage('license.component_navigation.button', currentTask.errorType)