Skip to content

Commit

Permalink
Merge pull request #255 from serguun42/metrics-and-traces
Browse files Browse the repository at this point in the history
Update Panel and Grafana paths
  • Loading branch information
serguun42 authored Dec 10, 2023
2 parents 44f032a + 5ce91be commit f153567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions panel/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ createServer((req, res) => {
return;
}

if (path[0] === "params-panel" || path[0] === "favicon.ico") {
if (path[0] === "params-panel") {
if (path[1] === "api" && path[2] === "list") {
if (method !== "GET") {
res.statusCode = 405;
Expand Down Expand Up @@ -109,12 +109,6 @@ createServer((req, res) => {
sendError();
});
}

if (method !== "GET") {
res.statusCode = 405;
res.end("405 Method Not Allowed");
return;
}
}

serveStatic(req, res);
Expand Down
4 changes: 2 additions & 2 deletions panel/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

<body>
<div class="panel">
<a class="panel__header panel__header_link" href="/d/mss/mss-backend-dashboard">Open Grafana</a>
<a class="panel__header panel__header_link" href="/grafana/d/mss/mss-backend-dashboard">Open Grafana</a>
</div>

<div class="panel">
Expand Down Expand Up @@ -221,7 +221,7 @@ <h1 class="panel__header">MSS Params</h1>
});
}

if (new URL(window.location.href).searchParams.get("code")) window.location.assign("/params-panel/");
if (new URL(window.location.href).searchParams.get("code")) window.location.assign("/");
else ListAllParams();
</script>
</body>
Expand Down

0 comments on commit f153567

Please sign in to comment.