Skip to content
Snippets Groups Projects
Unverified Commit 33d936ee authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Move hosting code to EE (#32079)

parent 1a3edb0a
No related branches found
No related tags found
No related merge requests found
Showing with 24 additions and 13 deletions
import { t } from "ttag";
import MetabaseSettings from "metabase/lib/settings";
import { getStoreUrl } from "metabase/selectors/settings";
import { Description, Link, LinkIcon } from "./SettingsCloudStoreLink.styled";
export function SettingsCloudStoreLink() {
const url = MetabaseSettings.storeUrl();
export const SettingsCloudStoreLink = () => {
const url = getStoreUrl();
return (
<div>
<Description>{t`Manage your Cloud account, including billing preferences and technical settings about this instance in your Metabase Store account.`}</Description>
......@@ -13,4 +14,4 @@ export function SettingsCloudStoreLink() {
</Link>
</div>
);
}
};
export { SettingsCloudStoreLink } from "./SettingsCloudStoreLink";
import _ from "underscore";
import { updateIn } from "icepick";
import { t } from "ttag";
import MetabaseSettings from "metabase/lib/settings";
import { PLUGIN_ADMIN_SETTINGS_UPDATES } from "metabase/plugins";
import { SettingsCloudStoreLink } from "../../components/SettingsCloudStoreLink";
import { hasPremiumFeature } from "metabase-enterprise/settings";
import { SettingsCloudStoreLink } from "./components/SettingsCloudStoreLink";
if (MetabaseSettings.isHosted()) {
if (hasPremiumFeature("hosting")) {
PLUGIN_ADMIN_SETTINGS_UPDATES.push(sections => _.omit(sections, ["updates"]));
PLUGIN_ADMIN_SETTINGS_UPDATES.push(sections =>
......
......@@ -10,6 +10,7 @@ import "./shared";
// PLUGINS:
import "./hosting";
import "./tools";
import "./sandboxes";
import "./auth";
......
......@@ -317,14 +317,16 @@ class MetabaseSettings {
return `https://www.metabase.com/docs/${tag}/${page}${anchor}`;
}
pricingUrl() {
return "https://www.metabase.com/pricing";
}
/**
* @deprecated use getLearnUrl
*/
learnUrl(path = "") {
return `https://www.metabase.com/learn/${path}`;
}
/**
* @deprecated use getStoreUrl
*/
storeUrl(path = "") {
return `https://store.metabase.com/${path}`;
}
......
......@@ -3,4 +3,3 @@ import "metabase/plugins/builtin/auth/google";
import "metabase/plugins/builtin/auth/ldap";
import "metabase/plugins/builtin/auth/jwt";
import "metabase/plugins/builtin/auth/saml";
import "metabase/plugins/builtin/settings/hosted";
export * from "./SettingsCloudStoreLink";
......@@ -18,6 +18,14 @@ export const getSetting = <T extends SettingKey>(
key: T,
): Settings[T] => getSettings(state)[key];
export const getStoreUrl = (path = "") => {
return `https://store.metabase.com/${path}`;
};
export const getLearnUrl = (path = "") => {
return `https://www.metabase.com/learn/${path}`;
};
interface UpgradeUrlOpts {
utm_media: string;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment