From 0b9adba4230ea40e1b8d523981990b909b63dd1a Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 18 Sep 2020 16:18:09 +0200 Subject: [PATCH] Deprecate gateId parameter for /api/qualitygates/search --- server/sonar-web/src/main/js/api/quality-gates.ts | 2 +- .../src/main/js/apps/quality-gates/components/Projects.tsx | 2 +- .../apps/quality-gates/components/__tests__/Projects-test.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/api/quality-gates.ts b/server/sonar-web/src/main/js/api/quality-gates.ts index c81bc29a120..4078b2664d7 100644 --- a/server/sonar-web/src/main/js/api/quality-gates.ts +++ b/server/sonar-web/src/main/js/api/quality-gates.ts @@ -109,7 +109,7 @@ export function getGateForProject(data: { } export function searchProjects(data: { - gateId: string; + gateName: string; organization?: string; page?: number; pageSize?: number; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx index a7eadc3eaa4..170f62078e0 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx @@ -67,7 +67,7 @@ export default class Projects extends React.PureComponent { fetchProjects = (searchParams: SelectListSearchParams) => searchProjects({ - gateId: this.props.qualityGate.id, + gateName: this.props.qualityGate.name, organization: this.props.organization, page: searchParams.page, pageSize: searchParams.pageSize, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx index 15e36a03b11..f7a76c49793 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx @@ -69,7 +69,7 @@ it('should render correctly', async () => { expect(searchProjects).toHaveBeenCalledWith( expect.objectContaining({ - gateId: qualityGate.id, + gateName: qualityGate.name, organization, page: 1, pageSize: 100, -- 2.39.5