From 304aaa7b0c69fbafc1c2a8c079b896faddf3822a Mon Sep 17 00:00:00 2001 From: cgoodwin90 Date: Wed, 21 Aug 2024 11:28:09 +1000 Subject: [PATCH] Includes checks for storage --- landingTemplate.html | 6 +++++- main.go | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/landingTemplate.html b/landingTemplate.html index 8c8db52..e97222c 100644 --- a/landingTemplate.html +++ b/landingTemplate.html @@ -17,7 +17,11 @@

Internal Services Test

Available Services:

diff --git a/main.go b/main.go index 26598f5..156183c 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,8 @@ package main import ( "bytes" "fmt" + "github.com/gorilla/mux" + machinery "github.com/uselagoon/machinery/utils/variables" "gopkg.in/yaml.v3" "html/template" "log" @@ -11,8 +13,6 @@ import ( "regexp" "strings" "time" - - "github.com/gorilla/mux" ) type LandingPageData struct { @@ -79,6 +79,11 @@ func getServices() []Service { serviceList = append(serviceList, Service{Type: serviceType, Name: service}) } } + storage := machinery.GetEnv("STORAGE_LOCATION", "") + if storage != "" { + serviceList = append(serviceList, Service{Type: "storage", Name: storage}) + } + return serviceList }