diff options
author | Mathieu Suen <mathieu.suen@sonarsource.com> | 2023-05-26 16:58:05 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-30 20:02:52 +0000 |
commit | 80e01984fcffe2c76f61d76c34620edfb73f68be (patch) | |
tree | 5126f6931c52b691634873f7bd32d7b606eba068 /server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx | |
parent | 6195aabac5a00888b0a94eab78b71cf90b34d0c3 (diff) | |
download | sonarqube-80e01984fcffe2c76f61d76c34620edfb73f68be.tar.gz sonarqube-80e01984fcffe2c76f61d76c34620edfb73f68be.zip |
SONAR-19347 Add synchronize now button for Github
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx index e011d74d7bb..5d7cb2544c7 100644 --- a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx +++ b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx @@ -19,18 +19,15 @@ */ import { formatDistance } from 'date-fns'; import * as React from 'react'; -import { useContext } from 'react'; import { FormattedMessage } from 'react-intl'; import Link from '../../components/common/Link'; import CheckIcon from '../../components/icons/CheckIcon'; import { Alert } from '../../components/ui/Alert'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { useSyncStatusQuery } from '../../queries/github-sync'; -import { Feature } from '../../types/features'; import { GithubStatusEnabled } from '../../types/provisioning'; import { TaskStatuses } from '../../types/tasks'; import './SystemAnnouncement.css'; -import { AvailableFeaturesContext } from './available-features/AvailableFeaturesContext'; interface LastSyncProps { short?: boolean; @@ -100,10 +97,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) { } function GitHubSynchronisationWarning({ short }: GitHubSynchronisationWarningProps) { - const hasGithubProvisioning = useContext(AvailableFeaturesContext).includes( - Feature.GithubProvisioning - ); - const { data } = useSyncStatusQuery({ enabled: hasGithubProvisioning }); + const { data } = useSyncStatusQuery(); if (!data) { return null; @@ -113,7 +107,7 @@ function GitHubSynchronisationWarning({ short }: GitHubSynchronisationWarningPro <> {!short && data?.nextSync && ( <> - <Alert variant="loading"> + <Alert variant="loading" className="spacer-bottom"> {translate( data.nextSync.status === TaskStatuses.Pending ? 'settings.authentication.github.synchronization_pending' |