Skip to content

Commit a7c4a18

Browse files
added operator and optout dashboard links
1 parent 7784a79 commit a7c4a18

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

webroot/adm/oncall/participant-summary.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ <h5>Participant API Keys</h5>
7272
<div class="row px-2">
7373
<div class="col section">
7474
<h5>Client Side Keypairs</h5>
75+
<a id="grafanaCstg" target="_blank">CSTG Dashboard</a>
7576
<pre class="errorDiv" id="keyPairsErrorOutput"></pre>
7677
<pre id="keyPairsStandardOutput"></pre>
7778
</div>
@@ -85,13 +86,15 @@ <h5>Participant Encryption Keys</h5>
8586
<div class="col section">
8687
<h5>Participant Operator Keys</h5>
8788
<pre class="errorDiv" id="operatorKeysErrorOutput"></pre>
89+
<a id="operatorDashboard" target="_blank"></a>
8890
<pre id="operatorKeysStandardOutput"></pre>
8991
</div>
9092
</div>
9193
<div class="row px-2">
9294
<div class="col section">
9395
<h5>Participant Opt-out Webhook</h5>
9496
<pre class="errorDiv" id="webhooksErrorOutput"></pre>
97+
<a id="optOutDashboard" target="_blank"></a>
9598
<pre id="webhooksStandardOutput"></pre>
9699
</div>
97100
</div>

webroot/js/component/participantSummary.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ function loadOperatorKeysCallback(result, siteId) {
177177
);
178178
const element = document.getElementById("operatorKeysStandardOutput");
179179
if (element) element.innerHTML = highlightedText;
180+
181+
if (filteredResults.length !== 0) {
182+
const el = document.getElementById("operatorDashboard");
183+
el.innerText = "Operator Dashboard";
184+
const operatorDashboardUrl = `https://${uidType}.grafana.net/d/nnz7mb9Mk/operator-dashboard?orgId=1&from=now-24h&to=now&timezone=browser&var-_APP=uid2-operator&var-CLUSTER=uid2-prod-opr-use2-auto&var-ENV=${currentEnv}&var-_STORE=$__all`;
185+
el.href = operatorDashboardUrl;
186+
}
180187
}
181188

182189
function loadOptoutWebhooksCallback(result, siteName) {
@@ -187,6 +194,13 @@ function loadOptoutWebhooksCallback(result, siteName) {
187194
const formatted = prettifyJson(JSON.stringify(filteredResults));
188195
const element = document.getElementById("webhooksStandardOutput");
189196
if (element) element.innerHTML = formatted;
197+
198+
if (filteredResults.length !== 0) {
199+
const el = document.getElementById("optOutDashboard");
200+
el.innerText = "Opt Out Dashboard";
201+
const optOutDashboardUrl = `https://${uidType}.grafana.net/d/a3-KG_rGz/optout-dashboard?orgId=1&from=now-1h&to=now&timezone=browser&var-_APP=uid2-optout&var-CLUSTER=uid2-us-east-2&var-ENV=${currentEnv}&var-_STORE=operators`;
202+
el.href = optOutDashboardUrl;
203+
}
190204
}
191205

192206
function loadRelatedKeysetsCallback(result, siteId, clientTypes) {
@@ -369,6 +383,10 @@ document.addEventListener("DOMContentLoaded", () => {
369383
const apiKeyUsageGrafanaUrl = `https://${uidType}.grafana.net/d/JaOQgV7Iz/api-key-usage?orgId=1&from=now-6h&to=now&timezone=browser&var-SiteId=${site.id}&var-Env=${currentEnv}`;
370384
const apiKeyUsageElement = document.getElementById("grafanaApiKeyUsage");
371385
apiKeyUsageElement.href = apiKeyUsageGrafanaUrl;
386+
387+
const cstgGrafanaUrl = `https://${uidType}.grafana.net/d/J22t4ykIz/cstg-client-side-token-generation-dashboard?orgId=1&from=now-2d&to=now&timezone=browser&var-env=${currentEnv}&var-cluster=$__all&var-site_name=${site.name}&var-platform_type=$__all&refresh=15m`;
388+
const cstgElement = document.getElementById("grafanaCstg");
389+
cstgElement.href = cstgGrafanaUrl;
372390
});
373391
}
374392

0 commit comments

Comments
 (0)