fix showing the active link in the navbar
All checks were successful
Build the docker image for the API / build (push) Successful in 2m16s
Build the docker image for the frontend application / build (push) Successful in 40s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-07-11 22:00:56 +03:00
parent 26d656896e
commit c287ffa086
15 changed files with 68 additions and 36 deletions

View File

@@ -13,11 +13,14 @@ function api_urljoin(path = null, query = {}) {
}
function api_check_err(json) {
if (!("error" in json)) throw new Error('API response is missing the "error" key');
if (!("error" in json))
throw new Error('API response is missing the "error" key');
if (json["error"] != "") throw new Error(`API returned an error: ${json["error"]}`);
if (json["error"] != "")
throw new Error(`API returned an error: ${json["error"]}`);
if (!("result" in json)) throw new Error('API response is missing the "result" key');
if (!("result" in json))
throw new Error('API response is missing the "result" key');
}
async function api_http_get(fetch, url) {
@@ -39,4 +42,10 @@ async function api_get_projects(fetch) {
return await api_http_get(fetch, api_urljoin("/projects"));
}
export { api_version, api_urljoin, api_get_metrics, api_get_services, api_get_projects };
export {
api_version,
api_urljoin,
api_get_metrics,
api_get_services,
api_get_projects,
};