Skip to content

Commit d657a35

Browse files
attaching api key usage grafana dashboard
1 parent d28f50b commit d657a35

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

webroot/adm/oncall/participant-summary.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ <h5>Site App Names</h5>
6464
<div class="row px-2">
6565
<div class="col section">
6666
<h5>Participant API Keys</h5>
67-
<p>TESTING</p>
68-
<pre id="grafanaApiKeyUsage"></pre>
67+
<a id="grafanaApiKeyUsage" target="_blank">API Key Usage Dashboard</a>
6968
<pre class="errorDiv" id="participantKeysErrorOutput"></pre>
7069
<pre id="participantKeysStandardOutput"></pre>
7170
</div>

webroot/js/component/participantSummary.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ document.addEventListener("DOMContentLoaded", () => {
351351
);
352352
const sections = document.querySelectorAll(".section");
353353
sections.forEach((section) => (section.style.display = "block"));
354+
355+
const apiKeyUsageGrafanaUrl = `https://uid2.grafana.net/d/JaOQgV7Iz/api-key-usage?orgId=1&from=now-6h&to=now&timezone=browser&var-SiteId=${site.id}&var-Env=prod`;
356+
const apiKeyUsageElement = document.getElementById("grafanaApiKeyUsage");
357+
apiKeyUsageElement.href = apiKeyUsageGrafanaUrl;
354358
});
355359
}
356360

@@ -384,9 +388,7 @@ document.addEventListener("DOMContentLoaded", () => {
384388
});
385389
}
386390

387-
const apiKeyUsageGrafanaUrl = `https://uid2.grafana.net/d/JaOQgV7Iz/api-key-usage?orgId=1&from=now-6h&to=now&timezone=browser&var-SiteId=${site.id}&var-Env=prod`;
388-
const apiKeyUsageElement = document.getElementById(grafanaApiKeyUsage);
389-
apiKeyUsageElement.innerHTML = apiKeyUsageGrafanaUrl;
391+
390392
});
391393

392394
export {};

0 commit comments

Comments
 (0)