diff --git a/portal-ui/public/agpl.png b/portal-ui/public/agpl.png new file mode 100644 index 000000000..3fd427384 Binary files /dev/null and b/portal-ui/public/agpl.png differ diff --git a/portal-ui/src/screens/Console/License/ActivationModal.tsx b/portal-ui/src/screens/Console/License/ActivationModal.tsx index 8f73b2b67..3e72306fb 100644 --- a/portal-ui/src/screens/Console/License/ActivationModal.tsx +++ b/portal-ui/src/screens/Console/License/ActivationModal.tsx @@ -17,10 +17,9 @@ import React, { useState } from "react"; import { connect } from "react-redux"; import { createStyles, Theme, withStyles } from "@material-ui/core/styles"; -import { LinearProgress } from "@material-ui/core"; +import { LinearProgress, TextField } from "@material-ui/core"; import Grid from "@material-ui/core/Grid"; import Typography from "@material-ui/core/Typography"; -import TextField from "@material-ui/core/TextField"; import Button from "@material-ui/core/Button"; import { containerForHeader } from "../Common/FormComponents/common/styleLibrary"; import { SubscriptionActivateRequest } from "../Buckets/types"; @@ -28,6 +27,8 @@ import { setModalErrorSnackMessage } from "../../../actions"; import ModalWrapper from "../Common/ModalWrapper/ModalWrapper"; import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper"; import api from "../../../common/api"; +import PersonOutlineOutlinedIcon from "@material-ui/icons/PersonOutlineOutlined"; +import LockOutlinedIcon from "@material-ui/icons/LockOutlined"; const styles = (theme: Theme) => createStyles({ @@ -37,16 +38,32 @@ const styles = (theme: Theme) => subnetLicenseKey: { padding: "10px 10px 10px 0px", borderRight: "1px solid rgba(0, 0, 0, 0.12)", + opacity: 0.5, + "&:hover": { opacity: 1 }, }, subnetLoginForm: { padding: "10px 0px 10px 10px", + opacity: 0.5, + "&:hover": { opacity: 1 }, }, - licenseKeyField: { - marginBottom: 20, - }, + licenseKeyField: {}, pageTitle: { marginBottom: 20, }, + button: { + textTransform: "none", + fontSize: 15, + fontWeight: 700, + background: + "transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box", + color: "#fff", + }, + buttonSignup: { + textTransform: "none", + fontSize: 15, + fontWeight: 700, + marginLeft: 15, + }, ...containerForHeader(theme.spacing(4)), }); @@ -110,28 +127,32 @@ const ActivationModal = ({ aria-describedby="alert-dialog-description" > + + + Activate SUBNET License + + - - License Key + + Enter your license key here ) => setLicense(event.target.value) } fullWidth className={classes.licenseKeyField} + variant="outlined" /> +
+
+
diff --git a/portal-ui/src/screens/Console/License/License.tsx b/portal-ui/src/screens/Console/License/License.tsx index 3e1941bfc..2504d8a73 100644 --- a/portal-ui/src/screens/Console/License/License.tsx +++ b/portal-ui/src/screens/Console/License/License.tsx @@ -47,12 +47,32 @@ const styles = (theme: Theme) => paper: { padding: "20px 52px 20px 28px", }, + licenseContainer: { + padding: "20px 52px 0px 28px", + background: + "transparent linear-gradient(180deg, #ffffff 0%, #d6e1e8 100%) 0% 0% no-repeat padding-box", + boxShadow: "0px 3px 7px #00000014", + "& h2": { + color: "#000", + marginBottom: "50px", + }, + "& a": { + textDecoration: "none", + }, + "& h3": { + color: "#000", + marginBottom: "30px", + fontWeight: "bold", + }, + "& h6": { + color: "#000 !important", + }, + }, tableContainer: { marginLeft: 28, }, detailsContainer: { textAlign: "center", - paddingTop: 18, paddingBottom: 12, borderRadius: "3px 3px 0 0", marginLeft: 8, @@ -70,6 +90,14 @@ const styles = (theme: Theme) => fontSize: 17, fontWeight: 700, marginBottom: 26, + paddingTop: 18, + }, + currentPlan: { + fontWeight: 700, + background: + "transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box", + boxShadow: "0px 3px 7px #00000014", + color: "#fff", }, detailsPrice: { fontSize: 12, @@ -141,7 +169,7 @@ const styles = (theme: Theme) => border: 0, }, buttonContainerHighlighted: { - border: "1px solid #9a93ad", + border: "1px solid #000", borderTop: 0, }, button: { @@ -154,6 +182,49 @@ const styles = (theme: Theme) => marginTop: 25, marginRight: 25, }, + openSourcePolicy: { + color: "#1C5A8D", + fontWeight: "bold", + }, + activateLink: { + color: "#1C5A8D", + fontWeight: "bold", + clear: "both", + background: "none", + border: "none", + textDecoration: "underline", + cursor: "pointer", + }, + fullWidth: { + width: "100%", + height: "100%", + }, + midWidth: { + width: "70%", + float: "left", + height: "100%", + }, + smallWidth: { + width: "30%", + float: "right", + height: "100%", + borderRadius: "0px 3px 0px 0px !important", + }, + licenseInfo: { color: "#000" }, + licenseInfoTitle: { + textTransform: "none", + color: "#000", + }, + licenseInfoValue: { + textTransform: "none", + fontSize: 17, + }, + licenseDescription: { + background: "#fff", + padding: "30px 30px", + border: "1px solid #e2e5e4", + borderRadius: "5px 5px 0px 0px", + }, ...containerForHeader(theme.spacing(4)), }); @@ -200,262 +271,403 @@ const License = ({ classes, operatorMode }: ILicenseProps) => { } return ( - {licenseInfo ? ( - - - - - - - - Subscription Information - - Account ID: {licenseInfo.account_id} -
-
- Email: {licenseInfo.email} -
-
- Plan: {licenseInfo.plan} -
-
- Organization: {licenseInfo.organization} -
-
- Storage Capacity: {licenseInfo.storage_capacity} -
-
- Expiration: {licenseInfo.expires_at} -
-
-
-
-
- ) : ( - - - {operatorMode ? ( - - ) : null} - - - - - {operatorMode ? ( - closeModalAndFetchLicenseInfo()} - /> - ) : null} - - - Upgrade to commercial license - - - - - - {planDetails.map((details: any) => { - return ( - - - {details.title} - - - {details.price} - - - {details.capacityMax || ""} - - - {details.capacityMin} - - - ); - })} + {licenseInfo ? ( + + + + + License + + + Commercial License + + + Organization + + + {licenseInfo.organization} + + + Registered Capacity + + + {licenseInfo.storage_capacity} + + + Expiry Date + + + {licenseInfo.expires_at} + - {planItems.map((item: any) => { + + + Subscription Plan + + + {licenseInfo.plan} + + + Requester + + + {licenseInfo.email} + + + + + ) : ( + + agpl + + GNU Affero General Public License + + +
+ Version 3 + + The GNU Affero General Public License is a free, + copyleft license for software and other kinds of works, + specifically designed to ensure cooperation with the + Community in the case of network server software. + +
+
+
+ )} +
+ {operatorMode && !licenseInfo && ( + + + Choosing between GNU AGPL v3 and Commercial License + + + If you are building proprietary applications, you may want to + choose the commercial license included as part of the Standard + and Enterprise subscription plans. Applications must otherwise + comply with all GNU AGPLv3 obligations and requirements. Click + the link below to learn more about Open Source license + compliance. + +
+ + Open Source Policy Compliance + +
+ )} +
+ + + + {operatorMode ? ( + closeModalAndFetchLicenseInfo()} + /> + ) : null} + + + + {planDetails.map((details: any) => { return ( - - {item.field} - - - - {item.community === "N/A" ? ( - "" - ) : item.community === "Yes" ? ( - - ) : ( - item.community - )} + {(!licenseInfo && details.title === "Community") || + (licenseInfo && + licenseInfo.plan.toLowerCase() === + details.title.toLowerCase()) ? ( + + Current Plan - {item.communityDetail !== undefined && ( - - {item.communityDetail} - - )} + ) : null} + + {details.title} + + + {details.price} - - {item.standard === "N/A" ? ( - "" - ) : item.standard === "Yes" ? ( - - ) : ( - item.standard - )} - - {item.standardDetail !== undefined && ( - - {item.standardDetail} - - )} + {details.capacityMax || ""} - - {item.enterprise === "N/A" ? ( - "" - ) : item.enterprise === "Yes" ? ( - - ) : ( - item.enterprise - )} - - {item.enterpriseDetail !== undefined && ( - - {item.enterpriseDetail} - - )} + {details.capacityMin} ); })} - + + {planItems.map((item: any) => { + return ( - {planButtons.map((button: any) => { - return ( - + > + + {item.field} + + + + {item.community === "N/A" ? ( + "" + ) : item.community === "Yes" ? ( + + ) : ( + item.community + )} + + {item.communityDetail !== undefined && ( + + {item.communityDetail} + + )} + + + + {item.standard === "N/A" ? ( + "" + ) : item.standard === "Yes" ? ( + + ) : ( + item.standard + )} + + {item.standardDetail !== undefined && ( + + {item.standardDetail} + + )} + + + + {item.enterprise === "N/A" ? ( + "" + ) : item.enterprise === "Yes" ? ( + + ) : ( + item.enterprise + )} + + {item.enterpriseDetail !== undefined && ( + + {item.enterpriseDetail} + + )} + + + ); + })} + + + {planButtons.map((button: any) => { + return ( + + - ); - })} - + {operatorMode && + button.text === "Subscribe" && + !( + licenseInfo && + licenseInfo.plan.toLowerCase() === + button.plan.toLowerCase() + ) && ( + + + + )} + + ); + })} - - +
+ -
- )} + +
); }; diff --git a/portal-ui/src/screens/Console/License/utils.ts b/portal-ui/src/screens/Console/License/utils.ts index 5b1cb3cf2..2df6ad910 100644 --- a/portal-ui/src/screens/Console/License/utils.ts +++ b/portal-ui/src/screens/Console/License/utils.ts @@ -119,17 +119,20 @@ export const planItems = [ export const planButtons = [ { id: 0, - text: "Slack Community", + text: "Join Slack", link: "https://slack.min.io", + plan: "community", }, { id: 1, text: "Subscribe", link: "https://min.io/pricing", + plan: "standard", }, { id: 2, text: "Subscribe", link: "https://min.io/pricing", + plan: "enterprise", }, ];