Updates to License page and Menu (#2118)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2022-06-10 20:11:33 -07:00
committed by GitHub
parent 296f58f43d
commit e416abe19b
9 changed files with 211 additions and 93 deletions

View File

@@ -0,0 +1,36 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import * as React from "react";
import { SVGProps } from "react";
const AGPLV3LightLogo = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
className={"min-icon"}
fill={"currentcolor"}
{...props}
viewBox="0 0 59.801 10.087"
>
<path
d="M48.083-9.8H46.55L42.567,0h1.281l1.071-2.674h4.753L50.75,0h1.323ZM47.3-8.582l1.9,4.739H45.388ZM59.353-9.947A4.9,4.9,0,0,0,54.278-4.9,4.894,4.894,0,0,0,59.3.14c2.968,0,4.774-2.247,4.774-5.1,0-.1-.007-.2-.014-.308H59.78v1.148h2.94A3.173,3.173,0,0,1,59.3-1.036,3.673,3.673,0,0,1,55.566-4.9a3.686,3.686,0,0,1,3.787-3.864,3.723,3.723,0,0,1,2.891,1.316l.9-.875A4.969,4.969,0,0,0,59.353-9.947ZM71.428-3.92c2.212,0,3.465-1.106,3.465-2.94S73.64-9.8,71.428-9.8H67.7V0h1.232V-3.92ZM71.4-8.638c1.449,0,2.212.588,2.212,1.778S72.849-5.082,71.4-5.082H68.936V-8.638ZM85.239-1.169H79.625V-9.8H78.393V0h6.846ZM93.695-6.65H92.484l-2.24,5.5-2.233-5.5H86.765l2.8,6.657h1.344Zm5.194-3.29a3.5,3.5,0,0,0-3.045,1.484l.854.721a2.581,2.581,0,0,1,2.114-1.1c1.183,0,2.1.637,2.1,1.666,0,1.12-.924,1.68-2.093,1.68h-1.26V-4.4h1.26c1.274,0,2.31.616,2.31,1.715,0,1.169-.994,1.722-2.177,1.722a3.409,3.409,0,0,1-2.443-1.008l-.756.8A4.139,4.139,0,0,0,98.98.14c1.736,0,3.388-.9,3.388-2.779a2.417,2.417,0,0,0-1.708-2.31,2.342,2.342,0,0,0,1.484-2.275C102.144-8.841,100.835-9.94,98.889-9.94Z"
transform="translate(-42.567 9.947)"
fill="#bccee6"
/>
</svg>
);
export default AGPLV3LightLogo;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,36 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import * as React from "react";
import { SVGProps } from "react";
const EnterpriseLightLogo = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 99.785 10.08"
className={"min-icon"}
fill={"currentcolor"}
{...props}
>
<path
d="M8.351-1.155H2.625v-3.2H8.1V-5.516H2.625V-8.645H8.281V-9.8H1.393V0H8.351ZM20.538-9.8H19.306v7.693l-5.929-7.7H12.264V0H13.5L13.5-7.693l5.922,7.7h1.113Zm11,0H23.618v1.169h3.346V0H28.2V-8.631h3.339ZM41.566-1.155H35.84v-3.2h5.474V-5.516H35.84V-8.645H41.5V-9.8H34.608V0h6.958ZM45.479-9.8V0h1.232V-4.228h1.148L51.226,0h1.526L49.3-4.228h.077c2.1,0,3.423-1.092,3.423-2.793,0-1.785-1.218-2.779-3.43-2.779Zm3.864,1.155c1.421,0,2.177.539,2.177,1.624s-.735,1.673-2.177,1.673H46.711v-3.3ZM60.1-3.92c2.212,0,3.465-1.106,3.465-2.94S62.314-9.8,60.1-9.8H56.378V0H57.61V-3.92Zm-.028-4.718c1.449,0,2.212.588,2.212,1.778s-.763,1.778-2.212,1.778H57.61V-8.638ZM67.067-9.8V0H68.3V-4.228h1.148L72.814,0H74.34L70.889-4.228h.077c2.1,0,3.423-1.092,3.423-2.793,0-1.785-1.218-2.779-3.43-2.779Zm3.864,1.155c1.421,0,2.177.539,2.177,1.624s-.735,1.673-2.177,1.673H68.3v-3.3ZM79.2-9.8H77.966V0H79.2Zm11.221.931A6,6,0,0,0,86.891-9.94c-2.065,0-3.745,1.057-3.745,2.947,0,1.673,1.288,2.422,2.9,2.618l.91.112c1.526.189,2.345.623,2.345,1.533,0,1.106-1.148,1.7-2.611,1.7A5.235,5.235,0,0,1,83.5-2.114l-.672.98A6.35,6.35,0,0,0,86.695.14c2.121,0,3.892-1.022,3.892-2.975,0-1.729-1.421-2.4-3.08-2.6l-.861-.1c-1.47-.182-2.219-.637-2.219-1.526,0-1.057,1.022-1.7,2.457-1.7a5.128,5.128,0,0,1,2.9.9Zm10.759,7.714H95.452v-3.2h5.474V-5.516H95.452V-8.645h5.656V-9.8H94.22V0h6.958Z"
transform="translate(-1.393 9.94)"
fill="#bccee6"
/>
</svg>
);
export default EnterpriseLightLogo;

View File

@@ -0,0 +1,36 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import * as React from "react";
import { SVGProps } from "react";
const StandardLightLogo = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 87.892 10.08"
className={"min-icon"}
fill={"currentcolor"}
{...props}
>
<path
d="M8.421-8.869A6,6,0,0,0,4.893-9.94c-2.065,0-3.745,1.057-3.745,2.947,0,1.673,1.288,2.422,2.905,2.618l.91.112c1.526.189,2.345.623,2.345,1.533,0,1.106-1.148,1.7-2.611,1.7A5.235,5.235,0,0,1,1.505-2.114l-.672.98A6.35,6.35,0,0,0,4.7.14C6.818.14,8.589-.882,8.589-2.835c0-1.729-1.421-2.4-3.08-2.6l-.861-.1c-1.47-.182-2.219-.637-2.219-1.526,0-1.057,1.022-1.7,2.457-1.7a5.128,5.128,0,0,1,2.905.9Zm10.6-.931H11.109v1.169h3.346V0h1.232V-8.631h3.339Zm6.692,0H24.185L20.2,0h1.281l1.071-2.674h4.753L28.385,0h1.323Zm-.784,1.218,1.9,4.739H23.023ZM41.02-9.8H39.788v7.693l-5.929-7.7H32.746V0h1.232l.007-7.693,5.922,7.7H41.02Zm4.193,0V0h3.738c3.164,0,5.194-1.918,5.194-4.9s-2.03-4.9-5.194-4.9Zm3.738,1.169c2.569,0,3.9,1.5,3.9,3.731s-1.33,3.731-3.9,3.731H46.445V-8.631ZM61.866-9.8H60.333L56.35,0h1.281L58.7-2.674h4.753L64.533,0h1.323Zm-.784,1.218,1.9,4.739H59.171ZM68.894-9.8V0h1.232V-4.228h1.148L74.641,0h1.526L72.716-4.228h.077c2.1,0,3.423-1.092,3.423-2.793C76.216-8.806,75-9.8,72.786-9.8Zm3.864,1.155c1.421,0,2.177.539,2.177,1.624S74.2-5.348,72.758-5.348H70.126v-3.3ZM79.793-9.8V0h3.738c3.164,0,5.194-1.918,5.194-4.9s-2.03-4.9-5.194-4.9Zm3.738,1.169c2.569,0,3.9,1.5,3.9,3.731s-1.33,3.731-3.9,3.731H81.025V-8.631Z"
transform="translate(-0.833 9.94)"
fill="#aec1d9"
/>
</svg>
);
export default StandardLightLogo;

View File

@@ -195,3 +195,7 @@ export { default as InfoIcon } from "./InfoIcon";
export { default as ConsoleAgpl } from "./ConsoleAgpl";
export { default as ConsoleStandard } from "./ConsoleStandard";
export { default as ConsoleEnterprise } from "./ConsoleEnterprise";
export { default as AGPLV3LightLogo } from "./AGPLV3LightLogo";
export { default as AGPLV3Logo } from "./AGPLV3Logo";
export { default as EnterpriseLightLogo } from "./EnterpriseLightLogo";
export { default as StandardLightLogo } from "./StandardLightLogo";

View File

@@ -16,9 +16,9 @@
import React from "react";
import {
ConsoleAgpl,
ConsoleEnterprise,
ConsoleStandard,
AGPLV3LightLogo,
EnterpriseLightLogo,
StandardLightLogo,
} from "../../../../icons";
const LicensedConsoleLogo = ({
@@ -32,11 +32,11 @@ const LicensedConsoleLogo = ({
if (isLoading) {
return licenseLogo;
} else if (plan === "STANDARD") {
licenseLogo = <ConsoleStandard />;
licenseLogo = <StandardLightLogo style={{ width: 88 }} />;
} else if (plan === "ENTERPRISE") {
licenseLogo = <ConsoleEnterprise />;
licenseLogo = <EnterpriseLightLogo style={{ width: 100 }} />;
} else {
licenseLogo = <ConsoleAgpl style={{ width: 170 }} />;
licenseLogo = <AGPLV3LightLogo style={{ width: 60 }} />;
}
return licenseLogo;

View File

@@ -25,19 +25,19 @@ import withStyles from "@mui/styles/withStyles";
import { Box } from "@mui/material";
import useMediaQuery from "@mui/material/useMediaQuery";
import {
ConsoleAgpl,
AGPLV3Logo,
ConsoleEnterprise,
ConsoleStandard,
LicenseDocIcon,
} from "../../../icons";
import {
LICENSE_PLANS,
FEATURE_ITEMS,
COMMUNITY_PLAN_FEATURES,
STANDARD_PLAN_FEATURES,
ENTERPRISE_PLAN_FEATURES,
PAID_PLANS,
FEATURE_ITEMS,
getRenderValue,
LICENSE_PLANS,
PAID_PLANS,
STANDARD_PLAN_FEATURES,
} from "./utils";
const styles = (theme: Theme) => createStyles({});
@@ -84,6 +84,7 @@ const PlanHeader = ({
justifyContent: "center",
flexFlow: "column",
borderLeft: "1px solid #eaeaea",
borderBottom: "0px !important",
"& .plan-header": {
display: "flex",
alignItems: "center",
@@ -244,7 +245,7 @@ const LicensePlans = ({
<Box className="title-block">
<Box className="title-main">
<div className="iconContainer">
<ConsoleAgpl />
<AGPLV3Logo style={{ width: 117 }} />
</div>
</Box>
</Box>
@@ -423,6 +424,7 @@ const LicensePlans = ({
height: "25px",
paddingLeft: "26px",
fontSize: "14px",
background: "#E5E5E5",
"@media (max-width: 600px)": {
@@ -439,7 +441,6 @@ const LicensePlans = ({
alignItems: "center",
paddingLeft: "26px",
fontSize: "14px",
fontWeight: 600,
},
"& .feature-item": {
display: "flex",
@@ -523,6 +524,7 @@ const LicensePlans = ({
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
borderBottom: "0px !important",
"& .link-text": {
color: "#2781B0",
@@ -554,11 +556,11 @@ const LicensePlans = ({
className={`plan-header`}
sx={{
fontSize: "14px",
fontWeight: 600,
paddingLeft: "26px",
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
borderBottom: "0px !important",
}}
>
{fi.label}
@@ -595,7 +597,7 @@ const LicensePlans = ({
>
{COMMUNITY_PLAN_FEATURES.map((fi, idx) => {
const featureLabel = featureList[idx].desc;
const { featureTitleRow, isHeader, isOssLicenseLink } = fi;
const { featureTitleRow, isHeader } = fi;
if (isHeader) {
return getCommunityPlanHeader();
@@ -609,32 +611,6 @@ const LicensePlans = ({
);
}
if (isOssLicenseLink) {
return (
<Box
key={fi.id}
className="feature-item"
sx={{
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<a
href={"https://www.gnu.org/licenses/agpl-3.0.en.html"}
rel="noreferrer noopener"
className={"link-text"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
setLicenseModal && setLicenseModal(true);
}}
>
GNU AGPL v3
</a>
</Box>
);
}
return (
<PricingFeatureItem
key={fi.id}

View File

@@ -48,18 +48,16 @@ const FeatureLink = ({ text, anchor }: { text: string; anchor: string }) => {
export const FEATURE_ITEMS: FeatureItem[] = [
{
label: " ",
label: "License ",
isHeader: true,
},
{
desc: "License",
isHeader: false,
},
{
label: "",
isHeader: false,
style: {
height: "324px",
height: "360px",
verticalAlign: "top",
alignItems: "start",
},
},
{
@@ -123,11 +121,9 @@ export const COMMUNITY_PLAN_FEATURES = [
{
label: "Community",
isHeader: true,
},
{
id: "com_license",
label: "GNU AGPL v3",
isOssLicenseLink: true,
style: {
borderBottom: 0,
},
},
{
label: () => {
@@ -152,7 +148,8 @@ export const COMMUNITY_PLAN_FEATURES = [
},
isHeader: false,
style: {
height: "324px",
height: "360px",
borderBottom: 0,
},
},
{
@@ -173,7 +170,7 @@ export const COMMUNITY_PLAN_FEATURES = [
{
id: "com_support",
label: "Community:",
detail: "Public Slack Channel + Github Issues",
detail: "Slack + Github",
},
{
id: "com_security",
@@ -209,21 +206,9 @@ export const STANDARD_PLAN_FEATURES = [
{
label: "Standard",
isHeader: true,
},
{
label: () => {
return (
<a
href="https://subnet.min.io/terms-and-conditions/standard?ref=con"
target="_blank"
rel="noopener noreferrer"
className={"link-text"}
>
Commercial
</a>
);
style: {
borderBottom: 0,
},
isHeader: false,
},
{
isHeader: false,
@@ -240,8 +225,8 @@ export const STANDARD_PLAN_FEATURES = [
mostly self-support but want the peace of mind that comes with the
MinIO Subscription Networks suite of operational capabilities and
direct-to-engineer interaction. The Standard version is fully
featured but with SLA limitations. To learn more about the MinIO
Subscription Network click
featured but with SLA limitations. <br /> <br /> To learn more about
the MinIO Subscription Network
</span>{" "}
<a
href="https://min.io/product/subnet?ref=con"
@@ -249,14 +234,15 @@ export const STANDARD_PLAN_FEATURES = [
target="_blank"
rel="noopener noreferrer"
>
here
click here
</a>
.
</Box>
);
},
style: {
height: "324px",
height: "360px",
borderBottom: 0,
},
},
{
@@ -335,21 +321,9 @@ export const ENTERPRISE_PLAN_FEATURES = [
{
label: "Enterprise",
isHeader: true,
},
{
label: () => {
return (
<a
href="https://subnet.min.io/terms-and-conditions/enterprise?ref=con"
className={"link-text"}
target="_blank"
rel="noopener noreferrer"
>
Commercial
</a>
);
style: {
borderBottom: 0,
},
isHeader: false,
},
{
isHeader: false,
@@ -364,8 +338,8 @@ export const ENTERPRISE_PLAN_FEATURES = [
<span>
Designed for mission critical environments where both a license and
strict SLAs are required. The Enterprise version is fully featured
but comes with additional capabilities. To learn more about the
MinIO Subscription Network click
but comes with additional capabilities. <br /> <br /> To learn more
about the MinIO Subscription Network
</span>{" "}
<a
href="https://min.io/product/subnet?ref=con"
@@ -373,14 +347,15 @@ export const ENTERPRISE_PLAN_FEATURES = [
target="_blank"
rel="noopener noreferrer"
>
here
click here
</a>
.
</Box>
);
},
style: {
height: "324px",
height: "360px",
borderBottom: 0,
},
},
{

View File

@@ -14,9 +14,9 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import React, { Suspense, useEffect } from "react";
import React, { Fragment, Suspense, useEffect } from "react";
import OperatorLogo from "../../../icons/OperatorLogo";
import { VersionIcon } from "../../../icons";
import { LoginMinIOLogo, VersionIcon } from "../../../icons";
import { Box, IconButton } from "@mui/material";
import { ChevronLeft } from "@mui/icons-material";
import MenuIcon from "@mui/icons-material/Menu";
@@ -103,7 +103,13 @@ const MenuToggle = ({ isOpen, onToggle }: MenuToggleProps) => {
{operatorMode ? (
<OperatorLogo />
) : (
<LicensedConsoleLogo plan={plan} isLoading={isLicenseLoading} />
<Fragment>
<div style={{ margin: "auto", width: 100, textAlign: "right" }}>
<LoginMinIOLogo style={{ width: 100 }} />
<br />
<LicensedConsoleLogo plan={plan} isLoading={isLicenseLoading} />
</div>
</Fragment>
)}
</div>
) : (