Files
hermione-fe/src/router/index.js
mariapia.lorusso 8b1cb5a35d updates
2025-06-10 16:15:13 +02:00

99 lines
3.1 KiB
JavaScript

import AppLayout from '@/layout/AppLayout.vue';
import { createRouter, createWebHistory } from 'vue-router';
const router = createRouter({
history: createWebHistory(),
routes: [
{
path: '/',
redirect: '/auth/login',
meta: { auth: false }
},
{
path: '/home',
component: AppLayout,
meta: {
auth: true
},
children: [
{
path: 'scenario',
children: [
{
path: '/projects',
name: 'projects-list',
component: () => import('@/views/pages/ProjectList.vue')
},
{
path: '/home',
name: 'scenario-list',
component: () => import('@/views/pages/ScenarioList.vue')
},
{
path: 'exec/:id',
name: 'scenario-exec',
component: () => import('@/views/pages/ScenarioExec.vue')
},
{
path: 'exec-history',
name: 'scenario-exec-history',
component: () => import('@/views/pages/OldScenarioExec.vue')
},
{
path: '/dashboard',
name: 'dashboard',
component: () => import('@/views/pages/DashExecution.vue')
},
{
path: '/executions/:name',
name: 'executions',
component: () => import('@/views/pages/ScenarioExecList.vue'),
props: true // Facoltativo: consente di passare il parametro come prop al componente
},
{
path: '/canvas',
name: 'canvas',
component: () => import('@/views/pages/canvas/Canvas.vue')
},
{
path: '/app-browser',
name: 'app-browser',
component: () => import('@/views/pages/ApplicationBrowser.vue')
},
{
path: '/mdcanvas',
name: 'mdcanvas',
component: () => import('@/views/pages/canvas/MdCanvas.vue')
},
{
path: '/chat',
name: 'chat',
component: () => import('@/views/pages/chat/ChatPage.vue')
}
]
}
]
},
{
path: '/auth/login',
name: 'login',
meta: {
auth: false
},
component: () => import('@/views/pages/auth/Login.vue')
},
{
path: '/auth/callback',
name: 'test',
meta: {
auth: false
},
component: () => import('@/views/pages/auth/Callback.vue')
}
]
});
export default router;