diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2019-01-11 10:49:03 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-01-16 09:43:12 +0100 |
commit | 2d70af2266bfe2871ed871a23edea807f54aaf64 (patch) | |
tree | 83ea922007e581c637bff55b40cb9ad48f95cc7d /server/sonar-web/src/main/js | |
parent | 346a7f4cc25418651f7a3544b42f6c744ed2d25f (diff) | |
download | sonarqube-2d70af2266bfe2871ed871a23edea807f54aaf64.tar.gz sonarqube-2d70af2266bfe2871ed871a23edea807f54aaf64.zip |
SONARCLOUD-290 Drop unnecessary request to api/organizations/search in issues page
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/App.tsx | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx b/server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx index 0457ad37bb5..1ac4f83c010 100644 --- a/server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx +++ b/server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx @@ -26,5 +26,7 @@ interface Props { } export default function ExploreIssues(props: Props) { - return <AppContainer hideAuthorFacet={true} myIssues={false} {...props} />; + return ( + <AppContainer hideAuthorFacet={true} multiOrganizations={true} myIssues={false} {...props} /> + ); } diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index 1bf52ed354b..5c6db560471 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -101,6 +101,7 @@ interface Props { fetchIssues: (query: RawQuery, requestOrganizations?: boolean) => Promise<FetchIssuesPromise>; hideAuthorFacet?: boolean; location: Pick<Location, 'pathname' | 'query'>; + multiOrganizations?: boolean; myIssues?: boolean; onBranchesChange: () => void; organization?: { key: string }; @@ -438,7 +439,10 @@ export class App extends React.PureComponent<Props, State> { Object.assign(parameters, { assignees: '__me__' }); } - return this.props.fetchIssues(parameters, requestOrganizations); + return this.props.fetchIssues( + parameters, + Boolean(requestOrganizations && this.props.multiOrganizations) + ); }; fetchFirstIssues() { |