diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-03-27 14:00:14 +0200 |
---|---|---|
committer | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-03 10:38:52 +0200 |
commit | 32a73efa05cb12056a93f08b9124e647213f1f02 (patch) | |
tree | 89c545631a613d2041383b5143afb0e040c327e0 /server/sonar-web/src/main/js/apps/overview | |
parent | be8738ea1e0322d81e238c4462c7ec6f22d2177c (diff) | |
download | sonarqube-32a73efa05cb12056a93f08b9124e647213f1f02.tar.gz sonarqube-32a73efa05cb12056a93f08b9124e647213f1f02.zip |
SONAR-9008 support quality profiles for organizations
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/meta/Meta.js | 7 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js | 16 |
2 files changed, 21 insertions, 2 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 9f67196b368..a18e1385f1b 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 @@ -57,7 +57,12 @@ const Meta = ({ component, measures, areThereCustomOrganizations }) => { {shouldShowQualityGate && <MetaQualityGate gate={qualityGate} />} - {shouldShowQualityProfiles && <MetaQualityProfiles profiles={qualityProfiles} />} + {shouldShowQualityProfiles && + <MetaQualityProfiles + component={component} + customOrganizations={areThereCustomOrganizations} + profiles={qualityProfiles} + />} <MetaLinks component={component} /> diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js index ff4c39b3db0..fb5c176df85 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +// @flow import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; @@ -27,6 +28,15 @@ import { searchRules } from '../../../api/rules'; import { getLanguages } from '../../../store/rootReducer'; class MetaQualityProfiles extends React.Component { + mounted: boolean; + + props: { + component: { organization: string }, + customOrganizations: boolean, + languages: { [string]: { name: string } }, + profiles: Array<{ key: string, language: string, name: string }> + }; + state = { deprecatedByKey: {} }; @@ -74,12 +84,16 @@ class MetaQualityProfiles extends React.Component { const languageFromStore = this.props.languages[profile.language]; const languageName = languageFromStore ? languageFromStore.name : profile.language; + const path = this.props.customOrganizations + ? getQualityProfileUrl(profile.key, this.props.component.organization) + : getQualityProfileUrl(profile.key); + const inner = ( <div className="text-ellipsis"> <span className="note spacer-right"> {'(' + languageName + ')'} </span> - <Link to={getQualityProfileUrl(profile.key)}> + <Link to={path}> {profile.name} </Link> </div> |