diff --git a/code-payload.js b/code-payload.js
index 1b33fca..ac4408e 100644
--- a/code-payload.js
+++ b/code-payload.js
@@ -14,16 +14,31 @@ var zNode = document.createElement('div');
zNode.setAttribute('id', 'myContainer');
document.body.appendChild(zNode);
-var auxHTML = '
Apply Selection Reset Form ';
+// max region button width 468px
+
+var auxHTML = '' +
+ 'Apply Selection ' +
+ 'Reset Form ' +
+ '';
var debugFlag = false;
var currentMode = "";
+
//azure status page controls
if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// render initial HTML
- var profilesHTML = 'Controlplanes ' +
- 'Stages ' +
- 'Dataplanes Shrink Debug ';
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
+ 'Stages ' +
+ ' ' +
+ 'Dataplanes ' +
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
+
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
- 'SQL ';
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
+ ' ';
// 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 = 'Canada Central Canada East Central India South India West India Switzerland North Norway East Germany West Central West US West US 2 South Central US West Europe North Europe UK West UK South South Africa North UAE North Australia East Australia Central Australia Central 2 Australia Southeast Japan East Japan West Korea Central Southeast Asia East Asia Brazil South East US 2 East US Central US North Central US France Central China North 2 China East 2 US Gov Virginia US Gov Arizona ';
+ var dataplaneHTML = '' +
+ 'Canada Central ' +
+ 'Canada East ' +
+ '' +
+ 'Central India ' +
+ 'South India ' +
+ 'West India ' +
+ '' +
+ 'Switzerland North ' +
+ 'Norway East ' +
+ '' +
+ 'Germany West Central ' +
+ '' +
+ 'West US ' +
+ 'West US 2 ' +
+ 'South Central US ' +
+ '' +
+ 'West Europe ' +
+ 'North Europe ' +
+ 'UK West ' +
+ 'UK South ' +
+ ' ' +
+ 'South Africa North ' +
+ 'UAE North ' +
+ '' +
+ 'Australia East ' +
+ 'Australia Central ' +
+ 'Australia Central 2 ' +
+ '' +
+ 'Australia Southeast ' +
+ 'Japan East ' +
+ 'Japan West ' +
+ 'Korea Central ' +
+ '' +
+ 'Southeast Asia ' +
+ 'East Asia ' +
+ '' +
+ 'Brazil South ' +
+ 'East US 2 ' +
+ 'East US ' +
+ '' +
+ 'Central US ' +
+ 'North Central US ' +
+ 'France Central ' +
+ '' +
+ 'China North 2 ' +
+ 'China East 2 ' +
+ 'US Gov Virginia ' +
+ 'US Gov Arizona ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + dataplaneHTML + ' ' + 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 = 'Canada Central Central India Switzerland North Norway East Germany West Central West US West Europe UK West South Africa North UAE North Australia East Japan East Korea Central Southeast Asia Brazil South East US 2 France Central China North 2 China East 2 US Gov Virginia US Gov Arizona ';
+ var controlplaneHTML = '' +
+ 'Canada Central ' +
+ 'Central India ' +
+ '' +
+ 'Switzerland North ' +
+ 'Norway East ' +
+ '' +
+ 'Germany West Central ' +
+ '' +
+ 'West US ' +
+ '' +
+ 'West Europe ' +
+ 'UK West ' +
+ '' +
+ 'South Africa North ' +
+ 'UAE North ' +
+ '' +
+ 'Australia East ' +
+ 'Japan East ' +
+ 'Korea Central ' +
+ 'Southeast Asia ' +
+ '' +
+ 'Brazil South ' +
+ 'East US 2 ' +
+ 'France Central ' +
+ '' +
+ 'China North 2 ' +
+ 'China East 2 ' +
+ 'US Gov Virginia ' +
+ 'US Gov Arizona ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 Stage-1.5 Stage-2 Stage-3AM Stage-3PM Govcloud Mooncake ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-1.5 ' +
+ 'Stage-2 ' +
+ 'Stage-3AM ' +
+ 'Stage-3PM ' +
+ '' +
+ 'Govcloud ' +
+ 'Mooncake ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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 = 'Controlplanes ' +
- 'Stages ' +
- 'Dataplanes Shrink Debug ';
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
+ 'Stages ' +
+ ' ' +
+ 'Dataplanes ' +
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
+
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
- 'SQL ';
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
+ ' ';
// 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 = 'CE ca-central-1 eu-central-1 eu-west-2 us-west-2 us-west-1 us-east-1 us-east-2 ap-south-1 ap-southeast-2 ap-northeast-1 eu-west-1 ';
+ var dataplaneHTML = '' +
+ 'CE ' +
+ 'ca-central-1 ' +
+ 'eu-central-1 ' +
+ 'eu-west-2 ' +
+ '' +
+ 'us-west-2 ' +
+ 'us-west-1 ' +
+ '' +
+ 'us-east-1 ' +
+ 'us-east-2 ' +
+ '' +
+ 'ap-southeast-1 ' +
+ '' +
+ 'ap-south-1 ' +
+ 'ap-southeast-2 ' +
+ 'ap-northeast-1 ' +
+ '' +
+ 'eu-west-1 ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + dataplaneHTML + ' ' + 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 = 'CE ca-central-1 eu-central-1 eu-west-2 us-west-2 us-east-2 ap-south-1 ap-southeast-2 ap-northeast-1 eu-west-1 ';
+ var controlplaneHTML = '' +
+ 'CE ' +
+ 'ca-central-1 ' +
+ 'eu-central-1 ' +
+ 'eu-west-2 ' +
+ '' +
+ 'us-west-2 ' +
+ 'us-east-2 ' +
+ 'ap-southeast-1 ' +
+ '' +
+ 'ap-south-1 ' +
+ 'ap-southeast-2 ' +
+ 'ap-northeast-1 ' +
+ '' +
+ 'eu-west-1 ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 Stage-2 Stage-3 AM Stage-3 PM ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-2 ' +
+ 'Stage-3 AM ' +
+ 'Stage-3 PM ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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 = 'Controlplanes ' +
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
'Stages ' +
- ' Shrink Debug ';
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
' ';
// 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 = 'US-West1 US-Central1 EU-West2 US-West4 ';
+ var controlplaneHTML = '' +
+ 'Australia-Southeast1 ' +
+ 'Europe-West1 ' +
+ '' +
+ 'EU-West2 ' +
+ 'US-Central1 ' +
+ '' +
+ 'US-East1 ' +
+ 'US-East4 ' +
+ 'US-West1 ' +
+ '' +
+ 'US-West4 ' +
+ ' '
+ ;
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-2 ' +
+ 'Stage-3PM ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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;
diff --git a/statusio-selector.user.js b/statusio-selector.user.js
index f0ef3a0..7ccfe13 100644
--- a/statusio-selector.user.js
+++ b/statusio-selector.user.js
@@ -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 = 'Apply Selection Reset Form ';
+// max region button width 468px
+
+var auxHTML = '' +
+ 'Apply Selection ' +
+ 'Reset Form ' +
+ '';
var debugFlag = false;
var currentMode = "";
+
//azure status page controls
if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// render initial HTML
- var profilesHTML = 'Controlplanes ' +
- 'Stages ' +
- 'Dataplanes Shrink Debug ';
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
+ 'Stages ' +
+ ' ' +
+ 'Dataplanes ' +
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
+
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
- 'SQL ';
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
+ ' ';
// 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 = 'Canada Central Canada East Central India South India West India Switzerland North Norway East Germany West Central West US West US 2 South Central US West Europe North Europe UK West UK South South Africa North UAE North Australia East Australia Central Australia Central 2 Australia Southeast Japan East Japan West Korea Central Southeast Asia East Asia Brazil South East US 2 East US Central US North Central US France Central China North 2 China East 2 US Gov Virginia US Gov Arizona ';
+ var dataplaneHTML = '' +
+ 'Canada Central ' +
+ 'Canada East ' +
+ '' +
+ 'Central India ' +
+ 'South India ' +
+ 'West India ' +
+ '' +
+ 'Switzerland North ' +
+ 'Norway East ' +
+ '' +
+ 'Germany West Central ' +
+ '' +
+ 'West US ' +
+ 'West US 2 ' +
+ 'South Central US ' +
+ '' +
+ 'West Europe ' +
+ 'North Europe ' +
+ 'UK West ' +
+ 'UK South ' +
+ ' ' +
+ 'South Africa North ' +
+ 'UAE North ' +
+ '' +
+ 'Australia East ' +
+ 'Australia Central ' +
+ 'Australia Central 2 ' +
+ '' +
+ 'Australia Southeast ' +
+ 'Japan East ' +
+ 'Japan West ' +
+ 'Korea Central ' +
+ '' +
+ 'Southeast Asia ' +
+ 'East Asia ' +
+ '' +
+ 'Brazil South ' +
+ 'East US 2 ' +
+ 'East US ' +
+ '' +
+ 'Central US ' +
+ 'North Central US ' +
+ 'France Central ' +
+ '' +
+ 'China North 2 ' +
+ 'China East 2 ' +
+ 'US Gov Virginia ' +
+ 'US Gov Arizona ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + dataplaneHTML + ' ' + 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 = 'Canada Central Central India Switzerland North Norway East Germany West Central West US West Europe UK West South Africa North UAE North Australia East Japan East Korea Central Southeast Asia Brazil South East US 2 France Central China North 2 China East 2 US Gov Virginia US Gov Arizona ';
+ var controlplaneHTML = '' +
+ 'Canada Central ' +
+ 'Central India ' +
+ '' +
+ 'Switzerland North ' +
+ 'Norway East ' +
+ '' +
+ 'Germany West Central ' +
+ '' +
+ 'West US ' +
+ '' +
+ 'West Europe ' +
+ 'UK West ' +
+ '' +
+ 'South Africa North ' +
+ 'UAE North ' +
+ '' +
+ 'Australia East ' +
+ 'Japan East ' +
+ 'Korea Central ' +
+ 'Southeast Asia ' +
+ '' +
+ 'Brazil South ' +
+ 'East US 2 ' +
+ 'France Central ' +
+ '' +
+ 'China North 2 ' +
+ 'China East 2 ' +
+ 'US Gov Virginia ' +
+ 'US Gov Arizona ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 Stage-1.5 Stage-2 Stage-3AM Stage-3PM Govcloud Mooncake ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-1.5 ' +
+ 'Stage-2 ' +
+ 'Stage-3AM ' +
+ 'Stage-3PM ' +
+ '' +
+ 'Govcloud ' +
+ 'Mooncake ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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 = 'Controlplanes ' +
- 'Stages ' +
- 'Dataplanes Shrink Debug ';
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
+ 'Stages ' +
+ ' ' +
+ 'Dataplanes ' +
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
+
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
- 'SQL ';
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
+ ' ';
// 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 = 'CE ca-central-1 eu-central-1 eu-west-2 us-west-2 us-west-1 us-east-1 us-east-2 ap-south-1 ap-southeast-2 ap-northeast-1 eu-west-1 ';
+ var dataplaneHTML = '' +
+ 'CE ' +
+ 'ca-central-1 ' +
+ 'eu-central-1 ' +
+ 'eu-west-2 ' +
+ '' +
+ 'us-west-2 ' +
+ 'us-west-1 ' +
+ '' +
+ 'us-east-1 ' +
+ 'us-east-2 ' +
+ '' +
+ 'ap-southeast-1 ' +
+ '' +
+ 'ap-south-1 ' +
+ 'ap-southeast-2 ' +
+ 'ap-northeast-1 ' +
+ '' +
+ 'eu-west-1 ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + dataplaneHTML + ' ' + 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 = 'CE ca-central-1 eu-central-1 eu-west-2 us-west-2 us-east-2 ap-south-1 ap-southeast-2 ap-northeast-1 eu-west-1 ';
+ var controlplaneHTML = '' +
+ 'CE ' +
+ 'ca-central-1 ' +
+ 'eu-central-1 ' +
+ 'eu-west-2 ' +
+ '' +
+ 'us-west-2 ' +
+ 'us-east-2 ' +
+ 'ap-southeast-1 ' +
+ '' +
+ 'ap-south-1 ' +
+ 'ap-southeast-2 ' +
+ 'ap-northeast-1 ' +
+ '' +
+ 'eu-west-1 ' +
+ ' ';
+
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 Stage-2 Stage-3 AM Stage-3 PM ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-2 ' +
+ 'Stage-3 AM ' +
+ 'Stage-3 PM ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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 = 'Controlplanes ' +
+ var profilesHTML = '' +
+ 'Controlplanes ' +
+ ' ' +
'Stages ' +
- ' Shrink Debug ';
+ ' ' +
+ 'Shrink ' +
+ ' ' +
+ 'Debug ' +
+ ' ';
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 = 'AllComponents API ' +
- 'Auth Compute Jobs ' +
- 'ODBC/JDBC Webapp ' +
+ var componentsHTML = '' +
+ 'AllComponents ' +
+ ' ' +
+ 'API ' +
+ 'Auth ' +
+ 'Compute ' +
+ 'Jobs ' +
+ 'ODBC/JDBC ' +
+ 'Webapp ' +
+ 'SQL ' +
' ';
// 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 = 'US-West1 US-Central1 EU-West2 US-West4 ';
+ var controlplaneHTML = '' +
+ 'Australia-Southeast1 ' +
+ 'Europe-West1 ' +
+ '' +
+ 'EU-West2 ' +
+ 'US-Central1 ' +
+ '' +
+ 'US-East1 ' +
+ 'US-East4 ' +
+ 'US-West1 ' +
+ '' +
+ 'US-West4 ' +
+ ' '
+ ;
zNode.innerHTML = profilesHTML + ' ' + controlplaneHTML + ' ' + 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 = 'Stage-1 ';
+ var stagesHTML = '' +
+ 'Stage-1 ' +
+ 'Stage-2 ' +
+ 'Stage-3PM ' +
+ ' ';
zNode.innerHTML = profilesHTML + ' ' + stagesHTML + ' ' + 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;