Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
bed5bfc6
Unverified
Commit
bed5bfc6
authored
2 years ago
by
Alexander Polyankin
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Migrate whitelabel settings that were dependent on custom colors (#23890)
parent
7caca2ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
enterprise/frontend/src/metabase-enterprise/whitelabel/index.js
+1
-0
1 addition, 0 deletions
...rise/frontend/src/metabase-enterprise/whitelabel/index.js
src/metabase/public_settings.clj
+30
-14
30 additions, 14 deletions
src/metabase/public_settings.clj
with
31 additions
and
14 deletions
enterprise/frontend/src/metabase-enterprise/whitelabel/index.js
+
1
−
0
View file @
bed5bfc6
...
...
@@ -89,6 +89,7 @@ if (hasPremiumFeature("whitelabel")) {
key
:
"
show-lighthouse-illustration
"
,
display_name
:
t
`Lighthouse illustration`
,
type
:
"
boolean
"
,
defaultValue
:
true
,
},
],
},
...
...
This diff is collapsed.
Click to expand it.
src/metabase/public_settings.clj
+
30
−
14
View file @
bed5bfc6
...
...
@@ -289,13 +289,6 @@
:type
:keyword
:default
:doing-science
)
(
defsetting
show-metabot
(
deferred-tru
"Enables Metabot character on the home page"
)
:visibility
:public
:type
:boolean
:enabled?
premium-features/enable-whitelabeling?
:default
true
)
(
defsetting
application-colors-migrated
"Stores whether the `application-colors` setting has been migrated to 0.44 expectations"
:visibility
:internal
...
...
@@ -366,6 +359,36 @@
:enabled?
premium-features/enable-whitelabeling?
:default
"app/assets/img/favicon.ico"
)
(
defn
has-custom-branding?
"Whether this instance has custom colors or logo set."
[]
(
or
(
not-empty
(
application-colors
))
(
not=
(
application-logo-url
)
"app/assets/img/logo.svg"
)))
(
defsetting
show-metabot
(
deferred-tru
"Enables Metabot character on the home page"
)
:visibility
:public
:type
:boolean
:enabled?
premium-features/enable-whitelabeling?
:getter
(
fn
[]
(
if-some
[
value
(
setting/get-value-of-type
:boolean
:show-metabot
)]
value
(
let
[
new-value
(
not
(
has-custom-branding?
))]
(
setting/set-value-of-type!
:boolean
:show-metabot
new-value
)
new-value
))))
(
defsetting
show-lighthouse-illustration
(
deferred-tru
"Display the lighthouse illustration on the home and login pages."
)
:visibility
:public
:type
:boolean
:enabled?
premium-features/enable-whitelabeling?
:getter
(
fn
[]
(
if-some
[
value
(
setting/get-value-of-type
:boolean
:show-lighthouse-illustration
)]
value
(
let
[
new-value
(
not
(
has-custom-branding?
))]
(
setting/set-value-of-type!
:boolean
:show-lighthouse-illustration
new-value
)
new-value
))))
(
defsetting
enable-password-login
(
deferred-tru
"Allow logging in by email and password."
)
:visibility
:public
...
...
@@ -430,13 +453,6 @@
:default
true
:visibility
:authenticated
)
(
defsetting
show-lighthouse-illustration
(
deferred-tru
"Display the lighthouse illustration on the home and login pages."
)
:visibility
:public
:type
:boolean
:enabled?
premium-features/enable-whitelabeling?
:default
true
)
(
defsetting
source-address-header
(
deferred-tru
"Identify the source of HTTP requests by this header's value, instead of its remote address."
)
:default
"X-Forwarded-For"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment