chore: added query params for ramps on admin settings page (#26539)
This commit is contained in:
parent
56c6aa0f1d
commit
584a0cd6d1
|
|
@ -16,6 +16,7 @@ import { adminSettingsCategoryUrl } from "RouteBuilder";
|
||||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||||
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
||||||
import BusinessTag from "components/BusinessTag";
|
import BusinessTag from "components/BusinessTag";
|
||||||
|
import { RampFeature, RampSection } from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
export const Wrapper = styled.div`
|
export const Wrapper = styled.div`
|
||||||
flex-basis: calc(100% - ${(props) => props.theme.homePage.leftPane.width}px);
|
flex-basis: calc(100% - ${(props) => props.theme.homePage.leftPane.width}px);
|
||||||
|
|
@ -107,6 +108,8 @@ export function ActionButton({ method }: { method: AuthMethodType }) {
|
||||||
const { onUpgrade } = useOnUpgrade({
|
const { onUpgrade } = useOnUpgrade({
|
||||||
logEventName: "ADMIN_SETTINGS_UPGRADE_AUTH_METHOD",
|
logEventName: "ADMIN_SETTINGS_UPGRADE_AUTH_METHOD",
|
||||||
logEventData: { method: method.label },
|
logEventData: { method: method.label },
|
||||||
|
featureName: RampFeature.Sso,
|
||||||
|
sectionName: RampSection.AdminSettings,
|
||||||
});
|
});
|
||||||
|
|
||||||
const onClickHandler = (method: AuthMethodType) => {
|
const onClickHandler = (method: AuthMethodType) => {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import {
|
||||||
} from "@appsmith/pages/AdminSettings/config/authentication/AuthPage";
|
} from "@appsmith/pages/AdminSettings/config/authentication/AuthPage";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import BusinessTag from "components/BusinessTag";
|
import BusinessTag from "components/BusinessTag";
|
||||||
|
import { RampFeature, RampSection } from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
const StyledSettingsSubHeader = styled(SettingsSubHeader)`
|
const StyledSettingsSubHeader = styled(SettingsSubHeader)`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -21,6 +22,8 @@ const StyledSettingsSubHeader = styled(SettingsSubHeader)`
|
||||||
const UpgradeBanner = () => {
|
const UpgradeBanner = () => {
|
||||||
const { onUpgrade } = useOnUpgrade({
|
const { onUpgrade } = useOnUpgrade({
|
||||||
logEventName: "BRANDING_UPGRADE_CLICK",
|
logEventName: "BRANDING_UPGRADE_CLICK",
|
||||||
|
featureName: RampFeature.Branding,
|
||||||
|
sectionName: RampSection.AdminSettings,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,14 @@ import {
|
||||||
SECURITY_APPS_LEAST_PRIVILEGE_DETAIL1,
|
SECURITY_APPS_LEAST_PRIVILEGE_DETAIL1,
|
||||||
} from "@appsmith/constants/messages";
|
} from "@appsmith/constants/messages";
|
||||||
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
||||||
|
import { RampFeature, RampSection } from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
export function AccessControlUpgradePage() {
|
export function AccessControlUpgradePage() {
|
||||||
const { onUpgrade } = useOnUpgrade({
|
const { onUpgrade } = useOnUpgrade({
|
||||||
logEventName: "GAC_UPGRADE_CLICK_ADMIN_SETTINGS",
|
logEventName: "GAC_UPGRADE_CLICK_ADMIN_SETTINGS",
|
||||||
logEventData: { source: "Granular Access Control" },
|
logEventData: { source: "Granular Access Control" },
|
||||||
|
featureName: RampFeature.Gac,
|
||||||
|
sectionName: RampSection.AdminSettings,
|
||||||
});
|
});
|
||||||
|
|
||||||
const header: Header = {
|
const header: Header = {
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,14 @@ import {
|
||||||
SECURITY_AND_COMPLIANCE_DETAIL2,
|
SECURITY_AND_COMPLIANCE_DETAIL2,
|
||||||
} from "@appsmith/constants/messages";
|
} from "@appsmith/constants/messages";
|
||||||
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
||||||
|
import { RampFeature, RampSection } from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
export function AuditLogsUpgradePage() {
|
export function AuditLogsUpgradePage() {
|
||||||
const { onUpgrade } = useOnUpgrade({
|
const { onUpgrade } = useOnUpgrade({
|
||||||
logEventName: "AUDIT_LOGS_UPGRADE_ADMIN_SETTINGS",
|
logEventName: "AUDIT_LOGS_UPGRADE_ADMIN_SETTINGS",
|
||||||
logEventData: { source: "AuditLogs" },
|
logEventData: { source: "AuditLogs" },
|
||||||
|
featureName: RampFeature.AuditLogs,
|
||||||
|
sectionName: RampSection.AdminSettings,
|
||||||
});
|
});
|
||||||
|
|
||||||
const header: Header = {
|
const header: Header = {
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,14 @@ import {
|
||||||
USER_PROVISIONING_FOR_ENTERPRISES,
|
USER_PROVISIONING_FOR_ENTERPRISES,
|
||||||
} from "@appsmith/constants/messages";
|
} from "@appsmith/constants/messages";
|
||||||
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
import useOnUpgrade from "utils/hooks/useOnUpgrade";
|
||||||
|
import { RampFeature, RampSection } from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
export function ProvisioningUpgradePage() {
|
export function ProvisioningUpgradePage() {
|
||||||
const { onUpgrade } = useOnUpgrade({
|
const { onUpgrade } = useOnUpgrade({
|
||||||
logEventName: "PROVISIONING_UPGRADE_ADMIN_SETTINGS",
|
logEventName: "PROVISIONING_UPGRADE_ADMIN_SETTINGS",
|
||||||
logEventData: { source: "Provisioning" },
|
logEventData: { source: "Provisioning" },
|
||||||
|
featureName: RampFeature.Provisioning,
|
||||||
|
sectionName: RampSection.AdminSettings,
|
||||||
});
|
});
|
||||||
|
|
||||||
const header: Header = {
|
const header: Header = {
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,9 @@ export const PRICING_PAGE_URL = (
|
||||||
URL: string,
|
URL: string,
|
||||||
source: string,
|
source: string,
|
||||||
instanceId: string,
|
instanceId: string,
|
||||||
) => `${URL}?source=${source}${instanceId ? `&instance=${instanceId}` : ``}`;
|
feature?: string,
|
||||||
|
section?: string,
|
||||||
|
) =>
|
||||||
|
`${URL}?source=${source}${instanceId ? `&instance=${instanceId}` : ``}${
|
||||||
|
feature ? `&feature=${feature}` : ""
|
||||||
|
}${section ? `§ion=${section}` : ""}`;
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,17 @@ export enum RampSection {
|
||||||
AppSettings = "app_settings",
|
AppSettings = "app_settings",
|
||||||
BottomBarEnvSwitcher = "bottom_bar_env_switcher",
|
BottomBarEnvSwitcher = "bottom_bar_env_switcher",
|
||||||
DSEditor = "ds_editor",
|
DSEditor = "ds_editor",
|
||||||
|
AdminSettings = "admin_settings",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RampFeature {
|
export enum RampFeature {
|
||||||
PrivateEmbeds = "private_embeds",
|
PrivateEmbeds = "private_embeds",
|
||||||
Gac = "gac",
|
Gac = "gac",
|
||||||
MultipleEnv = "multiple_env",
|
MultipleEnv = "multiple_env",
|
||||||
|
AuditLogs = "audit_logs",
|
||||||
|
Branding = "branding",
|
||||||
|
Sso = "sso",
|
||||||
|
Provisioning = "provisioning",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const INVITE_USER_TO_APP: SupportedRampsType = {
|
export const INVITE_USER_TO_APP: SupportedRampsType = {
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,20 @@ import type { EventName } from "@appsmith/utils/analyticsUtilTypes";
|
||||||
import AnalyticsUtil from "utils/AnalyticsUtil";
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
||||||
import { getAppsmithConfigs } from "@appsmith/configs";
|
import { getAppsmithConfigs } from "@appsmith/configs";
|
||||||
import { pricingPageUrlSource } from "@appsmith/utils/licenseHelpers";
|
import { pricingPageUrlSource } from "@appsmith/utils/licenseHelpers";
|
||||||
|
import type {
|
||||||
|
RampFeature,
|
||||||
|
RampSection,
|
||||||
|
} from "utils/ProductRamps/RampsControlList";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
logEventName?: EventName;
|
logEventName?: EventName;
|
||||||
logEventData?: any;
|
logEventData?: any;
|
||||||
|
featureName?: RampFeature;
|
||||||
|
sectionName?: RampSection;
|
||||||
};
|
};
|
||||||
|
|
||||||
const useOnUpgrade = (props: Props) => {
|
const useOnUpgrade = (props: Props) => {
|
||||||
const { logEventData, logEventName } = props;
|
const { featureName, logEventData, logEventName, sectionName } = props;
|
||||||
const instanceId = useSelector(getInstanceId);
|
const instanceId = useSelector(getInstanceId);
|
||||||
const appsmithConfigs = getAppsmithConfigs();
|
const appsmithConfigs = getAppsmithConfigs();
|
||||||
|
|
||||||
|
|
@ -26,6 +32,8 @@ const useOnUpgrade = (props: Props) => {
|
||||||
appsmithConfigs.pricingUrl,
|
appsmithConfigs.pricingUrl,
|
||||||
pricingPageUrlSource,
|
pricingPageUrlSource,
|
||||||
instanceId,
|
instanceId,
|
||||||
|
featureName,
|
||||||
|
sectionName,
|
||||||
),
|
),
|
||||||
"_blank",
|
"_blank",
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user