diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2018-03-27 11:52:20 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-05-16 20:20:46 +0200 |
commit | 965717195e58808778753edd0daa0e3d9e831cdd (patch) | |
tree | f1aaeebba925cec8366fae5eccfa1f1f08fc11d6 /server/sonar-web/src/main/js/components/common/BranchStatus.tsx | |
parent | 5073eb0f98e99ab0efbdd3f34b07a97f11e1d26c (diff) | |
download | sonarqube-965717195e58808778753edd0daa0e3d9e831cdd.tar.gz sonarqube-965717195e58808778753edd0daa0e3d9e831cdd.zip |
Introduce Bitbucket Cloud Application
SONAR-10514 Bitbucket Cloud application install/uninstall
* Bitbucket Cloud /install WS
* Expose Bitbucket application descriptor as WS
* Implement WS /integration/bitbucketcloud/uninstall
SONAR-10517 Bitbucket Cloud settings widget
* Create Bitbucket Cloud module
* Create Bitbucket Setting widget
* Bitbucket settings widget require SC authentication
* Add WS /integration/bitbucketcloud/repo_config
* Add WS /integration/bitbucketcloud/bind_repo
* Add WS /integration/bitbucketcloud/after_login
SONAR-10516 Bitbucket Cloud repository widget
* Add WS /integration/bitbucketcloud/repo_widget
* Add WS /integration/bitbucketcloud/repo_widget_data
BRANCH-59, BRANCH-60 Bitbucket Cloud PR decoration
SONAR-10605 Bitbucket Cloud PR widget
* Add integration/bitbucketcloud/pr_widget endpoint
* Add integration/bitbucketcloud/pr_widget_data endpoint
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/BranchStatus.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/BranchStatus.tsx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx index 1738e5c1fa1..2fc23b47849 100644 --- a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx +++ b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx @@ -26,7 +26,12 @@ import HelpTooltip from '../controls/HelpTooltip'; import Tooltip from '../controls/Tooltip'; import VulnerabilityIcon from '../icons-components/VulnerabilityIcon'; import { BranchLike } from '../../app/types'; -import { isShortLivingBranch, isPullRequest, isLongLivingBranch } from '../../helpers/branches'; +import { + getBranchQualityGateColor, + isShortLivingBranch, + isPullRequest, + isLongLivingBranch +} from '../../helpers/branches'; import { translateWithParameters } from '../../helpers/l10n'; import { formatMeasure } from '../../helpers/measures'; import './BranchStatus.css'; @@ -45,7 +50,7 @@ export default function BranchStatus({ branchLike, concise = false }: Props) { const totalIssues = branchLike.status.bugs + branchLike.status.vulnerabilities + branchLike.status.codeSmells; const status = branchLike.status.qualityGateStatus; - const indicatorColor = getQualityGateColor(status); + const indicatorColor = getBranchQualityGateColor(status); const shouldDisplayHelper = status === 'OK' && totalIssues > 0; const label = @@ -102,15 +107,3 @@ export default function BranchStatus({ branchLike, concise = false }: Props) { return null; } } - -function getQualityGateColor(status: string) { - let indicatorColor = 'gray'; - if (status === 'ERROR') { - indicatorColor = 'red'; - } else if (status === 'WARN') { - indicatorColor = 'orange'; - } else if (status === 'OK') { - indicatorColor = 'green'; - } - return indicatorColor; -} |