-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add CTA to migrate to MB Cloud in admin panel #14458
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f5d63a7
add mb cloud cta to admin updates page
mazameli cb888ce
change url to the new redirect url
mazameli cb138de
add cta to email setup form
mazameli e4ac41c
add cta to admin checklist page
mazameli 8334da2
add cta to state when update is available
mazameli af36048
extract reusable bits into components
mazameli e3f1920
hide CTAs if site url is on mb cloud
mazameli f9cee75
extract isHosted logic to an accessor
mazameli File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
frontend/src/metabase/admin/settings/components/widgets/HostingInfoLink.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from "react"; | ||
import ExternalLink from "metabase/components/ExternalLink"; | ||
|
||
const HostingInfoLink = ({ text }) => ( | ||
<ExternalLink | ||
className="bordered rounded border-brand bg-brand-hover text-white-hover px2 py1 text-bold text-center" | ||
href={"https://www.metabase.com/migrate/from/selfhosted"} | ||
target="_blank" | ||
> | ||
{text} | ||
</ExternalLink> | ||
); | ||
|
||
export default HostingInfoLink; |
23 changes: 23 additions & 0 deletions
23
frontend/src/metabase/admin/settings/components/widgets/MarginHostingCTA.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import { t } from "ttag"; | ||
|
||
import Icon from "metabase/components/Icon"; | ||
import Text from "metabase/components/type/Text"; | ||
import HostingInfoLink from "metabase/admin/settings/components/widgets/HostingInfoLink"; | ||
|
||
const MarginHostingCTA = ({ tagline }) => ( | ||
<div | ||
className="border-left border-brand text-brand px4" | ||
style={{ height: 172 }} | ||
> | ||
<Icon name="cloud" size={48} style={{ color: "#B9D8F4" }} /> | ||
<div className="pb3"> | ||
<Text className="text-brand mb0">{tagline}</Text> | ||
<Text className="text-brand text-bold">{t`Migrate to Metabase Cloud.`}</Text> | ||
</div> | ||
|
||
<HostingInfoLink text={t`Learn more`} /> | ||
</div> | ||
); | ||
|
||
export default MarginHostingCTA; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might it be better to imitate the way some of the settings have an accessor?
but for is hosted. then when the env var is exposed this can change in one place without the isHosted definiition duplicated in many places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, perfect — I was thinking along these lines but didn't know where to look. I'll amend.