License Tweaks (#1188)
* License Tweaks Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Address comments Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Fix react tests Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
This commit is contained in:
@@ -22,15 +22,15 @@ import {
|
||||
} from "../utils";
|
||||
|
||||
test("A variety of formatting results", () => {
|
||||
expect(niceBytes("1024")).toBe("1.0 KiB");
|
||||
expect(niceBytes("1048576")).toBe("1.0 MiB");
|
||||
expect(niceBytes("1073741824")).toBe("1.0 GiB");
|
||||
expect(niceBytes("1024")).toBe("1.0 KB");
|
||||
expect(niceBytes("1048576")).toBe("1.0 MB");
|
||||
expect(niceBytes("1073741824")).toBe("1.0 GB");
|
||||
});
|
||||
|
||||
test("From value and unit to a number of bytes", () => {
|
||||
expect(getBytes("1", "KiB")).toBe("1024");
|
||||
expect(getBytes("1", "MiB")).toBe("1048576");
|
||||
expect(getBytes("1", "GiB")).toBe("1073741824");
|
||||
expect(getBytes("1", "KB")).toBe("1024");
|
||||
expect(getBytes("1", "MB")).toBe("1048576");
|
||||
expect(getBytes("1", "GB")).toBe("1073741824");
|
||||
});
|
||||
|
||||
test("From value and unit to a number of bytes for kubernetes", () => {
|
||||
|
||||
@@ -21,17 +21,7 @@ import { IPool } from "../screens/Console/Tenants/ListTenants/types";
|
||||
const minStReq = 1073741824; // Minimal Space required for MinIO
|
||||
const minMemReq = 2147483648; // Minimal Memory required for MinIO in bytes
|
||||
|
||||
export const units = [
|
||||
"B",
|
||||
"KiB",
|
||||
"MiB",
|
||||
"GiB",
|
||||
"TiB",
|
||||
"PiB",
|
||||
"EiB",
|
||||
"ZiB",
|
||||
"YiB",
|
||||
];
|
||||
export const units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
||||
export const k8sUnits = ["Ki", "Mi", "Gi", "Ti", "Pi", "Ei"];
|
||||
export const k8sCalcUnits = ["B", ...k8sUnits];
|
||||
|
||||
|
||||
@@ -479,27 +479,10 @@ const License = ({ classes, operatorMode }: ILicenseProps) => {
|
||||
>
|
||||
{niceBytes(
|
||||
(licenseInfo.storage_capacity * 1099511627776) // 1 Terabyte = 1099511627776 Bytes
|
||||
.toString(10)
|
||||
.toString(10),
|
||||
false
|
||||
)}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="button"
|
||||
display="block"
|
||||
gutterBottom
|
||||
className={classes.licenseInfoTitle}
|
||||
>
|
||||
Expiry Date
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="overline"
|
||||
display="block"
|
||||
gutterBottom
|
||||
className={classes.licenseInfoValue}
|
||||
>
|
||||
<Moment format="YYYY-MM-DD">
|
||||
{licenseInfo.expires_at}
|
||||
</Moment>
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Typography
|
||||
@@ -524,7 +507,7 @@ const License = ({ classes, operatorMode }: ILicenseProps) => {
|
||||
gutterBottom
|
||||
className={classes.licenseInfoTitle}
|
||||
>
|
||||
Requester
|
||||
Requestor
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="overline"
|
||||
@@ -534,6 +517,27 @@ const License = ({ classes, operatorMode }: ILicenseProps) => {
|
||||
>
|
||||
{licenseInfo.email}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="button"
|
||||
display="block"
|
||||
gutterBottom
|
||||
className={classes.licenseInfoTitle}
|
||||
>
|
||||
Expiry Date
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="overline"
|
||||
display="block"
|
||||
gutterBottom
|
||||
className={classes.licenseInfoValue}
|
||||
>
|
||||
<Moment format="YYYY-MM-DD">
|
||||
{licenseInfo.expires_at
|
||||
.split(" ")
|
||||
.slice(0, 1)
|
||||
.join(" ")}
|
||||
</Moment>
|
||||
</Typography>
|
||||
</Grid>
|
||||
<img
|
||||
className={classes.verifiedIcon}
|
||||
@@ -624,7 +628,7 @@ const License = ({ classes, operatorMode }: ILicenseProps) => {
|
||||
refreshLicense();
|
||||
}}
|
||||
>
|
||||
Refresh Licence
|
||||
Refresh License
|
||||
</button>
|
||||
{loadingRefreshLicense && (
|
||||
<CircularProgress
|
||||
|
||||
@@ -18,7 +18,7 @@ export const planDetails = [
|
||||
{
|
||||
id: 0,
|
||||
title: "Community",
|
||||
price: "FREE",
|
||||
price: "N/A",
|
||||
capacityMax: "Open Source",
|
||||
},
|
||||
{
|
||||
@@ -98,14 +98,14 @@ export const planItems = [
|
||||
id: 6,
|
||||
field: "Annual Architecture Review",
|
||||
community: "N/A",
|
||||
standard: "Yes",
|
||||
standard: "N/A",
|
||||
enterprise: "Yes",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
field: "Annual Performance Review",
|
||||
community: "N/A",
|
||||
standard: "Yes",
|
||||
standard: "N/A",
|
||||
enterprise: "Yes",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -197,7 +197,7 @@ const SubnetLicenseTenant = ({
|
||||
gutterBottom
|
||||
className={classes.licenseInfoTitle}
|
||||
>
|
||||
Requester
|
||||
Requestor
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="overline"
|
||||
|
||||
Reference in New Issue
Block a user