2021-09-12 10:23:51 -07:00
|
|
|
import { createRouter, createWebHistory } from "vue-router";
|
2022-06-05 08:43:25 -07:00
|
|
|
|
2021-09-12 10:23:51 -07:00
|
|
|
import EmptyLayout from "./layouts/EmptyLayout.vue";
|
|
|
|
import Layout from "./layouts/Layout.vue";
|
|
|
|
import Dashboard from "./pages/Dashboard.vue";
|
|
|
|
import DashboardHome from "./pages/DashboardHome.vue";
|
|
|
|
import Details from "./pages/Details.vue";
|
|
|
|
import EditMonitor from "./pages/EditMonitor.vue";
|
2022-01-23 06:22:00 -08:00
|
|
|
import EditMaintenance from "./pages/EditMaintenance.vue";
|
2021-09-12 10:23:51 -07:00
|
|
|
import List from "./pages/List.vue";
|
2021-09-29 09:16:15 -07:00
|
|
|
const Settings = () => import("./pages/Settings.vue");
|
2021-09-12 10:23:51 -07:00
|
|
|
import Setup from "./pages/Setup.vue";
|
2022-06-05 08:43:25 -07:00
|
|
|
import StatusPage from "./pages/StatusPage.vue";
|
2021-09-22 22:57:24 -07:00
|
|
|
import Entry from "./pages/Entry.vue";
|
2022-06-05 08:43:25 -07:00
|
|
|
import ManageStatusPage from "./pages/ManageStatusPage.vue";
|
|
|
|
import AddStatusPage from "./pages/AddStatusPage.vue";
|
|
|
|
import NotFound from "./pages/NotFound.vue";
|
2022-09-17 07:00:11 -07:00
|
|
|
import DockerHosts from "./components/settings/Docker.vue";
|
|
|
|
import MaintenanceDetails from "./pages/MaintenanceDetails.vue";
|
|
|
|
import ManageMaintenance from "./pages/ManageMaintenance.vue";
|
2023-02-26 10:07:57 -08:00
|
|
|
import APIKeys from "./components/settings/APIKeys.vue";
|
2023-02-10 22:41:02 -08:00
|
|
|
import SetupDatabase from "./pages/SetupDatabase.vue";
|
2021-09-12 10:23:51 -07:00
|
|
|
|
2022-06-05 08:43:25 -07:00
|
|
|
// Settings - Sub Pages
|
2021-11-03 02:03:40 -07:00
|
|
|
import Appearance from "./components/settings/Appearance.vue";
|
|
|
|
import General from "./components/settings/General.vue";
|
2022-06-05 08:43:25 -07:00
|
|
|
const Notifications = () => import("./components/settings/Notifications.vue");
|
2022-03-29 10:49:45 -07:00
|
|
|
import ReverseProxy from "./components/settings/ReverseProxy.vue";
|
2022-05-26 01:52:18 -07:00
|
|
|
import Tags from "./components/settings/Tags.vue";
|
2021-11-03 02:03:40 -07:00
|
|
|
import MonitorHistory from "./components/settings/MonitorHistory.vue";
|
2022-06-05 08:43:25 -07:00
|
|
|
const Security = () => import("./components/settings/Security.vue");
|
2021-10-30 10:37:15 -07:00
|
|
|
import Proxies from "./components/settings/Proxies.vue";
|
2021-11-03 02:03:40 -07:00
|
|
|
import Backup from "./components/settings/Backup.vue";
|
|
|
|
import About from "./components/settings/About.vue";
|
|
|
|
|
2021-09-12 10:23:51 -07:00
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: "/",
|
2021-09-22 22:57:24 -07:00
|
|
|
component: Entry,
|
|
|
|
},
|
|
|
|
{
|
2021-09-24 00:00:52 -07:00
|
|
|
// If it is "/dashboard", the active link is not working
|
|
|
|
// If it is "", it overrides the "/" unexpectedly
|
|
|
|
// Give a random name to solve the problem.
|
|
|
|
path: "/empty",
|
2021-09-12 10:23:51 -07:00
|
|
|
component: Layout,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "",
|
|
|
|
component: Dashboard,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: "DashboardHome",
|
2021-09-24 00:00:52 -07:00
|
|
|
path: "/dashboard",
|
2021-09-12 10:23:51 -07:00
|
|
|
component: DashboardHome,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/dashboard/:id",
|
|
|
|
component: EmptyLayout,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "",
|
|
|
|
component: Details,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/edit/:id",
|
|
|
|
component: EditMonitor,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-02-25 00:20:59 -08:00
|
|
|
{
|
|
|
|
path: "/clone/:id",
|
|
|
|
component: EditMonitor,
|
|
|
|
},
|
2021-09-12 10:23:51 -07:00
|
|
|
{
|
|
|
|
path: "/add",
|
|
|
|
component: EditMonitor,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2022-06-14 07:43:44 -07:00
|
|
|
{
|
|
|
|
path: "/list",
|
|
|
|
component: List,
|
|
|
|
},
|
2021-09-12 10:23:51 -07:00
|
|
|
{
|
|
|
|
path: "/settings",
|
|
|
|
component: Settings,
|
2021-11-03 02:03:40 -07:00
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "general",
|
|
|
|
component: General,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "appearance",
|
|
|
|
component: Appearance,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "notifications",
|
|
|
|
component: Notifications,
|
|
|
|
},
|
2022-03-29 10:49:45 -07:00
|
|
|
{
|
|
|
|
path: "reverse-proxy",
|
|
|
|
component: ReverseProxy,
|
|
|
|
},
|
2022-05-26 01:52:18 -07:00
|
|
|
{
|
|
|
|
path: "tags",
|
|
|
|
component: Tags,
|
|
|
|
},
|
2021-11-03 02:03:40 -07:00
|
|
|
{
|
|
|
|
path: "monitor-history",
|
|
|
|
component: MonitorHistory,
|
|
|
|
},
|
2022-07-24 05:34:43 -07:00
|
|
|
{
|
|
|
|
path: "docker-hosts",
|
|
|
|
component: DockerHosts,
|
|
|
|
},
|
2021-11-03 02:03:40 -07:00
|
|
|
{
|
|
|
|
path: "security",
|
|
|
|
component: Security,
|
|
|
|
},
|
2023-02-26 10:07:57 -08:00
|
|
|
{
|
|
|
|
path: "api-keys",
|
|
|
|
component: APIKeys,
|
|
|
|
},
|
2021-10-30 10:37:15 -07:00
|
|
|
{
|
|
|
|
path: "proxies",
|
|
|
|
component: Proxies,
|
|
|
|
},
|
2021-11-03 02:03:40 -07:00
|
|
|
{
|
|
|
|
path: "backup",
|
|
|
|
component: Backup,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "about",
|
|
|
|
component: About,
|
|
|
|
},
|
|
|
|
]
|
2021-09-12 10:23:51 -07:00
|
|
|
},
|
2022-03-10 05:34:30 -08:00
|
|
|
{
|
|
|
|
path: "/manage-status-page",
|
|
|
|
component: ManageStatusPage,
|
|
|
|
},
|
2022-03-14 21:00:29 -07:00
|
|
|
{
|
|
|
|
path: "/add-status-page",
|
|
|
|
component: AddStatusPage,
|
|
|
|
},
|
2022-09-17 07:00:11 -07:00
|
|
|
{
|
|
|
|
path: "/maintenance",
|
|
|
|
component: ManageMaintenance,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/maintenance/:id",
|
|
|
|
component: MaintenanceDetails,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/add-maintenance",
|
|
|
|
component: EditMaintenance,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/maintenance/edit/:id",
|
|
|
|
component: EditMaintenance,
|
|
|
|
},
|
2021-09-12 10:23:51 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/setup",
|
|
|
|
component: Setup,
|
|
|
|
},
|
2023-02-10 22:41:02 -08:00
|
|
|
{
|
|
|
|
path: "/setup-database",
|
|
|
|
component: SetupDatabase,
|
|
|
|
},
|
2021-09-13 23:19:23 -07:00
|
|
|
{
|
|
|
|
path: "/status-page",
|
|
|
|
component: StatusPage,
|
|
|
|
},
|
2021-09-25 07:44:29 -07:00
|
|
|
{
|
|
|
|
path: "/status",
|
|
|
|
component: StatusPage,
|
|
|
|
},
|
2022-03-10 05:34:30 -08:00
|
|
|
{
|
|
|
|
path: "/status/:slug",
|
|
|
|
component: StatusPage,
|
|
|
|
},
|
2022-03-25 11:09:12 -07:00
|
|
|
{
|
|
|
|
path: "/:pathMatch(.*)*",
|
|
|
|
component: NotFound,
|
|
|
|
},
|
2021-09-13 23:19:23 -07:00
|
|
|
];
|
2021-09-12 10:23:51 -07:00
|
|
|
|
|
|
|
export const router = createRouter({
|
|
|
|
linkActiveClass: "active",
|
|
|
|
history: createWebHistory(),
|
|
|
|
routes,
|
|
|
|
});
|