Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/operator-manual/custom-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,20 @@ data:
```

![banner with link](../assets/banner.png)

## Login Button Text

By default, the SSO login button label is derived from the OIDC provider or Dex connector name (e.g. "Log in via Azure"). You can override this text using the `ui.loginButtonText` field in the `argocd-cm` ConfigMap.

### argocd-cm
```yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
ui.loginButtonText: "SSO Login"
```

If `ui.loginButtonText` is set, it takes precedence over the provider-derived label. If not set, the default behavior is preserved.
3 changes: 2 additions & 1 deletion ui/src/app/login/components/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export function Login(props: RouteComponentProps<{}>) {
<div className='login__box_saml width-control'>
<a href={`auth/login?return_url=${encodeURIComponent(returnUrl)}`}>
<button className='argo-button argo-button--base argo-button--full-width argo-button--xlg'>
{(authSettings.oidcConfig && <span>Log in via {authSettings.oidcConfig.name}</span>) ||
{(authSettings.uiLoginButtonText && <span>{authSettings.uiLoginButtonText}</span>) ||
(authSettings.oidcConfig && <span>Log in via {authSettings.oidcConfig.name}</span>) ||
(authSettings.dexConfig.connectors.length === 1 && <span>Log in via {authSettings.dexConfig.connectors[0].name}</span>) || (
<span>SSO Login</span>
)}
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/shared/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ export interface AuthSettings {
uiBannerURL: string;
uiBannerPermanent: boolean;
uiBannerPosition: string;
uiLoginButtonText: string;
execEnabled: boolean;
appsInAnyNamespaceEnabled: boolean;
hydratorEnabled: boolean;
Expand Down
5 changes: 5 additions & 0 deletions util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ type ArgoCDSettings struct {
UiBannerPermanent bool `json:"uiBannerPermanent,omitempty"` //nolint:revive //FIXME(var-naming)
// Position of UI Banner
UiBannerPosition string `json:"uiBannerPosition,omitempty"` //nolint:revive //FIXME(var-naming)
// UiLoginButtonText is an optional override for the SSO login button label
UiLoginButtonText string `json:"uiLoginButtonText,omitempty"` //nolint:revive //FIXME(var-naming)
// PasswordPattern for password regular expression
PasswordPattern string `json:"passwordPattern,omitempty"`
// BinaryUrls contains the URLs for downloading argocd binaries
Expand Down Expand Up @@ -513,6 +515,8 @@ const (
settingUIBannerPermanentKey = "ui.bannerpermanent"
// settingUIBannerPositionKey designates the key for the position of the banner
settingUIBannerPositionKey = "ui.bannerposition"
// settingUILoginButtonTextKey designates the key for the custom SSO login button label
settingUILoginButtonTextKey = "ui.loginButtonText"
// settingsBinaryUrlsKey designates the key for the argocd binary URLs
settingsBinaryUrlsKey = "help.download"
// settingsSourceHydratorCommitMessageTemplateKey is the key for the hydrator commit message template
Expand Down Expand Up @@ -1618,6 +1622,7 @@ func updateSettingsFromConfigMap(settings *ArgoCDSettings, argoCDCM *corev1.Conf
settings.UiBannerContent = argoCDCM.Data[settingUIBannerContentKey]
settings.UiBannerPermanent = argoCDCM.Data[settingUIBannerPermanentKey] == "true"
settings.UiBannerPosition = argoCDCM.Data[settingUIBannerPositionKey]
settings.UiLoginButtonText = argoCDCM.Data[settingUILoginButtonTextKey]
settings.BinaryUrls = getDownloadBinaryUrlsFromConfigMap(argoCDCM)
if err := ValidateExternalURL(argoCDCM.Data[settingURLKey]); err != nil {
log.Warnf("Failed to validate URL in configmap: %v", err)
Expand Down
Loading