asynqmon/ui/src/paths.ts
2021-01-03 07:32:14 -08:00

17 lines
395 B
TypeScript

export const paths = {
HOME: "/",
SETTINGS: "/settings",
SERVERS: "/servers",
SCHEDULERS: "/schedulers",
QUEUE_DETAILS: "/queues/:qname",
REDIS: "/redis",
};
export function queueDetailsPath(qname: string, taskStatus?: string): string {
const path = paths.QUEUE_DETAILS.replace(":qname", qname);
if (taskStatus) {
return `${path}?status=${taskStatus}`;
}
return path;
}