marginBottom: 8,
},
tenantsList: {
- marginTop: 25,
height: "calc(100vh - 195px)",
},
});
diff --git a/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx b/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx
index e13137d49..a6d682115 100644
--- a/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx
+++ b/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx
@@ -24,10 +24,9 @@ import { Theme } from "@mui/material/styles";
import createStyles from "@mui/styles/createStyles";
import withStyles from "@mui/styles/withStyles";
import { niceBytes, niceBytesInt } from "../../../../common/utils";
-import { tenantIsOnline } from "./utils";
-import { Button } from "@mui/material";
import InformationItem from "./InformationItem";
import TenantCapacity from "./TenantCapacity";
+import { DrivesIcon } from "../../../../icons";
const styles = (theme: Theme) =>
createStyles({
@@ -76,9 +75,8 @@ const styles = (theme: Theme) =>
height: 10,
},
tenantItem: {
- border: "1px solid #EAEDEE",
- borderRadius: 3,
- marginBottom: 20,
+ border: "1px solid #EAEAEA",
+ marginBottom: 16,
padding: "15px 30px",
"&:hover": {
backgroundColor: "#FAFAFA",
@@ -154,6 +152,8 @@ const TenantListItem = ({ tenant, classes }: ITenantListItem) => {
let raw: ValueUnit = { value: "n/a", unit: "" };
let capacity: ValueUnit = { value: "n/a", unit: "" };
let used: ValueUnit = { value: "n/a", unit: "" };
+ let localUse: ValueUnit = { value: "n/a", unit: "" };
+ let tieredUse: ValueUnit = { value: "n/a", unit: "" };
if (tenant.capacity_raw) {
const b = niceBytes(`${tenant.capacity_raw}`, true);
@@ -175,7 +175,6 @@ const TenantListItem = ({ tenant, classes }: ITenantListItem) => {
}
let spaceVariants: CapacityValues[] = [];
-
if (!tenant.tiers || tenant.tiers.length === 0) {
spaceVariants = [
{ value: tenant.capacity_usage || 0, variant: "STANDARD" },
@@ -184,6 +183,26 @@ const TenantListItem = ({ tenant, classes }: ITenantListItem) => {
spaceVariants = tenant.tiers.map((itemTenant) => {
return { value: itemTenant.size, variant: itemTenant.name };
});
+ let internalUsage = tenant.tiers
+ .filter((itemTenant) => {
+ return itemTenant.type === "internal";
+ })
+ .reduce((sum, itemTenant) => sum + itemTenant.size, 0);
+ let tieredUsage = tenant.tiers
+ .filter((itemTenant) => {
+ return itemTenant.type !== "internal";
+ })
+ .reduce((sum, itemTenant) => sum + itemTenant.size, 0);
+
+ const t = niceBytesInt(tieredUsage, true);
+ const parts = t.split(" ");
+ tieredUse.value = parts[0];
+ tieredUse.unit = parts[1];
+
+ const is = niceBytesInt(internalUsage, true);
+ const partsInternal = is.split(" ");
+ localUse.value = partsInternal[0];
+ localUse.unit = partsInternal[1];
}
const openTenantDetails = () => {
@@ -238,14 +257,10 @@ const TenantListItem = ({ tenant, classes }: ITenantListItem) => {
value={capacity.value}
unit={capacity.unit}
/>
-
{
-
-
+ {tenant.tiers && tenant.tiers.length > 0 && (
+
+
+
+ Internal:{" "}
+ {" "}
+ {`${localUse.value} ${localUse.unit}`}
+
+
+
+ Tiered:{" "}
+ {" "}
+ {`${tieredUse.value} ${tieredUse.unit}`}
+
+
+ )}
+
+
+
diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
index 99c15a740..a47d3ce96 100644
--- a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
+++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
@@ -128,10 +128,6 @@ const PoolsListing = ({
variant={"contained"}
/>
-
-
-
-
import("./TenantYAML")));
const TenantSummary = withSuspense(React.lazy(() => import("./TenantSummary")));
@@ -377,7 +378,7 @@ const TenantDetails = ({
}}
size="large"
>
- Delete Tenant
+ Delete
- Edit Tenant
+ YAML
+ {
+ history.push(
+ `/namespaces/${tenantNamespace}/tenants/${tenantName}/hop`
+ );
+ }}
+ disabled={!tenantInfo || !tenantIsOnline(tenantInfo)}
+ variant={"outlined"}
+ color="primary"
+ >
+ Console{" "}
+
+
- Reload
+ Refresh
}
diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
index a5f7382d7..117cb8a1a 100644
--- a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
+++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
@@ -17,8 +17,8 @@
import { ITenant } from "../ListTenants/types";
import {
ICertificateInfo,
- ITenantEncryptionResponse,
ISecurityContext,
+ ITenantEncryptionResponse,
} from "../types";
import { Theme } from "@mui/material/styles";
import createStyles from "@mui/styles/createStyles";
@@ -32,7 +32,6 @@ import {
tenantDetailsStyles,
wizardCommon,
} from "../../Common/FormComponents/common/styleLibrary";
-import Paper from "@mui/material/Paper";
import React, { Fragment, useEffect, useState } from "react";
import { setErrorSnackMessage } from "../../../../actions";
import { connect } from "react-redux";
@@ -46,7 +45,7 @@ import Grid from "@mui/material/Grid";
import FileSelector from "../../Common/FormComponents/FileSelector/FileSelector";
import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import RadioGroupSelector from "../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector";
-import { Button, DialogContentText } from "@mui/material";
+import { Button, DialogContentText, Stack } from "@mui/material";
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
import RemoveRedEyeIcon from "@mui/icons-material/RemoveRedEye";
import { KeyPair } from "../ListTenants/utils";
@@ -57,6 +56,7 @@ import {
} from "../../../../utils/validationFunctions";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
import TLSCertificate from "../../Common/TLSCertificate/TLSCertificate";
+import StackRow from "../../Common/UsageBarWrapper/StackRow";
interface ITenantEncryption {
classes: any;
@@ -100,13 +100,13 @@ const styles = (theme: Theme) =>
display: "flex",
alignItems: "center",
borderBottom: "1px solid #eaeaea",
- marginBottom: 10,
+ marginBottom: 8,
},
caCertsRow: {
borderBottom: "1px solid #eaeaea",
display: "flex",
alignItems: "center",
- marginBottom: 10,
+ marginBottom: 8,
},
...containerForHeader(theme.spacing(4)),
...createTenantCommon,
@@ -705,109 +705,124 @@ const TenantEncryption = ({
}
/>
)}
-