mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 22:27:48 +00:00
Merge pull request #4757 from Infisical/fix/upgrade-plan-notice-in-popup
fix: Pro/Enterprise plan clarification in ui popup
This commit is contained in:
@@ -69,7 +69,10 @@ export const PkiSyncSelect = ({ onSelect }: Props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
enterprise && !subscription.enterpriseCertificateSyncs
|
enterprise && !subscription.enterpriseCertificateSyncs
|
||||||
? handlePopUpOpen("upgradePlan")
|
? handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true,
|
||||||
|
text: "You can use every Certificate Sync if you switch to Infisical's Enterprise plan."
|
||||||
|
})
|
||||||
: onSelect(destination)
|
: onSelect(destination)
|
||||||
}
|
}
|
||||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||||
@@ -148,6 +151,7 @@ export const PkiSyncSelect = ({ onSelect }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text="You can use every Certificate Sync if you switch to Infisical's Enterprise plan."
|
text="You can use every Certificate Sync if you switch to Infisical's Enterprise plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ export const SecretSyncSelect = ({ onSelect }: Props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
enterprise && !subscription.enterpriseSecretSyncs
|
enterprise && !subscription.enterpriseSecretSyncs
|
||||||
? handlePopUpOpen("upgradePlan")
|
? handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
})
|
||||||
: onSelect(destination)
|
: onSelect(destination)
|
||||||
}
|
}
|
||||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||||
@@ -145,6 +147,7 @@ export const SecretSyncSelect = ({ onSelect }: Props) => {
|
|||||||
)}
|
)}
|
||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use every Secret Sync if you switch to Infisical's Enterprise plan."
|
text="You can use every Secret Sync if you switch to Infisical's Enterprise plan."
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ export const PamLayout = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (subscription && !subscription.pam) {
|
if (subscription && !subscription.pam) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
description: "You can use PAM if you switch to Infisical's Enterprise plan.",
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, [subscription]);
|
}, [subscription]);
|
||||||
|
|
||||||
@@ -111,7 +114,8 @@ export const PamLayout = () => {
|
|||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
handlePopUpToggle("upgradePlan", isOpen);
|
handlePopUpToggle("upgradePlan", isOpen);
|
||||||
}}
|
}}
|
||||||
text="You can use PAM if you switch to a paid Infisical plan."
|
text={popUp.upgradePlan.data?.description}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export const EncryptionPageForm = () => {
|
|||||||
|
|
||||||
if (!subscription.hsm) {
|
if (!subscription.hsm) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true,
|
||||||
description: "Hardware Security Module's (HSM's), are only available on Enterprise plans."
|
description: "Hardware Security Module's (HSM's), are only available on Enterprise plans."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -146,6 +147,7 @@ export const EncryptionPageForm = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan?.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+1
@@ -104,6 +104,7 @@ export const CertificateTemplatesSection = ({ caId }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text="Managing template enrollment options for EST is only available on Infisical's Enterprise plan."
|
text="Managing template enrollment options for EST is only available on Infisical's Enterprise plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
-1
@@ -36,6 +36,7 @@ type Props = {
|
|||||||
data?: {
|
data?: {
|
||||||
id?: string;
|
id?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
isEnterpriseFeature?: boolean;
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
};
|
};
|
||||||
@@ -90,7 +91,9 @@ export const CertificateTemplatesTable = ({ handlePopUpOpen, caId }: Props) => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.pkiEst) {
|
if (!subscription?.pkiEst) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,9 @@ export const PkiTemplateListPage = () => {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!subscription.pkiEst) {
|
if (!subscription.pkiEst) {
|
||||||
handlePopUpOpen("estUpgradePlan");
|
handlePopUpOpen("estUpgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("enrollmentOptions", {
|
handlePopUpOpen("enrollmentOptions", {
|
||||||
@@ -296,6 +298,7 @@ export const PkiTemplateListPage = () => {
|
|||||||
isOpen={popUp.estUpgradePlan.isOpen}
|
isOpen={popUp.estUpgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("estUpgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("estUpgradePlan", isOpen)}
|
||||||
text="You can only configure template enrollment methods if you switch to Infisical's Enterprise plan."
|
text="You can only configure template enrollment methods if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.estUpgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -170,7 +170,9 @@ export const KmipClientTable = () => {
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription.kmip) {
|
if (subscription && !subscription.kmip) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,6 +345,7 @@ export const KmipClientTable = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="KMIP requires an enterprise plan."
|
text="KMIP requires an enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
+3
-1
@@ -27,7 +27,8 @@ export const OrgGroupsSection = () => {
|
|||||||
if (!subscription?.groups) {
|
if (!subscription?.groups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can manage users more efficiently with groups if you upgrade your Infisical plan to an Enterprise license."
|
"You can manage users more efficiently with groups if you upgrade your Infisical plan to an Enterprise license.",
|
||||||
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("group");
|
handlePopUpOpen("group");
|
||||||
@@ -92,6 +93,7 @@ export const OrgGroupsSection = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+2
-1
@@ -291,7 +291,8 @@ export const IdentityAuthMethodModalContent = ({
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp?.upgradePlan?.isOpen}
|
isOpen={popUp?.upgradePlan?.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use IP allowlisting if you switch to Infisical's Pro plan."
|
text={`You can use ${popUp.upgradePlan.data?.featureName ?? "IP allowlisting"} if you switch to Infisical's ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+8
-2
@@ -147,7 +147,10 @@ const schema = z
|
|||||||
export type FormData = z.infer<typeof schema>;
|
export type FormData = z.infer<typeof schema>;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handlePopUpOpen: (popUpName: keyof UsePopUpState<["upgradePlan"]>) => void;
|
handlePopUpOpen: (
|
||||||
|
popUpName: keyof UsePopUpState<["upgradePlan"]>,
|
||||||
|
data?: { isEnterpriseFeature?: boolean; featureName?: string }
|
||||||
|
) => void;
|
||||||
handlePopUpToggle: (
|
handlePopUpToggle: (
|
||||||
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
popUpName: keyof UsePopUpState<["identityAuthMethod"]>,
|
||||||
state?: boolean
|
state?: boolean
|
||||||
@@ -304,7 +307,10 @@ export const IdentityLdapAuthForm = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!subscription?.ldap) {
|
if (!subscription?.ldap) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true,
|
||||||
|
featureName: "LDAP authentication"
|
||||||
|
});
|
||||||
handlePopUpToggle("identityAuthMethod", false);
|
handlePopUpToggle("identityAuthMethod", false);
|
||||||
}
|
}
|
||||||
}, [subscription, handlePopUpOpen, handlePopUpToggle]);
|
}, [subscription, handlePopUpOpen, handlePopUpToggle]);
|
||||||
|
|||||||
+8
-3
@@ -163,7 +163,7 @@ export const IdentitySection = withPermission(
|
|||||||
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can add more identities if you upgrade your Infisical plan."
|
"You can add more identities if you upgrade your Infisical Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,11 @@ export const IdentitySection = withPermission(
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription.machineIdentityAuthTemplates) {
|
if (subscription && !subscription.machineIdentityAuthTemplates) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true,
|
||||||
|
description:
|
||||||
|
"You can use Identity Auth Templates if you switch to Infisical's Enterprise plan."
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("createTemplate");
|
handlePopUpOpen("createTemplate");
|
||||||
@@ -279,7 +283,8 @@ export const IdentitySection = withPermission(
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use Identity Auth Templates if you switch to Infisical's Enterprise plan."
|
text={popUp.upgradePlan.data?.description}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@ export const OrgMembersSection = () => {
|
|||||||
|
|
||||||
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
if (!isMoreIdentitiesAllowed && !isEnterprise) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can add more members if you upgrade your Infisical plan."
|
description: "You can add more members if you switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -133,7 +133,8 @@ export const OrgMembersTable = ({
|
|||||||
|
|
||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can assign custom roles to members if you upgrade your Infisical plan."
|
description:
|
||||||
|
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ export const OrgRoleTable = () => {
|
|||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can set the default org role to a custom role if you upgrade your Infisical plan."
|
"You can set the default org role to a custom role if you switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -75,7 +75,9 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
enterprise && !subscription.enterpriseAppConnections
|
enterprise && !subscription.enterpriseAppConnections
|
||||||
? handlePopUpOpen("upgradePlan")
|
? handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
})
|
||||||
: onSelect(option.app)
|
: onSelect(option.app)
|
||||||
}
|
}
|
||||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||||
@@ -167,6 +169,7 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use every App Connection if you switch to Infisical's Enterprise plan."
|
text="You can use every App Connection if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ const LogsSectionComponent = ({
|
|||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
handlePopUpToggle("upgradePlan", isOpen);
|
handlePopUpToggle("upgradePlan", isOpen);
|
||||||
}}
|
}}
|
||||||
text="You can use audit logs if you switch to a paid Infisical plan."
|
text="You can use audit logs if you switch to Infisical's Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -181,7 +181,7 @@ const LogsSectionComponent = ({
|
|||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
handlePopUpToggle("upgradePlan", isOpen);
|
handlePopUpToggle("upgradePlan", isOpen);
|
||||||
}}
|
}}
|
||||||
text="You can use audit logs if you switch to a paid Infisical plan."
|
text="You can use audit logs if you switch to Infisical's Pro plan."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ const Page = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
<DeleteActionModal
|
<DeleteActionModal
|
||||||
isOpen={popUp.deleteIdentity.isOpen}
|
isOpen={popUp.deleteIdentity.isOpen}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export const ProjectsPage = () => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You have exceeded the number of projects allowed on the free plan."
|
text="You have exceeded the number of projects allowed on the free plan. You can upgrade to Infisical's Pro plan to add more projects."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-1
@@ -29,7 +29,9 @@ export const AuditLogStreamsTab = withPermission(
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription?.auditLogStreams) {
|
if (subscription && !subscription?.auditLogStreams) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("auditLogStreamForm");
|
handlePopUpOpen("auditLogStreamForm");
|
||||||
@@ -56,6 +58,7 @@ export const AuditLogStreamsTab = withPermission(
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add audit log streams if you switch to Infisical's Enterprise plan."
|
text="You can add audit log streams if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-1
@@ -70,7 +70,9 @@ export const LogStreamProviderSelect = ({ onSelect }: Props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (option.provider === LogProvider.QRadar) {
|
if (option.provider === LogProvider.QRadar) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
onSelect(option.provider);
|
onSelect(option.provider);
|
||||||
}
|
}
|
||||||
@@ -110,6 +112,7 @@ export const LogStreamProviderSelect = ({ onSelect }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="This audit log stream provider requires an enterprise license."
|
text="This audit log stream provider requires an enterprise license."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -180,7 +180,9 @@ const OrgConfigSection = ({
|
|||||||
className="mt-2"
|
className="mt-2"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription.kmip) {
|
if (subscription && !subscription.kmip) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,6 +253,7 @@ const OrgConfigSection = ({
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="KMIP requires an enterprise plan."
|
text="KMIP requires an enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-1
@@ -27,6 +27,7 @@ type Props = {
|
|||||||
kmsId?: string;
|
kmsId?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
provider?: string;
|
provider?: string;
|
||||||
|
isEnterpriseFeature?: boolean;
|
||||||
}
|
}
|
||||||
) => void;
|
) => void;
|
||||||
subscription: SubscriptionPlan;
|
subscription: SubscriptionPlan;
|
||||||
@@ -111,7 +112,9 @@ export const ExternalKmsItem = ({ kms, handlePopUpOpen, subscription }: Props) =
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (subscription && !subscription?.externalKms) {
|
if (subscription && !subscription?.externalKms) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -74,7 +74,9 @@ export const OrgEncryptionTab = withPermission(
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription?.externalKms) {
|
if (subscription && !subscription?.externalKms) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("addExternalKms");
|
handlePopUpOpen("addExternalKms");
|
||||||
@@ -124,6 +126,7 @@ export const OrgEncryptionTab = withPermission(
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can configure external KMS if you switch to Infisical's Enterprise plan."
|
text="You can configure external KMS if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
<AddExternalKmsForm
|
<AddExternalKmsForm
|
||||||
isOpen={popUp.addExternalKms.isOpen}
|
isOpen={popUp.addExternalKms.isOpen}
|
||||||
|
|||||||
+4
-1
@@ -111,7 +111,9 @@ export const OrgGithubSyncSection = () => {
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
subscription.githubOrgSync
|
subscription.githubOrgSync
|
||||||
? handlePopUpOpen("githubOrgSyncConfig")
|
? handlePopUpOpen("githubOrgSyncConfig")
|
||||||
: handlePopUpOpen("upgradePlan")
|
: handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
isDisabled={!isAllowed}
|
isDisabled={!isAllowed}
|
||||||
@@ -203,6 +205,7 @@ export const OrgGithubSyncSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use GitHub Organization Plan if you switch to Infisical's Enterprise plan."
|
text="You can use GitHub Organization Plan if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+10
-3
@@ -29,7 +29,9 @@ export const OrgScimSection = () => {
|
|||||||
if (subscription?.scim) {
|
if (subscription?.scim) {
|
||||||
handlePopUpOpen("scimToken");
|
handlePopUpOpen("scimToken");
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -37,7 +39,9 @@ export const OrgScimSection = () => {
|
|||||||
try {
|
try {
|
||||||
if (!currentOrg?.id) return;
|
if (!currentOrg?.id) return;
|
||||||
if (!subscription?.scim) {
|
if (!subscription?.scim) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +94,9 @@ export const OrgScimSection = () => {
|
|||||||
if (subscription?.scim) {
|
if (subscription?.scim) {
|
||||||
handleEnableSCIMToggle(value);
|
handleEnableSCIMToggle(value);
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
isChecked={currentOrg?.scimEnabled ?? false}
|
isChecked={currentOrg?.scimEnabled ?? false}
|
||||||
@@ -112,6 +118,7 @@ export const OrgScimSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use SCIM Provisioning if you switch to Infisical's Enterprise plan."
|
text="You can use SCIM Provisioning if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+10
-3
@@ -34,7 +34,9 @@ export const OrgLDAPSection = (): JSX.Element => {
|
|||||||
try {
|
try {
|
||||||
if (!currentOrg?.id) return;
|
if (!currentOrg?.id) return;
|
||||||
if (!subscription?.ldap) {
|
if (!subscription?.ldap) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +80,9 @@ export const OrgLDAPSection = (): JSX.Element => {
|
|||||||
|
|
||||||
handlePopUpOpen("addLDAP");
|
handlePopUpOpen("addLDAP");
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@@ -87,7 +91,9 @@ export const OrgLDAPSection = (): JSX.Element => {
|
|||||||
|
|
||||||
const openLDAPGroupMapModal = () => {
|
const openLDAPGroupMapModal = () => {
|
||||||
if (!subscription?.ldap) {
|
if (!subscription?.ldap) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,6 +192,7 @@ export const OrgLDAPSection = (): JSX.Element => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use LDAP authentication if you switch to Infisical's Enterprise plan."
|
text="You can use LDAP authentication if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+14
-10
@@ -27,7 +27,7 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
const { mutateAsync } = useUpdateSSOConfig();
|
const { mutateAsync } = useUpdateSSOConfig();
|
||||||
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
|
||||||
"upgradePlan",
|
"upgradePlan",
|
||||||
"upgradeEnterprisePlan",
|
// "upgradeEnterprisePlan",
|
||||||
"addSSO"
|
"addSSO"
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
@@ -38,7 +38,9 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
if (!currentOrg?.id) return;
|
if (!currentOrg?.id) return;
|
||||||
|
|
||||||
if (!subscription?.samlSSO) {
|
if (!subscription?.samlSSO) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
description: "You can use SAML SSO if you switch to Infisical's Pro plan."
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +67,11 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
if (!currentOrg?.id) return;
|
if (!currentOrg?.id) return;
|
||||||
|
|
||||||
if (!subscription?.samlSSO || !subscription?.groups) {
|
if (!subscription?.samlSSO || !subscription?.groups) {
|
||||||
handlePopUpOpen("upgradeEnterprisePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true,
|
||||||
|
description:
|
||||||
|
"You can use SAML group mapping if you switch to Infisical's Enterprise plan."
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +111,9 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
|
|
||||||
handlePopUpOpen("addSSO");
|
handlePopUpOpen("addSSO");
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
description: "You can use SAML SSO if you switch to Infisical's Pro plan."
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@@ -234,12 +242,8 @@ export const OrgSSOSection = (): JSX.Element => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can use SAML SSO if you switch to Infisical's Pro plan."
|
text={popUp.upgradePlan.data?.description}
|
||||||
/>
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
<UpgradePlanModal
|
|
||||||
isOpen={popUp.upgradeEnterprisePlan.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradeEnterprisePlan", isOpen)}
|
|
||||||
text="You can use SAML group mapping if you switch to Infisical's Enterprise plan."
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const OrgSsoTab = withPermission(
|
|||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.samlSSO) {
|
if (!subscription?.samlSSO) {
|
||||||
handlePopUpOpen("upgradePlan", { feature: "SAML SSO", plan: "Pro" });
|
handlePopUpOpen("upgradePlan", { feature: "SAML SSO" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ export const OrgSsoTab = withPermission(
|
|||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.oidcSSO) {
|
if (!subscription?.oidcSSO) {
|
||||||
handlePopUpOpen("upgradePlan", { feature: "OIDC SSO", plan: "Pro" });
|
handlePopUpOpen("upgradePlan", { feature: "OIDC SSO" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,10 @@ export const OrgSsoTab = withPermission(
|
|||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.ldap) {
|
if (!subscription?.ldap) {
|
||||||
handlePopUpOpen("upgradePlan", { feature: "LDAP", plan: "Enterprise" });
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
feature: "LDAP",
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,8 +211,13 @@ export const OrgSsoTab = withPermission(
|
|||||||
text={`You can use ${
|
text={`You can use ${
|
||||||
(popUp.upgradePlan.data as { feature: string })?.feature
|
(popUp.upgradePlan.data as { feature: string })?.feature
|
||||||
} if you switch to Infisical's ${
|
} if you switch to Infisical's ${
|
||||||
(popUp.upgradePlan.data as { plan: string })?.plan
|
(popUp.upgradePlan.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||||
|
? "Enterprise"
|
||||||
|
: "Pro"
|
||||||
} plan.`}
|
} plan.`}
|
||||||
|
isEnterpriseFeature={
|
||||||
|
(popUp.upgradePlan.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+4
-1
@@ -60,7 +60,9 @@ export const ProjectTemplatesSection = () => {
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription?.projectTemplates) {
|
if (!subscription?.projectTemplates) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +86,7 @@ export const ProjectTemplatesSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can create project templates if you switch to Infisical's Enterprise plan."
|
text="You can create project templates if you switch to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -149,7 +149,7 @@ export const UserOrgMembershipModal = ({ popUp, handlePopUpOpen, handlePopUpTogg
|
|||||||
if (isCustomRole && subscription && !subscription?.rbac) {
|
if (isCustomRole && subscription && !subscription?.rbac) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can assign custom roles to members if you upgrade your Infisical plan."
|
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
|
|
||||||
const handleResourceSelect = (resource: PamResourceType) => {
|
const handleResourceSelect = (resource: PamResourceType) => {
|
||||||
if (!subscription.pam) {
|
if (!subscription.pam) {
|
||||||
handlePopUpOpen(
|
handlePopUpOpen("upgradePlan", {
|
||||||
"upgradePlan",
|
description: "PAM (Privileged Access Management) requires an enterprise plan.",
|
||||||
"PAM (Privileged Access Management) requires an enterprise plan."
|
isEnterpriseFeature: true
|
||||||
);
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,10 +67,11 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
resource === PamResourceType.SSH ||
|
resource === PamResourceType.SSH ||
|
||||||
resource === PamResourceType.Kubernetes
|
resource === PamResourceType.Kubernetes
|
||||||
) {
|
) {
|
||||||
handlePopUpOpen(
|
handlePopUpOpen("upgradePlan", {
|
||||||
"upgradePlan",
|
description:
|
||||||
"This resource type requires a special license add-on to be enabled in your enterprise plan."
|
"This resource type requires a special license add-on to be enabled in your enterprise plan.",
|
||||||
);
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +180,8 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={popUp.upgradePlan.data || ""}
|
text={popUp.upgradePlan.data?.description}
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+5
-1
@@ -33,7 +33,8 @@ export const GroupsSection = () => {
|
|||||||
if (!subscription?.groups) {
|
if (!subscription?.groups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can manage users more efficiently with groups if you upgrade your Infisical plan to an Enterprise license."
|
"You can manage users more efficiently with groups if you switch to Infisical's Enterprise plan.",
|
||||||
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("group");
|
handlePopUpOpen("group");
|
||||||
@@ -100,6 +101,9 @@ export const GroupsSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
|
isEnterpriseFeature={
|
||||||
|
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export const Page = () => {
|
|||||||
onOpenUpgradeModal={() =>
|
onOpenUpgradeModal={() =>
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can assign custom roles to members if you upgrade your Infisical plan."
|
"You can assign custom roles to members if you switch to Infisical's Pro plan."
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+2
-4
@@ -60,7 +60,7 @@ type TRoleForm = z.infer<typeof roleFormSchema>;
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
projectMember: TWorkspaceUser;
|
projectMember: TWorkspaceUser;
|
||||||
onOpenUpgradeModal: (title: string) => void;
|
onOpenUpgradeModal: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) => {
|
export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) => {
|
||||||
@@ -122,9 +122,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (hasCustomRoleSelected && subscription && !subscription?.rbac) {
|
if (hasCustomRoleSelected && subscription && !subscription?.rbac) {
|
||||||
onOpenUpgradeModal(
|
onOpenUpgradeModal();
|
||||||
"You can assign custom roles to members if you upgrade your Infisical plan."
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -42,7 +42,8 @@ export const AuditLogsRetentionSection = () => {
|
|||||||
try {
|
try {
|
||||||
if (!subscription?.auditLogs) {
|
if (!subscription?.auditLogs) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description: "You can only configure audit logs retention if you upgrade your plan."
|
description:
|
||||||
|
"You can only configure audit logs retention if you switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -51,7 +52,7 @@ export const AuditLogsRetentionSection = () => {
|
|||||||
if (subscription && auditLogsRetentionDays > subscription?.auditLogsRetentionDays) {
|
if (subscription && auditLogsRetentionDays > subscription?.auditLogsRetentionDays) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"To update your audit logs retention period to a higher value, upgrade your plan."
|
"To update your audit logs retention period to a higher value, switch to Infisical's Pro plan."
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1173,7 +1173,9 @@ export const OverviewPage = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true,
|
||||||
|
description:
|
||||||
|
"You can add dynamic secrets if you switch to Infisical's Enterprise plan."
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
isDisabled={userAvailableDynamicSecretEnvs.length === 0}
|
isDisabled={userAvailableDynamicSecretEnvs.length === 0}
|
||||||
@@ -1197,7 +1199,10 @@ export const OverviewPage = () => {
|
|||||||
handlePopUpClose("misc");
|
handlePopUpClose("misc");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
description:
|
||||||
|
"You can add secret rotations if you switch to Infisical's Pro plan."
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
isDisabled={userAvailableSecretRotationEnvs.length === 0}
|
isDisabled={userAvailableSecretRotationEnvs.length === 0}
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
@@ -1682,11 +1687,7 @@ export const OverviewPage = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={
|
text={popUp.upgradePlan.data?.description}
|
||||||
subscription.slug === null
|
|
||||||
? "You can perform this action under an Enterprise license"
|
|
||||||
: "You can perform this action if you switch to Infisical's Enterprise plan"
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<CreateSecretRotationV2Modal
|
<CreateSecretRotationV2Modal
|
||||||
|
|||||||
+5
-2
@@ -329,7 +329,10 @@ export const AccessApprovalRequest = ({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (subscription && !subscription?.secretApproval) {
|
if (subscription && !subscription?.secretApproval) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
description:
|
||||||
|
"You can use request access feature if you switch to Infisical's Pro plan."
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("requestAccess");
|
handlePopUpOpen("requestAccess");
|
||||||
@@ -593,7 +596,7 @@ export const AccessApprovalRequest = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
text="You need to upgrade your plan to access this feature"
|
text={popUp.upgradePlan.data?.description}
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+1
-1
@@ -505,7 +505,7 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
|
|||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add secret approval policy if you switch to Infisical's Enterprise plan."
|
text="You can add secret approval policy if you switch to Infisical's Pro plan."
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+13
-10
@@ -905,7 +905,9 @@ export const ActionBar = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
feature: "PIT Recovery"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
|
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
|
||||||
isLoading={isSnapshotCountLoading}
|
isLoading={isSnapshotCountLoading}
|
||||||
@@ -1020,6 +1022,7 @@ export const ActionBar = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
feature: "Dynamic Secrets",
|
||||||
isEnterpriseFeature: true
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
@@ -1048,7 +1051,9 @@ export const ActionBar = ({
|
|||||||
handlePopUpClose("misc");
|
handlePopUpClose("misc");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
feature: "Secret Rotation"
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="h-10 text-left"
|
className="h-10 text-left"
|
||||||
@@ -1214,7 +1219,11 @@ export const ActionBar = ({
|
|||||||
environment={environment}
|
environment={environment}
|
||||||
secretPath={secretPath}
|
secretPath={secretPath}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
onUpgradePlan={() => handlePopUpOpen("upgradePlan")}
|
onUpgradePlan={() =>
|
||||||
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
feature: "Secret Imports"
|
||||||
|
})
|
||||||
|
}
|
||||||
isOpen={popUp.addSecretImport.isOpen}
|
isOpen={popUp.addSecretImport.isOpen}
|
||||||
onClose={() => handlePopUpClose("addSecretImport")}
|
onClose={() => handlePopUpClose("addSecretImport")}
|
||||||
onTogglePopUp={(isOpen) => handlePopUpToggle("addSecretImport", isOpen)}
|
onTogglePopUp={(isOpen) => handlePopUpToggle("addSecretImport", isOpen)}
|
||||||
@@ -1277,13 +1286,7 @@ export const ActionBar = ({
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
text={
|
text={`You can use ${popUp.upgradePlan.data?.feature} if you switch to Infisical's ${popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"} plan.`}
|
||||||
subscription.slug === null
|
|
||||||
? "You can perform this action under an Enterprise license"
|
|
||||||
: `You can perform this action if you switch to Infisical's ${
|
|
||||||
popUp.upgradePlan.data?.isEnterpriseFeature ? "Enterprise" : "Pro"
|
|
||||||
} plan`
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
+1
-1
@@ -321,7 +321,7 @@ export const SecretDetailSidebar = ({
|
|||||||
onOpenChange={(isUpgradeModalOpen) =>
|
onOpenChange={(isUpgradeModalOpen) =>
|
||||||
handlePopUpToggle("secretAccessUpgradePlan", isUpgradeModalOpen)
|
handlePopUpToggle("secretAccessUpgradePlan", isUpgradeModalOpen)
|
||||||
}
|
}
|
||||||
text="Secret access analysis is only available on Infisical's Pro plan and above."
|
text="You can access secret access analysis if you switch to Infisical's Pro plan."
|
||||||
/>
|
/>
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={popUp.secretReferenceTree.isOpen}
|
isOpen={popUp.secretReferenceTree.isOpen}
|
||||||
|
|||||||
+4
-1
@@ -72,7 +72,9 @@ export const SecretScanningDataSourcesSection = () => {
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!subscription.secretScanning) {
|
if (!subscription.secretScanning) {
|
||||||
handlePopUpOpen("upgradePlan");
|
handlePopUpOpen("upgradePlan", {
|
||||||
|
isEnterpriseFeature: true
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,6 +97,7 @@ export const SecretScanningDataSourcesSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can create Data Sources by upgrading to Infisical's Enterprise plan."
|
text="You can create Data Sources by upgrading to Infisical's Enterprise plan."
|
||||||
|
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
+5
-1
@@ -30,7 +30,8 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
|||||||
if (!subscription?.sshHostGroups) {
|
if (!subscription?.sshHostGroups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license."
|
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license.",
|
||||||
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("addHostGroupMembers", {
|
handlePopUpOpen("addHostGroupMembers", {
|
||||||
@@ -107,6 +108,9 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
|
isEnterpriseFeature={
|
||||||
|
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ export const SshHostGroupsSection = () => {
|
|||||||
if (!subscription?.sshHostGroups) {
|
if (!subscription?.sshHostGroups) {
|
||||||
handlePopUpOpen("upgradePlan", {
|
handlePopUpOpen("upgradePlan", {
|
||||||
description:
|
description:
|
||||||
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license."
|
"You can manage hosts more efficiently with SSH host groups if you upgrade your Infisical plan to an Enterprise license.",
|
||||||
|
isEnterpriseFeature: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
handlePopUpOpen("sshHostGroup");
|
handlePopUpOpen("sshHostGroup");
|
||||||
@@ -106,6 +107,9 @@ export const SshHostGroupsSection = () => {
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
text={(popUp.upgradePlan?.data as { description: string })?.description}
|
||||||
|
isEnterpriseFeature={
|
||||||
|
(popUp.upgradePlan?.data as { isEnterpriseFeature: boolean })?.isEnterpriseFeature
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user