rename api userconfig to frontend, return json on api auth error

This commit is contained in:
Christoph Kluge
2024-07-05 11:48:06 +02:00
parent 9d4767539c
commit 3afe40083d
8 changed files with 80 additions and 69 deletions

View File

@@ -262,7 +262,7 @@
<form
id="colorscheme-form"
method="post"
action="/userconfig/configuration/"
action="/frontend/configuration/"
class="card-body"
>
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->

View File

@@ -30,7 +30,7 @@
<form
id="line-width-form"
method="post"
action="/userconfig/configuration/"
action="/frontend/configuration/"
class="card-body"
on:submit|preventDefault={() =>
updateSetting("#line-width-form", "lw")}
@@ -76,7 +76,7 @@
<form
id="plots-per-row-form"
method="post"
action="/userconfig/configuration/"
action="/frontend/configuration/"
class="card-body"
on:submit|preventDefault={() =>
updateSetting("#plots-per-row-form", "ppr")}
@@ -122,7 +122,7 @@
<form
id="backgrounds-form"
method="post"
action="/userconfig/configuration/"
action="/frontend/configuration/"
class="card-body"
on:submit|preventDefault={() =>
updateSetting("#backgrounds-form", "bg")}

View File

@@ -51,7 +51,7 @@
<form
id="paging-form"
method="post"
action="/userconfig/configuration/"
action="/frontend/configuration/"
class="card-body"
on:submit|preventDefault={() =>
updateSetting("#paging-form", "pag")}

View File

@@ -239,7 +239,7 @@ export async function fetchMetrics(job, metrics, scopes) {
try {
let res = await fetch(
`/api/jobs/metrics/${job.id}${query.length > 0 ? "?" : ""}${query.join(
`/frontend/jobs/metrics/${job.id}${query.length > 0 ? "?" : ""}${query.join(
"&"
)}`
);
@@ -434,7 +434,7 @@ export function transformPerNodeDataForRoofline(nodes) {
}
export async function fetchJwt(username) {
const raw = await fetch(`/userconfig/jwt/?username=${username}`);
const raw = await fetch(`/frontend/jwt/?username=${username}`);
if (!raw.ok) {
const message = `An error has occured: ${response.status}`;