diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-19 15:10:29 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-25 09:20:30 +0200 |
commit | c86db4ee3737107b738e2bd83d5cfbad5d3575f2 (patch) | |
tree | 11267bf2cb1f5a957547164cd7c13aa25e7b5731 /server/sonar-web/src/main/js/apps/issues/components | |
parent | 5990dc0b10ad7cdd3e09b9eb8d0b636795d94c7b (diff) | |
download | sonarqube-c86db4ee3737107b738e2bd83d5cfbad5d3575f2.tar.gz sonarqube-c86db4ee3737107b738e2bd83d5cfbad5d3575f2.zip |
SONAR-9566 Add Issues link at organization level navbar
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/components')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/App.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.js b/server/sonar-web/src/main/js/apps/issues/components/App.js index 60dd9d43f9f..48b6dbfcb0c 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.js +++ b/server/sonar-web/src/main/js/apps/issues/components/App.js @@ -67,6 +67,7 @@ export type Props = { fetchIssues: (query: RawQuery) => Promise<*>, location: { pathname: string, query: RawQuery }, onRequestFail: Error => void, + organization?: { key: string }, router: { push: ({ pathname: string, query?: RawQuery }) => void, replace: ({ pathname: string, query?: RawQuery }) => void @@ -342,7 +343,7 @@ export default class App extends React.PureComponent { }; fetchIssues = (additional?: {}, requestFacets?: boolean = false): Promise<*> => { - const { component } = this.props; + const { component, organization } = this.props; const { myIssues, openFacets, query } = this.state; const facets = requestFacets @@ -358,6 +359,10 @@ export default class App extends React.PureComponent { ...additional }; + if (organization) { + parameters.organization = organization.key; + } + // only sorting by CREATION_DATE is allowed, so let's sort DESC if (query.sort) { Object.assign(parameters, { asc: 'false' }); @@ -730,7 +735,7 @@ export default class App extends React.PureComponent { } renderSide(openIssue: ?Issue) { - const top = this.props.component ? 95 : 30; + const top = this.props.component || this.props.organization ? 95 : 30; return ( <div className="layout-page-side-outer"> |