2023-07-27 20:10:46 +00:00
|
|
|
import { Router } from "express";
|
2023-07-31 19:23:22 +00:00
|
|
|
export const router = Router({ mergeParams: true });
|
2023-07-27 20:10:46 +00:00
|
|
|
|
|
|
|
const nodeRegexP = "[\\w-]+";
|
|
|
|
const typeRegexP = "qemu|lxc";
|
|
|
|
const vmidRegexP = "\\d+";
|
|
|
|
|
|
|
|
const basePath = `/:node(${nodeRegexP})/:type(${typeRegexP})/:vmid(${vmidRegexP})`;
|
|
|
|
|
|
|
|
import("./cluster/disk.js").then((module) => {
|
2023-07-31 19:23:22 +00:00
|
|
|
router.use(`${basePath}/disk`, module.router);
|
2023-07-27 20:10:46 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
import("./cluster/net.js").then((module) => {
|
2023-07-31 19:23:22 +00:00
|
|
|
router.use(`${basePath}/net`, module.router);
|
2023-07-27 20:10:46 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
import("./cluster/pci.js").then((module) => {
|
2023-07-31 19:23:22 +00:00
|
|
|
router.use(`${basePath}/pci`, module.router);
|
|
|
|
});
|