From 70d3cfc42c996326a32c878ba6083bd0a3b4fc44 Mon Sep 17 00:00:00 2001
From: Benjamin Perez
Date: Wed, 22 Nov 2023 15:58:14 -0600
Subject: [PATCH] Updated Tenant details main pages
Signed-off-by: Benjamin Perez
---
web-app/package.json | 1 +
web-app/public/index.html | 2 +-
web-app/public/manifest.json | 2 +-
.../CodeMirrorWrapper/CodeMirrorWrapper.tsx | 143 -
.../FileSelector/FileSelector.tsx | 184 --
.../FormComponents/FileSelector/utils.ts | 34 -
.../FormComponents/common/styleLibrary.ts | 69 -
web-app/src/screens/Console/Common/FormHr.tsx | 27 -
.../UsageBarWrapper/SummaryUsageBar.tsx | 87 +-
.../Console/Marketplace/SetEmailModal.tsx | 20 +-
.../Steps/TenantResources/TenantSizeMK.tsx | 111 +-
.../Tenants/ListTenants/DeleteTenant.tsx | 24 +-
.../Tenants/TenantDetails/DeletePod.tsx | 22 +-
.../Tenants/TenantDetails/EditDomains.tsx | 251 +-
.../Tenants/TenantDetails/PodsSummary.tsx | 105 +-
.../Pools/Details/PoolDetails.tsx | 16 +-
.../Pools/Details/PoolsListing.tsx | 57 +-
.../Tenants/TenantDetails/PoolsSummary.tsx | 46 +-
.../TenantDetails/SubnetLicenseTenant.tsx | 156 +-
.../Tenants/TenantDetails/TenantCSR.tsx | 60 +-
.../TenantDetails/TenantConfiguration.tsx | 213 +-
.../Tenants/TenantDetails/TenantDetails.tsx | 432 ++-
.../TenantDetails/TenantEncryption.tsx | 2388 ++++++++---------
.../Tenants/TenantDetails/TenantEvents.tsx | 47 +-
.../TenantDetails/TenantIdentityProvider.tsx | 586 ++--
.../Tenants/TenantDetails/TenantLicense.tsx | 40 +-
.../Tenants/TenantDetails/TenantMetrics.tsx | 50 +-
.../Tenants/TenantDetails/TenantSecurity.tsx | 428 ++-
.../Tenants/TenantDetails/TenantSummary.tsx | 487 ++--
.../Tenants/TenantDetails/TenantYAML.tsx | 70 +-
.../TenantDetails/UpdateTenantModal.tsx | 205 +-
.../Tenants/TenantDetails/VolumesSummary.tsx | 68 +-
.../TenantDetails/events/EventsList.tsx | 71 +-
.../Tenants/securityContextSelector.tsx | 198 +-
web-app/yarn.lock | 14 +-
35 files changed, 2822 insertions(+), 3892 deletions(-)
delete mode 100644 web-app/src/screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx
delete mode 100644 web-app/src/screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx
delete mode 100644 web-app/src/screens/Console/Common/FormComponents/FileSelector/utils.ts
delete mode 100644 web-app/src/screens/Console/Common/FormHr.tsx
diff --git a/web-app/package.json b/web-app/package.json
index dc8f5614e03..a1acb09c979 100644
--- a/web-app/package.json
+++ b/web-app/package.json
@@ -4,6 +4,7 @@
"homepage": ".",
"private": true,
"dependencies": {
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/traverse": "7.23.3",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
diff --git a/web-app/public/index.html b/web-app/public/index.html
index 806d86d3fea..2accd75b50b 100644
--- a/web-app/public/index.html
+++ b/web-app/public/index.html
@@ -59,7 +59,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
- MinIO Console
+ MinIO Operator
You need to enable JavaScript to run this app.
diff --git a/web-app/public/manifest.json b/web-app/public/manifest.json
index 28ab43f74e9..56e9f82a90a 100644
--- a/web-app/public/manifest.json
+++ b/web-app/public/manifest.json
@@ -1,5 +1,5 @@
{
- "name": "MinIO Console",
+ "name": "MinIO Operator",
"icons": [
{
"src": "favicon.ico",
diff --git a/web-app/src/screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx b/web-app/src/screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx
deleted file mode 100644
index 7caff722b5b..00000000000
--- a/web-app/src/screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-// This file is part of MinIO Operator
-// Copyright (c) 2021 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 .
-
-import React from "react";
-import Grid from "@mui/material/Grid";
-import { Box, InputLabel, Tooltip } from "@mui/material";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import { Button, CopyIcon, HelpIcon } from "mds";
-import { fieldBasic } from "../common/styleLibrary";
-import CopyToClipboard from "react-copy-to-clipboard";
-import CodeEditor from "@uiw/react-textarea-code-editor";
-import TooltipWrapper from "../../TooltipWrapper/TooltipWrapper";
-
-interface ICodeWrapper {
- value: string;
- label?: string;
- mode?: string;
- tooltip?: string;
- classes: any;
- onChange?: (editor: any, data: any, value: string) => any;
- onBeforeChange: (editor: any, data: any, value: string) => any;
- readOnly?: boolean;
- editorHeight?: string;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...fieldBasic,
- });
-
-const CodeMirrorWrapper = ({
- value,
- label = "",
- tooltip = "",
- mode = "json",
- classes,
- onBeforeChange,
- readOnly = false,
- editorHeight = "250px",
-}: ICodeWrapper) => {
- return (
-
-
-
- {label}
- {tooltip !== "" && (
-
- )}
-
-
-
-
- {
- onBeforeChange(null, null, evn.target.value);
- }}
- id={"code_wrapper"}
- padding={15}
- style={{
- fontSize: 12,
- backgroundColor: "#fefefe",
- fontFamily:
- "ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",
- minHeight: editorHeight || "initial",
- color: "#000000",
- }}
- />
-
-
-
-
-
- }
- color={"primary"}
- variant={"regular"}
- />
-
-
-
-
-
- );
-};
-
-export default withStyles(styles)(CodeMirrorWrapper);
diff --git a/web-app/src/screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx b/web-app/src/screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx
deleted file mode 100644
index fe99c6982e6..00000000000
--- a/web-app/src/screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx
+++ /dev/null
@@ -1,184 +0,0 @@
-// This file is part of MinIO Operator
-// Copyright (c) 2021 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 .
-
-import React, { useState } from "react";
-import get from "lodash/get";
-import { Grid, InputLabel, Tooltip } from "@mui/material";
-import IconButton from "@mui/material/IconButton";
-import AttachFileIcon from "@mui/icons-material/AttachFile";
-import CancelIcon from "@mui/icons-material/Cancel";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- fieldBasic,
- fileInputStyles,
- tooltipHelper,
-} from "../common/styleLibrary";
-import { fileProcess } from "./utils";
-import { HelpIcon } from "mds";
-import ErrorBlock from "../../../../shared/ErrorBlock";
-
-interface InputBoxProps {
- label: string;
- classes: any;
- onChange: (e: string, i: string) => void;
- id: string;
- name: string;
- disabled?: boolean;
- tooltip?: string;
- required?: boolean;
- error?: string;
- accept?: string;
- value?: string;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...fieldBasic,
- ...tooltipHelper,
- valueString: {
- maxWidth: 350,
- whiteSpace: "nowrap",
- overflow: "hidden",
- textOverflow: "ellipsis",
- marginTop: 2,
- },
- fileInputField: {
- margin: "13px 0",
- "@media (max-width: 900px)": {
- flexFlow: "column",
- },
- },
- ...fileInputStyles,
- inputLabel: {
- ...fieldBasic.inputLabel,
- fontWeight: "normal",
- },
- textBoxContainer: {
- ...fieldBasic.textBoxContainer,
- maxWidth: "100%",
- border: "1px solid #eaeaea",
- paddingLeft: "15px",
- },
- });
-
-const FileSelector = ({
- label,
- classes,
- onChange,
- id,
- name,
- disabled = false,
- tooltip = "",
- required,
- error = "",
- accept = "",
- value = "",
-}: InputBoxProps) => {
- const [showFileSelector, setShowSelector] = useState(false);
-
- return (
-
-
- {label !== "" && (
-
-
- {label}
- {required ? "*" : ""}
-
- {tooltip !== "" && (
-
- )}
-
- )}
-
- {showFileSelector || value === "" ? (
-
- {
- const fileName = get(e, "target.files[0].name", "");
- fileProcess(e, (data: any) => {
- onChange(data, fileName);
- });
- }}
- accept={accept}
- required={required}
- disabled={disabled}
- className={classes.fileInputField}
- />
-
- {value !== "" && (
- {
- setShowSelector(false);
- }}
- disableRipple={false}
- disableFocusRipple={false}
- size="small"
- >
-
-
- )}
-
- {error !== "" && }
-
- ) : (
-
-
{value}
-
{
- setShowSelector(true);
- }}
- disableRipple={false}
- disableFocusRipple={false}
- size="small"
- >
-
-
-
- )}
-
-
- );
-};
-
-export default withStyles(styles)(FileSelector);
diff --git a/web-app/src/screens/Console/Common/FormComponents/FileSelector/utils.ts b/web-app/src/screens/Console/Common/FormComponents/FileSelector/utils.ts
deleted file mode 100644
index 4fb54df2d0d..00000000000
--- a/web-app/src/screens/Console/Common/FormComponents/FileSelector/utils.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-// This file is part of MinIO Operator
-// Copyright (c) 2021 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 .
-
-export const fileProcess = (evt: any, callback: any) => {
- const file = evt.target.files[0];
- const reader = new FileReader();
- reader.readAsDataURL(file);
-
- reader.onload = () => {
- // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU
- // we care only about the actual base64 part (everything after "data:application/x-x509-ca-cert;base64,")
- const fileBase64 = reader.result;
- if (fileBase64) {
- const fileArray = fileBase64.toString().split("base64,");
-
- if (fileArray.length === 2) {
- callback(fileArray[1]);
- }
- }
- };
-};
diff --git a/web-app/src/screens/Console/Common/FormComponents/common/styleLibrary.ts b/web-app/src/screens/Console/Common/FormComponents/common/styleLibrary.ts
index 70b3dd21541..7dce906dd1d 100644
--- a/web-app/src/screens/Console/Common/FormComponents/common/styleLibrary.ts
+++ b/web-app/src/screens/Console/Common/FormComponents/common/styleLibrary.ts
@@ -379,45 +379,6 @@ export const inputFieldStyles = {
},
};
-export const pageContentStyles = {
- contentSpacer: {
- padding: "2rem",
- },
-};
-
-export const tableStyles: any = {
- tableBlock: {
- display: "flex",
- flexDirection: "row",
- "& .ReactVirtualized__Table__headerRow.rowLine, .ReactVirtualized__Table__row.rowLine":
- {
- borderBottom: "1px solid #EAEAEA",
- },
-
- "& .rowLine:hover:not(.ReactVirtualized__Table__headerRow)": {
- backgroundColor: "#F8F8F8",
- },
- "& .ReactVirtualized__Table__row.rowLine": {
- fontSize: ".8rem",
- },
- "& .optionsAlignment ": {
- textAlign: "right",
-
- "& .MuiButtonBase-root": {
- backgroundColor: "#F8F8F8",
- },
-
- "&:hover": {
- backgroundColor: "#E2E2E2",
- },
- "& .min-icon": {
- width: 13,
- margin: 3,
- },
- },
- },
-};
-
export const spacingUtils: any = {
spacerRight: {
marginRight: ".9rem",
@@ -442,36 +403,6 @@ export const formFieldStyles: any = {
},
};
-export const fileInputStyles = {
- fieldBottom: {
- borderBottom: 0,
- },
- fileReselect: {
- border: "1px solid #EAEAEA",
- width: "100%",
- paddingLeft: 10,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- height: 36,
- maxWidth: 300,
- },
- textBoxContainer: {
- border: "1px solid #EAEAEA",
- borderRadius: 3,
- height: 36,
- padding: 5,
- "& input": {
- width: "100%",
- margin: "auto",
- },
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- maxWidth: 300,
- },
-};
-
export const createTenantCommon: any = {
fieldGroup: {
border: "1px solid #EAEAEA",
diff --git a/web-app/src/screens/Console/Common/FormHr.tsx b/web-app/src/screens/Console/Common/FormHr.tsx
deleted file mode 100644
index 2205ef2be91..00000000000
--- a/web-app/src/screens/Console/Common/FormHr.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is part of MinIO Operator
-// Copyright (c) 2023 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 .
-
-import styled from "@emotion/styled";
-
-const FormHr = styled("hr")`
- border-top: 0;
- border-left: 0;
- border-right: 0;
- border-color: #999999;
- background-color: transparent;
-`;
-
-export default FormHr;
diff --git a/web-app/src/screens/Console/Common/UsageBarWrapper/SummaryUsageBar.tsx b/web-app/src/screens/Console/Common/UsageBarWrapper/SummaryUsageBar.tsx
index 99f167232bd..01ff7f855de 100644
--- a/web-app/src/screens/Console/Common/UsageBarWrapper/SummaryUsageBar.tsx
+++ b/web-app/src/screens/Console/Common/UsageBarWrapper/SummaryUsageBar.tsx
@@ -1,12 +1,35 @@
+// This file is part of MinIO Operator
+// Copyright (c) 2021 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 .
+
import React, { Fragment } from "react";
-import { Stack } from "@mui/material";
-import Grid from "@mui/material/Grid";
+import {
+ CircleIcon,
+ Loader,
+ ValuePair,
+ Grid,
+ Box,
+ breakPoints,
+ InformativeMessage,
+} from "mds";
+import get from "lodash/get";
+import styled from "styled-components";
import { CapacityValues, ValueUnit } from "../../Tenants/ListTenants/types";
-import { CircleIcon, Loader, ValuePair } from "mds";
import { niceBytes, niceBytesInt } from "../../../../common/utils";
-import TenantCapacity from "../../Tenants/ListTenants/TenantCapacity";
-import ErrorBlock from "../../../shared/ErrorBlock";
import { Tenant } from "../../../../api/operatorApi";
+import TenantCapacity from "../../Tenants/ListTenants/TenantCapacity";
interface ISummaryUsageBar {
tenant: Tenant;
@@ -17,6 +40,28 @@ interface ISummaryUsageBar {
healthStatus?: string;
}
+const TenantCapacityMain = styled.div(({ theme }) => ({
+ width: "100%",
+ "& .tenantStatus": {
+ marginTop: 2,
+ color: get(theme, "signalColors.disabled", "#E6EBEB"),
+ "& .min-icon": {
+ width: 16,
+ height: 16,
+ marginRight: 4,
+ },
+ "&.red": {
+ color: get(theme, "signalColors.danger", "#C51B3F"),
+ },
+ "&.yellow": {
+ color: get(theme, "signalColors.warning", "#FFBD62"),
+ },
+ "&.green": {
+ color: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ },
+}));
+
const SummaryUsageBar = ({
tenant,
healthStatus,
@@ -82,20 +127,30 @@ const SummaryUsageBar = ({
const renderComponent = () => {
if (!loading) {
return error !== "" ? (
-
+
) : (
-
+
-
{(!tenant.tiers || tenant.tiers.length === 0) && (
@@ -125,14 +180,14 @@ const SummaryUsageBar = ({
direction={"row"}
label={"Health:"}
value={
-
+
-
+
}
/>
)}
-
-
+
+
);
}
diff --git a/web-app/src/screens/Console/Marketplace/SetEmailModal.tsx b/web-app/src/screens/Console/Marketplace/SetEmailModal.tsx
index 2e2e8acbb58..0c6cfb56210 100644
--- a/web-app/src/screens/Console/Marketplace/SetEmailModal.tsx
+++ b/web-app/src/screens/Console/Marketplace/SetEmailModal.tsx
@@ -14,25 +14,15 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import { containerForHeader } from "../Common/FormComponents/common/styleLibrary";
-import ConfirmDialog from "../Common/ModalWrapper/ConfirmDialog";
-import useApi from "../Common/Hooks/useApi";
import React, { Fragment, useState } from "react";
+import { InfoIcon, InputBox } from "mds";
import { ISetEmailModalProps } from "./types";
-import { InfoIcon } from "mds";
import { ErrorResponseHandler } from "../../../common/types";
-import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import { setErrorSnackMessage, setSnackBarMessage } from "../../../systemSlice";
import { useAppDispatch } from "../../../store";
import { euTimezones } from "./euTimezones";
-
-const styles = (theme: Theme) =>
- createStyles({
- ...containerForHeader,
- });
+import ConfirmDialog from "../Common/ModalWrapper/ConfirmDialog";
+import useApi from "../Common/Hooks/useApi";
const reEmail =
// eslint-disable-next-line
@@ -105,7 +95,7 @@ const SetEmailModal = ({ open, closeModal }: ISetEmailModalProps) => {
To register later, contact{" "}
support@min.io .
- {
) : null;
};
-export default withStyles(styles)(SetEmailModal);
+export default SetEmailModal;
diff --git a/web-app/src/screens/Console/Tenants/AddTenant/Steps/TenantResources/TenantSizeMK.tsx b/web-app/src/screens/Console/Tenants/AddTenant/Steps/TenantResources/TenantSizeMK.tsx
index 50c156f99d7..eaa0fa5e41a 100644
--- a/web-app/src/screens/Console/Tenants/AddTenant/Steps/TenantResources/TenantSizeMK.tsx
+++ b/web-app/src/screens/Console/Tenants/AddTenant/Steps/TenantResources/TenantSizeMK.tsx
@@ -15,52 +15,29 @@
// along with this program. If not, see .
import React, { Fragment, useCallback, useEffect, useState } from "react";
+import { Box, Grid, InputBox, Select } from "mds";
import { useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import { SelectChangeEvent } from "@mui/material";
import get from "lodash/get";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
import { AppState, useAppDispatch } from "../../../../../../store";
-import {
- formFieldStyles,
- modalBasic,
- wizardCommon,
-} from "../../../../Common/FormComponents/common/styleLibrary";
-import Grid from "@mui/material/Grid";
import { erasureCodeCalc, getBytes } from "../../../../../../common/utils";
import { clearValidationError } from "../../../utils";
import { ecListTransform } from "../../../ListTenants/utils";
import { IStorageDistribution } from "../../../../../../common/types";
import { commonFormValidation } from "../../../../../../utils/validationFunctions";
-import api from "../../../../../../common/api";
-import InputBoxWrapper from "../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import SelectWrapper from "../../../../Common/FormComponents/SelectWrapper/SelectWrapper";
import {
IMkEnvs,
IntegrationConfiguration,
mkPanelConfigurations,
} from "./utils";
import { isPageValid, updateAddField } from "../../createTenantSlice";
+import api from "../../../../../../common/api";
import H3Section from "../../../../Common/H3Section";
interface ITenantSizeAWSProps {
- classes: any;
formToRender?: IMkEnvs;
}
-const styles = (theme: Theme) =>
- createStyles({
- ...formFieldStyles,
- ...modalBasic,
- ...wizardCommon,
- });
-
-const TenantSizeMK = ({
- classes,
-
- formToRender,
-}: ITenantSizeAWSProps) => {
+const TenantSizeMK = ({ formToRender }: ITenantSizeAWSProps) => {
const dispatch = useAppDispatch();
const volumeSize = useSelector(
@@ -300,61 +277,55 @@ const TenantSizeMK = ({
return (
-
+
Tenant Size
-
- Please select the desired capacity
-
-
+ Please select the desired capacity
+
{distribution.error !== "" && (
- {distribution.error}
+ {distribution.error}
)}
{resourcesSize.error !== "" && (
- {resourcesSize.error}
+ {resourcesSize.error}
)}
-
- ) => {
- if (e.target.validity.valid) {
- updateField("nodes", e.target.value);
- cleanValidation("nodes");
- }
- }}
- label="Number of Servers"
- disabled={selectedStorageType === ""}
- value={nodes}
- min="4"
- required
- error={validationErrors["nodes"] || ""}
- pattern={"[0-9]*"}
- />
-
-
- ) => {
- updateField("ecParity", e.target.value as string);
- }}
- label="Erasure Code Parity"
- disabled={selectedStorageType === ""}
- value={ecParity}
- options={ecParityChoices}
- />
-
- Please select the desired parity. This setting will change the max
- usable capacity in the cluster
-
-
+ ) => {
+ if (e.target.validity.valid) {
+ updateField("nodes", e.target.value);
+ cleanValidation("nodes");
+ }
+ }}
+ label="Number of Servers"
+ disabled={selectedStorageType === ""}
+ value={nodes}
+ min="4"
+ required
+ error={validationErrors["nodes"] || ""}
+ pattern={"[0-9]*"}
+ />
+ {
+ updateField("ecParity", value);
+ }}
+ label="Erasure Code Parity"
+ disabled={selectedStorageType === ""}
+ value={ecParity}
+ options={ecParityChoices}
+ />
+
+ Please select the desired parity. This setting will change the max
+ usable capacity in the cluster
+
);
};
-export default withStyles(styles)(TenantSizeMK);
+export default TenantSizeMK;
diff --git a/web-app/src/screens/Console/Tenants/ListTenants/DeleteTenant.tsx b/web-app/src/screens/Console/Tenants/ListTenants/DeleteTenant.tsx
index 501a36d242f..45bb7ba6359 100644
--- a/web-app/src/screens/Console/Tenants/ListTenants/DeleteTenant.tsx
+++ b/web-app/src/screens/Console/Tenants/ListTenants/DeleteTenant.tsx
@@ -15,14 +15,18 @@
// along with this program. If not, see .
import React, { useState } from "react";
-import { DialogContentText } from "@mui/material";
-
+import {
+ ConfirmDeleteIcon,
+ FormLayout,
+ InformativeMessage,
+ InputBox,
+ Switch,
+} from "mds";
import { ErrorResponseHandler } from "../../../../common/types";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import Grid from "@mui/material/Grid";
import useApi from "../../Common/Hooks/useApi";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
-import { ConfirmDeleteIcon, InformativeMessage } from "mds";
+
import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
import { setErrorSnackMessage } from "../../../../systemSlice";
import { useAppDispatch } from "../../../../store";
@@ -79,9 +83,9 @@ const DeleteTenant = ({
disabled: retypeTenant !== selectedTenant.name || deleteLoading,
}}
confirmationContent={
-
+
{deleteVolumes && (
-
+
{selectedTenant.name} in the box.
- ) => {
@@ -102,8 +106,7 @@ const DeleteTenant = ({
label=""
value={retypeTenant}
/>
-
- {
setDeleteVolumes(!deleteVolumes);
}}
- value={deleteVolumes}
/>
-
+
}
/>
);
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/DeletePod.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/DeletePod.tsx
index 486510925fa..9d3fc454d2b 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/DeletePod.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/DeletePod.tsx
@@ -14,18 +14,14 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import React, { useState } from "react";
-import { DialogContentText } from "@mui/material";
+import React, { useState, Fragment } from "react";
+import { ConfirmDeleteIcon, Box, InputBox } from "mds";
import { IPodListElement } from "../ListTenants/types";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import Grid from "@mui/material/Grid";
-
import { ErrorResponseHandler } from "../../../../common/types";
-import useApi from "../../Common/Hooks/useApi";
-import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
-import { ConfirmDeleteIcon } from "mds";
import { setErrorSnackMessage } from "../../../../systemSlice";
import { useAppDispatch } from "../../../../store";
+import useApi from "../../Common/Hooks/useApi";
+import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
interface IDeletePod {
deleteOpen: boolean;
@@ -75,10 +71,10 @@ const DeletePod = ({
disabled: retypePod !== selectedPod.name || deleteLoading,
}}
confirmationContent={
-
+
To continue please type {selectedPod.name} in the box.
-
-
+ ) => {
@@ -87,8 +83,8 @@ const DeletePod = ({
label=""
value={retypePod}
/>
-
-
+
+
}
/>
);
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/EditDomains.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/EditDomains.tsx
index 0468fdf5af8..b83b8f1b35c 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/EditDomains.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/EditDomains.tsx
@@ -15,28 +15,27 @@
// along with this program. If not, see .
import React, { useEffect, useState } from "react";
-import { Theme } from "@mui/material/styles";
-import { Button, RemoveIcon } from "mds";
-import { Grid, IconButton } from "@mui/material";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import AddIcon from "@mui/icons-material/Add";
import {
- formFieldStyles,
- modalStyleUtils,
-} from "../../Common/FormComponents/common/styleLibrary";
+ AddIcon,
+ Box,
+ Button,
+ FormLayout,
+ IconButton,
+ InputBox,
+ RemoveIcon,
+} from "mds";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
import {
ErrorResponseHandler,
IDomainsRequest,
} from "../../../../common/types";
-import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import api from "../../../../common/api";
import {
setModalErrorSnackMessage,
setSnackBarMessage,
} from "../../../../systemSlice";
import { useAppDispatch } from "../../../../store";
+import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
+import api from "../../../../common/api";
interface IEditDomains {
open: boolean;
@@ -44,38 +43,14 @@ interface IEditDomains {
namespace: string;
idTenant: string;
domains: IDomainsRequest | null;
- classes: any;
}
-const styles = (theme: Theme) =>
- createStyles({
- domainInline: {
- display: "flex",
- marginBottom: 15,
- },
- overlayAction: {
- marginLeft: 10,
- display: "flex",
- alignItems: "center",
- "& svg": {
- width: 15,
- height: 15,
- },
- "& button": {
- background: "#EAEAEA",
- },
- },
- ...formFieldStyles,
- ...modalStyleUtils,
- });
-
const EditDomains = ({
open,
closeModalAndRefresh,
namespace,
idTenant,
domains,
- classes,
}: IEditDomains) => {
const dispatch = useAppDispatch();
const [isSending, setIsSending] = useState(false);
@@ -200,114 +175,108 @@ const EditDomains = ({
modalOpen={open}
onClose={closeAction}
>
-
-
-
-
- ) => {
- setConsoleDomain(e.target.value);
+
+
+ ) => {
+ setConsoleDomain(e.target.value);
- setConsoleDomainValid(e.target.validity.valid);
- }}
- label="Console Domain"
- value={consoleDomain}
- placeholder={
- "Eg. http://subdomain.domain:port/subpath1/subpath2"
- }
- pattern={
- "^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?(\\/[a-zA-Z0-9\\-.\\/]*)?$"
- }
- error={
- !consoleDomainValid
- ? "Domain format is incorrect (http|https://subdomain.domain:port/subpath1/subpath2)"
- : ""
- }
- />
-
-
-
MinIO Domains
-
- {minioDomains.map((domain, index) => {
- return (
-
+
MinIO Domains
+
+ {minioDomains.map((domain, index) => {
+ return (
+
+ ) => {
+ updateMinIODomain(e.target.value, index);
+ setMinioDomainValidation(e.target.validity.valid, index);
+ }}
+ label={`MinIO Domain ${index + 1}`}
+ value={domain}
+ placeholder={"Eg. http://subdomain.domain"}
+ pattern={"^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?$"}
+ error={
+ !minioDomainValid[index]
+ ? "MinIO domain format is incorrect (http|https://subdomain.domain)"
+ : ""
+ }
+ />
+
+
- ) => {
- updateMinIODomain(e.target.value, index);
- setMinioDomainValidation(
- e.target.validity.valid,
- index,
- );
- }}
- label={`MinIO Domain ${index + 1}`}
- value={domain}
- placeholder={"Eg. http://subdomain.domain"}
- pattern={
- "^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?$"
- }
- error={
- !minioDomainValid[index]
- ? "MinIO domain format is incorrect (http|https://subdomain.domain)"
- : ""
- }
- />
-
-
-
- removeMinIODomain(index)}
- disabled={minioDomains.length <= 1}
- >
-
-
-
-
- );
- })}
-
-
-
-
-
- !domain).length > 0
- }
- onClick={updateDomainsList}
- label={"Save"}
- />
-
-
-
+
+
+ removeMinIODomain(index)}
+ disabled={minioDomains.length <= 1}
+ >
+
+
+
+
+ );
+ })}
+
+
+
+
+ !domain).length > 0
+ }
+ onClick={updateDomainsList}
+ label={"Save"}
+ />
+
+
);
};
-export default withStyles(styles)(EditDomains);
+export default EditDomains;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/PodsSummary.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/PodsSummary.tsx
index d9e7eb90cd1..28238c3875f 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/PodsSummary.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/PodsSummary.tsx
@@ -17,38 +17,19 @@
import React, { Fragment, useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { useNavigate, useParams } from "react-router-dom";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- containerForHeader,
- tableStyles,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
+import { Button, DataTable, Grid, InformativeMessage, SectionTitle } from "mds";
+import { actionsTray } from "../../Common/FormComponents/common/styleLibrary";
import { niceDays } from "../../../../common/utils";
import { IPodListElement } from "../ListTenants/types";
-
-import api from "../../../../common/api";
import { AppState, useAppDispatch } from "../../../../store";
import { ErrorResponseHandler } from "../../../../common/types";
-import DeletePod from "./DeletePod";
-import { Grid, InputAdornment, TextField } from "@mui/material";
-import { SearchIcon, Button, DataTable } from "mds";
import { setErrorSnackMessage } from "../../../../systemSlice";
+import api from "../../../../common/api";
+import DeletePod from "./DeletePod";
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
+import SearchBox from "../../Common/SearchBox";
-interface IPodsSummary {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...tableStyles,
- ...containerForHeader,
- });
-
-const PodsSummary = ({ classes }: IPodsSummary) => {
+const PodsSummary = () => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
const { tenantName, tenantNamespace } = useParams();
@@ -200,17 +181,10 @@ const PodsSummary = ({ classes }: IPodsSummary) => {
closeDeleteModalAndRefresh={closeDeleteModalAndRefresh}
/>
)}
-
-
- Pods
-
-
- {downloadSuccess &&
- !reportError &&
- "Tenant report downloaded to " + filename}
- {reportError && "There was a problem generating the report"}
-
-
+
{
Download Log Report
-
-
-
-
-
-
- ),
+ }
+ >
+ Pods
+
+ {downloadSuccess && !reportError && (
+
+ )}
+
+ {reportError && (
+
+ )}
+
+
+ {
- setFilter(e.target.value);
+ >
+
+
+ {
+ setFilter(value);
}}
- variant="standard"
+ placeholder={"Search Pods"}
+ id="search-resource"
/>
-
+
{
);
};
-export default withStyles(styles)(PodsSummary);
+export default PodsSummary;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolDetails.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolDetails.tsx
index 0cf11ed0034..1b38f254a4b 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolDetails.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolDetails.tsx
@@ -18,7 +18,6 @@ import React, { Fragment } from "react";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import { AppState } from "../../../../../../store";
-import Grid from "@mui/material/Grid";
import { niceBytesInt } from "../../../../../../common/utils";
import {
Box,
@@ -30,13 +29,6 @@ import {
} from "mds";
import { NodeSelectorTerm } from "../../../../../../api/operatorApi";
-const stylingLayout = {
- border: "#EAEAEA 1px solid",
- borderRadius: "3px",
- padding: "0px 20px",
- position: "relative",
-};
-
const twoColCssGridLayoutConfig = {
display: "grid",
gridTemplateColumns: "2fr 1fr",
@@ -79,7 +71,11 @@ const PoolDetails = () => {
return (
-
+
{
)}
-
+
);
};
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
index 2cab053bf99..b9361955a65 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/Pools/Details/PoolsListing.tsx
@@ -15,44 +15,24 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
-import { AppState, useAppDispatch } from "../../../../../../store";
+import { AddIcon, Button, DataTable, Grid } from "mds";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
-import Grid from "@mui/material/Grid";
-import { TextField } from "@mui/material";
-import InputAdornment from "@mui/material/InputAdornment";
-import { AddIcon, Button, DataTable, SearchIcon } from "mds";
-import { Theme } from "@mui/material/styles";
-import {
- actionsTray,
- containerForHeader,
- tableStyles,
- tenantDetailsStyles,
-} from "../../../../Common/FormComponents/common/styleLibrary";
+import { AppState, useAppDispatch } from "../../../../../../store";
+import { actionsTray } from "../../../../Common/FormComponents/common/styleLibrary";
import { setSelectedPool } from "../../../tenantsSlice";
-import TooltipWrapper from "../../../../Common/TooltipWrapper/TooltipWrapper";
import { Pool } from "../../../../../../api/operatorApi";
-import makeStyles from "@mui/styles/makeStyles";
-import createStyles from "@mui/styles/createStyles";
import { niceBytesInt } from "../../../../../../common/utils";
+import TooltipWrapper from "../../../../Common/TooltipWrapper/TooltipWrapper";
+import SearchBox from "../../../../Common/SearchBox";
interface IPoolsSummary {
setPoolDetailsView: () => void;
}
-const useStyles = makeStyles((theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...actionsTray,
- ...tableStyles,
- ...containerForHeader,
- }),
-);
-
const PoolsListing = ({ setPoolDetailsView }: IPoolsSummary) => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
- const classes = useStyles();
const loadingTenant = useSelector(
(state: AppState) => state.tenants.loadingTenant,
@@ -89,26 +69,15 @@ const PoolsListing = ({ setPoolDetailsView }: IPoolsSummary) => {
return (
-
- {
- setFilter(event.target.value);
- }}
- InputProps={{
- disableUnderline: true,
- startAdornment: (
-
-
-
- ),
+
+ {
+ setFilter(value);
}}
- variant="standard"
+ placeholder={"Filter"}
+ id="search-resource"
/>
-
{
/>
-
+
.
import React, { Fragment } from "react";
+import { BackLink, SectionTitle, Box } from "mds";
import { useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
import { useLocation, useNavigate } from "react-router-dom";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- actionsTray,
- containerForHeader,
- tableStyles,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
-import Grid from "@mui/material/Grid";
-
import { AppState, useAppDispatch } from "../../../../store";
-
+import { setOpenPoolDetails } from "../tenantsSlice";
import PoolsListing from "./Pools/Details/PoolsListing";
import PoolDetails from "./Pools/Details/PoolDetails";
-import { setOpenPoolDetails } from "../tenantsSlice";
-import { BackLink } from "mds";
-
-interface IPoolsSummary {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...actionsTray,
- ...tableStyles,
- ...containerForHeader,
- });
-
-const PoolsSummary = ({ classes }: IPoolsSummary) => {
+const PoolsSummary = () => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
@@ -64,7 +39,7 @@ const PoolsSummary = ({ classes }: IPoolsSummary) => {
return (
{poolDetailsOpen && (
-
+
{
@@ -72,12 +47,13 @@ const PoolsSummary = ({ classes }: IPoolsSummary) => {
dispatch(setOpenPoolDetails(false));
}}
/>
-
+
)}
-
+
{poolDetailsOpen ? `Pool Details - ${selectedPool || ""}` : "Pools"}
-
-
+
+
+
{poolDetailsOpen ? (
) : (
@@ -87,9 +63,9 @@ const PoolsSummary = ({ classes }: IPoolsSummary) => {
}}
/>
)}
-
+
);
};
-export default withStyles(styles)(PoolsSummary);
+export default PoolsSummary;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx
index 71e47421f33..85631502ea0 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx
@@ -15,23 +15,18 @@
// along with this program. If not, see .
import React from "react";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import Grid from "@mui/material/Grid";
-import { containerForHeader } from "../../Common/FormComponents/common/styleLibrary";
+import { Box, Button, Grid } from "mds";
+import styled from "styled-components";
import { Typography } from "@mui/material";
-import { niceBytes } from "../../../../common/utils";
import { DateTime } from "luxon";
import { Link } from "react-router-dom";
-import Paper from "@mui/material/Paper";
-import { Button } from "mds";
+import get from "lodash/get";
+import { niceBytes } from "../../../../common/utils";
import { SubnetInfo } from "../../License/types";
-import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
import { Tenant } from "../../../../api/operatorApi";
+import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
interface ISubnetLicenseTenant {
- classes: any;
tenant: Tenant | null;
loadingActivateProduct: any;
loadingLicenseInfo: boolean;
@@ -39,60 +34,54 @@ interface ISubnetLicenseTenant {
activateProduct: any;
}
-const styles = (theme: Theme) =>
- createStyles({
- paperContainer: {
- padding: "15px",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- },
- licenseInfoValue: {
- textTransform: "none",
- fontSize: 14,
- fontWeight: "bold",
+const LicenseContainer = styled.div(({ theme }) => ({
+ "& .licenseInfoValue": {
+ textTransform: "none",
+ fontSize: 14,
+ fontWeight: "bold",
+ },
+ "&.licenseContainer": {
+ position: "relative",
+ padding: "20px 52px 0px 28px",
+ background: get(theme, "signalColors.info", "#2781B0"),
+ boxShadow: "0px 3px 7px #00000014",
+ "& h2": {
+ color: get(theme, "bgColor", "#fff"),
+ marginBottom: 67,
},
- licenseContainer: {
- position: "relative",
- padding: "20px 52px 0px 28px",
- background: "#032F51",
- boxShadow: "0px 3px 7px #00000014",
- "& h2": {
- color: "#FFF",
- marginBottom: 67,
- },
- "& a": {
- textDecoration: "none",
- },
- "& h3": {
- color: "#FFFFFF",
- marginBottom: "30px",
- fontWeight: "bold",
- },
- "& h6": {
- color: "#FFFFFF !important",
- },
+ "& a": {
+ textDecoration: "none",
},
- licenseInfo: { color: "#FFFFFF", position: "relative" },
- licenseInfoTitle: {
- textTransform: "none",
- color: "#BFBFBF",
- fontSize: 11,
+ "& h3": {
+ color: get(theme, "bgColor", "#fff"),
+ marginBottom: "30px",
+ fontWeight: "bold",
},
- verifiedIcon: {
- width: 96,
- position: "absolute",
- right: 0,
- bottom: 29,
+ "& h6": {
+ color: "#FFFFFF !important",
},
- noUnderLine: {
- textDecoration: "none",
- },
- ...containerForHeader,
- });
+ },
+ "& .licenseInfo": {
+ color: get(theme, "bgColor", "#fff"),
+ position: "relative",
+ },
+ "& .licenseInfoTitle": {
+ textTransform: "none",
+ color: get(theme, "mutedText", "#87888d"),
+ fontSize: 11,
+ },
+ "& .verifiedIcon": {
+ width: 96,
+ position: "absolute",
+ right: 0,
+ bottom: 29,
+ },
+ "& .noUnderLine": {
+ textDecoration: "none",
+ },
+}));
const SubnetLicenseTenant = ({
- classes,
tenant,
loadingActivateProduct,
loadingLicenseInfo,
@@ -104,20 +93,18 @@ const SubnetLicenseTenant = ({
: DateTime.now();
return (
-
{tenant && tenant.subnet_license ? (
-
+
License
@@ -125,7 +112,7 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
Commercial License
@@ -133,7 +120,7 @@ const SubnetLicenseTenant = ({
variant="button"
display="block"
gutterBottom
- className={classes.licenseInfoTitle}
+ className={"licenseInfoTitle"}
>
Organization
@@ -141,7 +128,7 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
{tenant.subnet_license.organization}
@@ -149,7 +136,7 @@ const SubnetLicenseTenant = ({
variant="button"
display="block"
gutterBottom
- className={classes.licenseInfoTitle}
+ className={"licenseInfoTitle"}
>
Registered Capacity
@@ -157,7 +144,7 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
{niceBytes(
(
@@ -171,7 +158,7 @@ const SubnetLicenseTenant = ({
variant="button"
display="block"
gutterBottom
- className={classes.licenseInfoTitle}
+ className={"licenseInfoTitle"}
>
Expiry Date
@@ -179,7 +166,7 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
{expiryTime.toFormat("yyyy-MM-dd")}
@@ -189,7 +176,7 @@ const SubnetLicenseTenant = ({
variant="button"
display="block"
gutterBottom
- className={classes.licenseInfoTitle}
+ className={"licenseInfoTitle"}
>
Subscription Plan
@@ -197,7 +184,7 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
{tenant.subnet_license.plan}
@@ -205,7 +192,7 @@ const SubnetLicenseTenant = ({
variant="button"
display="block"
gutterBottom
- className={classes.licenseInfoTitle}
+ className={"licenseInfoTitle"}
>
Requestor
@@ -213,13 +200,13 @@ const SubnetLicenseTenant = ({
variant="overline"
display="block"
gutterBottom
- className={classes.licenseInfoValue}
+ className={"licenseInfoValue"}
>
{tenant.subnet_license.email}
@@ -227,14 +214,21 @@ const SubnetLicenseTenant = ({
) : (
!loadingLicenseInfo && (
-
+
{!licenseInfo && (
{
e.stopPropagation();
}}
- className={classes.noUnderLine}
+ className={"noUnderLine"}
>
)}
-
+
)
)}
-
+
);
};
-export default withStyles(styles)(SubnetLicenseTenant);
+export default SubnetLicenseTenant;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantCSR.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantCSR.tsx
index 8b08e801e0b..f3e99ebadf0 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantCSR.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantCSR.tsx
@@ -15,42 +15,23 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
+import {
+ SectionTitle,
+ Box,
+ Table,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableBody,
+} from "mds";
import { useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
+import { useParams } from "react-router-dom";
import { setErrorSnackMessage } from "../../../../systemSlice";
-import {
- actionsTray,
- containerForHeader,
- searchField,
- tableStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
import { ErrorResponseHandler } from "../../../../common/types";
-import api from "../../../../common/api";
-import TableContainer from "@mui/material/TableContainer";
-import Paper from "@mui/material/Paper";
-import Table from "@mui/material/Table";
-import TableHead from "@mui/material/TableHead";
-import TableRow from "@mui/material/TableRow";
-import TableCell from "@mui/material/TableCell";
-import TableBody from "@mui/material/TableBody";
-import { useParams } from "react-router-dom";
import { AppState, useAppDispatch } from "../../../../store";
+import api from "../../../../common/api";
-interface ITenantCSRProps {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...actionsTray,
- ...searchField,
- ...tableStyles,
- ...containerForHeader,
- });
-
-const TenantCSR = ({ classes }: ITenantCSRProps) => {
+const TenantCSR = () => {
const dispatch = useAppDispatch();
const { tenantName, tenantNamespace } = useParams();
@@ -59,9 +40,9 @@ const TenantCSR = ({ classes }: ITenantCSRProps) => {
);
const [loading, setLoading] = useState(true);
- const [csrStatus] = useState([""]);
- const [csrName] = useState([""]);
- const [csrAnnotations] = useState([""]);
+ const [csrStatus] = useState([""]);
+ const [csrName] = useState([""]);
+ const [csrAnnotations] = useState([""]);
useEffect(() => {
if (loadingTenant) {
@@ -103,15 +84,16 @@ const TenantCSR = ({ classes }: ITenantCSRProps) => {
return (
- Certificate Signing Requests
-
+
+ Certificate Signing Requests
+
+
Name
Status
Annotation
-
@@ -134,9 +116,9 @@ const TenantCSR = ({ classes }: ITenantCSRProps) => {
-
+
);
};
-export default withStyles(styles)(TenantCSR);
+export default TenantCSR;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantConfiguration.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantConfiguration.tsx
index 4fde9a29468..b3b321411c3 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantConfiguration.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantConfiguration.tsx
@@ -14,103 +14,34 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import React, { useCallback, useEffect, useState } from "react";
-import { connect, useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
-import { DialogContentText, IconButton } from "@mui/material";
-import AddIcon from "@mui/icons-material/Add";
-import { Button, ConfirmModalIcon, Loader, RemoveIcon } from "mds";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import Grid from "@mui/material/Grid";
+import React, { Fragment, useCallback, useEffect, useState } from "react";
+import { useSelector } from "react-redux";
+import {
+ AddIcon,
+ Box,
+ Button,
+ ConfirmModalIcon,
+ Grid,
+ IconButton,
+ InputBox,
+ Loader,
+ RemoveIcon,
+ SectionTitle,
+ Switch,
+} from "mds";
import {
ITenantConfigurationRequest,
ITenantConfigurationResponse,
LabelKeyPair,
} from "../types";
-import {
- containerForHeader,
- createTenantCommon,
- formFieldStyles,
- modalBasic,
- spacingUtils,
- tenantDetailsStyles,
- wizardCommon,
-} from "../../Common/FormComponents/common/styleLibrary";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import { AppState, useAppDispatch } from "../../../../store";
import { ErrorResponseHandler } from "../../../../common/types";
import { setErrorSnackMessage } from "../../../../systemSlice";
+import { MinIOEnvVarsSettings } from "../../../../common/utils";
import api from "../../../../common/api";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
-import { MinIOEnvVarsSettings } from "../../../../common/utils";
-import FormHr from "../../Common/FormHr";
-
-interface ITenantConfiguration {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...spacingUtils,
- envVarRow: {
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-start",
- "&:last-child": {
- borderBottom: 0,
- },
- "@media (max-width: 900px)": {
- flex: 1,
-
- "& div label": {
- minWidth: 50,
- },
- },
- },
- rowActions: {
- display: "flex",
- justifyContent: "flex-end",
- "@media (max-width: 900px)": {
- flex: 1,
- },
- },
- overlayAction: {
- marginLeft: 10,
- "& svg": {
- width: 15,
- height: 15,
- maxWidth: 15,
- maxHeight: 15,
- },
- "& button": {
- background: "#EAEAEA",
- },
- },
- loaderAlign: {
- textAlign: "center",
- },
- fileItem: {
- marginRight: 10,
- display: "flex",
- "& div label": {
- minWidth: 50,
- },
-
- "@media (max-width: 900px)": {
- flexFlow: "column",
- },
- },
- ...containerForHeader,
- ...createTenantCommon,
- ...formFieldStyles,
- ...modalBasic,
- ...wizardCommon,
- });
-const TenantConfiguration = ({ classes }: ITenantConfiguration) => {
+const TenantConfiguration = () => {
const dispatch = useAppDispatch();
const tenant = useSelector((state: AppState) => state.tenants.tenantInfo);
@@ -172,7 +103,7 @@ const TenantConfiguration = ({ classes }: ITenantConfiguration) => {
};
return (
-
+
{
isOpen={dialogOpen}
onConfirm={updateTenantConfiguration}
confirmationContent={
-
+
Are you sure you want to save the changes and restart the service?
-
+
}
/>
{loadingTenant ? (
-
+
-
+
) : (
-
-
- Configuration
-
-
-
+
+
+ Configuration
+
+
{envVars.map((envVar, index) => (
-
-
+ {
key={`env_var_key_${index.toString()}`}
/>
-
-
+ {
}
/>
-
-
+
+
{
@@ -268,7 +245,7 @@ const TenantConfiguration = ({ classes }: ITenantConfiguration) => {
-
+
{
@@ -290,15 +267,17 @@ const TenantConfiguration = ({ classes }: ITenantConfiguration) => {
))}
-
+
- {
label={"Save"}
/>
-
+
)}
-
+
);
};
-const mapState = (state: AppState) => ({
- loadingTenant: state.tenants.loadingTenant,
- selectedTenant: state.tenants.currentTenant,
- tenant: state.tenants.tenantInfo,
-});
-
-const connector = connect(mapState, null);
-
-export default withStyles(styles)(connector(TenantConfiguration));
+export default TenantConfiguration;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx
index 8832606d9c2..705380a96d1 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx
@@ -22,8 +22,10 @@ import {
Button,
CircleIcon,
EditIcon,
+ Grid,
MinIOTierIconXs,
PageLayout,
+ ProgressBar,
RefreshIcon,
ScreenTitle,
Tabs,
@@ -38,33 +40,24 @@ import {
useNavigate,
useParams,
} from "react-router-dom";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import Grid from "@mui/material/Grid";
-import {
- containerForHeader,
- pageContentStyles,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
+import styled from "styled-components";
+import get from "lodash/get";
import { AppState, useAppDispatch } from "../../../../store";
import { niceBytes } from "../../../../common/utils";
-import withSuspense from "../../Common/Components/withSuspense";
import { IAM_PAGES } from "../../../../common/SecureComponent/permissions";
import { setSnackBarMessage } from "../../../../systemSlice";
import { setTenantName } from "../tenantsSlice";
import { getTenantAsync } from "../thunks/tenantDetailsAsync";
-import { LinearProgress } from "@mui/material";
+import { tenantIsOnline } from "./utils";
+import withSuspense from "../../Common/Components/withSuspense";
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
import PageHeaderWrapper from "../../Common/PageHeaderWrapper/PageHeaderWrapper";
-import { tenantIsOnline } from "./utils";
const TenantYAML = withSuspense(React.lazy(() => import("./TenantYAML")));
const TenantSummary = withSuspense(React.lazy(() => import("./TenantSummary")));
const TenantLicense = withSuspense(React.lazy(() => import("./TenantLicense")));
const PoolsSummary = withSuspense(React.lazy(() => import("./PoolsSummary")));
const PodsSummary = withSuspense(React.lazy(() => import("./PodsSummary")));
-
const TenantEvents = withSuspense(React.lazy(() => import("./TenantEvents")));
const TenantCSR = withSuspense(React.lazy(() => import("./TenantCSR")));
const VolumesSummary = withSuspense(
@@ -93,61 +86,27 @@ const TenantConfiguration = withSuspense(
React.lazy(() => import("./TenantConfiguration")),
);
-interface ITenantDetailsProps {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- pageContainer: {
- border: "1px solid #EAEAEA",
- width: "100%",
- height: "100%",
+const HealthsStatusIcon = styled.div(({ theme }) => ({
+ position: "relative",
+ fontSize: 10,
+ left: 26,
+ height: 10,
+ top: 4,
+ "& .statusIcon": {
+ color: get(theme, "signalColors.disabled", "#E6EBEB"),
+ "&.red": {
+ color: get(theme, "signalColors.danger", "#C51B3F"),
},
- contentSpacer: {
- ...pageContentStyles.contentSpacer,
- minHeight: 400,
+ "&.yellow": {
+ color: get(theme, "signalColors.warning", "#FFBD62"),
},
- redState: {
- color: theme.palette.error.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- },
+ "&.green": {
+ color: get(theme, "signalColors.good", "#4CCB92"),
},
- yellowState: {
- color: theme.palette.warning.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- },
- },
- greenState: {
- color: theme.palette.success.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- },
- },
- greyState: {
- color: "grey",
- "& .min-icon": {
- width: 16,
- height: 16,
- },
- },
- healthStatusIcon: {
- position: "relative",
- fontSize: 10,
- left: 26,
- height: 10,
- top: 4,
- },
- ...containerForHeader,
- });
+ },
+}));
-const TenantDetails = ({ classes }: ITenantDetailsProps) => {
+const TenantDetails = () => {
const dispatch = useAppDispatch();
const params = useParams();
const navigate = useNavigate();
@@ -211,16 +170,6 @@ const TenantDetails = ({ classes }: ITenantDetailsProps) => {
}
};
- const healthStatusToClass = (health_status: string) => {
- return health_status === "red"
- ? classes.redState
- : health_status === "yellow"
- ? classes.yellowState
- : health_status === "green"
- ? classes.greenState
- : classes.greyState;
- };
-
return (
{deleteOpen && tenantInfo !== null && (
@@ -240,101 +189,100 @@ const TenantDetails = ({ classes }: ITenantDetailsProps) => {
/>
}
- actions={ }
+ actions={ }
/>
-
- {loadingTenant && (
+
+
+ {loadingTenant && (
+
+
+
+ )}
-
+
+
+ {tenantInfo && tenantInfo.status && (
+
+
+
+ )}
+
+
+
+ }
+ title={tenantName}
+ subTitle={
+
+ Namespace: {tenantNamespace} / Capacity:{" "}
+ {niceBytes((tenantInfo?.total_size || 0).toString(10))}
+
+ }
+ actions={
+
+
+ {
+ confirmDeleteTenant();
+ }}
+ color="secondary"
+ icon={ }
+ />
+
+
+ }
+ id={"yaml_button"}
+ variant="regular"
+ aria-label="Edit YAML"
+ onClick={() => {
+ editYaml();
+ }}
+ />
+
+
+ {
+ navigate(
+ `/namespaces/${tenantNamespace}/tenants/${tenantName}/hop`,
+ );
+ }}
+ disabled={!tenantInfo || !tenantIsOnline(tenantInfo)}
+ variant={"regular"}
+ icon={ }
+ />
+
+
+ {
+ dispatch(getTenantAsync());
+ }}
+ icon={ }
+ />
+
+
+ }
+ />
- )}
-
-
-
- {tenantInfo && tenantInfo.status && (
-
-
-
- )}
-
-
-
- }
- title={tenantName}
- subTitle={
-
- Namespace: {tenantNamespace} / Capacity:{" "}
- {niceBytes((tenantInfo?.total_size || 0).toString(10))}
-
- }
- actions={
-
-
- {
- confirmDeleteTenant();
- }}
- color="secondary"
- icon={ }
- />
-
-
- }
- id={"yaml_button"}
- variant="regular"
- aria-label="Edit YAML"
- onClick={() => {
- editYaml();
- }}
- />
-
-
- {
- navigate(
- `/namespaces/${tenantNamespace}/tenants/${tenantName}/hop`,
- );
- }}
- disabled={!tenantInfo || !tenantIsOnline(tenantInfo)}
- variant={"regular"}
- icon={ }
- />
-
-
- {
- dispatch(getTenantAsync());
- }}
- icon={ }
- />
-
-
- }
- />
-
- navigate(route)}
- routes={
-
+ navigate(route)}
+ routes={
} />
{
}
/>
-
- }
- options={[
- {
- tabConfig: {
- label: "Summary",
- id: `details-summary`,
- to: getRoutePath("summary"),
+ }
+ options={[
+ {
+ tabConfig: {
+ label: "Summary",
+ id: `details-summary`,
+ to: getRoutePath("summary"),
+ },
},
- },
- {
- tabConfig: {
- label: "Configuration",
- id: `details-configuration`,
- to: getRoutePath("configuration"),
+ {
+ tabConfig: {
+ label: "Configuration",
+ id: `details-configuration`,
+ to: getRoutePath("configuration"),
+ },
},
- },
- {
- tabConfig: {
- label: "Metrics",
- id: `details-metrics`,
- to: getRoutePath("metrics"),
+ {
+ tabConfig: {
+ label: "Metrics",
+ id: `details-metrics`,
+ to: getRoutePath("metrics"),
+ },
},
- },
- {
- tabConfig: {
- label: "Identity Provider",
- id: `details-idp`,
- to: getRoutePath("identity-provider"),
+ {
+ tabConfig: {
+ label: "Identity Provider",
+ id: `details-idp`,
+ to: getRoutePath("identity-provider"),
+ },
},
- },
- {
- tabConfig: {
- label: "Security",
- id: `details-security`,
- to: getRoutePath("security"),
+ {
+ tabConfig: {
+ label: "Security",
+ id: `details-security`,
+ to: getRoutePath("security"),
+ },
},
- },
- {
- tabConfig: {
- label: "Encryption",
- id: `details-encryption`,
- to: getRoutePath("encryption"),
+ {
+ tabConfig: {
+ label: "Encryption",
+ id: `details-encryption`,
+ to: getRoutePath("encryption"),
+ },
},
- },
- {
- tabConfig: {
- label: "Pools",
- id: `details-pools`,
- to: getRoutePath("pools"),
+ {
+ tabConfig: {
+ label: "Pools",
+ id: `details-pools`,
+ to: getRoutePath("pools"),
+ },
},
- },
- {
- tabConfig: {
- label: "Pods",
- id: "tenant-pod-tab",
- to: getRoutePath("pods"),
+ {
+ tabConfig: {
+ label: "Pods",
+ id: "tenant-pod-tab",
+ to: getRoutePath("pods"),
+ },
},
- },
- {
- tabConfig: {
- label: "Volumes",
- id: `details-volumes`,
- to: getRoutePath("volumes"),
+ {
+ tabConfig: {
+ label: "Volumes",
+ id: `details-volumes`,
+ to: getRoutePath("volumes"),
+ },
},
- },
- {
- tabConfig: {
- label: "Events",
- id: `details-events`,
- to: getRoutePath("events"),
+ {
+ tabConfig: {
+ label: "Events",
+ id: `details-events`,
+ to: getRoutePath("events"),
+ },
},
- },
- {
- tabConfig: {
- label: "Certificate Requests",
- id: `details-csr`,
- to: getRoutePath("csr"),
+ {
+ tabConfig: {
+ label: "Certificate Requests",
+ id: `details-csr`,
+ to: getRoutePath("csr"),
+ },
},
- },
- {
- tabConfig: {
- label: "License",
- id: `details-license`,
- to: getRoutePath("license"),
+ {
+ tabConfig: {
+ label: "License",
+ id: `details-license`,
+ to: getRoutePath("license"),
+ },
},
- },
- ]}
- />
+ ]}
+ />
+
);
};
-export default withStyles(styles)(TenantDetails);
+export default TenantDetails;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
index 2d37fc30445..f3d37af4f91 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantEncryption.tsx
@@ -14,82 +14,45 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import { ICertificateInfo, ITenantEncryptionResponse } from "../types";
-import { Theme } from "@mui/material/styles";
-import { Button, WarnIcon, SectionTitle } from "mds";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- containerForHeader,
- createTenantCommon,
- formFieldStyles,
- modalBasic,
- spacingUtils,
- tenantDetailsStyles,
- wizardCommon,
-} from "../../Common/FormComponents/common/styleLibrary";
import React, { Fragment, useEffect, useState } from "react";
+import {
+ Box,
+ Button,
+ CodeEditor,
+ FileSelector,
+ FormLayout,
+ Grid,
+ InformativeMessage,
+ InputBox,
+ RadioGroup,
+ SectionTitle,
+ Switch,
+ Tabs,
+} from "mds";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
import { useSelector } from "react-redux";
+import { ICertificateInfo, ITenantEncryptionResponse } from "../types";
import { AppState, useAppDispatch } from "../../../../store";
-import api from "../../../../common/api";
import { ErrorResponseHandler } from "../../../../common/types";
-
-import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
-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 { DialogContentText } from "@mui/material";
-import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
-import RemoveRedEyeIcon from "@mui/icons-material/RemoveRedEye";
import { KeyPair } from "../ListTenants/utils";
import { clearValidationError } from "../utils";
import {
commonFormValidation,
IValidation,
} from "../../../../utils/validationFunctions";
-import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
-import TLSCertificate from "../../Common/TLSCertificate/TLSCertificate";
import { setErrorSnackMessage } from "../../../../systemSlice";
-import Tabs from "@mui/material/Tabs";
-import Tab from "@mui/material/Tab";
-import CodeMirrorWrapper from "../../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper";
-import FormHr from "../../Common/FormHr";
import { SecurityContext } from "../../../../api/operatorApi";
+import api from "../../../../common/api";
+import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
+import TLSCertificate from "../../Common/TLSCertificate/TLSCertificate";
import KMSPolicyInfo from "./KMSPolicyInfo";
-interface ITenantEncryption {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...spacingUtils,
- ...containerForHeader,
- ...createTenantCommon,
- ...formFieldStyles,
- ...modalBasic,
- ...wizardCommon,
- warningBlock: {
- color: "red",
- fontSize: ".85rem",
- margin: ".5rem 0 .5rem 0",
- display: "flex",
- alignItems: "center",
- "& svg ": {
- marginRight: ".3rem",
- height: 16,
- width: 16,
- },
- },
- });
-
-const TenantEncryption = ({ classes }: ITenantEncryption) => {
+const TenantEncryption = () => {
const dispatch = useAppDispatch();
const tenant = useSelector((state: AppState) => state.tenants.tenantInfo);
- const [editRawConfiguration, setEditRawConfiguration] = useState(0);
+ const [editRawConfiguration, setEditRawConfiguration] =
+ useState("options");
const [encryptionRawConfiguration, setEncryptionRawConfiguration] =
useState("");
const [encryptionEnabled, setEncryptionEnabled] = useState(false);
@@ -598,7 +561,8 @@ const TenantEncryption = ({ classes }: ITenantEncryption) => {
}
const dataSend = {
- raw: editRawConfiguration ? encryptionRawConfiguration : "",
+ raw:
+ editRawConfiguration === "raw-edit" ? encryptionRawConfiguration : "",
secretsToBeDeleted: certificatesToBeRemoved || [],
replicas: replicas,
securityContext: securityContext,
@@ -663,1207 +627,1165 @@ const TenantEncryption = ({ classes }: ITenantEncryption) => {
onClose={() => setConfirmOpen(false)}
onConfirm={updateEncryptionConfiguration}
confirmationContent={
-
+
{encryptionEnabled
? "Data will be encrypted using and external KMS"
: "Current encrypted information will not be accessible"}
{encryptionEnabled && (
-
-
-
- The content of the KES config secret will be overwritten.
-
-
+
)}
-
+
}
/>
)}
-
-
- Encryption
-
-
- {
- setEncryptionEnabled(!encryptionEnabled);
- }}
- description=""
- />
-
-
-
-
- {encryptionEnabled && (
-
-
- , newValue: number) => {
- setEditRawConfiguration(newValue);
- }}
- indicatorColor="primary"
- textColor="primary"
- aria-label="cluster-tabs"
- variant="scrollable"
- scrollButtons="auto"
- >
-
-
-
-
-
- {editRawConfiguration ? (
-
-
- {
- setEncryptionRawConfiguration(value);
- }}
- editorHeight={"550px"}
- />
-
-
- ) : (
-
-
-
- {
- setEncryptionType(e.target.value);
+
+
+
+
+ {
+ setEncryptionEnabled(!encryptionEnabled);
}}
- selectorOptions={[
- { label: "Vault", value: "vault" },
- { label: "AWS", value: "aws" },
- { label: "Gemalto", value: "gemalto" },
- { label: "GCP", value: "gcp" },
- { label: "Azure", value: "azure" },
- ]}
+ description=""
/>
-
+
+ }
+ >
+ Encryption
+
+
+ {encryptionEnabled && (
+
+
+
+
+ {
+ setEncryptionType(e.target.value);
+ }}
+ selectorOptions={[
+ { label: "Vault", value: "vault" },
+ { label: "AWS", value: "aws" },
+ { label: "Gemalto", value: "gemalto" },
+ { label: "GCP", value: "gcp" },
+ { label: "Azure", value: "azure" },
+ ]}
+ />
- {encryptionType === "vault" && (
+ {encryptionType === "vault" && (
+
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ endpoint: e.target.value,
+ })
+ }
+ label="Endpoint"
+ tooltip="Endpoint is the Hashicorp Vault endpoint"
+ value={vaultConfiguration?.endpoint || ""}
+ error={validationErrors["vault_ping"] || ""}
+ required
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ engine: e.target.value,
+ })
+ }
+ label="Engine"
+ tooltip="Engine is the Hashicorp Vault K/V engine path. If empty, defaults to 'kv'"
+ value={vaultConfiguration?.engine || ""}
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ namespace: e.target.value,
+ })
+ }
+ label="Namespace"
+ tooltip="Namespace is an optional Hashicorp Vault namespace. An empty namespace means no particular namespace is used."
+ value={vaultConfiguration?.namespace || ""}
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ prefix: e.target.value,
+ })
+ }
+ label="Prefix"
+ tooltip="Prefix is an optional prefix / directory within the K/V engine. If empty, keys will be stored at the K/V engine top level"
+ value={vaultConfiguration?.prefix || ""}
+ />
+ App Role
+
+ App Role
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ approle: {
+ ...vaultConfiguration?.approle,
+ engine: e.target.value,
+ },
+ })
+ }
+ label="Engine"
+ tooltip="AppRoleEngine is the AppRole authentication engine path. If empty, defaults to 'approle'"
+ value={
+ vaultConfiguration?.approle?.engine || ""
+ }
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ approle: {
+ ...vaultConfiguration?.approle,
+ id: e.target.value,
+ },
+ })
+ }
+ label="AppRole ID"
+ tooltip="AppRoleSecret is the AppRole access secret for authenticating to Hashicorp Vault via the AppRole method"
+ value={vaultConfiguration?.approle?.id || ""}
+ required
+ error={validationErrors["vault_id"] || ""}
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ approle: {
+ ...vaultConfiguration?.approle,
+ secret: e.target.value,
+ },
+ })
+ }
+ label="AppRole Secret"
+ tooltip="AppRoleSecret is the AppRole access secret for authenticating to Hashicorp Vault via the AppRole method"
+ value={
+ vaultConfiguration?.approle?.secret || ""
+ }
+ required
+ error={validationErrors["vault_secret"] || ""}
+ />
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ approle: {
+ ...vaultConfiguration?.approle,
+ retry: e.target.value,
+ },
+ })
+ }
+ label="Retry (Seconds)"
+ error={validationErrors["vault_retry"] || ""}
+ value={
+ vaultConfiguration?.approle?.retry || ""
+ }
+ />
+
+
+ Status
+ ,
+ ) =>
+ setVaultConfiguration({
+ ...vaultConfiguration,
+ status: {
+ ...vaultConfiguration?.status,
+ ping: e.target.value,
+ },
+ })
+ }
+ label="Ping (Seconds)"
+ tooltip="controls how often to Vault health status is checked. If not set, defaults to 10s"
+ error={validationErrors["vault_ping"] || ""}
+ value={vaultConfiguration?.status?.ping || ""}
+ />
+
+
+ )}
+ {encryptionType === "azure" && (
+
+ ,
+ ) =>
+ setAzureConfiguration({
+ ...azureConfiguration,
+ keyvault: {
+ ...azureConfiguration?.keyvault,
+ endpoint: e.target.value,
+ },
+ })
+ }
+ label="Endpoint"
+ tooltip="Endpoint is the Azure KeyVault endpoint"
+ error={validationErrors["azure_endpoint"] || ""}
+ value={
+ azureConfiguration?.keyvault?.endpoint || ""
+ }
+ />
+
+ Credentials
+ ,
+ ) =>
+ setAzureConfiguration({
+ ...azureConfiguration,
+ keyvault: {
+ ...azureConfiguration?.keyvault,
+ credentials: {
+ ...azureConfiguration?.keyvault
+ ?.credentials,
+ tenant_id: e.target.value,
+ },
+ },
+ })
+ }
+ label="Tenant ID"
+ tooltip="TenantID is the ID of the Azure KeyVault tenant"
+ value={
+ azureConfiguration?.keyvault?.credentials
+ ?.tenant_id || ""
+ }
+ error={
+ validationErrors["azure_tenant_id"] || ""
+ }
+ />
+ ,
+ ) =>
+ setAzureConfiguration({
+ ...azureConfiguration,
+ keyvault: {
+ ...azureConfiguration?.keyvault,
+ credentials: {
+ ...azureConfiguration?.keyvault
+ ?.credentials,
+ client_id: e.target.value,
+ },
+ },
+ })
+ }
+ label="Client ID"
+ tooltip="ClientID is the ID of the client accessing Azure KeyVault"
+ value={
+ azureConfiguration?.keyvault?.credentials
+ ?.client_id || ""
+ }
+ error={
+ validationErrors["azure_client_id"] || ""
+ }
+ />
+ ,
+ ) =>
+ setAzureConfiguration({
+ ...azureConfiguration,
+ keyvault: {
+ ...azureConfiguration?.keyvault,
+ credentials: {
+ ...azureConfiguration?.keyvault
+ ?.credentials,
+ client_secret: e.target.value,
+ },
+ },
+ })
+ }
+ label="Client Secret"
+ tooltip="ClientSecret is the client secret accessing the Azure KeyVault"
+ value={
+ azureConfiguration?.keyvault?.credentials
+ ?.client_secret || ""
+ }
+ error={
+ validationErrors["azure_client_secret"] ||
+ ""
+ }
+ />
+
+
+ )}
+ {encryptionType === "gcp" && (
+
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ project_id: e.target.value,
+ },
+ })
+ }
+ label="Project ID"
+ tooltip="ProjectID is the GCP project ID"
+ value={
+ gcpConfiguration?.secretmanager.project_id ||
+ ""
+ }
+ />
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ endpoint: e.target.value,
+ },
+ })
+ }
+ label="Endpoint"
+ tooltip="Endpoint is the GCP project ID. If empty defaults to: secretmanager.googleapis.com:443"
+ value={
+ gcpConfiguration?.secretmanager.endpoint || ""
+ }
+ />
+
+ Credentials
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ credentials: {
+ ...gcpConfiguration?.secretmanager
+ .credentials,
+ client_email: e.target.value,
+ },
+ },
+ })
+ }
+ label="Client Email"
+ tooltip="Is the Client email of the GCP service account used to access the SecretManager"
+ value={
+ gcpConfiguration?.secretmanager.credentials
+ ?.client_email || ""
+ }
+ />
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ credentials: {
+ ...gcpConfiguration?.secretmanager
+ .credentials,
+ client_id: e.target.value,
+ },
+ },
+ })
+ }
+ label="Client ID"
+ tooltip="Is the Client ID of the GCP service account used to access the SecretManager"
+ value={
+ gcpConfiguration?.secretmanager.credentials
+ ?.client_id || ""
+ }
+ />
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ credentials: {
+ ...gcpConfiguration?.secretmanager
+ .credentials,
+ private_key_id: e.target.value,
+ },
+ },
+ })
+ }
+ label="Private Key ID"
+ tooltip="Is the private key ID of the GCP service account used to access the SecretManager"
+ value={
+ gcpConfiguration?.secretmanager.credentials
+ ?.private_key_id || ""
+ }
+ />
+ ,
+ ) =>
+ setGCPConfiguration({
+ ...gcpConfiguration,
+ secretmanager: {
+ ...gcpConfiguration?.secretmanager,
+ credentials: {
+ ...gcpConfiguration?.secretmanager
+ .credentials,
+ private_key: e.target.value,
+ },
+ },
+ })
+ }
+ label="Private Key"
+ tooltip="Is the private key of the GCP service account used to access the SecretManager"
+ value={
+ gcpConfiguration?.secretmanager.credentials
+ ?.private_key || ""
+ }
+ />
+
+
+ )}
+ {encryptionType === "aws" && (
+
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ endpoint: e.target.value,
+ },
+ })
+ }
+ label="Endpoint"
+ tooltip="Endpoint is the AWS SecretsManager endpoint. AWS SecretsManager endpoints have the following schema: secrestmanager[-fips]..amanzonaws.com"
+ value={
+ awsConfiguration?.secretsmanager?.endpoint ||
+ ""
+ }
+ required
+ error={validationErrors["aws_endpoint"] || ""}
+ />
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ region: e.target.value,
+ },
+ })
+ }
+ label="Region"
+ tooltip="Region is the AWS region the SecretsManager is located"
+ value={
+ awsConfiguration?.secretsmanager?.region || ""
+ }
+ error={validationErrors["aws_region"] || ""}
+ required
+ />
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ kmskey: e.target.value,
+ },
+ })
+ }
+ label="KMS Key"
+ tooltip="KMSKey is the AWS-KMS key ID (CMK-ID) used to en/decrypt secrets managed by the SecretsManager. If empty, the default AWS KMS key is used"
+ value={
+ awsConfiguration?.secretsmanager?.kmskey || ""
+ }
+ />
+
+ Credentials
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ credentials: {
+ ...awsConfiguration?.secretsmanager
+ ?.credentials,
+ accesskey: e.target.value,
+ },
+ },
+ })
+ }
+ label="Access Key"
+ tooltip="AccessKey is the access key for authenticating to AWS"
+ value={
+ awsConfiguration?.secretsmanager
+ ?.credentials?.accesskey || ""
+ }
+ error={
+ validationErrors["aws_accessKey"] || ""
+ }
+ required
+ />
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ credentials: {
+ ...awsConfiguration?.secretsmanager
+ ?.credentials,
+ secretkey: e.target.value,
+ },
+ },
+ })
+ }
+ label="Secret Key"
+ tooltip="SecretKey is the secret key for authenticating to AWS"
+ value={
+ awsConfiguration?.secretsmanager
+ ?.credentials?.secretkey || ""
+ }
+ error={
+ validationErrors["aws_secretKey"] || ""
+ }
+ required
+ />
+ ,
+ ) =>
+ setAWSConfiguration({
+ ...awsConfiguration,
+ secretsmanager: {
+ ...awsConfiguration?.secretsmanager,
+ credentials: {
+ ...awsConfiguration?.secretsmanager
+ ?.credentials,
+ token: e.target.value,
+ },
+ },
+ })
+ }
+ label="Token"
+ tooltip="SessionToken is an optional session token for authenticating to AWS when using STS"
+ value={
+ awsConfiguration?.secretsmanager
+ ?.credentials?.token || ""
+ }
+ />
+
+
+ )}
+ {encryptionType === "gemalto" && (
+
+ ,
+ ) =>
+ setGemaltoConfiguration({
+ ...gemaltoConfiguration,
+ keysecure: {
+ ...gemaltoConfiguration?.keysecure,
+ endpoint: e.target.value,
+ },
+ })
+ }
+ label="Endpoint"
+ tooltip="Endpoint is the endpoint to the KeySecure server"
+ value={
+ gemaltoConfiguration?.keysecure?.endpoint ||
+ ""
+ }
+ error={
+ validationErrors["gemalto_endpoint"] || ""
+ }
+ required
+ />
+
+ Credentials
+ ,
+ ) =>
+ setGemaltoConfiguration({
+ ...gemaltoConfiguration,
+ keysecure: {
+ ...gemaltoConfiguration?.keysecure,
+ credentials: {
+ ...gemaltoConfiguration?.keysecure
+ ?.credentials,
+ token: e.target.value,
+ },
+ },
+ })
+ }
+ label="Token"
+ tooltip="Token is the refresh authentication token to access the KeySecure server"
+ value={
+ gemaltoConfiguration?.keysecure?.credentials
+ ?.token || ""
+ }
+ error={
+ validationErrors["gemalto_token"] || ""
+ }
+ required
+ />
+ ,
+ ) =>
+ setGemaltoConfiguration({
+ ...gemaltoConfiguration,
+ keysecure: {
+ ...gemaltoConfiguration?.keysecure,
+ credentials: {
+ ...gemaltoConfiguration?.keysecure
+ ?.credentials,
+ domain: e.target.value,
+ },
+ },
+ })
+ }
+ label="Domain"
+ tooltip="Domain is the isolated namespace within the KeySecure server. If empty, defaults to the top-level / root domain"
+ value={
+ gemaltoConfiguration?.keysecure?.credentials
+ ?.domain || ""
+ }
+ error={
+ validationErrors["gemalto_domain"] || ""
+ }
+ required
+ />
+ ,
+ ) =>
+ setGemaltoConfiguration({
+ ...gemaltoConfiguration,
+ keysecure: {
+ ...gemaltoConfiguration?.keysecure,
+ credentials: {
+ ...gemaltoConfiguration?.keysecure
+ ?.credentials,
+ retry: e.target.value,
+ },
+ },
+ })
+ }
+ label="Retry (seconds)"
+ value={
+ gemaltoConfiguration?.keysecure?.credentials
+ ?.retry || ""
+ }
+ error={
+ validationErrors["gemalto_retry"] || ""
+ }
+ />
+
+
+ )}
+
+ ),
+ },
+ {
+ tabConfig: { label: "Raw Edit", id: "raw-edit" },
+ content: (
+ {
+ setEncryptionRawConfiguration(value);
+ }}
+ editorHeight={"550px"}
+ />
+ ),
+ },
+ ]}
+ onTabClick={(value) => setEditRawConfiguration(value)}
+ currentTabOrPath={editRawConfiguration}
+ horizontal
+ />
+
+
+ Additional Configuration for KES
+
+ setEnabledCustomCertificates(!enabledCustomCertificates)
+ }
+ label={"Custom Certificates"}
+ />
+ {enabledCustomCertificates && (
-
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- endpoint: e.target.value,
- })
- }
- label="Endpoint"
- tooltip="Endpoint is the Hashicorp Vault endpoint"
- value={vaultConfiguration?.endpoint || ""}
- error={validationErrors["vault_ping"] || ""}
- required
- />
-
-
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- engine: e.target.value,
- })
- }
- label="Engine"
- tooltip="Engine is the Hashicorp Vault K/V engine path. If empty, defaults to 'kv'"
- value={vaultConfiguration?.engine || ""}
- />
-
-
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- namespace: e.target.value,
- })
- }
- label="Namespace"
- tooltip="Namespace is an optional Hashicorp Vault namespace. An empty namespace means no particular namespace is used."
- value={vaultConfiguration?.namespace || ""}
- />
-
-
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- prefix: e.target.value,
- })
- }
- label="Prefix"
- tooltip="Prefix is an optional prefix / directory within the K/V engine. If empty, keys will be stored at the K/V engine top level"
- value={vaultConfiguration?.prefix || ""}
- />
-
-
- App Role
-
-
-
-
- App Role
-
-
- ,
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- approle: {
- ...vaultConfiguration?.approle,
- engine: e.target.value,
- },
- })
- }
- label="Engine"
- tooltip="AppRoleEngine is the AppRole authentication engine path. If empty, defaults to 'approle'"
- value={vaultConfiguration?.approle?.engine || ""}
- />
-
-
- ,
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- approle: {
- ...vaultConfiguration?.approle,
- id: e.target.value,
- },
- })
- }
- label="AppRole ID"
- tooltip="AppRoleSecret is the AppRole access secret for authenticating to Hashicorp Vault via the AppRole method"
- value={vaultConfiguration?.approle?.id || ""}
- required
- error={validationErrors["vault_id"] || ""}
- overlayIcon={
- showVaultAppRoleID ? (
-
- ) : (
-
- )
- }
- overlayAction={() =>
- setShowVaultAppRoleID(!showVaultAppRoleID)
- }
- />
-
-
- ,
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- approle: {
- ...vaultConfiguration?.approle,
- secret: e.target.value,
- },
- })
- }
- label="AppRole Secret"
- tooltip="AppRoleSecret is the AppRole access secret for authenticating to Hashicorp Vault via the AppRole method"
- value={vaultConfiguration?.approle?.secret || ""}
- required
- error={validationErrors["vault_secret"] || ""}
- overlayIcon={
- showVaultAppRoleSecret ? (
-
- ) : (
-
- )
- }
- overlayAction={() =>
- setShowVaultAppRoleSecret(!showVaultAppRoleSecret)
- }
- />
-
-
- ,
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- approle: {
- ...vaultConfiguration?.approle,
- retry: e.target.value,
- },
- })
- }
- label="Retry (Seconds)"
- error={validationErrors["vault_retry"] || ""}
- value={vaultConfiguration?.approle?.retry || ""}
- />
-
-
-
-
-
-
- Status
-
- ) =>
- setVaultConfiguration({
- ...vaultConfiguration,
- status: {
- ...vaultConfiguration?.status,
- ping: e.target.value,
- },
- })
+
+ Encryption server certificates
+ {kesServerTLSCertificateSecret ? (
+
+ removeCertificate(kesServerTLSCertificateSecret)
}
- label="Ping (Seconds)"
- tooltip="controls how often to Vault health status is checked. If not set, defaults to 10s"
- error={validationErrors["vault_ping"] || ""}
- value={vaultConfiguration?.status?.ping || ""}
/>
-
-
-
- )}
- {encryptionType === "azure" && (
-
-
- ) =>
- setAzureConfiguration({
- ...azureConfiguration,
- keyvault: {
- ...azureConfiguration?.keyvault,
- endpoint: e.target.value,
- },
- })
- }
- label="Endpoint"
- tooltip="Endpoint is the Azure KeyVault endpoint"
- error={validationErrors["azure_endpoint"] || ""}
- value={azureConfiguration?.keyvault?.endpoint || ""}
- />
-
-
-
-
- Credentials
-
-
- ,
- ) =>
- setAzureConfiguration({
- ...azureConfiguration,
- keyvault: {
- ...azureConfiguration?.keyvault,
- credentials: {
- ...azureConfiguration?.keyvault
- ?.credentials,
- tenant_id: e.target.value,
- },
- },
- })
- }
- label="Tenant ID"
- tooltip="TenantID is the ID of the Azure KeyVault tenant"
- value={
- azureConfiguration?.keyvault?.credentials
- ?.tenant_id || ""
- }
- error={validationErrors["azure_tenant_id"] || ""}
- />
-
-
- ,
- ) =>
- setAzureConfiguration({
- ...azureConfiguration,
- keyvault: {
- ...azureConfiguration?.keyvault,
- credentials: {
- ...azureConfiguration?.keyvault
- ?.credentials,
- client_id: e.target.value,
- },
- },
- })
- }
- label="Client ID"
- tooltip="ClientID is the ID of the client accessing Azure KeyVault"
- value={
- azureConfiguration?.keyvault?.credentials
- ?.client_id || ""
- }
- error={validationErrors["azure_client_id"] || ""}
- />
-
-
- ,
- ) =>
- setAzureConfiguration({
- ...azureConfiguration,
- keyvault: {
- ...azureConfiguration?.keyvault,
- credentials: {
- ...azureConfiguration?.keyvault
- ?.credentials,
- client_secret: e.target.value,
- },
- },
- })
- }
- label="Client Secret"
- tooltip="ClientSecret is the client secret accessing the Azure KeyVault"
- value={
- azureConfiguration?.keyvault?.credentials
- ?.client_secret || ""
- }
- error={
- validationErrors["azure_client_secret"] || ""
- }
- />
-
-
-
-
- )}
- {encryptionType === "gcp" && (
-
-
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- project_id: e.target.value,
- },
- })
- }
- label="Project ID"
- tooltip="ProjectID is the GCP project ID"
- value={gcpConfiguration?.secretmanager.project_id || ""}
- />
-
-
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- endpoint: e.target.value,
- },
- })
- }
- label="Endpoint"
- tooltip="Endpoint is the GCP project ID. If empty defaults to: secretmanager.googleapis.com:443"
- value={gcpConfiguration?.secretmanager.endpoint || ""}
- />
-
-
-
-
- Credentials
-
-
- ,
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- credentials: {
- ...gcpConfiguration?.secretmanager
- .credentials,
- client_email: e.target.value,
- },
- },
- })
- }
- label="Client Email"
- tooltip="Is the Client email of the GCP service account used to access the SecretManager"
- value={
- gcpConfiguration?.secretmanager.credentials
- ?.client_email || ""
- }
+ ) : (
+
+ {
+ if (encodedValue) {
+ setKESServerCertificate({
+ encoded_key: encodedValue,
+ id: kesServerCertificate?.id || "",
+ key: fileName || "",
+ cert: kesServerCertificate?.cert || "",
+ encoded_cert:
+ kesServerCertificate?.encoded_cert || "",
+ });
+ cleanValidation("serverKey");
+ }
+ }}
+ accept=".key,.pem"
+ id="serverKey"
+ name="serverKey"
+ label="Key"
+ value={kesServerCertificate?.key || ""}
+ returnEncodedData
/>
-
-
- ,
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- credentials: {
- ...gcpConfiguration?.secretmanager
- .credentials,
- client_id: e.target.value,
- },
- },
- })
- }
- label="Client ID"
- tooltip="Is the Client ID of the GCP service account used to access the SecretManager"
- value={
- gcpConfiguration?.secretmanager.credentials
- ?.client_id || ""
- }
- />
-
-
- ,
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- credentials: {
- ...gcpConfiguration?.secretmanager
- .credentials,
- private_key_id: e.target.value,
- },
- },
- })
- }
- label="Private Key ID"
- tooltip="Is the private key ID of the GCP service account used to access the SecretManager"
- value={
- gcpConfiguration?.secretmanager.credentials
- ?.private_key_id || ""
- }
- />
-
-
- ,
- ) =>
- setGCPConfiguration({
- ...gcpConfiguration,
- secretmanager: {
- ...gcpConfiguration?.secretmanager,
- credentials: {
- ...gcpConfiguration?.secretmanager
- .credentials,
- private_key: e.target.value,
- },
- },
- })
- }
- label="Private Key"
- tooltip="Is the private key of the GCP service account used to access the SecretManager"
- value={
- gcpConfiguration?.secretmanager.credentials
- ?.private_key || ""
- }
+ {
+ if (encodedValue) {
+ setKESServerCertificate({
+ encoded_key:
+ kesServerCertificate?.encoded_key || "",
+ id: kesServerCertificate?.id || "",
+ key: kesServerCertificate?.key || "",
+ cert: fileName || "",
+ encoded_cert: encodedValue || "",
+ });
+ cleanValidation("serverCert");
+ }
+ }}
+ accept=".cer,.crt,.cert,.pem"
+ id="serverCert"
+ name="serverCert"
+ label="Cert"
+ value={kesServerCertificate?.cert || ""}
+ returnEncodedData
/>
-
-
-
-
- )}
- {encryptionType === "aws" && (
-
-
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- endpoint: e.target.value,
- },
- })
- }
- label="Endpoint"
- tooltip="Endpoint is the AWS SecretsManager endpoint. AWS SecretsManager endpoints have the following schema: secrestmanager[-fips]..amanzonaws.com"
- value={awsConfiguration?.secretsmanager?.endpoint || ""}
- required
- error={validationErrors["aws_endpoint"] || ""}
- />
-
-
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- region: e.target.value,
- },
- })
- }
- label="Region"
- tooltip="Region is the AWS region the SecretsManager is located"
- value={awsConfiguration?.secretsmanager?.region || ""}
- error={validationErrors["aws_region"] || ""}
- required
- />
-
-
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- kmskey: e.target.value,
- },
- })
- }
- label="KMS Key"
- tooltip="KMSKey is the AWS-KMS key ID (CMK-ID) used to en/decrypt secrets managed by the SecretsManager. If empty, the default AWS KMS key is used"
- value={awsConfiguration?.secretsmanager?.kmskey || ""}
- />
-
-
-
-
- Credentials
-
-
- ,
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- credentials: {
- ...awsConfiguration?.secretsmanager
- ?.credentials,
- accesskey: e.target.value,
- },
- },
- })
- }
- label="Access Key"
- tooltip="AccessKey is the access key for authenticating to AWS"
- value={
- awsConfiguration?.secretsmanager?.credentials
- ?.accesskey || ""
- }
- error={validationErrors["aws_accessKey"] || ""}
- required
- />
-
-
- ,
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- credentials: {
- ...awsConfiguration?.secretsmanager
- ?.credentials,
- secretkey: e.target.value,
- },
- },
- })
- }
- label="Secret Key"
- tooltip="SecretKey is the secret key for authenticating to AWS"
- value={
- awsConfiguration?.secretsmanager?.credentials
- ?.secretkey || ""
- }
- error={validationErrors["aws_secretKey"] || ""}
- required
- />
-
-
- ,
- ) =>
- setAWSConfiguration({
- ...awsConfiguration,
- secretsmanager: {
- ...awsConfiguration?.secretsmanager,
- credentials: {
- ...awsConfiguration?.secretsmanager
- ?.credentials,
- token: e.target.value,
- },
- },
- })
- }
- label="Token"
- tooltip="SessionToken is an optional session token for authenticating to AWS when using STS"
- value={
- awsConfiguration?.secretsmanager?.credentials
- ?.token || ""
- }
+
+ )}
+
+
+
+ MinIO mTLS certificates (connection between MinIO and
+ the Encryption server)
+
+ {minioMTLSCertificateSecret ? (
+
+ removeCertificate(minioMTLSCertificateSecret)
+ }
+ />
+ ) : (
+
+ {
+ if (encodedValue) {
+ setMinioMTLSCertificate({
+ encoded_key: encodedValue,
+ id: minioMTLSCertificate?.id || "",
+ key: fileName || "",
+ cert: minioMTLSCertificate?.cert || "",
+ encoded_cert:
+ minioMTLSCertificate?.encoded_cert || "",
+ });
+ cleanValidation("clientKey");
+ }
+ }}
+ accept=".key,.pem"
+ id="clientKey"
+ name="clientKey"
+ label="Key"
+ value={minioMTLSCertificate?.key || ""}
+ returnEncodedData
/>
-
-
-
-
- )}
- {encryptionType === "gemalto" && (
-
-
- ) =>
- setGemaltoConfiguration({
- ...gemaltoConfiguration,
- keysecure: {
- ...gemaltoConfiguration?.keysecure,
- endpoint: e.target.value,
- },
- })
- }
- label="Endpoint"
- tooltip="Endpoint is the endpoint to the KeySecure server"
- value={gemaltoConfiguration?.keysecure?.endpoint || ""}
- error={validationErrors["gemalto_endpoint"] || ""}
- required
- />
-
-
-
-
- Credentials
-
-
- ,
- ) =>
- setGemaltoConfiguration({
- ...gemaltoConfiguration,
- keysecure: {
- ...gemaltoConfiguration?.keysecure,
- credentials: {
- ...gemaltoConfiguration?.keysecure
- ?.credentials,
- token: e.target.value,
- },
- },
- })
- }
- label="Token"
- tooltip="Token is the refresh authentication token to access the KeySecure server"
- value={
- gemaltoConfiguration?.keysecure?.credentials
- ?.token || ""
- }
- error={validationErrors["gemalto_token"] || ""}
- required
+ {
+ if (encodedValue) {
+ setMinioMTLSCertificate({
+ encoded_key:
+ minioMTLSCertificate?.encoded_key || "",
+ id: minioMTLSCertificate?.id || "",
+ key: minioMTLSCertificate?.key || "",
+ cert: fileName || "",
+ encoded_cert: encodedValue || "",
+ });
+ cleanValidation("clientCert");
+ }
+ }}
+ accept=".cer,.crt,.cert,.pem"
+ id="clientCert"
+ name="clientCert"
+ label="Cert"
+ value={minioMTLSCertificate?.cert || ""}
+ returnEncodedData
/>
-
-
- ,
- ) =>
- setGemaltoConfiguration({
- ...gemaltoConfiguration,
- keysecure: {
- ...gemaltoConfiguration?.keysecure,
- credentials: {
- ...gemaltoConfiguration?.keysecure
- ?.credentials,
- domain: e.target.value,
- },
- },
- })
- }
- label="Domain"
- tooltip="Domain is the isolated namespace within the KeySecure server. If empty, defaults to the top-level / root domain"
- value={
- gemaltoConfiguration?.keysecure?.credentials
- ?.domain || ""
- }
- error={validationErrors["gemalto_domain"] || ""}
- required
+
+ )}
+
+
+
+ KMS mTLS certificates (connection between the Encryption
+ server and the KMS)
+
+ {kmsMTLSCertificateSecret ? (
+
+ removeCertificate(kmsMTLSCertificateSecret)
+ }
+ />
+ ) : (
+
+ {
+ if (encodedValue) {
+ setKmsMTLSCertificate({
+ encoded_key: encodedValue || "",
+ id: kmsMTLSCertificate?.id || "",
+ key: fileName || "",
+ cert: kmsMTLSCertificate?.cert || "",
+ encoded_cert:
+ kmsMTLSCertificate?.encoded_cert || "",
+ });
+ }
+ }}
+ accept=".key,.pem"
+ id="kms_mtls_key"
+ name="kms_mtls_key"
+ label="Key"
+ value={kmsMTLSCertificate?.key || ""}
+ returnEncodedData
/>
-
-
- ,
- ) =>
- setGemaltoConfiguration({
- ...gemaltoConfiguration,
- keysecure: {
- ...gemaltoConfiguration?.keysecure,
- credentials: {
- ...gemaltoConfiguration?.keysecure
- ?.credentials,
- retry: e.target.value,
- },
- },
- })
- }
- label="Retry (seconds)"
- value={
- gemaltoConfiguration?.keysecure?.credentials
- ?.retry || ""
- }
- error={validationErrors["gemalto_retry"] || ""}
+ {
+ if (encodedValue) {
+ setKmsMTLSCertificate({
+ encoded_key:
+ kmsMTLSCertificate?.encoded_key || "",
+ id: kmsMTLSCertificate?.id || "",
+ key: kmsMTLSCertificate?.key || "",
+ cert: fileName || "",
+ encoded_cert: encodedValue || "",
+ });
+ }
+ }}
+ accept=".cer,.crt,.cert,.pem"
+ id="kms_mtls_cert"
+ name="kms_mtls_cert"
+ label="Cert"
+ value={kmsMTLSCertificate?.cert || ""}
+ returnEncodedData
/>
-
-
-
-
- )}
-
- )}
-
-
- Additional Configuration for KES
-
-
-
- setEnabledCustomCertificates(!enabledCustomCertificates)
- }
- label={"Custom Certificates"}
- />
-
- {enabledCustomCertificates && (
-
-
-
-
- Encryption server certificates
-
- {kesServerTLSCertificateSecret ? (
-
- removeCertificate(kesServerTLSCertificateSecret)
- }
- />
- ) : (
-
- {
- setKESServerCertificate({
- encoded_key: encodedValue || "",
- id: kesServerCertificate?.id || "",
- key: fileName || "",
- cert: kesServerCertificate?.cert || "",
- encoded_cert:
- kesServerCertificate?.encoded_cert || "",
- });
- cleanValidation("serverKey");
- }}
- accept=".key,.pem"
- id="serverKey"
- name="serverKey"
- label="Key"
- value={kesServerCertificate?.key}
- />
- {
- setKESServerCertificate({
- encoded_key:
- kesServerCertificate?.encoded_key || "",
- id: kesServerCertificate?.id || "",
- key: kesServerCertificate?.key || "",
- cert: fileName || "",
- encoded_cert: encodedValue || "",
- });
- cleanValidation("serverCert");
- }}
- accept=".cer,.crt,.cert,.pem"
- id="serverCert"
- name="serverCert"
- label="Cert"
- value={kesServerCertificate?.cert}
- />
-
- )}
-
-
-
-
-
- MinIO mTLS certificates (connection between MinIO and the
- Encryption server)
-
- {minioMTLSCertificateSecret ? (
-
- removeCertificate(minioMTLSCertificateSecret)
- }
- />
- ) : (
-
- {
- setMinioMTLSCertificate({
- encoded_key: encodedValue || "",
- id: minioMTLSCertificate?.id || "",
- key: fileName || "",
- cert: minioMTLSCertificate?.cert || "",
- encoded_cert:
- minioMTLSCertificate?.encoded_cert || "",
- });
- cleanValidation("clientKey");
- }}
- accept=".key,.pem"
- id="clientKey"
- name="clientKey"
- label="Key"
- value={minioMTLSCertificate?.key}
- />
- {
- setMinioMTLSCertificate({
- encoded_key:
- minioMTLSCertificate?.encoded_key || "",
- id: minioMTLSCertificate?.id || "",
- key: minioMTLSCertificate?.key || "",
- cert: fileName || "",
- encoded_cert: encodedValue || "",
- });
- cleanValidation("clientCert");
- }}
- accept=".cer,.crt,.cert,.pem"
- id="clientCert"
- name="clientCert"
- label="Cert"
- value={minioMTLSCertificate?.cert}
+
+ )}
+ {kmsCACertificateSecret ? (
+
+ removeCertificate(kmsCACertificateSecret)
+ }
/>
-
- )}
-
-
-
-
-
- KMS mTLS certificates (connection between the Encryption
- server and the KMS)
-
- {kmsMTLSCertificateSecret ? (
-
- removeCertificate(kmsMTLSCertificateSecret)
- }
- />
- ) : (
-
+ ) : (
{
- setKmsMTLSCertificate({
- encoded_key: encodedValue || "",
- id: kmsMTLSCertificate?.id || "",
- key: fileName || "",
- cert: kmsMTLSCertificate?.cert || "",
- encoded_cert:
- kmsMTLSCertificate?.encoded_cert || "",
- });
+ onChange={(event, fileName, encodedValue) => {
+ if (encodedValue) {
+ setKmsCACertificate({
+ encoded_key:
+ kmsCACertificate?.encoded_key || "",
+ id: kmsCACertificate?.id || "",
+ key: kmsCACertificate?.key || "",
+ cert: fileName || "",
+ encoded_cert: encodedValue || "",
+ });
+ }
}}
- accept=".key,.pem"
- id="kms_mtls_key"
- name="kms_mtls_key"
- label="Key"
- value={kmsMTLSCertificate?.key}
- />
-
- setKmsMTLSCertificate({
- encoded_key:
- kmsMTLSCertificate?.encoded_key || "",
- id: kmsMTLSCertificate?.id || "",
- key: kmsMTLSCertificate?.key || "",
- cert: fileName || "",
- encoded_cert: encodedValue || "",
- })
- }
accept=".cer,.crt,.cert,.pem"
- id="kms_mtls_cert"
- name="kms_mtls_cert"
- label="Cert"
- value={kmsMTLSCertificate?.cert || ""}
+ id="kms_mtls_ca"
+ name="kms_mtls_ca"
+ label="CA"
+ value={kmsCACertificate?.cert || ""}
+ returnEncodedData
/>
-
- )}
- {kmsCACertificateSecret ? (
-
- removeCertificate(kmsCACertificateSecret)
- }
- />
- ) : (
-
- setKmsCACertificate({
- encoded_key: kmsCACertificate?.encoded_key || "",
- id: kmsCACertificate?.id || "",
- key: kmsCACertificate?.key || "",
- cert: fileName || "",
- encoded_cert: encodedValue || "",
- })
- }
- accept=".cer,.crt,.cert,.pem"
- id="kms_mtls_ca"
- name="kms_mtls_ca"
- label="CA"
- value={kmsCACertificate?.cert || ""}
- />
- )}
-
-
-
- )}
-
- ) =>
- setImage(e.target.value)
- }
- label="Image"
- tooltip="KES container image"
- placeholder="minio/kes:2023-11-10T10-44-28Z"
- value={image}
- />
-
-
- ) =>
- setReplicas(e.target.value)
- }
- label="Replicas"
- tooltip="Numer of KES pod replicas"
- value={replicas}
- required
- error={validationErrors["replicas"] || ""}
- />
-
-
- SecurityContext for KES
-
-
-
-
- ) => {
- setSecurityContext({
- ...securityContext,
- runAsUser: e.target.value,
- });
- }}
- label="Run As User"
- value={securityContext.runAsUser}
- required
- error={
- validationErrors["kes_securityContext_runAsUser"] || ""
- }
- min="0"
- />
-
-
- ) => {
- setSecurityContext({
- ...securityContext,
- runAsGroup: e.target.value,
- });
- }}
- label="Run As Group"
- value={securityContext.runAsGroup}
- required
- error={
- validationErrors["kes_securityContext_runAsGroup"] || ""
- }
- min="0"
- />
-
-
+
+ )}
+ ) =>
+ setImage(e.target.value)
+ }
+ label="Image"
+ tooltip="KES container image"
+ placeholder="minio/kes:2023-11-10T10-44-28Z"
+ value={image}
+ />
+ ) =>
+ setReplicas(e.target.value)
+ }
+ label="Replicas"
+ tooltip="Numer of KES pod replicas"
+ value={replicas}
+ required
+ error={validationErrors["replicas"] || ""}
+ />
+ SecurityContext for KES
+
- ) => {
- setSecurityContext({
- ...securityContext,
- fsGroup: e.target.value,
- });
- }}
- label="FsGroup"
- value={securityContext.fsGroup!}
- required
- error={
- validationErrors["kes_securityContext_fsGroup"] || ""
- }
- min="0"
- />
-
-
-
-
- {
- const targetD = e.target;
- const checked = targetD.checked;
- setSecurityContext({
- ...securityContext,
- runAsNonRoot: checked,
- });
- }}
- label={"Do not run as Root"}
- />
-
-
- )}
-
- setConfirmOpen(true)}
- label={"Save"}
- />
+
+ ) => {
+ setSecurityContext({
+ ...securityContext,
+ runAsUser: e.target.value,
+ });
+ }}
+ label="Run As User"
+ value={securityContext.runAsUser}
+ required
+ error={
+ validationErrors["kes_securityContext_runAsUser"] || ""
+ }
+ min="0"
+ />
+
+
+ ) => {
+ setSecurityContext({
+ ...securityContext,
+ runAsGroup: e.target.value,
+ });
+ }}
+ label="Run As Group"
+ value={securityContext.runAsGroup}
+ required
+ error={
+ validationErrors["kes_securityContext_runAsGroup"] || ""
+ }
+ min="0"
+ />
+
+
+ ) => {
+ setSecurityContext({
+ ...securityContext,
+ fsGroup: e.target.value,
+ });
+ }}
+ label="FsGroup"
+ value={securityContext.fsGroup!}
+ required
+ error={
+ validationErrors["kes_securityContext_fsGroup"] || ""
+ }
+ min="0"
+ sx={{
+ marginBottom: 12,
+ }}
+ />
+
+
+ {
+ const targetD = e.target;
+ const checked = targetD.checked;
+ setSecurityContext({
+ ...securityContext,
+ runAsNonRoot: checked,
+ });
+ }}
+ label={"Do not run as Root"}
+ />
+
+
+ )}
+
+ setConfirmOpen(true)}
+ label={"Save"}
+ />
+
-
+
);
};
-export default withStyles(styles)(TenantEncryption);
+export default TenantEncryption;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantEvents.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantEvents.tsx
index 438f126682b..4f6ec25072b 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantEvents.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantEvents.tsx
@@ -14,40 +14,19 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import React, { useEffect, useState } from "react";
-import { connect, useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
+import React, { Fragment, useEffect, useState } from "react";
+import { useSelector } from "react-redux";
+import { Grid, SectionTitle } from "mds";
import { useParams } from "react-router-dom";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- actionsTray,
- containerForHeader,
- searchField,
- tableStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
-import Grid from "@mui/material/Grid";
import { IEvent } from "../ListTenants/types";
import { niceDays } from "../../../../common/utils";
import { ErrorResponseHandler } from "../../../../common/types";
-import api from "../../../../common/api";
import { AppState, useAppDispatch } from "../../../../store";
-import EventsList from "./events/EventsList";
import { setErrorSnackMessage } from "../../../../systemSlice";
+import api from "../../../../common/api";
+import EventsList from "./events/EventsList";
-interface ITenantEventsProps {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...actionsTray,
- ...searchField,
- ...tableStyles,
- ...containerForHeader,
- });
-
-const TenantEvents = ({ classes }: ITenantEventsProps) => {
+const TenantEvents = () => {
const dispatch = useAppDispatch();
const params = useParams();
@@ -90,17 +69,15 @@ const TenantEvents = ({ classes }: ITenantEventsProps) => {
}, [loading, tenantNamespace, tenantName, dispatch]);
return (
-
- Events
+
+
+ Events
+
-
+
);
};
-const mapState = (state: AppState) => ({
- loadingTenant: state.tenants.loadingTenant,
-});
-const connector = connect(mapState, null);
-export default withStyles(styles)(connector(TenantEvents));
+export default TenantEvents;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantIdentityProvider.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantIdentityProvider.tsx
index e28c34ac892..ff9e239ef52 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantIdentityProvider.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantIdentityProvider.tsx
@@ -15,38 +15,28 @@
// along with this program. If not, see .
import React, { Fragment, useCallback, useEffect, useState } from "react";
-import { RadioGroup } from "mds";
-import { connect, useSelector } from "react-redux";
-import {
- DialogContentText,
- IconButton,
- Tooltip,
- Typography,
-} from "@mui/material";
-import { Theme } from "@mui/material/styles";
import {
+ AddIcon,
+ Box,
Button,
ConfirmModalIcon,
+ DeleteIcon,
+ FormLayout,
+ Grid,
+ IconButton,
+ InformativeMessage,
+ InputBox,
LDAPIcon,
Loader,
OIDCIcon,
+ RadioGroup,
SectionTitle,
+ Switch,
+ Tooltip,
UsersIcon,
} from "mds";
-import Grid from "@mui/material/Grid";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
-import RemoveRedEyeIcon from "@mui/icons-material/RemoveRedEye";
-import {
- containerForHeader,
- createTenantCommon,
- formFieldStyles,
- modalBasic,
- spacingUtils,
- tenantDetailsStyles,
- wizardCommon,
-} from "../../Common/FormComponents/common/styleLibrary";
+import { useSelector } from "react-redux";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
import {
ITenantIdentityProviderResponse,
ITenantSetAdministratorsRequest,
@@ -62,48 +52,10 @@ import {
} from "../../../../systemSlice";
import { AppState, useAppDispatch } from "../../../../store";
import { ErrorResponseHandler } from "../../../../common/types";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
import api from "../../../../common/api";
-import AddIcon from "@mui/icons-material/Add";
-import DeleteIcon from "@mui/icons-material/Delete";
-
-interface ITenantIdentityProvider {
- classes: any;
-}
-const styles = (theme: Theme) =>
- createStyles({
- adUserDnRows: {
- display: "flex",
- marginBottom: 10,
- },
- buttonTray: {
- marginLeft: 10,
- display: "flex",
- height: 38,
- "& button": {
- background: "#EAEAEA",
- },
- },
- ...tenantDetailsStyles,
- ...spacingUtils,
- loaderAlign: {
- textAlign: "center",
- },
- ...containerForHeader,
- ...createTenantCommon,
- ...formFieldStyles,
- ...modalBasic,
- ...wizardCommon,
- });
-
-function FormHr() {
- return null;
-}
-
-const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
+const TenantIdentityProvider = () => {
const dispatch = useAppDispatch();
const tenant = useSelector((state: AppState) => state.tenants.tenantInfo);
@@ -118,15 +70,12 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
useState("");
const [openIDClientID, setOpenIDClientID] = useState("");
const [openIDSecretID, setOpenIDSecretID] = useState("");
- const [showOIDCSecretID, setShowOIDCSecretID] = useState(false);
const [openIDCallbackURL, setOpenIDCallbackURL] = useState("");
const [openIDClaimName, setOpenIDClaimName] = useState("");
const [openIDScopes, setOpenIDScopes] = useState("");
const [ADURL, setADURL] = useState("");
const [ADLookupBindDN, setADLookupBindDN] = useState("");
const [ADLookupBindPassword, setADLookupBindPassword] = useState("");
- const [showADLookupBindPassword, setShowADLookupBindPassword] =
- useState(false);
const [ADUserDNSearchBaseDN, setADUserDNSearchBaseDN] = useState("");
const [ADUserDNSearchFilter, setADUserDNSearchFilter] = useState("");
const [ADGroupSearchBaseDN, setADGroupSearchBaseDN] = useState("");
@@ -331,7 +280,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
};
return (
-
+
{
isOpen={dialogOpen}
onConfirm={updateTenantIdentityProvider}
confirmationContent={
-
+
Are you sure you want to save the changes and restart the service?
-
+
}
/>
{loadingTenant ? (
-
+
-
+
) : (
-
- Identity Provider
-
-
-
+
+
+ Identity Provider
+
+
+
{
},
]}
/>
-
- {idpSelection === "OpenID" && (
-
-
-
+ ) => {
@@ -399,9 +346,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
error={validationErrors["openID_CONFIGURATION_URL"] || ""}
required
/>
-
-
- ) => {
@@ -413,10 +358,8 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
error={validationErrors["openID_clientID"] || ""}
required
/>
-
-
- ) => {
@@ -427,18 +370,8 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
value={openIDSecretID}
error={validationErrors["openID_secretID"] || ""}
required
- overlayIcon={
- showOIDCSecretID ? (
-
- ) : (
-
- )
- }
- overlayAction={() => setShowOIDCSecretID(!showOIDCSecretID)}
/>
-
-
- ) => {
@@ -450,9 +383,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
placeholder="policy"
error={validationErrors["openID_claimName"] || ""}
/>
-
-
- ) => {
@@ -462,14 +393,12 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
label="Scopes"
value={openIDScopes}
/>
-
-
- )}
+
+ )}
- {idpSelection === "AD" && (
-
-
-
+ ) => {
@@ -482,9 +411,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
error={validationErrors["AD_URL"] || ""}
required
/>
-
-
- {
}}
label={"Skip TLS Verification"}
/>
-
-
- {
}}
label={"Server Insecure"}
/>
-
- {ADServerInsecure ? (
-
-
- Warning: All traffic with Active Directory will be
- unencrypted
-
-
-
- ) : null}
-
-
+ ) : null}
+ {
}}
label={"Start TLS connection to AD/LDAP server"}
/>
-
-
- ) => {
@@ -553,10 +471,8 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
error={validationErrors["ad_lookupBindDN"] || ""}
required
/>
-
-
- ) => {
@@ -565,20 +481,8 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
label="Lookup Bind Password"
value={ADLookupBindPassword}
placeholder="admin"
- overlayIcon={
- showADLookupBindPassword ? (
-
- ) : (
-
- )
- }
- overlayAction={() =>
- setShowADLookupBindPassword(!showADLookupBindPassword)
- }
/>
-
-
- ) => {
@@ -588,9 +492,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
value={ADUserDNSearchBaseDN}
placeholder="dc=min,dc=io"
/>
-
-
- ) => {
@@ -600,9 +502,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
value={ADUserDNSearchFilter}
placeholder="(sAMAcountName=%s)"
/>
-
-
- ) => {
@@ -612,9 +512,7 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
value={ADGroupSearchBaseDN}
placeholder="ou=hwengg,dc=min,dc=io;ou=swengg,dc=min,dc=io"
/>
-
-
- ) => {
@@ -624,183 +522,199 @@ const TenantIdentityProvider = ({ classes }: ITenantIdentityProvider) => {
value={ADGroupSearchFilter}
placeholder="(&(objectclass=groupOfNames)(member=%s))"
/>
-
-
- )}
+
+ )}
-
- setDialogOpen(true)}
- label={"Save"}
- />
-
+
+ setDialogOpen(true)}
+ label={"Save"}
+ />
+
- {idpSelection === "AD" && (
-
- User & Group management
-
-
-
- List of user DNs (Distinguished Names) to be added as Tenant
- Administrators
-
-
- {ADUserDNs.map((_, index) => {
- return (
-
-
-
,
- ) => {
- setADUserDNs(
- ADUserDNs.map((group, i) =>
- i === index ? e.target.value : group,
- ),
- );
+ {idpSelection === "AD" && (
+
+ User & Group management
+
+
+
+ List of user DNs (Distinguished Names) to be added as Tenant
+ Administrators
+
+
+ {ADUserDNs.map((_, index) => {
+ return (
+
+
-
-
- {
- setADUserDNs([...ADUserDNs, ""]);
- }}
- >
-
-
-
-
- {
- if (ADUserDNs.length > 1) {
- setADUserDNs(
- ADUserDNs.filter((_, i) => i !== index),
- );
- }
- }}
- >
-
-
-
-
-
-
- );
- })}
-
-
-
-
- List of group DNs (Distinguished Names) to be added as Tenant
- Administrators
-
-
- {ADGroupDNs.map((_, index) => {
- return (
-
-
-
,
- ) => {
- setADGroupDNs(
- ADGroupDNs.map((group, i) =>
- i === index ? e.target.value : group,
- ),
- );
+ >
+ ,
+ ) => {
+ setADUserDNs(
+ ADUserDNs.map((group, i) =>
+ i === index ? e.target.value : group,
+ ),
+ );
+ }}
+ index={index}
+ key={`csv-ad-userdn-${index.toString()}`}
+ error={
+ validationErrors[
+ `ad-userdn-${index.toString()}`
+ ] || ""
+ }
+ />
+
+
+ {
+ setADUserDNs([...ADUserDNs, ""]);
+ }}
+ >
+
+
+
+
+ {
+ if (ADUserDNs.length > 1) {
+ setADUserDNs(
+ ADUserDNs.filter((_, i) => i !== index),
+ );
+ }
+ }}
+ >
+
+
+
+
+
+
+ );
+ })}
+
+
+
+
+ List of group DNs (Distinguished Names) to be added as
+ Tenant Administrators
+
+
+ {ADGroupDNs.map((_, index) => {
+ return (
+
+
-
-
- {
- setADGroupDNs([...ADGroupDNs, ""]);
- }}
- >
-
-
-
-
- {
- if (ADGroupDNs.length > 1) {
- setADGroupDNs(
- ADGroupDNs.filter((_, i) => i !== index),
- );
- }
- }}
- >
-
-
-
-
-
-
- );
- })}
-
-
-
-
- setAdministrators()}
- label={"Add additional DNs"}
- />
-
-
- )}
+ >
+ ,
+ ) => {
+ setADGroupDNs(
+ ADGroupDNs.map((group, i) =>
+ i === index ? e.target.value : group,
+ ),
+ );
+ }}
+ index={index}
+ key={`csv-ad-groupdn-${index.toString()}`}
+ error={
+ validationErrors[
+ `ad-groupdn-${index.toString()}`
+ ] || ""
+ }
+ />
+
+
+ {
+ setADGroupDNs([...ADGroupDNs, ""]);
+ }}
+ >
+
+
+
+
+ {
+ if (ADGroupDNs.length > 1) {
+ setADGroupDNs(
+ ADGroupDNs.filter(
+ (_, i) => i !== index,
+ ),
+ );
+ }
+ }}
+ >
+
+
+
+
+
+
+ );
+ })}
+
+
+
+
+ setAdministrators()}
+ label={"Add additional DNs"}
+ />
+
+
+ )}
+
)}
-
+
);
};
-const mapState = (state: AppState) => ({
- loadingTenant: state.tenants.loadingTenant,
- selectedTenant: state.tenants.currentTenant,
- tenant: state.tenants.tenantInfo,
-});
-
-const connector = connect(mapState, null);
-
-export default withStyles(styles)(connector(TenantIdentityProvider));
+export default TenantIdentityProvider;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantLicense.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantLicense.tsx
index a824eb51d02..92e8869b7a3 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantLicense.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantLicense.tsx
@@ -15,38 +15,18 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
+import { Loader, SectionTitle, Box, Grid } from "mds";
import { useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import Grid from "@mui/material/Grid";
-import {
- containerForHeader,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
import { SubnetInfo } from "../../License/types";
import { AppState, useAppDispatch } from "../../../../store";
import { ErrorResponseHandler } from "../../../../common/types";
import SubnetLicenseTenant from "./SubnetLicenseTenant";
import api from "../../../../common/api";
-import { Loader } from "mds";
+
import { setErrorSnackMessage } from "../../../../systemSlice";
import { setTenantDetailsLoad } from "../tenantsSlice";
-interface ITenantLicense {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- loaderAlign: {
- textAlign: "center",
- },
- ...containerForHeader,
- });
-
-const TenantLicense = ({ classes }: ITenantLicense) => {
+const TenantLicense = () => {
const dispatch = useAppDispatch();
const loadingTenant = useSelector(
@@ -97,11 +77,17 @@ const TenantLicense = ({ classes }: ITenantLicense) => {
return (
- License
+
+ License
+
{loadingTenant ? (
-
+
-
+
) : (
{tenant && (
@@ -123,4 +109,4 @@ const TenantLicense = ({ classes }: ITenantLicense) => {
);
};
-export default withStyles(styles)(TenantLicense);
+export default TenantLicense;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantMetrics.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantMetrics.tsx
index 898ec1dd30f..67dafd4b850 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantMetrics.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantMetrics.tsx
@@ -14,49 +14,35 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
-import React, { useState } from "react";
-import { Theme } from "@mui/material/styles";
+import React, { Fragment, useState } from "react";
+import { SectionTitle, ProgressBar } from "mds";
+import styled from "styled-components";
import { useParams } from "react-router-dom";
-import { LinearProgress } from "@mui/material";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- containerForHeader,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
import { IAM_PAGES } from "../../../../common/SecureComponent/permissions";
-interface ITenantMetrics {
- classes: any;
-}
+const IFrameContainer = styled.iframe(() => ({
+ border: "0px",
+ flex: "1 1 auto",
+ minHeight: "800px",
+ width: "100%",
+}));
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- iframeStyle: {
- border: "0px",
- flex: "1 1 auto",
- minHeight: "800px",
- width: "100%",
- },
- ...containerForHeader,
- });
-
-const TenantMetrics = ({ classes }: ITenantMetrics) => {
+const TenantMetrics = () => {
const { tenantName, tenantNamespace } = useParams();
const [loading, setLoading] = useState(true);
return (
-
- Metrics
+
+
+ Metrics
+
{loading && (
)}
-
+
);
};
-export default withStyles(styles)(TenantMetrics);
+export default TenantMetrics;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantSecurity.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantSecurity.tsx
index e65355e6eca..bcac1e14b0f 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantSecurity.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantSecurity.tsx
@@ -15,34 +15,32 @@
// along with this program. If not, see .
import React, { Fragment, useCallback, useEffect, useState } from "react";
-import { connect, useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import { DialogContentText, IconButton } from "@mui/material";
-import { AddIcon, Button, ConfirmModalIcon, Loader, RemoveIcon } from "mds";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import Grid from "@mui/material/Grid";
+import { useSelector } from "react-redux";
+import {
+ AddIcon,
+ Box,
+ Button,
+ ConfirmModalIcon,
+ FileSelector,
+ FormLayout,
+ Grid,
+ IconButton,
+ Loader,
+ RemoveIcon,
+ SectionTitle,
+ Switch,
+} from "mds";
import {
fsGroupChangePolicyType,
ICertificateInfo,
ITenantSecurityResponse,
} from "../types";
-import {
- containerForHeader,
- createTenantCommon,
- formFieldStyles,
- modalBasic,
- spacingUtils,
- tenantDetailsStyles,
- wizardCommon,
-} from "../../Common/FormComponents/common/styleLibrary";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
import { KeyPair } from "../ListTenants/utils";
import { AppState, useAppDispatch } from "../../../../store";
import { ErrorResponseHandler } from "../../../../common/types";
import { setErrorSnackMessage } from "../../../../systemSlice";
-import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
-import FileSelector from "../../Common/FormComponents/FileSelector/FileSelector";
import api from "../../../../common/api";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
import TLSCertificate from "../../Common/TLSCertificate/TLSCertificate";
@@ -55,84 +53,8 @@ import {
setRunAsUser,
} from "../tenantSecurityContextSlice";
import TLSHelpBox from "../HelpBox/TLSHelpBox";
-import FormHr from "../../Common/FormHr";
-
-interface ITenantSecurity {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...spacingUtils,
- minioCertificateRows: {
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-start",
- borderBottom: "1px solid #EAEAEA",
- "&:last-child": {
- borderBottom: 0,
- },
- "@media (max-width: 900px)": {
- flex: 1,
- },
- },
- minioCACertsRow: {
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-start",
-
- borderBottom: "1px solid #EAEAEA",
- "&:last-child": {
- borderBottom: 0,
- },
- "@media (max-width: 900px)": {
- flex: 1,
-
- "& div label": {
- minWidth: 50,
- },
- },
- },
- rowActions: {
- display: "flex",
- justifyContent: "flex-end",
- "@media (max-width: 900px)": {
- flex: 1,
- },
- },
- overlayAction: {
- marginLeft: 10,
- "& svg": {
- maxWidth: 15,
- maxHeight: 15,
- },
- "& button": {
- background: "#EAEAEA",
- },
- },
- loaderAlign: {
- textAlign: "center",
- },
- fileItem: {
- marginRight: 10,
- display: "flex",
- "& div label": {
- minWidth: 50,
- },
- "@media (max-width: 900px)": {
- flexFlow: "column",
- },
- },
- ...containerForHeader,
- ...createTenantCommon,
- ...formFieldStyles,
- ...modalBasic,
- ...wizardCommon,
- });
-
-const TenantSecurity = ({ classes }: ITenantSecurity) => {
+const TenantSecurity = () => {
const dispatch = useAppDispatch();
const tenant = useSelector((state: AppState) => state.tenants.tenantInfo);
@@ -482,73 +404,102 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
isOpen={dialogOpen}
onConfirm={updateTenantSecurity}
confirmationContent={
-
+
Are you sure you want to save the changes and restart the service?
-
+
}
/>
{loadingTenant ? (
-
+
-
+
) : (
-
-
- Security
-
-
-
-
- {
- const targetD = e.target;
- const checked = targetD.checked;
- setEnableTLS(checked);
- }}
- label={"TLS"}
- description={
- "Securing all the traffic using TLS. This is required for Encryption Configuration"
- }
- />
-
+
+
+
+ Security
+
+
+
+ {
+ const targetD = e.target;
+ const checked = targetD.checked;
+ setEnableTLS(checked);
+ }}
+ label={"TLS"}
+ description={
+ "Securing all the traffic using TLS. This is required for Encryption Configuration"
+ }
+ />
{enableTLS && (
-
- {
- const targetD = e.target;
- const checked = targetD.checked;
- setEnableAutoCert(checked);
- }}
- label={"AutoCert"}
- description={
- "The internode certificates will be generated and managed by MinIO Operator"
- }
- />
-
-
- {
- const targetD = e.target;
- const checked = targetD.checked;
- setEnableCustomCerts(checked);
- }}
- label={"Custom Certificates"}
- description={"Certificates used to terminated TLS at MinIO"}
- />
-
+ {
+ const targetD = e.target;
+ const checked = targetD.checked;
+ setEnableAutoCert(checked);
+ }}
+ label={"AutoCert"}
+ description={
+ "The internode certificates will be generated and managed by MinIO Operator"
+ }
+ />
+ {
+ const targetD = e.target;
+ const checked = targetD.checked;
+ setEnableCustomCerts(checked);
+ }}
+ label={"Custom Certificates"}
+ description={"Certificates used to terminated TLS at MinIO"}
+ />
{enableCustomCerts && (
@@ -557,7 +508,7 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
)}
-
+
MinIO Server Certificates
@@ -570,50 +521,54 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
),
)}
-
+
{minioServerCertificates.map((keyPair, index) => (
-
-
+ {
+ if (encodedValue) {
addFileToKeyPair(
"minio",
keyPair.id,
"cert",
fileName,
encodedValue,
- )
+ );
}
- accept=".cer,.crt,.cert,.pem"
- id="tlsCert"
- name="tlsCert"
- label="Cert"
- value={keyPair.cert}
- />
-
+ }}
+ accept=".cer,.crt,.cert,.pem"
+ id="tlsCert"
+ name="tlsCert"
+ label="Cert"
+ value={keyPair.cert}
+ returnEncodedData
+ />
+ {
+ if (encodedValue) {
addFileToKeyPair(
"minio",
keyPair.id,
"key",
fileName,
encodedValue,
- )
+ );
}
- accept=".key,.pem"
- id="tlsKey"
- name="tlsKey"
- label="Key"
- value={keyPair.key}
- />
-
-
-
+ }}
+ accept=".key,.pem"
+ id="tlsKey"
+ name="tlsKey"
+ label="Key"
+ value={keyPair.key}
+ returnEncodedData
+ />
+
+
addKeyPair("minio")}
@@ -624,7 +579,7 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
-
+
@@ -640,7 +595,7 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
))}
-
+
MinIO Client Certificates
@@ -653,50 +608,54 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
),
)}
-
+
{minioClientCertificates.map((keyPair, index) => (
-
-
+ {
+ if (encodedValue) {
addFileToKeyPair(
"client",
keyPair.id,
"cert",
fileName,
encodedValue,
- )
+ );
}
- accept=".cer,.crt,.cert,.pem"
- id="tlsCert"
- name="tlsCert"
- label="Cert"
- value={keyPair.cert}
- />
-
+ }}
+ accept=".cer,.crt,.cert,.pem"
+ id="tlsCert"
+ name="tlsCert"
+ label="Cert"
+ value={keyPair.cert}
+ returnEncodedData
+ />
+ {
+ if (encodedValue) {
addFileToKeyPair(
"client",
keyPair.id,
"key",
fileName,
encodedValue,
- )
+ );
}
- accept=".key,.pem"
- id="tlsKey"
- name="tlsKey"
- label="Key"
- value={keyPair.key}
- />
-
-
-
+ }}
+ accept=".key,.pem"
+ id="tlsKey"
+ name="tlsKey"
+ label="Key"
+ value={keyPair.key}
+ returnEncodedData
+ />
+
+
addKeyPair("client")}
@@ -707,7 +666,7 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
-
+
@@ -742,29 +701,32 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
item
xs={12}
key={keyPair.id}
- className={classes.minioCACertsRow}
+ className={"minioCertificateRows"}
>
- addFileToKeyPair(
- "minioCAs",
- keyPair.id,
- "cert",
- fileName,
- encodedValue,
- )
- }
+ onChange={(event, fileName, encodedValue) => {
+ if (encodedValue) {
+ addFileToKeyPair(
+ "minioCAs",
+ keyPair.id,
+ "cert",
+ fileName,
+ encodedValue,
+ );
+ }
+ }}
accept=".cer,.crt,.cert,.pem"
id="tlsCert"
name="tlsCert"
label="Cert"
value={keyPair.cert}
+ returnEncodedData
/>
-
-
+
+
addKeyPair("minioCAs")}
@@ -775,7 +737,7 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
-
+
@@ -795,13 +757,11 @@ const TenantSecurity = ({ classes }: ITenantSecurity) => {
)}
)}
-
- Security Context
-
+
+ Security Context
-
+
{
}
/>
-
+
{
label={"Save"}
/>
-
-
+
+
)}
);
};
-const mapState = (state: AppState) => ({
- loadingTenant: state.tenants.loadingTenant,
- selectedTenant: state.tenants.currentTenant,
- tenant: state.tenants.tenantInfo,
-});
-
-const connector = connect(mapState, null);
-
-export default withStyles(styles)(connector(TenantSecurity));
+export default TenantSecurity;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx
index fbac3078f46..f1a9e6f4d5e 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx
@@ -16,98 +16,38 @@
import React, { Fragment, useEffect, useState } from "react";
import { useSelector } from "react-redux";
-import get from "lodash/get";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import {
- containerForHeader,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
-import { Box, Grid } from "@mui/material";
-import UpdateTenantModal from "./UpdateTenantModal";
-import { AppState, useAppDispatch } from "../../../../store";
-import SummaryUsageBar from "../../Common/UsageBarWrapper/SummaryUsageBar";
import {
ActionLink,
+ Box,
Button,
DisableIcon,
EditIcon,
- TierOnlineIcon,
+ Grid,
SectionTitle,
+ TierOnlineIcon,
ValuePair,
} from "mds";
-import EditDomains from "./EditDomains";
+import get from "lodash/get";
+import styled from "styled-components";
+import UpdateTenantModal from "./UpdateTenantModal";
+import { AppState, useAppDispatch } from "../../../../store";
import { useParams } from "react-router-dom";
import { getTenantAsync } from "../thunks/tenantDetailsAsync";
import { Tenant } from "../../../../api/operatorApi";
+import SummaryUsageBar from "../../Common/UsageBarWrapper/SummaryUsageBar";
+import EditDomains from "./EditDomains";
-interface ITenantsSummary {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- redState: {
- color: theme.palette.error.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- marginRight: 4,
- },
- },
- yellowState: {
- color: theme.palette.warning.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- marginRight: 4,
- },
- },
- greenState: {
- color: theme.palette.success.main,
- "& .min-icon": {
- width: 16,
- height: 16,
- marginRight: 4,
- },
- },
- greyState: {
- color: "grey",
- "& .min-icon": {
- width: 16,
- height: 16,
- marginRight: 4,
- },
- },
- linkedSection: {
- color: theme.palette.info.main,
- fontFamily: "'Inter', sans-serif",
- },
- autoGeneratedLink: {
- fontStyle: "italic",
- },
- ...containerForHeader,
- });
-
-const healthStatusToClass = (health_status: string = "red", classes: any) => {
- return health_status === "red"
- ? classes.redState
- : health_status === "yellow"
- ? classes.yellowState
- : health_status === "green"
- ? classes.greenState
- : classes.greyState;
-};
+const SummaryMain = styled.div(({ theme }) => ({
+ "& .linkedSection": {
+ color: get(theme, "linkColor", "#2781B0"),
+ fontFamily: "'Inter', sans-serif",
+ },
+ "& .autoGeneratedLink": {
+ fontStyle: "italic",
+ },
+}));
-const StorageSummary = ({
- tenant,
- classes,
-}: {
- tenant: Tenant | null;
- classes: any;
-}) => {
+const StorageSummary = ({ tenant }: { tenant: Tenant | null }) => {
if (!tenant) {
return null;
}
@@ -118,7 +58,7 @@ const StorageSummary = ({
label={"Storage"}
error={""}
loading={false}
- healthStatus={healthStatusToClass(tenant?.status?.health_status, classes)}
+ healthStatus={tenant?.status?.health_status}
/>
);
};
@@ -139,26 +79,7 @@ const featureRowStyle = {
},
};
-const featureItemStyleProps = {
- stkProps: {
- sx: {
- flex: 1,
- marginRight: 10,
- display: "flex",
- alignItems: "center",
- justifyContent: "space-between",
- "@media (max-width: 900px)": {
- marginRight: "25px",
- },
- },
- },
- lblProps: {
- style: {
- minWidth: 100,
- },
- },
-};
-const TenantSummary = ({ classes }: ITenantsSummary) => {
+const TenantSummary = () => {
const dispatch = useAppDispatch();
const { tenantName, tenantNamespace } = useParams();
@@ -229,212 +150,211 @@ const TenantSummary = ({ classes }: ITenantsSummary) => {
)}
Details
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {
+ setUpdateMinioVersion(true);
+ }}
+ >
+ {tenant ? tenant.image : ""}
+
+ }
+ />
+
+
+
+ Domains
+ }
onClick={() => {
- setUpdateMinioVersion(true);
+ setEditDomainsOpen(true);
}}
- >
- {tenant ? tenant.image : ""}
-
- }
- />
-
-
-
- Domains
- }
- onClick={() => {
- setEditDomainsOpen(true);
- }}
- />
-
-
-
-
- {(!tenant?.domains?.console ||
- tenant?.domains?.console === "") &&
- !tenant?.endpoints?.console
- ? "-"
- : ""}
+ />
+
+
+
+
+ {(!tenant?.domains?.console ||
+ tenant?.domains?.console === "") &&
+ !tenant?.endpoints?.console
+ ? "-"
+ : ""}
- {tenant?.endpoints?.console && (
-
-
- {tenant?.endpoints?.console || "-"}
-
-
-
- )}
+ {tenant?.endpoints?.console && (
+
+
+ {tenant?.endpoints?.console || "-"}
+
+
+
+ )}
- {tenant?.domains?.console &&
- tenant?.domains?.console !== "" && (
-
- {tenant?.domains?.console || ""}
-
+ {tenant?.domains?.console &&
+ tenant?.domains?.console !== "" && (
+
+ {tenant?.domains?.console || ""}
+
+ )}
+
+ }
+ />
+
+
+
+ {!tenant?.domains?.minio && !tenant?.endpoints?.minio
+ ? "-"
+ : ""}
+ {tenant?.endpoints?.minio && (
+
+
+ {tenant?.endpoints?.minio || "-"}
+
+
+
)}
-
- }
- />
-
-
-
- {!tenant?.domains?.minio && !tenant?.endpoints?.minio
- ? "-"
- : ""}
- {tenant?.endpoints?.minio && (
-
-
- {tenant?.endpoints?.minio || "-"}
-
-
-
- )}
- {tenant?.domains?.minio &&
- tenant.domains.minio.map((domain) => {
- return (
-
-
- {domain}
-
-
-
- );
- })}
-
- }
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {tenant?.domains?.minio &&
+ tenant.domains.minio.map((domain) => {
+ return (
+
+
+ {domain}
+
+
+
+ );
+ })}
+
+ }
+ />
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- Features
-
+ Features
+
@@ -442,11 +362,10 @@ const TenantSummary = ({ classes }: ITenantsSummary) => {
direction="row"
label={"OpenID:"}
value={getToggle(oidcEnabled, "tenant-oidc")}
- {...featureItemStyleProps}
/>
);
};
-export default withStyles(styles)(TenantSummary);
+export default TenantSummary;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/TenantYAML.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/TenantYAML.tsx
index 1e69b0d9edc..ecf45ccb469 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/TenantYAML.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/TenantYAML.tsx
@@ -17,43 +17,25 @@
import React, { Fragment, useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
-import { LinearProgress } from "@mui/material";
-import { Theme } from "@mui/material/styles";
-import { Button, SectionTitle } from "mds";
-import Grid from "@mui/material/Grid";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import api from "../../../../common/api";
import {
- fieldBasic,
- modalStyleUtils,
-} from "../../Common/FormComponents/common/styleLibrary";
+ Button,
+ CodeEditor,
+ Grid,
+ InformativeMessage,
+ ProgressBar,
+ SectionTitle,
+} from "mds";
+import api from "../../../../common/api";
import { ErrorResponseHandler } from "../../../../common/types";
-import CodeMirrorWrapper from "../../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper";
import { setModalErrorSnackMessage } from "../../../../systemSlice";
import { AppState, useAppDispatch } from "../../../../store";
import { getTenantAsync } from "../thunks/tenantDetailsAsync";
-const styles = (theme: Theme) =>
- createStyles({
- errorState: {
- color: "#b53b4b",
- fontSize: 14,
- fontWeight: "bold",
- },
- ...modalStyleUtils,
- ...fieldBasic,
- });
-
interface ITenantYAML {
yaml: string;
}
-interface ITenantYAMLProps {
- classes: any;
-}
-
-const TenantYAML = ({ classes }: ITenantYAMLProps) => {
+const TenantYAML = () => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
@@ -78,7 +60,7 @@ const TenantYAML = ({ classes }: ITenantYAMLProps) => {
.invoke("PUT", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`, {
yaml: tenantYaml,
})
- .then((res) => {
+ .then(() => {
setAddLoading(false);
dispatch(getTenantAsync());
setErrorMessage("");
@@ -115,7 +97,7 @@ const TenantYAML = ({ classes }: ITenantYAMLProps) => {
{addLoading ||
(loading && (
-
+
))}
@@ -133,29 +115,19 @@ const TenantYAML = ({ classes }: ITenantYAMLProps) => {
Tenant Specification
{errorMessage ? (
-
- {errorMessage}
+
+
) : null}
-
-
+ {
+ onChange={(value) => {
setTenantYaml(value);
}}
editorHeight={"550px"}
@@ -198,4 +170,4 @@ const TenantYAML = ({ classes }: ITenantYAMLProps) => {
);
};
-export default withStyles(styles)(TenantYAML);
+export default TenantYAML;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx
index c67627ae7b9..47d8d25eded 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx
@@ -15,49 +15,29 @@
// along with this program. If not, see .
import React, { Fragment, useCallback, useEffect, useState } from "react";
-import { Button } from "mds";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import { Grid } from "@mui/material";
-import {
- formFieldStyles,
- modalStyleUtils,
-} from "../../Common/FormComponents/common/styleLibrary";
+import { Box, Button, FormLayout, InputBox, Switch } from "mds";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
import { ErrorResponseHandler } from "../../../../common/types";
-import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
-import api from "../../../../common/api";
import {
setModalErrorSnackMessage,
setSnackBarMessage,
} from "../../../../systemSlice";
import { useAppDispatch } from "../../../../store";
+import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
+import api from "../../../../common/api";
interface IUpdateTenantModal {
open: boolean;
closeModalAndRefresh: (update: boolean) => any;
namespace: string;
idTenant: string;
- classes: any;
}
-const styles = (theme: Theme) =>
- createStyles({
- infoText: {
- fontSize: 14,
- },
- ...formFieldStyles,
- ...modalStyleUtils,
- });
-
const UpdateTenantModal = ({
open,
closeModalAndRefresh,
namespace,
idTenant,
- classes,
}: IUpdateTenantModal) => {
const dispatch = useAppDispatch();
const [isSending, setIsSending] = useState(false);
@@ -144,106 +124,99 @@ const UpdateTenantModal = ({
modalOpen={open}
onClose={closeAction}
>
-
-
-
+
+
+
Please enter the MinIO image from dockerhub to use. If blank, then
latest build will be used.
-
-
+
-
- {
- setMinioImage(e.target.value);
- }}
- />
-
-
- ) => {
- setImageRegistry(!imageRegistry);
- }}
- label={"Set Custom Image Registry"}
- indicatorLabels={["Yes", "No"]}
- />
-
+ {
+ setMinioImage(e.target.value);
+ }}
+ />
+ ) => {
+ setImageRegistry(!imageRegistry);
+ }}
+ label={"Set Custom Image Registry"}
+ indicatorLabels={["Yes", "No"]}
+ />
{imageRegistry && (
-
- {
- setImageRegistryEndpoint(e.target.value);
- }}
- />
-
-
- {
- setImageRegistryUsername(e.target.value);
- }}
- />
-
-
- {
- setImageRegistryPassword(e.target.value);
- }}
- />
-
+ {
+ setImageRegistryEndpoint(e.target.value);
+ }}
+ />
+ {
+ setImageRegistryUsername(e.target.value);
+ }}
+ />
+ {
+ setImageRegistryPassword(e.target.value);
+ }}
+ />
)}
-
-
-
-
-
-
+
+
+
+
+
+
);
};
-export default withStyles(styles)(UpdateTenantModal);
+export default UpdateTenantModal;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/VolumesSummary.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/VolumesSummary.tsx
index 22fd63079ce..f3b1f37d619 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/VolumesSummary.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/VolumesSummary.tsx
@@ -15,41 +15,23 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
-import get from "lodash/get";
+import { Box, DataTable, Grid, SectionTitle } from "mds";
import { useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import { Grid, InputAdornment, TextField } from "@mui/material";
-import {
- containerForHeader,
- tableStyles,
- tenantDetailsStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
+import get from "lodash/get";
+import { actionsTray } from "../../Common/FormComponents/common/styleLibrary";
import { IStoragePVCs } from "../../Storage/types";
import { ErrorResponseHandler } from "../../../../common/types";
-import api from "../../../../common/api";
-import { DataTable, SearchIcon } from "mds";
import { IPodListElement } from "../ListTenants/types";
-import withSuspense from "../../Common/Components/withSuspense";
import { AppState, useAppDispatch } from "../../../../store";
import { setErrorSnackMessage } from "../../../../systemSlice";
import { useNavigate, useParams } from "react-router-dom";
+import api from "../../../../common/api";
+import withSuspense from "../../Common/Components/withSuspense";
+import SearchBox from "../../Common/SearchBox";
const DeletePVC = withSuspense(React.lazy(() => import("./DeletePVC")));
-interface ITenantVolumesProps {
- classes: any;
-}
-
-const styles = (theme: Theme) =>
- createStyles({
- ...tenantDetailsStyles,
- ...tableStyles,
- ...containerForHeader,
- });
-
-const TenantVolumes = ({ classes }: ITenantVolumesProps) => {
+const TenantVolumes = () => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
const { tenantName, tenantNamespace } = useParams();
@@ -126,29 +108,21 @@ const TenantVolumes = ({ classes }: ITenantVolumesProps) => {
closeDeleteModalAndRefresh={closeDeleteModalAndRefresh}
/>
)}
-
- Volumes
-
-
-
-
- ),
+
+
+ Volumes
+
+
+ {
+ setFilter(value);
}}
- onChange={(e) => {
- setFilter(e.target.value);
- }}
- variant="standard"
+ placeholder={"Search Volumes (PVCs)"}
+ id="search-resource"
/>
-
+
{
customPaperHeight={"calc(100vh - 400px)"}
/>
-
+
);
};
-export default withStyles(styles)(TenantVolumes);
+export default TenantVolumes;
diff --git a/web-app/src/screens/Console/Tenants/TenantDetails/events/EventsList.tsx b/web-app/src/screens/Console/Tenants/TenantDetails/events/EventsList.tsx
index 18c4dcc22e1..68a24bc1bdd 100644
--- a/web-app/src/screens/Console/Tenants/TenantDetails/events/EventsList.tsx
+++ b/web-app/src/screens/Console/Tenants/TenantDetails/events/EventsList.tsx
@@ -15,20 +15,19 @@
// along with this program. If not, see .
import React from "react";
-import { LinearProgress } from "@mui/material";
+import {
+ ProgressBar,
+ Table,
+ TableBody,
+ TableHeadCell,
+ TableCell,
+ TableHead,
+ TableRow,
+ Box,
+ ExpandCaret,
+ CollapseCaret,
+} from "mds";
import { IEvent } from "../../ListTenants/types";
-import Table from "@mui/material/Table";
-import TableBody from "@mui/material/TableBody";
-import TableCell from "@mui/material/TableCell";
-import TableHead from "@mui/material/TableHead";
-import TableRow from "@mui/material/TableRow";
-import Box from "@mui/material/Box";
-import Collapse from "@mui/material/Collapse";
-import Typography from "@mui/material/Typography";
-import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
-import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
-import TableContainer from "@mui/material/TableContainer";
-import Paper from "@mui/material/Paper";
interface IEventsListProps {
events: IEvent[];
@@ -41,38 +40,36 @@ const Event = (props: { event: IEvent }) => {
return (
- *": { borderBottom: "unset" }, cursor: "pointer" }}>
- setOpen(!open)}>
+
+ setOpen(!open)}
+ sx={{ borderBottom: 0 }}
+ >
{event.event_type}
+
+ setOpen(!open)} sx={{ borderBottom: 0 }}>
+ {event.reason}
- setOpen(!open)}>{event.reason}
- setOpen(!open)}>{event.seen}
- setOpen(!open)}>
+ setOpen(!open)} sx={{ borderBottom: 0 }}>
+ {event.seen}
+
+ setOpen(!open)} sx={{ borderBottom: 0 }}>
{event.message.length >= 30
? `${event.message.slice(0, 30)}...`
: event.message}
- setOpen(!open)}>
- {open ? : }
+ setOpen(!open)} sx={{ borderBottom: 0 }}>
+ {open ? : }
-
-
-
- {event.message}
-
+ {open && (
+
+ {event.message}
-
+ )}
@@ -81,10 +78,10 @@ const Event = (props: { event: IEvent }) => {
const EventsList = ({ events, loading }: IEventsListProps) => {
if (loading) {
- return ;
+ return ;
}
return (
-
+
@@ -101,7 +98,7 @@ const EventsList = ({ events, loading }: IEventsListProps) => {
))}
-
+
);
};
diff --git a/web-app/src/screens/Console/Tenants/securityContextSelector.tsx b/web-app/src/screens/Console/Tenants/securityContextSelector.tsx
index 7c579de3714..7c82e24258c 100644
--- a/web-app/src/screens/Console/Tenants/securityContextSelector.tsx
+++ b/web-app/src/screens/Console/Tenants/securityContextSelector.tsx
@@ -15,18 +15,11 @@
// along with this program. If not, see .
import React, { Fragment } from "react";
-import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import FormSwitchWrapper from "../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
-import SelectWrapper from "../Common/FormComponents/SelectWrapper/SelectWrapper";
-import { Grid, SelectChangeEvent } from "@mui/material";
+import { Box, Grid, InputBox, Select, Switch } from "mds";
import { useDispatch } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
import { fsGroupChangePolicyType } from "./types";
interface IEditSecurityContextProps {
- classes: any;
runAsUser: string;
runAsGroup: string;
fsGroup: string;
@@ -39,19 +32,7 @@ interface IEditSecurityContextProps {
setFSGroupChangePolicy: any;
}
-const styles = (theme: Theme) =>
- createStyles({
- configSectionItem: {
- marginRight: 15,
- marginBottom: 15,
- "& .multiContainer": {
- border: "1px solid red",
- },
- },
- });
-
const SecurityContextSelector = ({
- classes,
runAsGroup,
runAsUser,
fsGroup,
@@ -66,84 +47,99 @@ const SecurityContextSelector = ({
const dispatch = useDispatch();
return (
-
- Security Context
-
-
-
-
- ) => {
- dispatch(setRunAsUser(e.target.value));
- }}
- label="Run As User"
- value={runAsUser}
- required
- min="0"
- />
-
-
- ) => {
- dispatch(setRunAsGroup(e.target.value));
- }}
- label="Run As Group"
- value={runAsGroup}
- required
- min="0"
- />
-
-
-
-
-
-
- ) => {
- dispatch(setFSGroup(e.target.value));
- }}
- label="FsGroup"
- value={fsGroup}
- required
- min="0"
- />
-
-
-
- ) => {
- dispatch(setFSGroupChangePolicy(e.target.value));
- }}
- value={fsGroupChangePolicy}
- options={[
- {
- label: "Always",
- value: "Always",
- },
- {
- label: "OnRootMismatch",
- value: "OnRootMismatch",
- },
- ]}
- />
-
-
-
-
-
-
+ Security Context
+
+
+
+
+ ) => {
+ dispatch(setRunAsUser(e.target.value));
+ }}
+ label="Run As User"
+ value={runAsUser}
+ required
+ min="0"
+ />
+
+
+ ) => {
+ dispatch(setRunAsGroup(e.target.value));
+ }}
+ label="Run As Group"
+ value={runAsGroup}
+ required
+ min="0"
+ />
+
+
+
+
+
+
+ ) => {
+ dispatch(setFSGroup(e.target.value));
+ }}
+ label="FsGroup"
+ value={fsGroup}
+ required
+ min="0"
+ />
+
+
+ {
+ dispatch(setFSGroupChangePolicy(value));
+ }}
+ value={fsGroupChangePolicy}
+ options={[
+ {
+ label: "Always",
+ value: "Always",
+ },
+ {
+ label: "OnRootMismatch",
+ value: "OnRootMismatch",
+ },
+ ]}
+ />
+
+
+
+
+
-
-
+
+
);
};
-export default withStyles(styles)(SecurityContextSelector);
+export default SecurityContextSelector;
diff --git a/web-app/yarn.lock b/web-app/yarn.lock
index 4db071ef958..4646e27fdea 100644
--- a/web-app/yarn.lock
+++ b/web-app/yarn.lock
@@ -87,7 +87,7 @@
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"
-"@babel/helper-annotate-as-pure@^7.22.5":
+"@babel/helper-annotate-as-pure@^7.18.6", "@babel/helper-annotate-as-pure@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882"
integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==
@@ -112,7 +112,7 @@
lru-cache "^5.1.1"
semver "^6.3.1"
-"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.15":
+"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.15":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz#97a61b385e57fe458496fad19f8e63b63c867de4"
integrity sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==
@@ -392,6 +392,16 @@
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703"
integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==
+"@babel/plugin-proposal-private-property-in-object@^7.21.11":
+ version "7.21.11"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c"
+ integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.18.6"
+ "@babel/helper-create-class-features-plugin" "^7.21.0"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/plugin-syntax-private-property-in-object" "^7.14.5"
+
"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"