Skip to content

Commit 6d0d2f1

Browse files
authored
Merge pull request #336 from IABTechLab/sas-UID2-3946-participant-summary-improvements
added client side keypairs to participant summary
2 parents 84f690b + 897e240 commit 6d0d2f1

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

webroot/adm/oncall/participant-summary.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,27 @@ <h5>Participant API Keys</h5>
6464
<pre class="errorDiv" id="participantKeysErrorOutput"></pre>
6565
<pre id="participantKeysStandardOutput"></pre>
6666
</div>
67+
</div>
68+
<div class="row px-2">
69+
<div class="col section">
70+
<h5>Client Side Keypairs</h5>
71+
<pre class="errorDiv" id="keyPairsErrorOutput"></pre>
72+
<pre id="keyPairsStandardOutput"></pre>
73+
</div>
74+
</div>
75+
<div class="row px-2">
6776
<div class="col section">
6877
<h5>Participant Encryption Keys</h5>
6978
<pre class="errorDiv" id="encryptionKeysErrorOutput"></pre>
7079
<pre id="encryptionKeysStandardOutput"></pre>
7180
</div>
72-
</div>
73-
<div class="row px-2">
7481
<div class="col section">
7582
<h5>Participant Operator Keys</h5>
7683
<pre class="errorDiv" id="operatorKeysErrorOutput"></pre>
7784
<pre id="operatorKeysStandardOutput"></pre>
7885
</div>
86+
</div>
87+
<div class="row px-2">
7988
<div class="col section">
8089
<h5>Participant Opt-out Webhook</h5>
8190
<pre class="errorDiv" id="webhooksErrorOutput"></pre>

webroot/js/participantSummary.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ function loadAPIKeysCallback(result) {
4848
$('#participantKeysStandardOutput').html(highlightedText);
4949
};
5050

51+
function loadKeyPairsCallback(result, siteId) {
52+
let resultJson = JSON.parse(result);
53+
let filteredResults = resultJson.filter((item) => { return item.site_id === siteId });
54+
const formatted = prettifyJson(JSON.stringify(filteredResults));
55+
$('#keyPairsStandardOutput').html(formatted);
56+
};
57+
5158
function loadEncryptionKeysCallback(result, siteId) {
5259
const resultJson = JSON.parse(result);
5360
let filteredResults = resultJson.filter((item) => { return item.site_id === siteId });
@@ -156,6 +163,9 @@ $(document).ready(() => {
156163
url = `/api/client/list/${site.id}`;
157164
doApiCallWithCallback('GET', url, loadAPIKeysCallback, (err) => { participantSummaryErrorHandler(err, '#participantKeysErrorOutput') });
158165

166+
url = `/api/client_side_keypairs/list`;
167+
doApiCallWithCallback('GET', url, (r) => { loadKeyPairsCallback(r, site.id) }, (err) => { participantSummaryErrorHandler(err, '#keyPairsErrorOutput') });
168+
159169
url = '/api/key/list';
160170
doApiCallWithCallback('GET', url, (r) => { loadEncryptionKeysCallback(r, site.id) }, (err) => { participantSummaryErrorHandler(err, '#encryptionKeysErrorOutput') });
161171

0 commit comments

Comments
 (0)