yunohost-admin/app/src/router/routes.js

248 lines
5.8 KiB
JavaScript
Raw Normal View History

2020-08-29 19:05:56 +02:00
import Home from '@/views/Home'
import Login from '@/views/Login'
2020-08-30 17:12:15 +02:00
import ToolList from '@/views/tool/ToolList'
2020-08-29 19:05:56 +02:00
import { UserList, UserCreate, UserInfo, UserEdit } from '@/views/user'
import { GroupList, GroupCreate } from '@/views/group'
import { DomainList, DomainAdd, DomainInfo, DomainDns, DomainCert } from '@/views/domain'
import { ServiceList, ServiceInfo } from '@/views/service'
const routes = [
2020-07-15 16:39:24 +02:00
{ name: 'home', path: '/', component: Home },
{ name: 'login', path: '/login', component: Login, meta: { noAuth: true } },
/*
USER
*/
2020-07-15 16:39:24 +02:00
{
name: 'user-list',
2020-07-15 16:39:24 +02:00
path: '/users',
component: UserList,
meta: { breadcrumb: [{ name: 'user-list', trad: 'users' }] }
2020-07-15 16:39:24 +02:00
},
2020-07-16 14:49:34 +02:00
{
name: 'user-create',
path: '/users/create',
component: UserCreate,
meta: {
breadcrumb: [
{ name: 'user-list', trad: 'users' },
{ name: 'user-create', trad: 'users_new' }
]
}
},
2020-07-15 16:39:24 +02:00
{
name: 'user-info',
2020-07-16 14:49:34 +02:00
path: '/users/:name',
2020-07-27 21:53:18 +02:00
component: UserInfo,
2020-07-15 16:39:24 +02:00
props: true,
meta: {
breadcrumb: [
{ name: 'user-list', trad: 'users' },
{ name: 'user-info', param: 'name' }
2020-07-15 16:39:24 +02:00
]
}
2020-07-27 20:46:27 +02:00
},
{
name: 'user-edit',
path: '/users/:name/edit',
component: UserEdit,
props: true,
meta: {
breadcrumb: [
{ name: 'user-list', trad: 'users' },
{ name: 'user-info', param: 'name' },
{ name: 'user-edit', param: 'name', trad: 'user_username_edit' }
]
}
},
/*
GROUP
*/
{
name: 'group-list',
path: '/groups',
component: GroupList,
meta: {
breadcrumb: [
{ name: 'user-list', trad: 'users' },
{ name: 'group-list', trad: 'groups_and_permissions' }
]
}
},
{
name: 'group-create',
path: '/groups/create',
component: GroupCreate,
meta: {
breadcrumb: [
{ name: 'user-list', trad: 'users' },
{ name: 'group-list', trad: 'groups_and_permissions' },
{ name: 'group-create', trad: 'group_new' }
]
}
},
/*
DOMAIN
*/
{
name: 'domain-list',
path: '/domains',
component: DomainList,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' }
]
}
2020-08-04 22:11:30 +02:00
},
{
name: 'domain-add',
path: '/domains/add',
component: DomainAdd,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' },
{ name: 'domain-add', trad: 'domain_add' }
]
}
},
{
name: 'domain-info',
path: '/domains/:name',
component: DomainInfo,
props: true,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' },
{ name: 'domain-info', param: 'name' }
]
}
2020-08-06 13:30:30 +02:00
},
{
name: 'domain-dns',
path: '/domains/:name/dns',
component: DomainDns,
props: true,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' },
{ name: 'domain-info', param: 'name' },
{ name: 'domain-dns', trad: 'dns' }
]
}
2020-08-06 17:39:02 +02:00
},
{
name: 'domain-cert',
path: '/domains/:name/cert-management',
component: DomainCert,
props: true,
meta: {
breadcrumb: [
{ name: 'domain-list', trad: 'domains' },
{ name: 'domain-info', param: 'name' },
{ name: 'domain-cert', trad: 'certificate' }
]
}
},
/*
SERVICE
*/
{
name: 'service-list',
path: '/services',
component: ServiceList,
meta: {
breadcrumb: [
{ name: 'service-list', trad: 'services' }
]
}
},
{
name: 'service-info',
path: '/services/:name',
component: ServiceInfo,
props: true,
meta: {
breadcrumb: [
{ name: 'service-list', trad: 'services' },
{ name: 'service-info', param: 'name' }
]
}
2020-08-08 15:47:01 +02:00
},
/*
TOOLS
*/
{
name: 'tool-list',
path: '/tools',
component: ToolList,
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' }
]
}
2020-08-08 20:17:12 +02:00
},
{
name: 'tool-logs',
path: '/tools/logs',
2020-08-30 17:12:15 +02:00
component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolLogs'),
2020-08-08 20:17:12 +02:00
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' },
2020-08-30 17:12:15 +02:00
{ name: 'tool-logs', trad: 'logs' }
]
}
},
{
name: 'tool-log',
2020-09-11 14:20:06 +02:00
path: '/tools/logs/:name',
2020-08-30 17:12:15 +02:00
component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolLog'),
props: true,
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' },
{ name: 'tool-logs', trad: 'logs' },
{ name: 'tool-log', param: 'name' }
2020-08-08 20:17:12 +02:00
]
}
2020-09-11 14:20:06 +02:00
},
{
name: 'tool-migrations',
path: '/tools/migrations',
component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolMigrations'),
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' },
{ name: 'tool-migrations', trad: 'migrations' }
]
}
2020-09-12 17:11:13 +02:00
},
{
name: 'tool-firewall',
path: '/tools/firewall',
component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolFirewall'),
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' },
{ name: 'tool-firewall', trad: 'firewall' }
]
}
2020-09-12 19:02:12 +02:00
},
{
name: 'tool-adminpw',
path: '/tools/adminpw',
component: () => import(/* webpackChunkName: "views/tools" */ '@/views/tool/ToolAdminpw'),
meta: {
breadcrumb: [
{ name: 'tool-list', trad: 'tools' },
{ name: 'tool-adminpw', trad: 'tools_adminpw' }
]
}
2020-07-15 16:39:24 +02:00
}
]
export default routes