mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2026-01-08 15:23:36 +01:00
Fix routing (#43)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="/flask.png?v=1">
|
||||
<title>Catalyst</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -12,8 +11,5 @@
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script>let global = globalThis;</script>
|
||||
<script type="module" src="./src/main.ts"></script>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<v-list>
|
||||
<v-list-item class="px-2" :to="{ name: 'Home' }">
|
||||
<v-list-item-avatar rounded="0">
|
||||
<v-img src="/flask_white.svg" :width="40"></v-img>
|
||||
<v-img src="/static/flask_white.svg" :width="40"></v-img>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="title">
|
||||
@@ -132,9 +132,7 @@
|
||||
</v-btn>
|
||||
|
||||
</v-app-bar>
|
||||
<div>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
<v-snackbar v-model="snackbar" :color="$store.state.alert.type" :timeout="$store.state.alert.type === 'error' ? -1 : 5000" outlined>
|
||||
<b style="display: block">{{ $store.state.alert.name | capitalize }}</b>
|
||||
{{ $store.state.alert.detail }}
|
||||
@@ -190,6 +188,8 @@ export default Vue.extend({
|
||||
return this.$store.state.showAlert
|
||||
},
|
||||
crumbs: function() {
|
||||
this.$route.name
|
||||
|
||||
let pathArray = this.$route.path.split("/")
|
||||
pathArray.shift()
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import TicketType from '../views/TicketType.vue';
|
||||
import TicketTypeList from "@/views/TicketTypeList.vue";
|
||||
import TaskList from "@/views/TaskList.vue";
|
||||
import Settings from "@/views/Settings.vue";
|
||||
import NotFound from "@/views/NotFound.vue";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
@@ -229,7 +230,6 @@ const routes: Array<RouteConfig> = [
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: "/dashboards",
|
||||
name: "DashboardList",
|
||||
@@ -264,6 +264,13 @@ const routes: Array<RouteConfig> = [
|
||||
component: Graph,
|
||||
meta: { title: "Graph" },
|
||||
},
|
||||
|
||||
{
|
||||
path: '*',
|
||||
name: "Not Found",
|
||||
component: NotFound,
|
||||
meta: { title: "Not Found" },
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
|
||||
13
ui/src/views/NotFound.vue
Normal file
13
ui/src/views/NotFound.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<v-main>
|
||||
<div class="fill-height d-flex flex-row align-center justify-center">
|
||||
<h1>Page not found :(</h1>
|
||||
</div>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "NotFound"
|
||||
}
|
||||
</script>
|
||||
@@ -1,4 +1,5 @@
|
||||
module.exports = {
|
||||
publicPath: "/static/",
|
||||
transpileDependencies: ["vuetify", "@koumoul/vjsf"],
|
||||
pwa: {
|
||||
name: "Catalyst",
|
||||
|
||||
Reference in New Issue
Block a user