Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Integrate dynamic routing via UmiJS #172

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 20 additions & 34 deletions config/router.config.js
Original file line number Diff line number Diff line change
@@ -1,92 +1,78 @@
module.exports = [
{
path: '/auth',
name: 'auth',
component: '../components/AuthLayout',
},
{
path: '/login',
name: 'login',
component: './LoginHandler',
component: 'LoginHandler',
},
{
path: '/signup',
name: 'signup',
component: './SignupHandler',
component: 'SignupHandler',
},
{
path: '/password',
name: 'password',
component: './PasswordHandler',
component: 'PasswordHandler',
},
{
path: '/share/:id',
name: 'share',
component: './SessionPlaceholder',
component: 'SessionPlaceholder',
},
{
path: '/',
component: '../layouts/BasicLayout',
routes: [
{
path: '/',
name: 'dashboard',
icon: 'dashboard',
component: './Controllers',
component: 'Controllers',
},
{
path: '/results',
name: 'results',
component: './Results',
path: '/controllers',
component: 'Controllers',
},
{
path: '/summary',
name: 'summary',
component: './Summary',
path: '/controllers/:controller',
component: 'Results',
},
{
path: '/comparison-select',
name: 'comparison-select',
component: './ComparisonSelect',
path: '/controllers/:controller/:result/summary',
component: 'Summary',
},
{
path: '/comparison-select/',
component: 'ComparisonSelect',
},
{
path: '/comparison',
name: 'comparison',
component: './RunComparison',
component: 'RunComparison',
},
{
path: '/search',
name: 'search',
component: './Search',
component: 'Search',
},
{
path: '/sessions',
name: 'sessions',
component: './Sessions',
component: 'Sessions',
},
{
path: '/overview',
name: 'overview',
component: './Overview',
component: 'Overview',
},
{
path: '/profile',
name: 'profile',
component: './Profile',
component: 'Profile',
},
{
path: '/exception/403',
name: 'exception-403',
component: './Exception/403',
},
{
path: '/exception/404',
name: 'exception-404',
component: './Exception/404',
},
{
path: '/exception/500',
name: 'exception-500',
component: './Exception/500',
},
],
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
"jschart": "^1.0.7",
"lodash": "^4.17.20",
"match-sorter": "^6.3.0",
"memoize-one": "^5.0.0",
"moment": "^2.24.0",
"path-to-regexp": "^2.1.0",
"prop-types": "^15.5.10",
"react": "^16.8.0",
"react-copy-to-clipboard": "^5.0.2",
Expand Down
24 changes: 1 addition & 23 deletions src/common/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,8 @@ import { isUrl } from '../utils/utils';

const menuData = [
{
name: 'Dashboard',
name: 'Controllers',
path: '/',
routes: [
{
name: 'Results',
path: '/results',
routes: [
{
name: 'Summary',
path: '/summary',
},
{
name: 'Comparison Select',
path: '/comparison-select',
routes: [
{
name: 'Comparison',
path: '/comparison',
},
],
},
],
},
],
},
{
name: 'Search',
Expand Down
241 changes: 0 additions & 241 deletions src/components/SiderMenu/SiderMenu.js

This file was deleted.

Loading