From aec65f619ec50e7a6f5d9d07db32fd27466676ae Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 1 Dec 2021 23:41:39 -0600 Subject: [PATCH] add asia-southeast1 + stage3am to gcp --- code-payload.js | 32 ++++++++++++++++++++++---------- statusio-selector.user.js | 34 +++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/code-payload.js b/code-payload.js index ac4408e..d4866c5 100644 --- a/code-payload.js +++ b/code-payload.js @@ -1233,6 +1233,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { ]; var regionArray = [ "australia-southeast1", + "asia-southeast1", "europe-west1", "europe-west2", "us-central1", @@ -1283,6 +1284,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleRegion("australia-southeast1"); toggleButtonColor("australiasoutheast1Button"); }; + function asiasoutheast1ButtonClickAction(zEvent) { + toggleRegion("asia-southeast1"); + toggleButtonColor("asiasoutheast1Button"); + }; + function europewest1ButtonClickAction(zEvent) { toggleRegion("europe-west1"); toggleButtonColor("europewest1Button"); @@ -1312,7 +1318,6 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleButtonColor("uswest4Button"); }; function stage1ButtonClickAction(zEvent) { - toggleRegion("australia-southeast1"); toggleRegion("europe-west1"); toggleButtonColor("stage1Button"); }; @@ -1324,10 +1329,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleRegion("us-west1"); toggleButtonColor("stage2Button"); }; - // function stage3amButtonClickAction(zEvent) { - // toggleRegion("asia-southeast1"); - // toggleButtonColor("stage3amButton"); - // }; + function stage3amButtonClickAction(zEvent) { + toggleRegion("asia-southeast1"); + toggleRegion("australia-southeast1"); + toggleButtonColor("stage3amButton"); + }; function stage3pmButtonClickAction(zEvent) { toggleRegion("us-west4"); toggleButtonColor("stage3pmButton"); @@ -1367,8 +1373,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { currentMode = "controlplane"; console.log("Loading GCP controlplanes profile"); var controlplaneHTML = '
' + - '' + - '' + + '' + '

' + '' + '' + @@ -1377,6 +1382,9 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { '' + '' + '

' + + '' + + '' + + '

' + '' + '
' ; @@ -1405,6 +1413,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { // regional listeners document.getElementById("australiasoutheast1Button").addEventListener("click", australiasoutheast1ButtonClickAction, false); + document.getElementById("asiasoutheast1Button").addEventListener("click", asiasoutheast1ButtonClickAction, false); document.getElementById("europewest1Button").addEventListener("click", europewest1ButtonClickAction, false); document.getElementById("europewest2Button").addEventListener("click", europewest2ButtonClickAction, false); document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false); @@ -1437,9 +1446,10 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { currentMode = "stage"; console.log("Loading GCP stages profile"); var stagesHTML = '
' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + '
'; zNode.innerHTML = profilesHTML + '
' + stagesHTML + '
' + componentsHTML + auxHTML; @@ -1451,6 +1461,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { buttonArray = [ "stage1", "stage2", + "stage3am" "stage3pm" ]; @@ -1460,6 +1471,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { // regional listeners document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false); document.getElementById("stage2Button").addEventListener("click", stage2ButtonClickAction, false); + document.getElementById("stage3amButton").addEventListener("click", stage3amButtonClickAction, false); document.getElementById("stage3pmButton").addEventListener("click", stage3pmButtonClickAction, false); // profile listeners diff --git a/statusio-selector.user.js b/statusio-selector.user.js index 7ccfe13..cd3791f 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.4 +// @version 0.0.5 // @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$/ @@ -1269,6 +1269,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { ]; var regionArray = [ "australia-southeast1", + "asia-southeast1", "europe-west1", "europe-west2", "us-central1", @@ -1319,6 +1320,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleRegion("australia-southeast1"); toggleButtonColor("australiasoutheast1Button"); }; + function asiasoutheast1ButtonClickAction(zEvent) { + toggleRegion("asia-southeast1"); + toggleButtonColor("asiasoutheast1Button"); + }; + function europewest1ButtonClickAction(zEvent) { toggleRegion("europe-west1"); toggleButtonColor("europewest1Button"); @@ -1348,7 +1354,6 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleButtonColor("uswest4Button"); }; function stage1ButtonClickAction(zEvent) { - toggleRegion("australia-southeast1"); toggleRegion("europe-west1"); toggleButtonColor("stage1Button"); }; @@ -1360,10 +1365,11 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { toggleRegion("us-west1"); toggleButtonColor("stage2Button"); }; - // function stage3amButtonClickAction(zEvent) { - // toggleRegion("asia-southeast1"); - // toggleButtonColor("stage3amButton"); - // }; + function stage3amButtonClickAction(zEvent) { + toggleRegion("asia-southeast1"); + toggleRegion("australia-southeast1"); + toggleButtonColor("stage3amButton"); + }; function stage3pmButtonClickAction(zEvent) { toggleRegion("us-west4"); toggleButtonColor("stage3pmButton"); @@ -1403,8 +1409,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { currentMode = "controlplane"; console.log("Loading GCP controlplanes profile"); var controlplaneHTML = '
' + - '' + - '' + + '' + '

' + '' + '' + @@ -1413,6 +1418,9 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { '' + '' + '

' + + '' + + '' + + '

' + '' + '
' ; @@ -1441,6 +1449,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { // regional listeners document.getElementById("australiasoutheast1Button").addEventListener("click", australiasoutheast1ButtonClickAction, false); + document.getElementById("asiasoutheast1Button").addEventListener("click", asiasoutheast1ButtonClickAction, false); document.getElementById("europewest1Button").addEventListener("click", europewest1ButtonClickAction, false); document.getElementById("europewest2Button").addEventListener("click", europewest2ButtonClickAction, false); document.getElementById("uscentral1Button").addEventListener("click", uscentral1ButtonClickAction, false); @@ -1473,9 +1482,10 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { currentMode = "stage"; console.log("Loading GCP stages profile"); var stagesHTML = '
' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + '
'; zNode.innerHTML = profilesHTML + '
' + stagesHTML + '
' + componentsHTML + auxHTML; @@ -1487,6 +1497,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { buttonArray = [ "stage1", "stage2", + "stage3am" "stage3pm" ]; @@ -1496,6 +1507,7 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) { // regional listeners document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false); document.getElementById("stage2Button").addEventListener("click", stage2ButtonClickAction, false); + document.getElementById("stage3amButton").addEventListener("click", stage3amButtonClickAction, false); document.getElementById("stage3pmButton").addEventListener("click", stage3pmButtonClickAction, false); // profile listeners