Skip to content

Commit

Permalink
feat: Allow Banner to be non-closable argoproj#7261 (argoproj#7312)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Chong <[email protected]>
  • Loading branch information
keithchong authored Oct 4, 2021
1 parent df7e5ff commit e084a11
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 78 deletions.
3 changes: 3 additions & 0 deletions assets/swagger.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit e084a11

Please sign in to comment.