Skip to content

Commit c89f5a7

Browse files
authored
Tweaks to registration. (#1463)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
1 parent ebcebfb commit c89f5a7

File tree

3 files changed

+114
-72
lines changed

3 files changed

+114
-72
lines changed

portal-ui/src/screens/Console/License/LicensePlans.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const styles = (theme: Theme) =>
6666
},
6767
currPlan: {
6868
color: "white",
69-
backgroundColor: "#4CCB92",
69+
backgroundColor: "#2781B0",
7070
},
7171
planHeader: {
7272
padding: 8,

portal-ui/src/screens/Console/License/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ export const planButtons: IPlanButton[] = [
252252
id: 1,
253253
text: "Subscribe",
254254
text2: "Sign up",
255-
link: "https://subnet.min.io/subscription",
255+
link: "https://min.io/signup",
256256
plan: "Standard",
257257
},
258258
{
259259
id: 2,
260260
text: "Subscribe",
261261
text2: "Sign up",
262-
link: "https://subnet.min.io/subscription",
262+
link: "https://min.io/signup",
263263
plan: "Enterprise",
264264
},
265265
];

portal-ui/src/screens/Console/Support/Register.tsx

Lines changed: 111 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ import HelpBox from "../../../common/HelpBox";
6262
import SettingsIcon from "../../../icons/SettingsIcon";
6363
import RegisterStatus from "./RegisterStatus";
6464
import FormSwitchWrapper from "../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
65+
import { AppState } from "../../../store";
6566

6667
interface IRegister {
6768
classes: any;
6869
displayErrorMessage: typeof setErrorSnackMessage;
70+
operatorMode: boolean;
6971
}
7072

7173
const styles = (theme: Theme) =>
@@ -85,6 +87,11 @@ const styles = (theme: Theme) =>
8587
textAlign: "center",
8688
marginBottom: 10,
8789
},
90+
headerStyle: {
91+
color: theme.palette.primary.main,
92+
fontSize: 16,
93+
fontWeight: "bold",
94+
},
8895
registerActivationIcon: {
8996
color: theme.palette.primary.main,
9097
fontSize: 16,
@@ -112,9 +119,6 @@ const styles = (theme: Theme) =>
112119
fontWeight: "bold",
113120
},
114121
},
115-
subnetLoginInputBoxWrapper: {
116-
paddingRight: 20,
117-
},
118122
registeredStatus: {
119123
border: "1px solid #E2E2E2",
120124
padding: "24px 24px 24px 24px",
@@ -147,12 +151,22 @@ const styles = (theme: Theme) =>
147151
color: "#2781B0",
148152
cursor: "pointer",
149153
},
154+
smallBoxy: {
155+
border: "#E5E5E5 1px solid",
156+
borderRadius: 2,
157+
padding: 20,
158+
backgroundColor: "#fff",
159+
},
150160
...actionsTray,
151161
...searchField,
152162
...containerForHeader(theme.spacing(4)),
153163
});
154164

155-
const Register = ({ classes, displayErrorMessage }: IRegister) => {
165+
const Register = ({
166+
classes,
167+
displayErrorMessage,
168+
operatorMode,
169+
}: IRegister) => {
156170
const [license, setLicense] = useState<string>("");
157171
const [subnetPassword, setSubnetPassword] = useState<string>("");
158172
const [subnetEmail, setSubnetEmail] = useState<string>("");
@@ -355,12 +369,12 @@ const Register = ({ classes, displayErrorMessage }: IRegister) => {
355369
const title = onlineActivation ? (
356370
<Fragment>
357371
<OnlineRegistrationIcon />
358-
Online Activation SUBNET License
372+
Register with MinIO Subscription Network
359373
</Fragment>
360374
) : (
361375
<Fragment>
362376
<OfflineRegistrationIcon />
363-
Offline Activating SUBNET License
377+
Offline Activation of SUBNET License
364378
</Fragment>
365379
);
366380

@@ -444,67 +458,95 @@ const Register = ({ classes, displayErrorMessage }: IRegister) => {
444458
clusterRegistrationForm = (
445459
<Fragment>
446460
<Grid item xs={12} className={classes.subnetDescription}>
447-
The MinIO Subscription Network (SUBNET for short) is a simple, yet
448-
powerful software stack that ensures commercial customers are
449-
getting the very best out of their MinIO instances. SUBNET is priced
450-
on capacity - just like cloud storage and comes in two
451-
configurations, Standard and Enterprise.
452-
</Grid>
453-
<br />
454-
<Grid item xs={12} className={classes.subnetDescription}>
455-
You can use your credentials from SUBNET to register.{" "}
456-
<Link
457-
className={classes.link}
458-
color="inherit"
459-
target="_blank"
460-
href="https://min.io/product/subnet"
461-
>
462-
Learn more about SUBNET →.
463-
</Link>
461+
Use your MinIO Subscription Network login credentials to register
462+
this cluster.
464463
</Grid>
465464
<br />
466465
<Grid item xs={12} className={clsx(classes.actionsTray)}>
467-
<InputBoxWrapper
468-
className={classes.subnetLoginInputBoxWrapper}
469-
id="subnet-email"
470-
name="subnet-email"
471-
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
472-
setSubnetEmail(event.target.value)
473-
}
474-
label="Email"
475-
value={subnetEmail}
476-
noLabelMinWidth
477-
overlayIcon={<UsersIcon />}
478-
/>
479-
<InputBoxWrapper
480-
className={classes.subnetLoginInputBoxWrapper}
481-
id="subnet-password"
482-
name="subnet-password"
483-
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
484-
setSubnetPassword(event.target.value)
485-
}
486-
label="Password"
487-
type={showPassword ? "text" : "password"}
488-
value={subnetPassword}
489-
noLabelMinWidth
490-
overlayIcon={
491-
showPassword ? <VisibilityOffIcon /> : <RemoveRedEyeIcon />
492-
}
493-
overlayAction={() => setShowPassword(!showPassword)}
494-
/>
495-
<Button
496-
type="submit"
497-
variant="contained"
498-
color="primary"
499-
disabled={
500-
loading ||
501-
subnetEmail.trim().length === 0 ||
502-
subnetPassword.trim().length === 0
503-
}
504-
onClick={() => subnetLogin()}
466+
<Grid
467+
container
468+
justifyContent={"center"}
469+
item
470+
xs={4}
471+
style={{ margin: "auto" }}
505472
>
506-
Register
507-
</Button>
473+
<Grid item xs={12}>
474+
<InputBoxWrapper
475+
id="subnet-email"
476+
name="subnet-email"
477+
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
478+
setSubnetEmail(event.target.value)
479+
}
480+
label="Email"
481+
value={subnetEmail}
482+
overlayIcon={<UsersIcon />}
483+
/>
484+
</Grid>
485+
<Grid item xs={12}>
486+
{" "}
487+
<InputBoxWrapper
488+
id="subnet-password"
489+
name="subnet-password"
490+
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
491+
setSubnetPassword(event.target.value)
492+
}
493+
label="Password"
494+
type={showPassword ? "text" : "password"}
495+
value={subnetPassword}
496+
overlayIcon={
497+
showPassword ? <VisibilityOffIcon /> : <RemoveRedEyeIcon />
498+
}
499+
overlayAction={() => setShowPassword(!showPassword)}
500+
/>
501+
</Grid>
502+
<Grid item xs={12}>
503+
<br />
504+
</Grid>
505+
<Grid item xs={12} textAlign={"center"}>
506+
<Button
507+
type="submit"
508+
variant="outlined"
509+
onClick={(e) => {
510+
e.preventDefault();
511+
window.open(
512+
`https://min.io/signup?ref=${
513+
operatorMode ? "op" : "con"
514+
}`,
515+
"_blank"
516+
);
517+
}}
518+
>
519+
Sign up
520+
</Button>
521+
<Button
522+
type="submit"
523+
variant="contained"
524+
color="primary"
525+
disabled={
526+
loading ||
527+
subnetEmail.trim().length === 0 ||
528+
subnetPassword.trim().length === 0
529+
}
530+
onClick={() => subnetLogin()}
531+
>
532+
Register
533+
</Button>
534+
</Grid>
535+
</Grid>
536+
</Grid>
537+
<Grid item xs={12} className={classes.subnetDescription}>
538+
<div className={classes.smallBoxy}>
539+
<h1 className={classes.headerStyle}>Why should I register?</h1>
540+
Registering this cluster with the MinIO Subscription Network
541+
(SUBNET) provides the following benefits in addition to the
542+
commercial license and SLA backed support:
543+
<br />
544+
<ul>
545+
<li>Call Home Monitoring</li>
546+
<li>Health Diagnostics</li>
547+
<li>Performance Analysis</li>
548+
</ul>
549+
</div>
508550
</Grid>
509551
</Fragment>
510552
);
@@ -517,10 +559,7 @@ const Register = ({ classes, displayErrorMessage }: IRegister) => {
517559
</Grid>
518560
<Grid item xs={12} className={clsx(classes.actionsTray)}>
519561
<InputBoxWrapper
520-
className={clsx(
521-
classes.subnetLoginInputBoxWrapper,
522-
classes.copyInputBox
523-
)}
562+
className={clsx(classes.copyInputBox)}
524563
id="registration-token"
525564
name="registration-token"
526565
placeholder=""
@@ -551,7 +590,6 @@ const Register = ({ classes, displayErrorMessage }: IRegister) => {
551590
</Grid>
552591
<Grid item xs={12} className={clsx(classes.actionsTray)}>
553592
<InputBoxWrapper
554-
className={classes.subnetLoginInputBoxWrapper}
555593
value={license}
556594
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
557595
setLicense(event.target.value)
@@ -667,7 +705,11 @@ const Register = ({ classes, displayErrorMessage }: IRegister) => {
667705
);
668706
};
669707

670-
const connector = connect(null, {
708+
const mapState = (state: AppState) => ({
709+
operatorMode: state.system.operatorMode,
710+
});
711+
712+
const connector = connect(mapState, {
671713
displayErrorMessage: setErrorSnackMessage,
672714
});
673715

0 commit comments

Comments
 (0)