Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow Banner to be non-closable #7261 #7312

Merged
merged 1 commit into from Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/swagger.json
Expand Up @@ -3666,6 +3666,9 @@
"uiBannerContent": {
"type": "string"
},
"uiBannerPermanent": {
"type": "boolean"
},
"uiBannerURL": {
"type": "string"
},
Expand Down
6 changes: 6 additions & 0 deletions docs/operator-manual/argocd-cm.yaml
Expand Up @@ -224,6 +224,12 @@ data:
# Optional link for banner. If set, the entire banner text will become a link.
# You can have bannercontent without a bannerurl, but not the other way around.
ui.bannerurl: "https://argoproj.github.io"
# Uncomment to make the banner not show the close buttons, thereby making the banner permanent.
# Because it is permanent, only one line of text is available to not take up too much real estate in the UI,
# so it is recommended that the length of the bannercontent text is kept reasonably short. Note that you can
# have either a permanent banner or a regular closeable banner, and NOT both. eg. A user can't dismiss a
# notification message (closeable) banner, to then immediately see a permanent banner.
# ui.bannerpermanent: "true"

# Application reconciliation timeout is the max amount of time required to discover if a new manifests version got
# published to the repository. Reconciliation by timeout is disabled if timeout is set to 0. Three minutes by default.
Expand Down
172 changes: 108 additions & 64 deletions pkg/apiclient/settings/settings.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/settings/settings.go
Expand Up @@ -120,6 +120,7 @@ func (s *Server) Get(ctx context.Context, q *settingspkg.SettingsQuery) (*settin
set.ConfigManagementPlugins = tools
set.UiBannerContent = argoCDSettings.UiBannerContent
set.UiBannerURL = argoCDSettings.UiBannerURL
set.UiBannerPermanent = argoCDSettings.UiBannerPermanent
}
if argoCDSettings.DexConfig != "" {
var cfg settingspkg.DexConfig
Expand Down
1 change: 1 addition & 0 deletions server/settings/settings.proto
Expand Up @@ -35,6 +35,7 @@ message Settings {
string uiBannerURL = 16;
string passwordPattern = 17;
string trackingMethod = 18;
bool uiBannerPermanent = 19;
}

message GoogleAnalyticsConfig {
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/shared/models.ts
Expand Up @@ -442,6 +442,7 @@ export interface AuthSettings {
uiCssURL: string;
uiBannerContent: string;
uiBannerURL: string;
uiBannerPermanent: boolean;
}

export interface UserInfo {
Expand Down
12 changes: 12 additions & 0 deletions ui/src/app/ui-banner/ui-banner.scss
Expand Up @@ -28,6 +28,18 @@
top: $banner-height;
}
}

&--wrapper-multiline {
.page__top-bar {
top: $banner-height;
}
}

&--wrapper-singleline {
.page__top-bar {
top: 28px;
}
}
}

.ui-banner-text {
Expand Down