asynqmon/ui/src/paths.ts

15 lines
353 B
TypeScript
Raw Normal View History

2020-11-24 06:54:00 -08:00
export const paths = {
HOME: "/",
SETTINGS: "/settings",
SCHEDULERS: "/schedulers",
2020-11-24 06:54:00 -08:00
QUEUE_DETAILS: "/queues/:qname",
};
export function queueDetailsPath(qname: string, taskStatus?: string): string {
const path = paths.QUEUE_DETAILS.replace(":qname", qname);
if (taskStatus) {
return `${path}?status=${taskStatus}`;
}
return path;
}