aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-01-11 10:49:03 +0100
committersonartech <sonartech@sonarsource.com>2019-01-16 09:43:12 +0100
commit2d70af2266bfe2871ed871a23edea807f54aaf64 (patch)
tree83ea922007e581c637bff55b40cb9ad48f95cc7d /server/sonar-web/src/main/js
parent346a7f4cc25418651f7a3544b42f6c744ed2d25f (diff)
downloadsonarqube-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.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.tsx6
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() {