Skip to content

Commit 5087219

Browse files
committed
Consistent naming of Client API Key
Fixed some bugs Addressed review comments
1 parent a1a7356 commit 5087219

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

webroot/adm/oncall/generate-api-key-secret.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h4>Instructions</h4>
3939
<div class="row">
4040
<div class="col">
4141
<ol>
42-
<li>First seach for a participant with the requested name from the Jira ticket.</li>
42+
<li>Search for a participant with the requested name from the Jira ticket.</li>
4343
<li>If a site exists use the Site Id to update the site if necessary.</li>
4444
<li>Use the Site Id to create a client API key and secret if necessary.</li>
4545
</ol>
@@ -53,9 +53,9 @@ <h5>Search for existing participants:</h5>
5353
<div class="row align-items-end">
5454
<div class="col">
5555
<div class="form-group">
56-
<label for="participantName">Participant / Client name</label>
56+
<label for="participantName">Participant name</label>
5757
<input type="text" class="form-control" id="participantName"
58-
placeholder="Leave empty for all participants / clients">
58+
placeholder="Leave empty for all participants">
5959
</div>
6060
</div>
6161
<div class="col">
@@ -91,7 +91,7 @@ <h5>Search Results:</h5>
9191
<table class="table table-bordered" id="searchResultsTable">
9292
<thead>
9393
<th scope="col" class="col-1">Sites</th>
94-
<th scope="col" class="col-1">Clients</th>
94+
<th scope="col" class="col-1">Client API Keys</th>
9595
</thead>
9696
<tbody id="searchResultsTableBody">
9797
</tbody>
@@ -104,11 +104,11 @@ <h5>Search Results:</h5>
104104
<div class="row pt-1">
105105
<div class="col">
106106
<div class="row">
107-
<h5>Update Operations:</h5>
107+
<h5>Create / Update Operations:</h5>
108108
</div>
109109
<div class="row py-2">
110110
<div>
111-
Use this to create new site, update existing sites or create new clients.
111+
Use this to create a new site, update existing sites or create new Client API Key and Secrets.
112112
</div>
113113
</div>
114114
<div class="row">
@@ -321,7 +321,7 @@ <h5>Update an existing site</h5>
321321
<form id="createClientForm">
322322
<div class="card card-body">
323323
<div class="form-group">
324-
<h5>Create a new client</h5>
324+
<h5>Create a new client API Key</h5>
325325

326326
<div>
327327
<label for="createClient-workflow-name">Name:</label>
@@ -342,20 +342,20 @@ <h5>Create a new client</h5>
342342
class="form-check-input" name="createClient-workflow-roles[]"
343343
value="GENERATOR">
344344
<label for="createClient-workflow-roles-GENERATOR">GENERATOR - for
345-
publishers123</label>
345+
publishers</label>
346346
</div>
347347
<div class="form-check">
348348
<input type="checkbox" id="createClient-workflow-roles-MAPPER"
349349
class="form-check-input" name="createClient-workflow-roles[]"
350350
value="MAPPER">
351-
<label for="createClient-workflow-roles-GENERATOR">MAPPER - for
351+
<label for="createClient-workflow-roles-MAPPER">MAPPER - for
352352
publishers</label>
353353
</div>
354354
<div class="form-check">
355355
<input type="checkbox" id="createClient-workflow-roles-ID_READER"
356356
class="form-check-input" name="createClient-workflow-roles[]"
357357
value="ID_READER">
358-
<label for="createClient-workflow-roles-GENERATOR">ID_READER - for
358+
<label for="createClient-workflow-roles-ID_READER">ID_READER - for
359359
advertisers, data providers</label>
360360
</div>
361361
<div class="form-check pt-3 pb-2">
@@ -582,9 +582,11 @@ <h5>Create a new client</h5>
582582
});
583583

584584
const search = (name) => {
585+
clearFormsAndShowCollapsed([]);
585586
$("#searchSiteNoSiteFoundAlert").collapse('hide');
586587
$("#searchSiteErrorAlert").collapse('hide');
587588
$("#searchResultsTableBody").empty();
589+
588590

589591
doApiCallWithCallback("GET", "/api/site/list", (text) => {
590592
const searchList = JSON.parse(text);

webroot/adm/oncall/generate-cstg-keypair.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h4>Instructions</h4>
3838
<div class="row">
3939
<div class="col">
4040
<ol>
41-
<li>First seach for a participant with the requested name from the Jira ticket.</li>
41+
<li>Search for a participant with the requested name from the Jira ticket.</li>
4242
<li>If a site exists use the Site Id to update the site if necessary.</li>
4343
<li>Use the Site Id to create a CSTG key pair if necessary.</li>
4444
</ol>
@@ -102,7 +102,7 @@ <h5>Search Results:</h5>
102102
<div class="row pt-1">
103103
<div class="col">
104104
<div class="row">
105-
<h5>Update Operations:</h5>
105+
<h5>Create / Update Operations:</h5>
106106
</div>
107107
<div class="row py-2">
108108
<div>
@@ -360,6 +360,7 @@ <h5>Create a new CSTG Pair</h5>
360360

361361
$(document).ready(() => {
362362
$("#searchParticipant").on("click", () => {
363+
clearFormsAndShowCollapsed([]);
363364
$("#searchSiteNoSiteFoundAlert").collapse('hide');
364365
$("#searchSiteErrorAlert").collapse('hide');
365366
$("#searchResultsTableBody").empty();
@@ -504,7 +505,7 @@ <h5>Create a new CSTG Pair</h5>
504505
const description = encodeURIComponent($("#updateSite-workflow-afterSearch-description").val());
505506

506507
const updateDomainNamesUrl = `/api/site/domain_names?id=${id}`;
507-
if (!currentClientTypesAfterSearch.includes('PUBLISHER') && publisherChecked) {
508+
if (!currentClientTypesAfterSearch.includes('PUBLISHER') && isPublisherChecked) {
508509
// update the site and add publisher client type
509510
currentClientTypesAfterSearch.push('PUBLISHER');
510511
const updateClientTypesUrl = `/api/site/set-types?id=${id}&types=${currentClientTypesAfterSearch.join(",")}`;

webroot/js/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ function clearFormsAndShowCollapsed(toShow) {
7070
$(".form-clear").not(exclude).text("");
7171
$("form").trigger("reset");
7272
$('.collapse').not(exclude).collapse('hide');
73+
$(".group").removeClass("btn-primary").addClass("btn-secondary");
7374

7475
setTimeout(function () {
7576
toShow.forEach((regionId) => {

0 commit comments

Comments
 (0)