Skip to content

Commit

Permalink
Update deployUi with new placeholder element ${enableEcsRequests}
Browse files Browse the repository at this point in the history
  • Loading branch information
BKadirkhodjaev committed Dec 12, 2024
1 parent 025e2ad commit bbd2596
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions eureka-cli/internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,21 @@ func PrepareStripesConfigJs(commandName string, configPath string, tenant string
}

replaceMap := map[string]string{"${kongUrl}": kongUrl,
"${tenantUrl}": platformCompleteUrl,
"${keycloakUrl}": keycloakUrl,
"${hasAllPerms}": `false`,
"${isSingleTenant}": `true`,
"${tenantOptions}": fmt.Sprintf(`{%[1]s: {name: "%[1]s", clientId: "%[1]s%s"}}`, tenant, GetEnvironmentFromMapByKey("KC_LOGIN_CLIENT_SUFFIX")),
"${tenantUrl}": platformCompleteUrl,
"${keycloakUrl}": keycloakUrl,
"${hasAllPerms}": `false`,
"${isSingleTenant}": `true`,
"${tenantOptions}": fmt.Sprintf(`{%[1]s: {name: "%[1]s", clientId: "%[1]s%s"}}`, tenant, GetEnvironmentFromMapByKey("KC_LOGIN_CLIENT_SUFFIX")),
"${enableEcsRequests}": `false`,
}

var newReadFileStr string = string(readFileBytes)
for key, value := range replaceMap {
if !strings.Contains(newReadFileStr, key) {
slog.Info(commandName, GetFuncName(), fmt.Sprintf("Key not found in stripes.config.js: %s", key))
continue
}

newReadFileStr = strings.Replace(newReadFileStr, key, value, -1)
}

Expand Down

0 comments on commit bbd2596

Please sign in to comment.