+
+
+
UID2 Env - On-call - Generate CSTG Keypair
+
+
+
+
+
+
+
+
+ - Search for a participant with the requested name from the Jira ticket.
+ - If a site exists use the Site Id to update the site if necessary.
+ - Use the Site Id to create a CSTG key pair if necessary.
+
+
+
+
+
+
Search for existing participants:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No site found
+
+
+
+
+
+
+
+ | Sites |
+ CSTG Keypairs |
+
+
+
+
+
+
+
+
+
+
+
+
+
Create / Update Operations:
+
+
+
+ Use this to create new site, update existing sites or create new key pairs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webroot/adm/oncall/search.html b/webroot/adm/oncall/search.html
new file mode 100644
index 000000000..0a88c63f1
--- /dev/null
+++ b/webroot/adm/oncall/search.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
UID2 Env - On-call - Key and Secret Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webroot/adm/operator-key.html b/webroot/adm/operator-key.html
index 4b9570cfd..a74623be4 100644
--- a/webroot/adm/operator-key.html
+++ b/webroot/adm/operator-key.html
@@ -4,7 +4,7 @@
-
UID2 Admin - Operator Key Management
+
UID2 Env - Operator Key Management
Back
diff --git a/webroot/adm/partner-config.html b/webroot/adm/partner-config.html
index e1803860b..343bfa9ac 100644
--- a/webroot/adm/partner-config.html
+++ b/webroot/adm/partner-config.html
@@ -4,7 +4,7 @@
-
UID2 Admin - Partner Config
+
UID2 Env - Partner Config
Back
diff --git a/webroot/adm/salt.html b/webroot/adm/salt.html
index d4a0a3f41..479b26bf8 100644
--- a/webroot/adm/salt.html
+++ b/webroot/adm/salt.html
@@ -4,7 +4,7 @@
-
UID2 Admin - Salt Management
+
UID2 Env - Salt Management
Back
diff --git a/webroot/adm/search.html b/webroot/adm/search.html
deleted file mode 100644
index 6ef203f2a..000000000
--- a/webroot/adm/search.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
UID2 Admin - Key and Secret Search
-
-
Back
-
-
-
-
-
Inputs
-
-
-
-
Search
-
-
-
-
-
Output
-
-
-
-
-
-
-
diff --git a/webroot/adm/service-links.html b/webroot/adm/service-links.html
index c83e6be0e..29e28c8fe 100644
--- a/webroot/adm/service-links.html
+++ b/webroot/adm/service-links.html
@@ -4,7 +4,7 @@
-
UID2 Admin - Service Link Management
+
UID2 Env - Service Link Management
Back
diff --git a/webroot/adm/services.html b/webroot/adm/services.html
index 1cd6c1e20..031b623b5 100644
--- a/webroot/adm/services.html
+++ b/webroot/adm/services.html
@@ -4,7 +4,7 @@
-
UID2 Admin - Service Management
+
UID2 Env - Service Management
Back
diff --git a/webroot/adm/site.html b/webroot/adm/site.html
index 55f4c48cb..5cab7f5fb 100644
--- a/webroot/adm/site.html
+++ b/webroot/adm/site.html
@@ -5,7 +5,7 @@
-
UID2 Admin - Site Management
+
UID2 Env - Site Management
Back
diff --git a/webroot/css/copy.svg b/webroot/css/copy.svg
new file mode 100644
index 000000000..b59068028
--- /dev/null
+++ b/webroot/css/copy.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/webroot/css/style.css b/webroot/css/style.css
index bd3846a9e..0507ea180 100644
--- a/webroot/css/style.css
+++ b/webroot/css/style.css
@@ -1,4 +1,4 @@
.message {
font-weight: bold;
background-color: #FFFF00;
-}
\ No newline at end of file
+}
diff --git a/webroot/index.html b/webroot/index.html
index 2dc194e27..771da807e 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -4,7 +4,7 @@
-
UID2 Admin Site
+
UID2 Env Admin Site
Login
@@ -18,6 +18,15 @@
UID2 Admin Site
+
On-call Support Workflow
+
+
+
+
diff --git a/webroot/js/main.js b/webroot/js/main.js
index ddc4e2fdf..b788abdf8 100644
--- a/webroot/js/main.js
+++ b/webroot/js/main.js
@@ -1,19 +1,14 @@
function doApiCall(method, url, outputDiv, errorDiv, body) {
- $(outputDiv).text('');
- $(errorDiv).text('');
+ $(outputDiv).text("");
+ $(errorDiv).text("");
$.ajax({
type: method,
url: url,
- dataType: 'text',
- data : body,
- success: function (text) {
- const pretty = JSON.stringify(JSON.parse(text),null,2);
- $(outputDiv).text(pretty);
- },
- error: function (err) {
- standardErrorCallback(err, errorDiv)
- }
+ dataType: "text",
+ data: body,
+ success: text => setOutput(text, outputDiv),
+ error: err => standardErrorCallback(err, errorDiv)
});
}
@@ -21,38 +16,46 @@ function doApiCallWithCallback(method, url, onSuccess, onError, body) {
$.ajax({
type: method,
url: url,
- dataType: 'text',
- data : body,
- success: function (text) {
- onSuccess(text);
- },
- error: function (err) {
- standardErrorCallback(err, undefined, onError);
- }
+ dataType: "text",
+ data: body,
+ success: text => onSuccess(text),
+ error: err => onError(err)
});
}
-function errorCallback(err) { standardErrorCallback(err, '#errorOutput') }
+function setOutput(text, div) {
+ const pretty = JSON.stringify(JSON.parse(text), null, 2);
+ $(div).text(pretty);
+}
+
+function errorCallback(err) {
+ standardErrorCallback(err, "#errorOutput")
+}
function standardErrorCallback(err, errorDiv, onError) {
- if(err.getResponseHeader("REQUIRES_AUTH") == 1) {
- $('body').hide()
- $('body').replaceWith("Unauthorized, prompting reauthentication...")
- $('body').show()
+ if (err.getResponseHeader("REQUIRES_AUTH") == 1) {
+ $("body").hide()
+ $("body").replaceWith("Unauthorized, prompting reauthentication...")
+ $("body").show()
$(function () {
- setTimeout(function() {
+ setTimeout(function () {
window.location.replace("/login");
}, 3000);
});
} else {
- if(onError === undefined) {
- $(errorDiv).text('Error: ' + err.status + ': ' + (isJsonString(err.responseText) ? JSON.parse(err.responseText).message : (err.responseText ? err.responseText : err.statusText)));
+ if (onError === undefined) {
+ $(errorDiv).text("Error: " + err.status + ": " + (isJsonString(err.responseText) ? JSON.parse(err.responseText).message : (err.responseText ? err.responseText : err.statusText)));
} else {
onError(err);
}
}
}
+function alertErrorCallback(err, errorDiv, alert) {
+ $(errorDiv).text("Error: " + err.status + ": " + (isJsonString(err.responseText) ? JSON.parse(err.responseText).message : (err.responseText ? err.responseText : err.statusText)));
+ $(alert).collapse('show');
+}
+
function isJsonString(str) {
try {
JSON.parse(str);
@@ -62,37 +65,75 @@ function isJsonString(str) {
return true;
}
+function clearFormsAndShowCollapsed(toShow) {
+ const exclude = toShow.join(',');
+ $(".form-clear").not(exclude).text("");
+ $("form").trigger("reset");
+ $('.collapse').not(exclude).collapse('hide');
+ $(".group").removeClass("btn-primary").addClass("btn-secondary");
+
+ setTimeout(function () {
+ toShow.forEach((regionId) => {
+ $(regionId).collapse('show');
+ })
+ }, 400); // the collapse takes 350ms, so wait until all are done before showing them
+}
+
function init() {
$.ajax({
- type: 'GET',
- url: '/api/userinfo',
- dataType: 'text',
+ type: "GET",
+ url: "/api/userinfo",
+ dataType: "text",
success: function (text) {
- var u = JSON.parse(text);
- $('#loginEmail').text(u.email);
- $('.authed').show();
- if (u.groups.findIndex(e => e === 'developer' || e === 'developer-elevated' || e === 'infra-admin' || e === 'admin') >= 0) {
- $('.ro-cki').show();
- $('.ro-opm').show();
- $('.ro-adm').show();
- $('.ro-sem').show();
+ const u = JSON.parse(text);
+
+ $("#loginEmail").text(u.email);
+ $(".authed").show();
+
+ if (u.groups.findIndex(e => e === "developer" || e === "developer-elevated" || e === "infra-admin" || e === "admin") >= 0) {
+ $(".ro-cki").show();
+ $(".ro-opm").show();
+ $(".ro-adm").show();
+ $(".ro-sem").show();
}
if (u.groups.length === 0) {
- $('.ro-nil').show();
+ $(".ro-nil").show();
}
},
- error: function (err) {
- // alert('Error: ' + err.status + ': ' + JSON.parse(err).message);
- $('.notauthed').show();
+ error: err => {
+ // alert("Error: " + err.status + ": " + JSON.parse(err).message);
+ $(".notauthed").show();
}
});
- $(document).ready(function () {
- if (window.location.origin.endsWith('.eu')) {
- let header = $("h1").first();
+ $(document).ready(() => {
+ const header = $("h1").first();
+
+ if (window.location.origin.includes("prod")) {
+ header.text(header.text().replace("Env", "Prod"));
+ } else if (window.location.origin.includes("integ")) {
+ header.text(header.text().replace("Env", "Integ"));
+ } else if (window.location.origin.includes("localhost") || (window.location.origin.includes("127.0.0.1"))) {
+ header.text(header.text().replace("Env", "Local"));
+ } else {
+ header.text(header.text().replace("Env", ""));
+ }
+
+ if (window.location.origin.endsWith(".eu")) {
header.text(header.text().replace("UID2", "EUID"));
}
+
+ $(".group").on("click", (e) => {
+ $(".group").removeClass("btn-primary").addClass("btn-secondary");
+
+ if ($("#" + e.target.id).attr("aria-expanded") == "false") {
+ $("#" + e.target.id).removeClass("btn-primary").addClass("btn-secondary");
+ } else {
+ $("#" + e.target.id).removeClass("btn-secondary").addClass("btn-primary");
+ }
+ })
});
+
}
-init();
+init();
\ No newline at end of file