diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap | 7 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap | 18 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx (renamed from server/sonar-web/src/main/js/apps/projectsManagement/routes.ts) | 11 |
6 files changed, 12 insertions, 30 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx index b416ffa2c1c..622329fc954 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { createProject } from '../../api/components'; import VisibilitySelector from '../../components/common/VisibilitySelector'; import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx index 7f96d1b14ff..1cb7d26e0ba 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { Project } from '../../api/components'; import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer'; import Checkbox from '../../components/controls/Checkbox'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx index 70ab3aaae7e..36bbd9969e6 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx @@ -154,5 +154,5 @@ function mockComponents(n: number) { } function renderGlobalBackgroundTasksApp() { - renderAdminApp('admin/background_tasks', routes, {}); + renderAdminApp('admin/projects_management', routes, {}); } diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap index d7c8b42fb8f..6e3daf3a9bf 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap @@ -313,15 +313,10 @@ exports[`creates project 4`] = ` values={ Object { "project": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "name", - }, + "search": "?id=name", } } > diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap index eb4b5da27bb..69db1456cc3 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap @@ -18,14 +18,10 @@ exports[`renders 1`] = ` > <Link className="link-with-icon" - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "id": "project", - }, + "search": "?id=project", } } > @@ -114,14 +110,10 @@ exports[`renders: portfolio 1`] = ` > <Link className="link-with-icon" - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/portfolio", - "query": Object { - "id": "project", - }, + "search": "?id=project", } } > @@ -210,14 +202,10 @@ exports[`renders: with lastAnalysisDate 1`] = ` > <Link className="link-with-icon" - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "id": "project", - }, + "search": "?id=project", } } > diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts b/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx index cabc724387d..f3caf1e7d8c 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { lazyLoadComponent } from '../../components/lazyLoadComponent'; -const routes = [ - { - indexRoute: { component: lazyLoadComponent(() => import('./ProjectManagementApp')) } - } -]; +import React from 'react'; +import { Route } from 'react-router-dom'; +import ProjectManagementApp from './ProjectManagementApp'; + +export const routes = () => <Route path="projects_management" element={<ProjectManagementApp />} />; export default routes; |