You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crontab-ui/routes.js

30 lines
832 B

// base url
var base_url = process.env.BASE_URL ?? '';
base_url = base_url.replace(/\/+$/, "").trim();
exports.base_url = base_url;
var routes = {
"root": "/",
"save": "/save",
"run": "/runjob",
"crontab": "/crontab",
"stop": "/stop",
"start": "/start",
10 years ago
"remove": "/remove",
"backup": "/backup",
10 years ago
"restore": "/restore",
"delete_backup": "/delete",
10 years ago
"restore_backup": "/restore_backup",
"export": "/export",
"import": "/import", // this is import from database
"import_crontab": "/import_crontab", // this is from existing crontab
"logger": "/logger",
"stdout": "/stdout",
8 years ago
};
exports.routes = Object.keys(routes).reduce((p, c) => ({...p, [c]: base_url + routes[c]}), {});
exports.relative = Object.keys(routes).reduce((p, c) => ({...p, [c]: routes[c].replace(/^\//, '')}), {});
exports.relative["root"] = base_url;