refactor: parametrize default value
This commit is contained in:
parent
3f32dbb1a3
commit
03000c25e0
@ -238,7 +238,7 @@ Please note, "upgrade"/"rollback" do not support chaos operations.`,
|
|||||||
log.Debug("skipping domain checks as requested")
|
log.Debug("skipping domain checks as requested")
|
||||||
}
|
}
|
||||||
|
|
||||||
deployedVersion := "N/A"
|
deployedVersion := config.NO_VERSION_DEFAULT
|
||||||
if deployMeta.IsDeployed {
|
if deployMeta.IsDeployed {
|
||||||
deployedVersion = deployMeta.Version
|
deployedVersion = deployMeta.Version
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
appPkg "coopcloud.tech/abra/pkg/app"
|
appPkg "coopcloud.tech/abra/pkg/app"
|
||||||
|
"coopcloud.tech/abra/pkg/config"
|
||||||
"coopcloud.tech/abra/pkg/formatter"
|
"coopcloud.tech/abra/pkg/formatter"
|
||||||
"coopcloud.tech/abra/pkg/log"
|
"coopcloud.tech/abra/pkg/log"
|
||||||
"github.com/AlecAivazis/survey/v2"
|
"github.com/AlecAivazis/survey/v2"
|
||||||
@ -55,7 +56,7 @@ func NewVersionOverview(
|
|||||||
|
|
||||||
domain := app.Domain
|
domain := app.Domain
|
||||||
if domain == "" {
|
if domain == "" {
|
||||||
domain = "N/A"
|
domain = config.NO_DOMAIN_DEFAULT
|
||||||
}
|
}
|
||||||
|
|
||||||
body := strings.Builder{}
|
body := strings.Builder{}
|
||||||
@ -127,7 +128,7 @@ func DeployOverview(
|
|||||||
|
|
||||||
domain := app.Domain
|
domain := app.Domain
|
||||||
if domain == "" {
|
if domain == "" {
|
||||||
domain = "N/A"
|
domain = config.NO_DOMAIN_DEFAULT
|
||||||
}
|
}
|
||||||
|
|
||||||
rows := [][]string{
|
rows := [][]string{
|
||||||
@ -183,7 +184,7 @@ func UndeployOverview(
|
|||||||
|
|
||||||
domain := app.Domain
|
domain := app.Domain
|
||||||
if domain == "" {
|
if domain == "" {
|
||||||
domain = "N/A"
|
domain = config.NO_DOMAIN_DEFAULT
|
||||||
}
|
}
|
||||||
|
|
||||||
rows := [][]string{
|
rows := [][]string{
|
||||||
|
@ -107,5 +107,13 @@ var (
|
|||||||
REPOS_BASE_URL = "https://git.coopcloud.tech/coop-cloud"
|
REPOS_BASE_URL = "https://git.coopcloud.tech/coop-cloud"
|
||||||
CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
|
CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
|
||||||
SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"
|
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"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user