add missing regions; refactor for legibility

This commit is contained in:
Tyler 2021-10-19 12:34:41 -05:00
parent 80febd7e36
commit 9adf186a4f
2 changed files with 1171 additions and 145 deletions

View File

@ -14,16 +14,31 @@ var zNode = document.createElement('div');
zNode.setAttribute('id', 'myContainer');
document.body.appendChild(zNode);
var auxHTML = '<center><button id="applyButton" type="button">Apply Selection</button><button id="resetButton" type="button">Reset Form</button><center>';
// max region button width 468px
var auxHTML = '<center>' +
'<button id="applyButton" type="button">Apply Selection</button>' +
'<button id="resetButton" type="button">Reset Form</button>' +
'<center>';
var debugFlag = false;
var currentMode = "";
//azure status page controls
if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -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>';
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>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
@ -36,12 +51,54 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
// initialize azure component and region variables
var componentArray = ["api", "auth", "compute", "jobs", "odbc", "webapp", "sql"];
var regionArray = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "switzerlandnorth", "norwayeast", "germanywestcentral", "westus2",
"westus", "southcentralus", "westeurope", "northeurope", "ukwest", "uksouth", "southafricanorth", "uaenorth", "australiaeast",
"australiacentral", "australiacentral2", "australiasoutheast", "japaneast", "japanwest", "koreacentral", "southeastasia",
"eastasia", "brazilsouth", "eastus2", "eastus","centralus", "northcentralus", "francecentral", "chinanorth2", "chinaeast2",
"usgovvirginia", "usgovarizona"];
var componentArray = [
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"australiacentral",
"australiacentral2",
"australiaeast",
"australiasoutheast",
"brazilsouth",
"canadacentral",
"canadaeast",
"centralindia",
"centralus",
"chinaeast2",
"chinanorth2",
"eastasia",
"eastus",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"japanwest",
"koreacentral",
"northcentralus",
"northeurope",
"norwayeast",
"southafricanorth",
"southcentralus",
"southeastasia",
"southindia",
"switzerlandnorth",
"uaenorth",
"uksouth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westeurope",
"westus",
"westus2",
"westindia"
];
var buttonArray = [];
// create tracking maps
@ -64,10 +121,17 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
var sqlGroup = $("div.form-group").filter(":contains('Databricks SQL')");
// 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>' +
'<button id="sqlButton" type="button">SQL</button></center></br></br>';
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br></br>';
// regional functions
function canadaeastButtonClickAction(zEvent) {
@ -357,7 +421,57 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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><button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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>';
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>' +
'<button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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) {
@ -365,15 +479,47 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
};
// array of active buttons
buttonArray = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia",
"switzerlandnorth", "norwayeast", "germanywestcentral", "westus2", "westus", "southcentralus",
"westeurope", "northeurope", "ukwest", "uksouth", "southafricanorth",
"uaenorth", "australiaeast", "australiacentral", "australiacentral2",
"australiasoutheast", "japaneast", "japanwest", "koreacentral",
"southeastasia", "eastasia", "brazilsouth", "eastus2", "eastus",
"centralus", "northcentralus", "francecentral", "chinanorth2", "chinaeast2",
"usgovvirginia", "usgovarizona"];
buttonArray = [
"australiacentral",
"australiacentral2",
"australiaeast",
"australiasoutheast",
"brazilsouth",
"canadacentral",
"canadaeast",
"centralindia",
"centralus",
"chinaeast2",
"chinanorth2",
"eastasia",
"eastus",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"japanwest",
"koreacentral",
"northcentralus",
"northeurope",
"norwayeast",
"southafricanorth",
"southcentralus",
"southeastasia",
"southindia",
"switzerlandnorth",
"uaenorth",
"uksouth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westindia",
"westeurope",
"westus",
"westus2"
];
reset();
// regional listeners
document.getElementById("canadacentralButton").addEventListener("click", canadacentralButtonClickAction, false);
document.getElementById("canadaeastButton").addEventListener("click", canadaeastButtonClickAction, false);
@ -436,16 +582,67 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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><button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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>';
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>' +
'<button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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");
};
// array of active buttons
buttonArray = ["canadacentral", "centralindia", "switzerlandnorth", "norwayeast", "germanywestcentral", "westus", "westeurope","ukwest", "southafricanorth",
"uaenorth", "australiaeast", "japaneast", "koreacentral", "southeastasia", "brazilsouth", "eastus2", "francecentral",
"chinanorth2", "chinaeast2", "usgovvirginia", "usgovarizona"];
buttonArray = [
"australiaeast",
"brazilsouth",
"canadacentral",
"centralindia",
"chinaeast2",
"chinanorth2",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"koreacentral",
"norwayeast",
"southafricanorth",
"southeastasia",
"switzerlandnorth",
"uaenorth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westeurope",
"westus"
];
// clear everything on profile load
reset();
@ -497,7 +694,16 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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>';
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) {
@ -505,7 +711,16 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
};
// array of active buttons
buttonArray = ["stage1", "stage1point5", "stage2", "stage3am", "stage3pm", "stagegovcloud", "stagemooncake"];
buttonArray = [
"stage1",
"stage1point5",
"stage2",
"stage3am",
"stage3pm",
"stagegovcloud",
"stagemooncake"
];
reset();
// regional listeners
@ -556,9 +771,18 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// aws status page controls
if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -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>';
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>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor("debugButton");
@ -569,10 +793,30 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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", "sql"];
var regionArray = ["us-west-1", "us-west-2", "us-east-1", "us-east-2", "sa-east-1", "eu-west-1", "eu-west-2", "eu-central-1",
"ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ca-central-1"];
// initialize aws component and region variables
var componentArray = [
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"ap-northeast-1",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2"
];
var buttonArray = [];
var ceFlag = false;
@ -597,10 +841,17 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>' +
'<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>' +
'<button id="sqlButton" type="button">SQL</button></center></br>';
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br>';
// regional functions
function cacentral1ButtonClickAction(zEvent) {
@ -641,6 +892,10 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
toggleRegion("ap-south-1");
toggleButtonColor("apsouth1Button");
};
function apsoutheast1ButtonClickAction(zEvent) {
toggleRegion("ap-southeast-1");
toggleButtonColor("apsoutheast1Button");
};
function apsoutheast2ButtonClickAction(zEvent) {
toggleRegion("ap-southeast-2");
toggleButtonColor("apsoutheast2Button");
@ -669,6 +924,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
toggleRegion("us-west-1");
toggleRegion("us-east-1");
toggleRegion("us-east-2");
toggleRegion("ap-southeast-1");
toggleButtonColor("stage2Button");
};
function stage3amButtonClickAction(zEvent) {
@ -716,7 +972,26 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>';
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>' +
'<button id="apsoutheast1Button" style="width:468px" type="button">ap-southeast-1</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) {
@ -724,8 +999,21 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
};
// array of active buttons
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "uswest1", "useast1", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
buttonArray = [
"apnortheast1",
"apsouth1",
"apsoutheast1",
"apsoutheast2",
"ce",
"cacentral1",
"eucentral1",
"euwest1",
"euwest2",
"useast1",
"useast2",
"uswest2",
"uswest1"
];
// clear everything on profile load
reset();
@ -739,6 +1027,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("useast1Button").addEventListener("click", useast1ButtonClickAction, false);
document.getElementById("useast2Button").addEventListener("click", useast2ButtonClickAction, false);
document.getElementById("apsouth1Button").addEventListener("click", apsouth1ButtonClickAction, false);
document.getElementById("apsoutheast1Button").addEventListener("click", apsoutheast1ButtonClickAction, false);
document.getElementById("apsoutheast2Button").addEventListener("click", apsoutheast2ButtonClickAction, false);
document.getElementById("apnortheast1Button").addEventListener("click", apnortheast1ButtonClickAction, false);
document.getElementById("euwest1Button").addEventListener("click", euwest1ButtonClickAction, false);
@ -768,15 +1057,42 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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: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>';
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="useast2Button" style="width:156px" type="button">us-east-2</button>' +
'<button id="apsoutheast1Button" style="width:156px" type="button">ap-southeast-1</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");
};
// array of active buttons
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
buttonArray = [
"apnortheast1",
"apsouth1",
"apsoutheast1",
"apsoutheast2",
"cacentral1",
"ce",
"eucentral1",
"euwest1",
"euwest2",
"useast2",
"uswest2",
];
// clear everything on profile load
reset();
@ -789,6 +1105,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("uswest2Button").addEventListener("click", uswest2CPButtonClickAction, false);
document.getElementById("useast2Button").addEventListener("click", useast2ButtonClickAction, false);
document.getElementById("apsouth1Button").addEventListener("click", apsouth1ButtonClickAction, false);
document.getElementById("apsoutheast1Button").addEventListener("click", apsoutheast1ButtonClickAction, false);
document.getElementById("apsoutheast2Button").addEventListener("click", apsoutheast2ButtonClickAction, false);
document.getElementById("apnortheast1Button").addEventListener("click", apnortheast1ButtonClickAction, false);
document.getElementById("euwest1Button").addEventListener("click", euwest1ButtonClickAction, false);
@ -818,7 +1135,12 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>';
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) {
@ -826,7 +1148,12 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
}
// array of active buttons
buttonArray = ["stage1", "stage2", "stage3am", "stage3pm"];
buttonArray = [
"stage1",
"stage2",
"stage3am",
"stage3pm"
];
// clear everything on profile load
reset();
@ -875,9 +1202,15 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
// gcp status page controls
if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
// render initial HTML
var profilesHTML = '<center><button id="controlplanesButton" type="button">Controlplanes</button> ' +
var profilesHTML = '<center>' +
'<button id="controlplanesButton" type="button">Controlplanes</button>' +
' ' +
'<button id="stagesButton" type="button">Stages</button>' +
' <button id="shrinkButton" type="button">Shrink</button> <button id="debugButton" type="button">Debug</button></center>';
' ' +
'<button id="shrinkButton" type="button">Shrink</button>' +
' ' +
'<button id="debugButton" type="button">Debug</button>' +
'</center>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor("debugButton");
@ -888,9 +1221,26 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
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"];
// initialize gcp component and region variables
var componentArray =[
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"australia-southeast1",
"europe-west1",
"europe-west2",
"us-central1",
"us-east1",
"us-east4",
"us-west1",
"us-west4"
];
var buttonArray = [];
var selectedComponents = new Map();
@ -909,37 +1259,80 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
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')");
var sqlGroup = $("div.form-group").filter(":contains('Databricks SQL')");
// 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>' +
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br></br>';
// regional functions
function uswest1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleButtonColor("uswest1Button");
// function asiasoutheast1ButtonClickAction(zEvent) {
// toggleRegion("asia-southeast1");
// toggleButtonColor("asiasoutheast1Button");
// };
function australiasoutheast1ButtonClickAction(zEvent) {
toggleRegion("australia-southeast1");
toggleButtonColor("australiasoutheast1Button");
};
function europewest1ButtonClickAction(zEvent) {
toggleRegion("europe-west1");
toggleButtonColor("europewest1Button");
};
function europewest2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleButtonColor("europewest2Button");
};
function uscentral1ButtonClickAction(zEvent) {
toggleRegion("us-central1");
toggleButtonColor("uscentral1Button");
};
function europewest2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleButtonColor("europewest2Button");
function useast1ButtonClickAction(zEvent) {
toggleRegion("us-east1");
toggleButtonColor("useast1Button");
};
function useast4ButtonClickAction(zEvent) {
toggleRegion("us-east4");
toggleButtonColor("useast4Button");
};
function uswest1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleButtonColor("uswest1Button");
};
function uswest4ButtonClickAction(zEvent) {
toggleRegion("us-west4");
toggleButtonColor("uswest4Button");
};
function stage1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleRegion("us-central1");
toggleRegion("europe-west2");
toggleRegion("us-west4");
toggleRegion("australia-southeast1");
toggleRegion("europe-west1");
toggleButtonColor("stage1Button");
};
function stage2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleRegion("us-central1");
toggleRegion("us-east1");
toggleRegion("us-east4");
toggleRegion("us-west1");
toggleButtonColor("stage2Button");
};
// function stage3amButtonClickAction(zEvent) {
// toggleRegion("asia-southeast1");
// toggleButtonColor("stage3amButton");
// };
function stage3pmButtonClickAction(zEvent) {
toggleRegion("us-west4");
toggleButtonColor("stage3pmButton");
};
// component functions
function authButtonClickAction(zEvent) {
toggleComponent("auth");
@ -965,26 +1358,59 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
toggleComponent("webapp");
toggleButtonColor("webappButton");
};
function sqlButtonClickAction(zEvent) {
toggleComponent("sql");
toggleButtonColor("sqlButton");
};
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>';
var controlplaneHTML = '<center>' +
'<button id="australiasoutheast1Button" style="width:234px" type="button">Australia-Southeast1</button>' +
'<button id="europewest1Button" style="width:234px" type="button">Europe-West1</button>' +
'</br></br>' +
'<button id="europewest2Button" style="width:234px" type="button">EU-West2</button>' +
'<button id="uscentral1Button" style="width:234px" type="button">US-Central1</button>' +
'</br>' +
'<button id="useast1Button" style="width:156px" type="button">US-East1</button>' +
'<button id="useast4Button" style="width:156px" type="button">US-East4</button>' +
'<button id="uswest1Button" style="width:156px" type="button">US-West1</button>' +
'</br></br>' +
'<button id="uswest4Button" style="width:468px" 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"];
buttonArray = [
"australiasoutheast1",
"europewest1",
"europewest2",
"uscentral1",
"useast1",
"useast4",
"uswest1",
"uswest4"
];
if (debugFlag == true) {
console.log("buttonArray: " + buttonArray);
}
// clear everything on profile load
reset();
// regional listeners
document.getElementById("uswest1Button").addEventListener("click", uswest1ButtonClickAction, false);
document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false);
document.getElementById("australiasoutheast1Button").addEventListener("click", australiasoutheast1ButtonClickAction, false);
document.getElementById("europewest1Button").addEventListener("click", europewest1ButtonClickAction, false);
document.getElementById("europewest2Button").addEventListener("click", europewest2ButtonClickAction, false);
document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false);
document.getElementById("useast1Button").addEventListener("click", useast1ButtonClickAction, false);
document.getElementById("useast4Button").addEventListener("click", useast4ButtonClickAction, false);
document.getElementById("uswest1Button").addEventListener("click", uswest1ButtonClickAction, false);
document.getElementById("uswest4Button").addEventListener("click", uswest4ButtonClickAction, false);
// profile listeners
@ -1000,6 +1426,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
document.getElementById("sqlButton").addEventListener("click", sqlButtonClickAction, false);
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
// aux listeners
@ -1009,7 +1436,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
function loadStages() {
currentMode = "stage";
console.log("Loading GCP stages profile");
var stagesHTML = '<center><button id="stage1Button" style="width:468px" type="button">Stage-1</button></center>';
var stagesHTML = '<center>' +
'<button id="stage1Button" style="width:156px" type="button">Stage-1</button>' +
'<button id="stage2Button" style="width:156px" type="button">Stage-2</button>' +
'<button id="stage3pmButton" style="width:156px" type="button">Stage-3PM</button>' +
'</center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + stagesHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
@ -1017,13 +1448,19 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
}
// array of active buttons
buttonArray = ["stage1"];
buttonArray = [
"stage1",
"stage2",
"stage3pm"
];
// clear everything on profile load
reset();
// regional listeners
document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false);
document.getElementById("stage2Button").addEventListener("click", stage2ButtonClickAction, false);
document.getElementById("stage3pmButton").addEventListener("click", stage3pmButtonClickAction, false);
// profile listeners
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
@ -1037,6 +1474,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
document.getElementById("sqlButton").addEventListener("click", sqlButtonClickAction, false);
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
// aux listeners
@ -1176,18 +1614,41 @@ function deselectCheckbox(box) {
box.filter("INPUT")[0].checked = false;
};
function apply() {
if (debugFlag == true) {
console.log("Running apply()");
}
for (i = 0; i < componentArray.length; i++) {
var component = componentArray[i];
if (debugFlag == true) {
console.log("component: " + component);
}
for (j = 0; j < regionArray.length; j++) {
var region = regionArray[j];
var groupName = component + "Group";
var group = eval(groupName);
var checkboxStr = `group.find('*').filter(\":contains(' ${region}:')\").filter("div.clearfix.prettycheckbox.labelright.blue").children()`;
var checkbox = eval(checkboxStr);
if (debugFlag == true) {
console.log("region: " + region);
console.log("groupName: " + groupName);
console.log("checkboxStr: " + checkboxStr);
}
if (checkRegion(region) == true && checkComponent(component) == true) {
if (debugFlag == true) {
console.log("selecting checkbox")
}
selectCheckbox(checkbox);
if (debugFlag == true) {
console.log("checkbox selected")
}
} else {
if (debugFlag == true) {
console.log("deselecting checkbox")
}
deselectCheckbox(checkbox);
if (debugFlag == true) {
console.log("checkbox deselected")
}
}
}
}
@ -1202,28 +1663,80 @@ function apply() {
}
};
function reset() {
if (debugFlag == true) {
console.log("Running reset()");
}
if (debugFlag == true) {
console.log("Clearing components");
console.log("componentArray: " + componentArray);
console.log("buttonArray: " + buttonArray);
};
for (i = 0; i < componentArray.length; i++) {
var component = componentArray[i];
if(debugFlag == true) {
console.log("Deselecting " + component);
}
deselectComponent(component);
var buttonName = component + 'Button';
if(debugFlag == true) {
console.log("Clearing button " + buttonName);
}
clearButtonColor(buttonName);
};
if (debugFlag == true) {
console.log("Clearing regions");
console.log("regionArray: " + regionArray);
console.log("buttonArray: " + buttonArray);
};
for (i = 0; i < buttonArray.length; i++) {
var region = buttonArray[i];
var buttonName = region + 'Button';
if(debugFlag == true) {
console.log("region: " + region);
console.log("buttonName: " + buttonName);
}
if(debugFlag == true) {
console.log("clearButtonColor:" + buttonName);
}
clearButtonColor(buttonName);
if(debugFlag == true) {
console.log("clearButtonColor complete");
}
};
for (i = 0; i < regionArray.length; i++) {
var region = regionArray[i];
if(debugFlag == true) {
console.log("deselectRegion " + region);
}
deselectRegion(region);
if(debugFlag == true) {
console.log("deselectRegion complete");
}
};
if (debugFlag == true) {
console.log("Checking for CE");
}
if (typeof ceFlag != 'undefined') {
if (debugFlag == true) {
console.log("CE found; deselectCe");
}
deselectCe();
if (debugFlag == true) {
console.log("Clearing ceButton if visible");
}
if (currentMode != 'stage') {
clearButtonColor("ceButton");
};
}
if (debugFlag == true) {
console.log("CE check complete");
}
apply();
if(debugFlag == true) {
console.log("reset() complete");
}
};
function checkDebug() {
var status = debugFlag;

View File

@ -4,7 +4,7 @@
// @description Effort to simplify configuration of incidents/maintenance windows
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js
// @version 0.0.3
// @version 0.0.4
// @downloadUrl https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js
// @updateURL https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/create$/
@ -50,16 +50,31 @@ var zNode = document.createElement('div');
zNode.setAttribute('id', 'myContainer');
document.body.appendChild(zNode);
var auxHTML = '<center><button id="applyButton" type="button">Apply Selection</button><button id="resetButton" type="button">Reset Form</button><center>';
// max region button width 468px
var auxHTML = '<center>' +
'<button id="applyButton" type="button">Apply Selection</button>' +
'<button id="resetButton" type="button">Reset Form</button>' +
'<center>';
var debugFlag = false;
var currentMode = "";
//azure status page controls
if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -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>';
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>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor(debugButton);
@ -72,12 +87,54 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
// initialize azure component and region variables
var componentArray = ["api", "auth", "compute", "jobs", "odbc", "webapp", "sql"];
var regionArray = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "switzerlandnorth", "norwayeast", "germanywestcentral", "westus2",
"westus", "southcentralus", "westeurope", "northeurope", "ukwest", "uksouth", "southafricanorth", "uaenorth", "australiaeast",
"australiacentral", "australiacentral2", "australiasoutheast", "japaneast", "japanwest", "koreacentral", "southeastasia",
"eastasia", "brazilsouth", "eastus2", "eastus","centralus", "northcentralus", "francecentral", "chinanorth2", "chinaeast2",
"usgovvirginia", "usgovarizona"];
var componentArray = [
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"australiacentral",
"australiacentral2",
"australiaeast",
"australiasoutheast",
"brazilsouth",
"canadacentral",
"canadaeast",
"centralindia",
"centralus",
"chinaeast2",
"chinanorth2",
"eastasia",
"eastus",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"japanwest",
"koreacentral",
"northcentralus",
"northeurope",
"norwayeast",
"southafricanorth",
"southcentralus",
"southeastasia",
"southindia",
"switzerlandnorth",
"uaenorth",
"uksouth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westeurope",
"westus",
"westus2",
"westindia"
];
var buttonArray = [];
// create tracking maps
@ -100,10 +157,17 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
var sqlGroup = $("div.form-group").filter(":contains('Databricks SQL')");
// 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>' +
'<button id="sqlButton" type="button">SQL</button></center></br></br>';
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br></br>';
// regional functions
function canadaeastButtonClickAction(zEvent) {
@ -393,7 +457,57 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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><button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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>';
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>' +
'<button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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) {
@ -401,15 +515,47 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
};
// array of active buttons
buttonArray = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia",
"switzerlandnorth", "norwayeast", "germanywestcentral", "westus2", "westus", "southcentralus",
"westeurope", "northeurope", "ukwest", "uksouth", "southafricanorth",
"uaenorth", "australiaeast", "australiacentral", "australiacentral2",
"australiasoutheast", "japaneast", "japanwest", "koreacentral",
"southeastasia", "eastasia", "brazilsouth", "eastus2", "eastus",
"centralus", "northcentralus", "francecentral", "chinanorth2", "chinaeast2",
"usgovvirginia", "usgovarizona"];
buttonArray = [
"australiacentral",
"australiacentral2",
"australiaeast",
"australiasoutheast",
"brazilsouth",
"canadacentral",
"canadaeast",
"centralindia",
"centralus",
"chinaeast2",
"chinanorth2",
"eastasia",
"eastus",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"japanwest",
"koreacentral",
"northcentralus",
"northeurope",
"norwayeast",
"southafricanorth",
"southcentralus",
"southeastasia",
"southindia",
"switzerlandnorth",
"uaenorth",
"uksouth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westindia",
"westeurope",
"westus",
"westus2"
];
reset();
// regional listeners
document.getElementById("canadacentralButton").addEventListener("click", canadacentralButtonClickAction, false);
document.getElementById("canadaeastButton").addEventListener("click", canadaeastButtonClickAction, false);
@ -472,16 +618,67 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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><button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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>';
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>' +
'<button id="germanywestcentralButton" style="width:468px" type="button">Germany West Central</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");
};
// array of active buttons
buttonArray = ["canadacentral", "centralindia", "switzerlandnorth", "norwayeast", "germanywestcentral", "westus", "westeurope","ukwest", "southafricanorth",
"uaenorth", "australiaeast", "japaneast", "koreacentral", "southeastasia", "brazilsouth", "eastus2", "francecentral",
"chinanorth2", "chinaeast2", "usgovvirginia", "usgovarizona"];
buttonArray = [
"australiaeast",
"brazilsouth",
"canadacentral",
"centralindia",
"chinaeast2",
"chinanorth2",
"eastus2",
"francecentral",
"germanywestcentral",
"japaneast",
"koreacentral",
"norwayeast",
"southafricanorth",
"southeastasia",
"switzerlandnorth",
"uaenorth",
"ukwest",
"usgovarizona",
"usgovvirginia",
"westeurope",
"westus"
];
// clear everything on profile load
reset();
@ -533,7 +730,16 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
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>';
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) {
@ -541,7 +747,16 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
};
// array of active buttons
buttonArray = ["stage1", "stage1point5", "stage2", "stage3am", "stage3pm", "stagegovcloud", "stagemooncake"];
buttonArray = [
"stage1",
"stage1point5",
"stage2",
"stage3am",
"stage3pm",
"stagegovcloud",
"stagemooncake"
];
reset();
// regional listeners
@ -592,9 +807,18 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// aws status page controls
if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -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>';
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>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor("debugButton");
@ -605,10 +829,30 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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", "sql"];
var regionArray = ["us-west-1", "us-west-2", "us-east-1", "us-east-2", "sa-east-1", "eu-west-1", "eu-west-2", "eu-central-1",
"ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ca-central-1"];
// initialize aws component and region variables
var componentArray = [
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"ap-northeast-1",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2"
];
var buttonArray = [];
var ceFlag = false;
@ -633,10 +877,17 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>' +
'<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>' +
'<button id="sqlButton" type="button">SQL</button></center></br>';
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br>';
// regional functions
function cacentral1ButtonClickAction(zEvent) {
@ -677,6 +928,10 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
toggleRegion("ap-south-1");
toggleButtonColor("apsouth1Button");
};
function apsoutheast1ButtonClickAction(zEvent) {
toggleRegion("ap-southeast-1");
toggleButtonColor("apsoutheast1Button");
};
function apsoutheast2ButtonClickAction(zEvent) {
toggleRegion("ap-southeast-2");
toggleButtonColor("apsoutheast2Button");
@ -705,6 +960,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
toggleRegion("us-west-1");
toggleRegion("us-east-1");
toggleRegion("us-east-2");
toggleRegion("ap-southeast-1");
toggleButtonColor("stage2Button");
};
function stage3amButtonClickAction(zEvent) {
@ -752,7 +1008,26 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>';
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>' +
'<button id="apsoutheast1Button" style="width:468px" type="button">ap-southeast-1</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) {
@ -760,8 +1035,21 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
};
// array of active buttons
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "uswest1", "useast1", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
buttonArray = [
"apnortheast1",
"apsouth1",
"apsoutheast1",
"apsoutheast2",
"ce",
"cacentral1",
"eucentral1",
"euwest1",
"euwest2",
"useast1",
"useast2",
"uswest2",
"uswest1"
];
// clear everything on profile load
reset();
@ -775,6 +1063,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("useast1Button").addEventListener("click", useast1ButtonClickAction, false);
document.getElementById("useast2Button").addEventListener("click", useast2ButtonClickAction, false);
document.getElementById("apsouth1Button").addEventListener("click", apsouth1ButtonClickAction, false);
document.getElementById("apsoutheast1Button").addEventListener("click", apsoutheast1ButtonClickAction, false);
document.getElementById("apsoutheast2Button").addEventListener("click", apsoutheast2ButtonClickAction, false);
document.getElementById("apnortheast1Button").addEventListener("click", apnortheast1ButtonClickAction, false);
document.getElementById("euwest1Button").addEventListener("click", euwest1ButtonClickAction, false);
@ -804,15 +1093,42 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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: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>';
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="useast2Button" style="width:156px" type="button">us-east-2</button>' +
'<button id="apsoutheast1Button" style="width:156px" type="button">ap-southeast-1</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");
};
// array of active buttons
buttonArray = ["ce", "cacentral1", "eucentral1", "euwest2", "uswest2", "useast2", "apsouth1",
"apsoutheast2", "apnortheast1", "euwest1"];
buttonArray = [
"apnortheast1",
"apsouth1",
"apsoutheast1",
"apsoutheast2",
"cacentral1",
"ce",
"eucentral1",
"euwest1",
"euwest2",
"useast2",
"uswest2",
];
// clear everything on profile load
reset();
@ -825,6 +1141,7 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
document.getElementById("uswest2Button").addEventListener("click", uswest2CPButtonClickAction, false);
document.getElementById("useast2Button").addEventListener("click", useast2ButtonClickAction, false);
document.getElementById("apsouth1Button").addEventListener("click", apsouth1ButtonClickAction, false);
document.getElementById("apsoutheast1Button").addEventListener("click", apsoutheast1ButtonClickAction, false);
document.getElementById("apsoutheast2Button").addEventListener("click", apsoutheast2ButtonClickAction, false);
document.getElementById("apnortheast1Button").addEventListener("click", apnortheast1ButtonClickAction, false);
document.getElementById("euwest1Button").addEventListener("click", euwest1ButtonClickAction, false);
@ -854,7 +1171,12 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
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>';
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) {
@ -862,7 +1184,12 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
}
// array of active buttons
buttonArray = ["stage1", "stage2", "stage3am", "stage3pm"];
buttonArray = [
"stage1",
"stage2",
"stage3am",
"stage3pm"
];
// clear everything on profile load
reset();
@ -911,9 +1238,15 @@ if (window.location.href.indexOf("5cf02dde58a00904bda41926") > -1) {
// gcp status page controls
if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
// render initial HTML
var profilesHTML = '<center><button id="controlplanesButton" type="button">Controlplanes</button> ' +
var profilesHTML = '<center>' +
'<button id="controlplanesButton" type="button">Controlplanes</button>' +
' ' +
'<button id="stagesButton" type="button">Stages</button>' +
' <button id="shrinkButton" type="button">Shrink</button> <button id="debugButton" type="button">Debug</button></center>';
' ' +
'<button id="shrinkButton" type="button">Shrink</button>' +
' ' +
'<button id="debugButton" type="button">Debug</button>' +
'</center>';
zNode.innerHTML = profilesHTML;
if (debugFlag == true) {
toggleButtonColor("debugButton");
@ -924,9 +1257,26 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
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"];
// initialize gcp component and region variables
var componentArray =[
"api",
"auth",
"compute",
"jobs",
"odbc",
"sql",
"webapp"
];
var regionArray = [
"australia-southeast1",
"europe-west1",
"europe-west2",
"us-central1",
"us-east1",
"us-east4",
"us-west1",
"us-west4"
];
var buttonArray = [];
var selectedComponents = new Map();
@ -945,37 +1295,80 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
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')");
var sqlGroup = $("div.form-group").filter(":contains('Databricks SQL')");
// 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>' +
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>' +
'<button id="sqlButton" type="button">SQL</button>' +
'</center></br></br>';
// regional functions
function uswest1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleButtonColor("uswest1Button");
// function asiasoutheast1ButtonClickAction(zEvent) {
// toggleRegion("asia-southeast1");
// toggleButtonColor("asiasoutheast1Button");
// };
function australiasoutheast1ButtonClickAction(zEvent) {
toggleRegion("australia-southeast1");
toggleButtonColor("australiasoutheast1Button");
};
function europewest1ButtonClickAction(zEvent) {
toggleRegion("europe-west1");
toggleButtonColor("europewest1Button");
};
function europewest2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleButtonColor("europewest2Button");
};
function uscentral1ButtonClickAction(zEvent) {
toggleRegion("us-central1");
toggleButtonColor("uscentral1Button");
};
function europewest2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleButtonColor("europewest2Button");
function useast1ButtonClickAction(zEvent) {
toggleRegion("us-east1");
toggleButtonColor("useast1Button");
};
function useast4ButtonClickAction(zEvent) {
toggleRegion("us-east4");
toggleButtonColor("useast4Button");
};
function uswest1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleButtonColor("uswest1Button");
};
function uswest4ButtonClickAction(zEvent) {
toggleRegion("us-west4");
toggleButtonColor("uswest4Button");
};
function stage1ButtonClickAction(zEvent) {
toggleRegion("us-west1");
toggleRegion("us-central1");
toggleRegion("europe-west2");
toggleRegion("us-west4");
toggleRegion("australia-southeast1");
toggleRegion("europe-west1");
toggleButtonColor("stage1Button");
};
function stage2ButtonClickAction(zEvent) {
toggleRegion("europe-west2");
toggleRegion("us-central1");
toggleRegion("us-east1");
toggleRegion("us-east4");
toggleRegion("us-west1");
toggleButtonColor("stage2Button");
};
// function stage3amButtonClickAction(zEvent) {
// toggleRegion("asia-southeast1");
// toggleButtonColor("stage3amButton");
// };
function stage3pmButtonClickAction(zEvent) {
toggleRegion("us-west4");
toggleButtonColor("stage3pmButton");
};
// component functions
function authButtonClickAction(zEvent) {
toggleComponent("auth");
@ -1001,26 +1394,59 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
toggleComponent("webapp");
toggleButtonColor("webappButton");
};
function sqlButtonClickAction(zEvent) {
toggleComponent("sql");
toggleButtonColor("sqlButton");
};
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>';
var controlplaneHTML = '<center>' +
'<button id="australiasoutheast1Button" style="width:234px" type="button">Australia-Southeast1</button>' +
'<button id="europewest1Button" style="width:234px" type="button">Europe-West1</button>' +
'</br></br>' +
'<button id="europewest2Button" style="width:234px" type="button">EU-West2</button>' +
'<button id="uscentral1Button" style="width:234px" type="button">US-Central1</button>' +
'</br>' +
'<button id="useast1Button" style="width:156px" type="button">US-East1</button>' +
'<button id="useast4Button" style="width:156px" type="button">US-East4</button>' +
'<button id="uswest1Button" style="width:156px" type="button">US-West1</button>' +
'</br></br>' +
'<button id="uswest4Button" style="width:468px" 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"];
buttonArray = [
"australiasoutheast1",
"europewest1",
"europewest2",
"uscentral1",
"useast1",
"useast4",
"uswest1",
"uswest4"
];
if (debugFlag == true) {
console.log("buttonArray: " + buttonArray);
}
// clear everything on profile load
reset();
// regional listeners
document.getElementById("uswest1Button").addEventListener("click", uswest1ButtonClickAction, false);
document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false);
document.getElementById("australiasoutheast1Button").addEventListener("click", australiasoutheast1ButtonClickAction, false);
document.getElementById("europewest1Button").addEventListener("click", europewest1ButtonClickAction, false);
document.getElementById("europewest2Button").addEventListener("click", europewest2ButtonClickAction, false);
document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false);
document.getElementById("useast1Button").addEventListener("click", useast1ButtonClickAction, false);
document.getElementById("useast4Button").addEventListener("click", useast4ButtonClickAction, false);
document.getElementById("uswest1Button").addEventListener("click", uswest1ButtonClickAction, false);
document.getElementById("uswest4Button").addEventListener("click", uswest4ButtonClickAction, false);
// profile listeners
@ -1036,6 +1462,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
document.getElementById("sqlButton").addEventListener("click", sqlButtonClickAction, false);
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
// aux listeners
@ -1045,7 +1472,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
function loadStages() {
currentMode = "stage";
console.log("Loading GCP stages profile");
var stagesHTML = '<center><button id="stage1Button" style="width:468px" type="button">Stage-1</button></center>';
var stagesHTML = '<center>' +
'<button id="stage1Button" style="width:156px" type="button">Stage-1</button>' +
'<button id="stage2Button" style="width:156px" type="button">Stage-2</button>' +
'<button id="stage3pmButton" style="width:156px" type="button">Stage-3PM</button>' +
'</center>';
zNode.innerHTML = profilesHTML + '<hr class="solid">' + stagesHTML + '<hr class="solid">' + componentsHTML + auxHTML;
if (debugFlag == true) {
@ -1053,13 +1484,19 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
}
// array of active buttons
buttonArray = ["stage1"];
buttonArray = [
"stage1",
"stage2",
"stage3pm"
];
// clear everything on profile load
reset();
// regional listeners
document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false);
document.getElementById("stage2Button").addEventListener("click", stage2ButtonClickAction, false);
document.getElementById("stage3pmButton").addEventListener("click", stage3pmButtonClickAction, false);
// profile listeners
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
@ -1073,6 +1510,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
document.getElementById("sqlButton").addEventListener("click", sqlButtonClickAction, false);
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
// aux listeners
@ -1212,18 +1650,41 @@ function deselectCheckbox(box) {
box.filter("INPUT")[0].checked = false;
};
function apply() {
if (debugFlag == true) {
console.log("Running apply()");
}
for (i = 0; i < componentArray.length; i++) {
var component = componentArray[i];
if (debugFlag == true) {
console.log("component: " + component);
}
for (j = 0; j < regionArray.length; j++) {
var region = regionArray[j];
var groupName = component + "Group";
var group = eval(groupName);
var checkboxStr = `group.find('*').filter(\":contains(' ${region}:')\").filter("div.clearfix.prettycheckbox.labelright.blue").children()`;
var checkbox = eval(checkboxStr);
if (debugFlag == true) {
console.log("region: " + region);
console.log("groupName: " + groupName);
console.log("checkboxStr: " + checkboxStr);
}
if (checkRegion(region) == true && checkComponent(component) == true) {
if (debugFlag == true) {
console.log("selecting checkbox")
}
selectCheckbox(checkbox);
if (debugFlag == true) {
console.log("checkbox selected")
}
} else {
if (debugFlag == true) {
console.log("deselecting checkbox")
}
deselectCheckbox(checkbox);
if (debugFlag == true) {
console.log("checkbox deselected")
}
}
}
}
@ -1238,28 +1699,80 @@ function apply() {
}
};
function reset() {
if (debugFlag == true) {
console.log("Running reset()");
}
if (debugFlag == true) {
console.log("Clearing components");
console.log("componentArray: " + componentArray);
console.log("buttonArray: " + buttonArray);
};
for (i = 0; i < componentArray.length; i++) {
var component = componentArray[i];
if(debugFlag == true) {
console.log("Deselecting " + component);
}
deselectComponent(component);
var buttonName = component + 'Button';
if(debugFlag == true) {
console.log("Clearing button " + buttonName);
}
clearButtonColor(buttonName);
};
if (debugFlag == true) {
console.log("Clearing regions");
console.log("regionArray: " + regionArray);
console.log("buttonArray: " + buttonArray);
};
for (i = 0; i < buttonArray.length; i++) {
var region = buttonArray[i];
var buttonName = region + 'Button';
if(debugFlag == true) {
console.log("region: " + region);
console.log("buttonName: " + buttonName);
}
if(debugFlag == true) {
console.log("clearButtonColor:" + buttonName);
}
clearButtonColor(buttonName);
if(debugFlag == true) {
console.log("clearButtonColor complete");
}
};
for (i = 0; i < regionArray.length; i++) {
var region = regionArray[i];
if(debugFlag == true) {
console.log("deselectRegion " + region);
}
deselectRegion(region);
if(debugFlag == true) {
console.log("deselectRegion complete");
}
};
if (debugFlag == true) {
console.log("Checking for CE");
}
if (typeof ceFlag != 'undefined') {
if (debugFlag == true) {
console.log("CE found; deselectCe");
}
deselectCe();
if (debugFlag == true) {
console.log("Clearing ceButton if visible");
}
if (currentMode != 'stage') {
clearButtonColor("ceButton");
};
}
if (debugFlag == true) {
console.log("CE check complete");
}
apply();
if(debugFlag == true) {
console.log("reset() complete");
}
};
function checkDebug() {
var status = debugFlag;