forked from toolshed/abra
		
	refactor: parametrize default value
This commit is contained in:
		@ -238,7 +238,7 @@ Please note, "upgrade"/"rollback" do not support chaos operations.`,
 | 
			
		||||
			log.Debug("skipping domain checks as requested")
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		deployedVersion := "N/A"
 | 
			
		||||
		deployedVersion := config.NO_VERSION_DEFAULT
 | 
			
		||||
		if deployMeta.IsDeployed {
 | 
			
		||||
			deployedVersion = deployMeta.Version
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	appPkg "coopcloud.tech/abra/pkg/app"
 | 
			
		||||
	"coopcloud.tech/abra/pkg/config"
 | 
			
		||||
	"coopcloud.tech/abra/pkg/formatter"
 | 
			
		||||
	"coopcloud.tech/abra/pkg/log"
 | 
			
		||||
	"github.com/AlecAivazis/survey/v2"
 | 
			
		||||
@ -55,7 +56,7 @@ func NewVersionOverview(
 | 
			
		||||
 | 
			
		||||
	domain := app.Domain
 | 
			
		||||
	if domain == "" {
 | 
			
		||||
		domain = "N/A"
 | 
			
		||||
		domain = config.NO_DOMAIN_DEFAULT
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	body := strings.Builder{}
 | 
			
		||||
@ -127,7 +128,7 @@ func DeployOverview(
 | 
			
		||||
 | 
			
		||||
	domain := app.Domain
 | 
			
		||||
	if domain == "" {
 | 
			
		||||
		domain = "N/A"
 | 
			
		||||
		domain = config.NO_DOMAIN_DEFAULT
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	rows := [][]string{
 | 
			
		||||
@ -183,7 +184,7 @@ func UndeployOverview(
 | 
			
		||||
 | 
			
		||||
	domain := app.Domain
 | 
			
		||||
	if domain == "" {
 | 
			
		||||
		domain = "N/A"
 | 
			
		||||
		domain = config.NO_DOMAIN_DEFAULT
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	rows := [][]string{
 | 
			
		||||
 | 
			
		||||
@ -107,5 +107,13 @@ var (
 | 
			
		||||
	REPOS_BASE_URL           = "https://git.coopcloud.tech/coop-cloud"
 | 
			
		||||
	CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
 | 
			
		||||
	SSH_URL_TEMPLATE         = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"
 | 
			
		||||
	CHAOS_DEFAULT            = "false"
 | 
			
		||||
 | 
			
		||||
	// NOTE(d1): please note, this was done purely out of laziness on our part
 | 
			
		||||
	// AFAICR. it's easy to punt the value into the label because that is what is
 | 
			
		||||
	// expects. it's not particularly useful in terms of UI/UX but hey, nobody
 | 
			
		||||
	// complained yet!
 | 
			
		||||
	CHAOS_DEFAULT = "false"
 | 
			
		||||
 | 
			
		||||
	NO_DOMAIN_DEFAULT  = "N/A"
 | 
			
		||||
	NO_VERSION_DEFAULT = "N/A"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user