wiring up AWS and GCP

This commit is contained in:
Tyler 2021-06-25 00:45:55 -05:00
parent fbbb8469d4
commit 1bc57aeb92
1 changed files with 257 additions and 52 deletions

View File

@ -17,7 +17,8 @@ document.body.appendChild(zNode);
var auxHTML = '<center><button id="applyButton" type="button">Apply Selection</button><button id="resetButton" type="button">Reset Form</button><center>';
var debugFlag = true;
var debugFlag = false;
var currentMode = "";
//azure status page controls
if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// render initial HTML
@ -350,13 +351,13 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// profile management functions
function loadDataplanes() {
currentMode = "dataplane";
console.log("Loading Azure dataplanes profile");
var dataplaneHTML = '<center><button id="canadacentralButton" style="width:234px" type="button">Canada Central</button><button id="canadaeastButton" style="width:234px" type="button">Canada East</button></br><button id="centralindiaButton" style="width:156px" type="button">Central India</button><button id="southindiaButton" style="width:156px" type="button">South India</button><button id="westindiaButton" style="width:156px" type="button">West India</button></br><button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button><button id="norwayeastButton" style="width:234px" type="button">Norway East</button></br></br><button id="westusButton" style="width:156px" type="button">West US</button><button id="westus2Button" style="width:156px" type="button">West US 2</button><button id="southcentralusButton" style="width:156px" type="button">South Central US</button></br></br><button id="westeuropeButton" style="width:117px" type="button">West Europe</button><button id="northeuropeButton" style="width:117px" type="button">North Europe</button><button id="ukwestButton" style="width:117px" type="button">UK West</button><button id="uksouthButton" style="width:117px" type="button">UK South</button><br><button id="southafricanorthButton" style="width:234px" type="button">South Africa North</button><button id="uaenorthButton" style="width:234px" type="button">UAE North</button></br></br><button id="australiaeastButton" style="width:156px" type="button">Australia East</button><button id="australiacentralButton" style="width:156px" type="button">Australia Central</button><button id="australiacentral2Button" style="width:156px" type="button">Australia Central 2</button></br><button id="australiasoutheastButton" style="width:138px" type="button">Australia Southeast</button><button id="japaneastButton" style="width:110px" type="button">Japan East</button><button id="japanwestButton" style="width:110px" type="button">Japan West</button><button id="koreacentralButton" style="width:110px" type="button">Korea Central</button></br><button id="southeastasiaButton" style="width:234px" type="button">Southeast Asia</button><button id="eastasiaButton" style="width:234px" type="button">East Asia</button></br></br><button id="brazilsouthButton" style="width:156px" type="button">Brazil South</button><button id="eastus2Button" style="width:156px" type="button">East US 2</button><button id="eastusButton" style="width:156px" type="button">East US</button></br><button id="centralusButton" style="width:156px" type="button">Central US</button><button id="northcentralusButton" style="width:156px" type="button">North Central US</button><button id="francecentralButton" style="width:156px" type="button">France Central</button></br></br><button id="chinanorth2Button" style="width:117px" type="button">China North 2</button><button id="chinaeast2Button" style="width:117px" type="button">China East 2</button><button id="usgovvirginiaButton" style="width:117px" type="button">US Gov Virginia</button><button id="usgovarizonaButton" style="width:117px" type="button">US Gov Arizona</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + dataplaneHTML + '<hr class="solid">' + componentsHTML +
auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
// array of active buttons
@ -428,11 +429,12 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function loadControlplanes() {
currentMode = "controlplane";
console.log("Loading Azure controlplanes profile");
var controlplaneHTML = '<center><button id="canadacentralButton" style="width:234px" type="button">Canada Central</button><button id="centralindiaButton" style="width:234px" type="button">Central India</button></br><button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button><button id="norwayeastButton" style="width:234px" type="button">Norway East</button></br></br><button id="westusButton" style="width:468px" type="button">West US</button></br></br><button id="westeuropeButton" style="width:234px" type="button">West Europe</button><button id="ukwestButton" style="width:234px" type="button">UK West</button></br><button id="southafricanorthButton" style="width:234px" type="button">South Africa North</button><button id="uaenorthButton" style="width:234px" type="button">UAE North</button></br></br><button id="australiaeastButton" style="width:117px" type="button">Australia East</button><button id="japaneastButton" style="width:117px" type="button">Japan East</button><button id="koreacentralButton" style="width:117px" type="button">Korea Central</button><button id="southeastasiaButton" style="width:117px" type="button">Southeast Asia</button></br></br><button id="brazilsouthButton" style="width:156px" type="button">Brazil South</button><button id="eastus2Button" style="width:156px" type="button">East US 2</button><button id="francecentralButton" style="width:156px" type="button">France Central</button></br></br><button id="chinanorth2Button" style="width:117px" type="button">China North 2</button><button id="chinaeast2Button" style="width:117px" type="button">China East 2</button><button id="usgovvirginiaButton" style="width:117px" type="button">US Gov Virginia</button><button id="usgovarizonaButton" style="width:117px" type="button">US Gov Arizona</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + controlplaneHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
// array of active buttons
@ -487,12 +489,13 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function loadStages() {
currentMode = "stage";
console.log("Loading Azure stages profile");
var stagesHTML = '<center><button id="stage1Button" style="width:94px" type="button">Stage-1</button><button id="stage1point5Button" style="width:94px" type="button">Stage-1.5</button><button id="stage2Button" style="width:92px" type="button">Stage-2</button><button id="stage3amButton" style="width:94px" type="button">Stage-3AM</button><button id="stage3pmButton" style="width:94px" type="button">Stage-3PM</button></br><button id="stagegovcloudButton" style="width:234px" type="button">Govcloud</button><button id="stagemooncakeButton" style="width:234px" type="button">Mooncake</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + stagesHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
// array of active buttons
@ -530,15 +533,17 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function shrink() {
currentMode = "";
zNode.innerHTML = profilesHTML
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
document.getElementById("dataplanesButton").addEventListener("click", dataplanesButtonClickAction, false);
document.getElementById("stagesButton").addEventListener("click", stagesButtonClickAction, false);
document.getElementById("shrinkButton").addEventListener("click", shrinkButtonClickAction, false);
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
};
};
@ -550,7 +555,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
'Dataplanes</button> <button id="shrinkButton" type="button">Shrink</button> <button id="debugButton" type="button">Debug</button></center>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
document.getElementById("dataplanesButton").addEventListener("click", dataplanesButtonClickAction, false);
@ -583,6 +588,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
var odbcGroup = $("div.form-group").filter(":contains('ODBC/JDBC Service')");
var webappGroup = $("div.form-group").filter(":contains('User Interface')");
var sqlGroup = $("div.form-group").filter(":contains('Databricks SQL')");
var ceGroup = $("div.form-group").filter(":contains('Community Edition')");
// write component HTML template
var componentsHTML = '<center><button id="allComponentsButton" type="button">AllComponents</button> <button id="apiButton" type="button">API</button>' +
@ -641,50 +647,83 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
toggleRegion("eu-west-1");
toggleButtonColor("euwest1Button");
};
function canadacentralCPButtonClickAction(zEvent) {
toggleRegion("canadacentral");
toggleRegion("canadaeast");
toggleButtonColor("canadacentralButton");
};
function ceButtonClickAction(zEvent) {
toggleButtonColor("ceButton");
toggleCe();
};
function selectCe() {
ceFlag = true;
if (debugFlag = true) {
console.log("DEBUG: ceFlag = " + ceFlag);
};
function stage1ButtonClickAction(zEvent) {
toggleRegion("ca-central-1");
toggleRegion("eu-central-1");
toggleRegion("eu-west-2");
toggleCe();
toggleButtonColor("stage1Button");
};
function deselectCe() {
ceFlag = false;
function stage2ButtonClickAction(zEvent) {
toggleRegion("us-west-2");
toggleRegion("us-west-1");
toggleRegion("us-east-1");
toggleRegion("us-east-2");
toggleButtonColor("stage2Button");
};
function toggleCe() {
if (checkCe == false) {
selectCe();
} else {
deselectCe();
}
function stage3amButtonClickAction(zEvent) {
toggleRegion("ap-south-1");
toggleRegion("ap-southeast-2");
toggleRegion("ap-northeast-1");
toggleButtonColor("stage3amButton");
};
function checkCe() {
var status = ceFlag;
return status;
function stage3pmButtonClickAction(zEvent) {
toggleRegion("eu-west-1");
toggleButtonColor("stage3pmButton");
};
// component functions
function authButtonClickAction(zEvent) {
toggleComponent("auth");
toggleButtonColor("authButton");
};
function apiButtonClickAction(zEvent) {
toggleComponent("api");
toggleButtonColor("apiButton");
};
function computeButtonClickAction(zEvent) {
toggleComponent("compute");
toggleButtonColor("computeButton");
};
function jobsButtonClickAction(zEvent) {
toggleComponent("jobs");
toggleButtonColor("jobsButton");
};
function odbcButtonClickAction(zEvent) {
toggleComponent("odbc");
toggleButtonColor("odbcButton");
};
function webappButtonClickAction(zEvent) {
toggleComponent("webapp");
toggleButtonColor("webappButton");
};
function sqlButtonClickAction(zEvent) {
toggleComponent("sql");
toggleButtonColor("sqlButton");
};
// profile management functions
function loadDataplanes() {
currentMode = "dataplane";
console.log("Loading AWS dataplanes profile");
var dataplaneHTML = '<center><button id="ceButton" style="width:117px" type="button">CE</button><button id="cacentral1Button" style="width:117px" type="button">ca-central-1</button><button id="eucentral1Button" style="width:117px" type="button">eu-central-1</button><button id="euwest2Button" style="width:117px" type="button">eu-west-2</button></br></br><button id="uswest2Button" style="width:234px" type="button">us-west-2</button><button id="uswest1Button" style="width:234px" type="button">us-west-1</button></br><button id="useast1Button" style="width:234px" type="button">us-east-1</button><button id="useast2Button" style="width:234px" type="button">us-east-2</button></br></br><button id="apsouth1Button" style="width:156px" type="button">ap-south-1</button><button id="apsoutheast2Button" style="width:156px" type="button">ap-southeast-2</button><button id="apnortheast1Button" style="width:156px" type="button">ap-northeast-1</button></br></br><button id="euwest1Button" style="width:468px" type="button">eu-west-1</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + dataplaneHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
// array of active buttons
buttonArray = ["CE", "ca-central-1", "eu-central-1", "eu-west-2", "us-west-2", "us-east-1", "us-east-2", "ap-south-1",
"ap-southeast-2", "ap-northeast-1", "eu-west-1"];
//reset();
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "uswest1", "useast1", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
// clear everything on profile load
reset();
// regional listeners
document.getElementById("cacentral1Button").addEventListener("click", cacentral1ButtonClickAction, false);
document.getElementById("eucentral1Button").addEventListener("click", eucentral1ButtonClickAction, false);
@ -721,20 +760,20 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function loadControlplanes() {
currentMode = "controlplane";
console.log("Loading AWS controlplanes profile");
var controlplaneHTML = '<center><button id="ceButton" style="width:117px" type="button">CE</button><button id="cacentral1Button" style="width:117px" type="button">ca-central-1</button><button id="eucentral1Button" style="width:117px" type="button">eu-central-1</button><button id="euwest2Button" style="width:117px" type="button">eu-west-2</button></br></br><button id="uswest2Button" style="width:156px" type="button">us-west-2</button><button id="useast1Button" style="width:156px" type="button">us-east-1</button><button id="useast2Button" style="width:156px" type="button">us-east-2</button></br></br><button id="apsouth1Button" style="width:156px" type="button">ap-south-1</button><button id="apsoutheast2Button" style="width:156px" type="button">ap-southeast-2</button><button id="apnortheast1Button" style="width:156px" type="button">ap-northeast-1</button></br></br><button id="euwest1Button" style="width:468px" type="button">eu-west-1</button></center>';
var controlplaneHTML = '<center><button id="ceButton" style="width:117px" type="button">CE</button><button id="cacentral1Button" style="width:117px" type="button">ca-central-1</button><button id="eucentral1Button" style="width:117px" type="button">eu-central-1</button><button id="euwest2Button" style="width:117px" type="button">eu-west-2</button></br></br><button id="uswest2Button" style="width:234px" type="button">us-west-2</button><button id="useast2Button" style="width:234px" type="button">us-east-2</button></br></br><button id="apsouth1Button" style="width:156px" type="button">ap-south-1</button><button id="apsoutheast2Button" style="width:156px" type="button">ap-southeast-2</button><button id="apnortheast1Button" style="width:156px" type="button">ap-northeast-1</button></br></br><button id="euwest1Button" style="width:468px" type="button">eu-west-1</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + controlplaneHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
// array of active buttons
buttonArray = ["canadacentral", "centralindia", "switzerlandnorth", "norwayeast", "westus", "westeurope","ukwest", "southafricanorth",
"uaenorth", "australiaeast", "japaneast", "koreacentral", "southeastasia", "brazilsouth", "eastus2", "francecentral",
"chinanorth2", "chinaeast2", "usgovvirginia", "usgovarizona"];
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
// clear everything on profile load
//reset();
reset();
// regional listeners
// document.getElementById("canadacentralButton").addEventListener("click", canadacentralCPButtonClickAction, false);
@ -742,12 +781,12 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("eucentral1Button").addEventListener("click", eucentral1ButtonClickAction, false);
document.getElementById("euwest2Button").addEventListener("click", euwest2ButtonClickAction, false);
document.getElementById("uswest2Button").addEventListener("click", uswest2CPButtonClickAction, false);
document.getElementById("useast1Button").addEventListener("click", useast1ButtonClickAction, false);
document.getElementById("useast2Button").addEventListener("click", useast2ButtonClickAction, false);
document.getElementById("apsouth1Button").addEventListener("click", apsouth1ButtonClickAction, false);
document.getElementById("apsoutheast2Button").addEventListener("click", apsoutheast2ButtonClickAction, false);
document.getElementById("apnortheast1Button").addEventListener("click", apnortheast1ButtonClickAction, false);
document.getElementById("euwest1Button").addEventListener("click", euwest1ButtonClickAction, false);
document.getElementById("ceButton").addEventListener("click", ceButtonClickAction, false);
// profile listeners
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
@ -771,20 +810,26 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function loadStages() {
currentMode = "stage";
console.log("Loading AWS stages profile");
var stagesHTML = '<center><button id="stage1Button" style="width:117px" type="button">Stage-1</button><button id="stage2Button" style="width:117px" type="button">Stage-2</button><button id="stage3amButton" style="width:117px" type="button">Stage-3 AM</button><button id="stage3pmButton" style="width:117px" type="button">Stage-3 PM</button></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + stagesHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
}
// array of active buttons
buttonArray = ["stage1", "stage1point5", "stage2", "stage3am", "stage3pm", "stagegovcloud", "stagemooncake"];
// reset();
buttonArray = ["stage1", "stage2", "stage3am", "stage3pm"];
// clear everything on profile load
reset();
// regional listeners
//document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false);
document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false);
document.getElementById("stage2Button").addEventListener("click", stage2ButtonClickAction, false);
document.getElementById("stage3amButton").addEventListener("click", stage3amButtonClickAction, false);
document.getElementById("stage3pmButton").addEventListener("click", stage3pmButtonClickAction, false);
// profile listeners
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
@ -807,9 +852,10 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
function shrink() {
currentMode = "";
zNode.innerHTML = profilesHTML
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
@ -824,11 +870,135 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
// render initial HTML
var profilesHTML = '<center><button id="controlplanesButton" type="button">Controlplanes</button> ' +
'<button id="stagesButton" type="button">Stages</button> <button id="dataplanesButton" type="button">' +
'Dataplanes</button> <button id="shrinkButton" type="button">Shrink</button> <button id="debugButton" type="button">Debug</button></center>';
'<button id="stagesButton" type="button">Stages</button>' +
' <button id="shrinkButton" type="button">Shrink</button> <button id="debugButton" type="button">Debug</button></center>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
toggleButtonColor("debugButton");
};
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
document.getElementById("stagesButton").addEventListener("click", stagesButtonClickAction, false);
document.getElementById("shrinkButton").addEventListener("click", shrinkButtonClickAction, false);
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
// initialize azure component and region variables
var componentArray = ["api", "auth", "compute", "jobs", "odbc", "webapp"];
var regionArray = ["us-west1", "us-central1", "europe-west2", "us-west4"];
var buttonArray = [];
var selectedComponents = new Map();
var selectedRegions = new Map();
for (i = 0; i < componentArray.length; i++) {
selectedComponents.set(componentArray[i], false);
};
for (i = 0; i < regionArray.length; i++) {
selectedRegions.set(regionArray[i], false);
};
// init component div groups
var apiGroup = $("div.form-group").filter(":contains('API Service')");
var authGroup = $("div.form-group").filter(":contains('Authentication')");
var computeGroup = $("div.form-group").filter(":contains('Compute Service')");
var jobsGroup = $("div.form-group").filter(":contains('Jobs Service')");
var odbcGroup = $("div.form-group").filter(":contains('ODBC/JDBC Service')");
var webappGroup = $("div.form-group").filter(":contains('User Interface')");
// write component HTML template
var componentsHTML = '<center><button id="allComponentsButton" type="button">AllComponents</button> <button id="apiButton" type="button">API</button>' +
'<button id="authButton">Auth</button><button id="computeButton" type="button">Compute</button><button id="jobsButton" type="button">Jobs</button>' +
'<button id="odbcButton" type="button">ODBC/JDBC</button><button id="webappButton" type="button">Webapp</button>' +
'</center></br></br>';
// regional functions
function uswest1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleButtonColor("uswest1Button");
};
function uscentral1ButtonClickAction(zEvent) {
toggleRegion("us-central1");
toggleButtonColor("uscentral1Button");
};
function europewest2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleButtonColor("europewest2Button");
};
function uswest4ButtonClickAction(zEvent) {
toggleRegion("us-west4");
toggleButtonColor("uswest4Button");
};
function stage1ButtonClickAction(zEvent) {
toggleRegion("uswest1");
toggleRegion("uscentral1");
toggleRegion("europewest2");
toggleRegion("uswest4");
toggleButtonColor("stage1Button");
};
// component functions
function authButtonClickAction(zEvent) {
toggleComponent("auth");
toggleButtonColor("authButton");
};
function apiButtonClickAction(zEvent) {
toggleComponent("api");
toggleButtonColor("apiButton");
};
function computeButtonClickAction(zEvent) {
toggleComponent("compute");
toggleButtonColor("computeButton");
};
function jobsButtonClickAction(zEvent) {
toggleComponent("jobs");
toggleButtonColor("jobsButton");
};
function odbcButtonClickAction(zEvent) {
toggleComponent("odbc");
toggleButtonColor("odbcButton");
};
function webappButtonClickAction(zEvent) {
toggleComponent("webapp");
toggleButtonColor("webappButton");
};
function loadControlplanes() {
currentMode = "controlplane";
console.log("Loading GCP controlplanes profile");
var controlplaneHTML = '<center><button id="uswest1Button" style="width:117px" type="button">US-West1</button><button id="uscentral1Button" style="width:117px" type="button">US-Central1</button><button id="europewest2Button" style="width:117px" type="button">EU-West2</button><button id="uswest4Button" style="width:117px" type="button">US-West4</button></br></center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + controlplaneHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
toggleButtonColor("debugButton");
};
// array of active buttons
buttonArray = ["uswest1", "uscentral1", "europewest2", "uswest4"];
// clear everything on profile load
reset();
// regional listeners
document.getElementById("uswest1Button").addEventListener("click", uswest1ButtonClickAction, false);
document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false);
document.getElementById("europewest2Button").addEventListener("click", europewest2ButtonClickAction, false);
document.getElementById("uswest4Button").addEventListener("click", uswest4ButtonClickAction, false);
// profile listeners
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
document.getElementById("stagesButton").addEventListener("click", stagesButtonClickAction, false);
document.getElementById("shrinkButton").addEventListener("click", shrinkButtonClickAction, false);
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
// component listeners
document.getElementById("apiButton").addEventListener("click", apiButtonClickAction, false);
document.getElementById("authButton").addEventListener("click", authButtonClickAction, false);
document.getElementById("computeButton").addEventListener("click", computeButtonClickAction, false);
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
// aux listeners
document.getElementById("resetButton").addEventListener("click", resetButtonClickAction, false);
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
};
};
@ -906,13 +1076,13 @@ function checkRegion(region) {
};
function selectComponent(component) {
selectedComponents.set(component, true);
if (debugFlag = true) {
if (debugFlag == true) {
console.log(selectedComponents);
}
};
function deselectComponent(component) {
selectedComponents.set(component, false);
if (debugFlag = true) {
if (debugFlag == true) {
console.log(selectedComponents);
};
};
@ -925,13 +1095,13 @@ function toggleRegion(region) {
};
function selectRegion(region) {
selectedRegions.set(region, true);
if (debugFlag = true) {
if (debugFlag == true) {
console.log(selectedRegions);
};
};
function deselectRegion(region) {
selectedRegions.set(region, false);
if (debugFlag = true) {
if (debugFlag == true) {
console.log(selectedRegions);
};
};
@ -965,6 +1135,15 @@ function apply() {
}
}
}
if (typeof ceFlag != 'undefined') {
var checkboxStr = `$("div.form-group").filter(":contains('Community Edition')").children().slice(1).children().children().children().children().children()`;
var checkbox = eval(checkboxStr);
if (checkCe() == true) {
selectCheckbox(checkbox);
} else {
deselectCheckbox(checkbox);
}
}
};
function reset() {
for (i = 0; i < componentArray.length; i++) {
@ -982,6 +1161,12 @@ function reset() {
var region = regionArray[i];
deselectRegion(region);
};
if (typeof ceFlag != 'undefined') {
deselectCe();
if (currentMode != 'stage') {
clearButtonColor("ceButton");
};
}
apply();
};
function checkDebug() {
@ -989,7 +1174,7 @@ function checkDebug() {
return status;
};
function toggleDebug() {
if (checkDebug == false) {
if (checkDebug() == false) {
enableDebug();
} else {
disableDebug();
@ -1003,3 +1188,23 @@ function disableDebug() {
debugFlag = false;
console.log("DEBUG logging disabled");
};
function selectCe() {
ceFlag = true;
if (debugFlag == true) {
console.log("DEBUG: ceFlag = " + ceFlag);
};
};
function deselectCe() {
ceFlag = false;
};
function toggleCe() {
if (checkCe() == false) {
selectCe();
} else {
deselectCe();
}
};
function checkCe() {
var status = ceFlag;
return status;
};