diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-20 13:27:32 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-25 09:20:30 +0200 |
commit | 106437a53c371a202d7fbd669472ba7096ae2f71 (patch) | |
tree | 60db17cd6c1cf3413a556eeadf28654f92c21f35 /server/sonar-web/src/main/js/apps/overview/meta | |
parent | 1ef941b5c7b4faa45f7f19461a8b1d81ccac540d (diff) | |
download | sonarqube-106437a53c371a202d7fbd669472ba7096ae2f71.tar.gz sonarqube-106437a53c371a202d7fbd669472ba7096ae2f71.zip |
SONAR-9565 Move the Quality Gates link to organization level
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/meta')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/meta/Meta.js | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/meta/MetaQualityGate.js | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/meta/Meta.js b/server/sonar-web/src/main/js/apps/overview/meta/Meta.js index 1a57590524f..4d84a3f2e23 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/Meta.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/Meta.js @@ -43,7 +43,7 @@ const Meta = ({ component, history, measures, areThereCustomOrganizations, route const shouldShowQualityProfiles = !isView && !isDeveloper && hasQualityProfiles; const shouldShowQualityGate = !isView && !isDeveloper && hasQualityGate; - const shouldShowOrganizationKey = component.organization != null && areThereCustomOrganizations; + const hasOrganization = component.organization != null && areThereCustomOrganizations; return ( <div className="overview-meta"> @@ -58,7 +58,11 @@ const Meta = ({ component, history, measures, areThereCustomOrganizations, route {isProject && <AnalysesList project={component.key} history={history} router={router} />} - {shouldShowQualityGate && <MetaQualityGate gate={qualityGate} />} + {shouldShowQualityGate && + <MetaQualityGate + gate={qualityGate} + organization={hasOrganization && component.organization} + />} {shouldShowQualityProfiles && <MetaQualityProfiles @@ -71,7 +75,7 @@ const Meta = ({ component, history, measures, areThereCustomOrganizations, route <MetaKey component={component} /> - {shouldShowOrganizationKey && <MetaOrganizationKey component={component} />} + {hasOrganization && <MetaOrganizationKey component={component} />} </div> ); }; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityGate.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityGate.js index 3bdda5734d1..f9c3a1db5f6 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityGate.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityGate.js @@ -22,7 +22,7 @@ import { Link } from 'react-router'; import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; -const MetaQualityGate = ({ gate }) => { +const MetaQualityGate = ({ gate, organization }) => { return ( <div className="overview-meta-card"> <h4 className="overview-meta-header"> @@ -35,7 +35,7 @@ const MetaQualityGate = ({ gate }) => { <span className="note spacer-right"> {'(' + translate('default') + ')'} </span>} - <Link to={getQualityGateUrl(gate.key)}> + <Link to={getQualityGateUrl(gate.key, organization)}> {gate.name} </Link> </li> |