diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucket.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucket.tsx
index 64f1bc658..6faacc8f8 100644
--- a/portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucket.tsx
+++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucket.tsx
@@ -32,6 +32,7 @@ import {
PageLayout,
RadioGroup,
Switch,
+ SectionTitle,
} from "mds";
import { k8sScalarUnitsExcluding } from "../../../../../common/utils";
import { AppState, useAppDispatch } from "../../../../../store";
@@ -44,7 +45,6 @@ import {
} from "../../../../../systemSlice";
import InputUnitMenu from "../../../Common/FormComponents/InputUnitMenu/InputUnitMenu";
import TooltipWrapper from "../../../Common/TooltipWrapper/TooltipWrapper";
-import SectionTitle from "../../../Common/SectionTitle";
import {
resetForm,
setEnableObjectLocking,
@@ -277,7 +277,7 @@ const AddBucket = () => {
- Features
+ Features
{!distributedSetup && (
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/AddReplicationSites.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/AddReplicationSites.tsx
index dd5fa0dce..f9f23030d 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/AddReplicationSites.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/AddReplicationSites.tsx
@@ -15,13 +15,21 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
-import Grid from "@mui/material/Grid";
-import { Box, LinearProgress } from "@mui/material";
import { useNavigate } from "react-router-dom";
-import { BackLink, Button, ClustersIcon, HelpBox, PageLayout } from "mds";
+import {
+ BackLink,
+ Button,
+ ClustersIcon,
+ HelpBox,
+ PageLayout,
+ Box,
+ Grid,
+ ProgressBar,
+ InputLabel,
+ SectionTitle,
+} from "mds";
import useApi from "../../Common/Hooks/useApi";
import { IAM_PAGES } from "../../../../common/SecureComponent/permissions";
-import SectionTitle from "../../Common/SectionTitle";
import {
setErrorSnackMessage,
setHelpName,
@@ -58,17 +66,18 @@ const isEmptyValue = (value: string): boolean => {
const TableHeader = () => {
return (
-
- Site Name
+
+ Site Name
+
+
+ Endpoint {"*"}
+
+
+ Access Key {"*"}
+
+
+ Secret Key {"*"}
- Endpoint {"*"}
- Access Key {"*"}
- Secret Key {"*"}
);
@@ -272,10 +281,10 @@ const AddReplicationSites = () => {
>
{
>
{
}}
>
- }>
+ }>
Add Sites for Replication
- {isSiteInfoLoading || isAdding ? : null}
+ {isSiteInfoLoading || isAdding ? : null}
{
flexFlow: "column",
fontSize: "14px",
flex: "2",
- "& .step-number": {
- color: "#ffffff",
- height: "25px",
- width: "25px",
- background: "#081C42",
- marginRight: "10px",
- textAlign: "center",
- fontWeight: 600,
- borderRadius: "50%",
- },
-
"& li": {
fontSize: "14px",
display: "flex",
@@ -547,15 +545,6 @@ const AddReplicationSites = () => {
"&.step-text": {
fontWeight: 400,
},
- "&:before": {
- content: "' '",
- height: "7px",
- width: "7px",
- backgroundColor: "#2781B0",
- marginRight: "10px",
- marginTop: "12px",
- flexShrink: 0,
- },
},
}}
>
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/EditSiteEndPoint.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/EditSiteEndPoint.tsx
index 8753037e5..20f40152b 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/EditSiteEndPoint.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/EditSiteEndPoint.tsx
@@ -15,10 +15,7 @@
// along with this program. If not, see .
import React, { useState } from "react";
-import { Button, EditIcon } from "mds";
-import { Box, DialogContentText } from "@mui/material";
-import Grid from "@mui/material/Grid";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
+import { Box, Button, EditIcon, Grid, InputBox, InputLabel } from "mds";
import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
import useApi from "../../Common/Hooks/useApi";
import {
@@ -26,31 +23,24 @@ import {
setSnackBarMessage,
} from "../../../../systemSlice";
import { useAppDispatch } from "../../../../store";
-import withStyles from "@mui/styles/withStyles";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import {
- formFieldStyles,
- modalStyleUtils,
- spacingUtils,
-} from "../../Common/FormComponents/common/styleLibrary";
+import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
+import styled from "styled-components";
+import get from "lodash/get";
+
+const SiteEndpointContainer = styled.div(({ theme }) => ({
+ "& .alertText": {
+ color: get(theme, "signalColors.danger", "#C51B3F"),
+ },
+}));
-const styles = (theme: Theme) =>
- createStyles({
- ...modalStyleUtils,
- ...formFieldStyles,
- ...spacingUtils,
- });
const EditSiteEndPoint = ({
editSite = {},
onClose,
onComplete,
- classes = {},
}: {
editSite: any;
onClose: () => void;
onComplete: () => void;
- classes: any;
}) => {
const dispatch = useAppDispatch();
const [editEndPointName, setEditEndPointName] = useState("");
@@ -99,7 +89,7 @@ const EditSiteEndPoint = ({
titleIcon={}
onClose={onClose}
>
-
+
- New Endpoint:
- New Endpoint:
+
-
-
- Note:{" "}
-
- Access Key and Secret Key should be same on the new site/endpoint.
-
-
+
+ Note:
+
+ Access Key and Secret Key should be same on the new site/endpoint.
+
-
+
-
+
- {
- setEntityType(e.target.value);
+ onChange={(value) => {
+ setEntityType(value);
setStatsLoaded(false);
}}
label=""
@@ -122,7 +130,7 @@ const EntityReplicationLookup = () => {
flex: 2,
}}
>
- ) => {
@@ -159,10 +167,12 @@ const EntityReplicationLookup = () => {
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx
index 81add609c..af9dbebab 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx
@@ -15,8 +15,56 @@
// along with this program. If not, see .
import React from "react";
-import { Box } from "@mui/material";
-import { CircleIcon } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, CircleIcon } from "mds";
+
+const LookupTableBase = styled.div(({ theme }) => ({
+ marginTop: 15,
+ table: {
+ width: "100%",
+ borderCollapse: "collapse",
+ "& .feature-cell": {
+ fontWeight: 600,
+ fontSize: 14,
+ paddingLeft: 15,
+ },
+ "& .status-cell": {
+ textAlign: "center",
+ },
+ "& .header-cell": {
+ textAlign: "center",
+ },
+ "& tr": {
+ height: 38,
+ "& td": {
+ borderBottom: `1px solid ${get(theme, "borderColor", "#E2E2E2")}`,
+ },
+ "& th": {
+ borderBottom: `2px solid ${get(theme, "borderColor", "#E2E2E2")}`,
+ },
+ },
+ "& .indicator": {
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ "& .min-icon": {
+ height: 15,
+ width: 15,
+ },
+ "&.active": {
+ "& .min-icon": {
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ },
+ "&.deactivated": {
+ "& .min-icon": {
+ fill: get(theme, "signalColors.danger", "#C51B3F"),
+ },
+ },
+ },
+ },
+}));
const LookupStatusTable = ({
matrixData = [],
@@ -32,9 +80,9 @@ const LookupStatusTable = ({
const tableHeader = header.map((hC: string, hcIdx: number) => {
return (
- |
+ |
{hC}
-
+ |
);
});
@@ -51,35 +99,13 @@ const LookupStatusTable = ({
}
if (v === true) {
indicator = (
-
+
);
} else if (v === false) {
indicator = (
-
+
);
@@ -99,34 +125,8 @@ const LookupStatusTable = ({
});
return (
-
-
+
+
Replication status for {entityType}: {entityName}.
@@ -135,7 +135,7 @@ const LookupStatusTable = ({
{tableRowsToRender}
-
+
);
};
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/ReplicationSites.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/ReplicationSites.tsx
index 015b1ce95..77e8cd5e5 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/ReplicationSites.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/ReplicationSites.tsx
@@ -14,36 +14,38 @@
// 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 List from "@mui/material/List";
-import ListItemButton from "@mui/material/ListItemButton";
-import { Box, DialogContentText, Tooltip } from "@mui/material";
+import React, { Fragment, useState } from "react";
import {
- Button,
+ Box,
CircleIcon,
ConfirmDeleteIcon,
- EditIcon,
- TrashIcon,
+ DataTable,
+ IColumns,
+ ItemActions,
+ Tooltip,
} from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
import { ReplicationSite } from "./SiteReplication";
import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog";
-import withStyles from "@mui/styles/withStyles";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import {
- formFieldStyles,
- modalStyleUtils,
- spacingUtils,
-} from "../../Common/FormComponents/common/styleLibrary";
-import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
import EditSiteEndPoint from "./EditSiteEndPoint";
-const styles = (theme: Theme) =>
- createStyles({
- ...modalStyleUtils,
- ...formFieldStyles,
- ...spacingUtils,
- });
+const EndpointRender = styled.div(({ theme }) => ({
+ display: "flex",
+ gap: 10,
+ "& .currentIndicator": {
+ "& .min-icon": {
+ width: 12,
+ height: 12,
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ },
+ "& .endpointName": {
+ overflow: "hidden",
+ textOverflow: "ellipsis",
+ whiteSpace: "nowrap",
+ },
+}));
const ReplicationSites = ({
sites,
@@ -53,215 +55,93 @@ const ReplicationSites = ({
sites: ReplicationSite[];
onDeleteSite: (isAll: boolean, sites: string[]) => void;
onRefresh: () => void;
- classes: any;
}) => {
const [deleteSiteKey, setIsDeleteSiteKey] = useState("");
const [editSite, setEditSite] = useState(null);
+ const replicationColumns: IColumns[] = [
+ { label: "Site Name", elementKey: "name" },
+ {
+ label: "Endpoint",
+ elementKey: "endpoint",
+ renderFullObject: true,
+ renderFunction: (siteInfo) => (
+
+ {siteInfo.isCurrent ? (
+
+
+
+
+
+ ) : null}
+
+ {siteInfo.endpoint}
+
+
+ ),
+ },
+ ];
+
+ const actions: ItemActions[] = [
+ {
+ type: "edit",
+ onClick: (valueToSend) => setEditSite(valueToSend),
+ tooltip: "Edit Endpoint",
+ },
+ {
+ type: "delete",
+ onClick: (valueToSend) => setIsDeleteSiteKey(valueToSend.name),
+ tooltip: "Delete Site",
+ },
+ ];
+
return (
-
-
-
+
+
+ {deleteSiteKey !== "" && (
+ }
+ isLoading={false}
+ onConfirm={() => {
+ onDeleteSite(false, [deleteSiteKey]);
}}
- >
- List of Replicated Sites
-
- {sites.map((siteInfo, index) => {
- const key = `${siteInfo.name}`;
+ onClose={() => {
+ setIsDeleteSiteKey("");
+ }}
+ confirmationContent={
+
+ Are you sure you want to remove the replication site:{" "}
+ {deleteSiteKey}?
+
+ }
+ />
+ )}
- return (
-
-
-
-
- {siteInfo.name}
-
-
- {siteInfo.isCurrent ? (
-
-
-
-
-
- ) : null}
-
-
- {siteInfo.endpoint}
-
-
-
-
-
-
-
- }
- onClick={(e) => {
- e.preventDefault();
- setIsDeleteSiteKey(key);
- }}
- style={{
- width: "25px",
- height: "25px",
- padding: "0",
- }}
- />
-
-
- }
- onClick={(e) => {
- e.preventDefault();
- setEditSite(siteInfo);
- }}
- style={{
- width: "25px",
- height: "25px",
- padding: "0",
- marginLeft: "8px",
- }}
- />
-
-
-
-
- {deleteSiteKey === key ? (
- }
- isLoading={false}
- onConfirm={() => {
- onDeleteSite(false, [key]);
- }}
- onClose={() => {
- setIsDeleteSiteKey("");
- }}
- confirmationContent={
-
- Are you sure you want to remove the replication site:{" "}
- {key}.?
-
- }
- />
- ) : null}
-
- {editSite?.name === key ? (
- {
- setEditSite(null);
- onRefresh();
- }}
- editSite={editSite}
- onClose={() => {
- setEditSite(null);
- }}
- />
- ) : null}
-
- );
- })}
-
-
+ {editSite !== null && (
+ {
+ setEditSite(null);
+ onRefresh();
+ }}
+ editSite={editSite}
+ onClose={() => {
+ setEditSite(null);
+ }}
+ />
+ )}
+
);
};
-export default withStyles(styles)(ReplicationSites);
+export default ReplicationSites;
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/SRSiteInputRow.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/SRSiteInputRow.tsx
index 1896d41ed..286f01f4e 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/SRSiteInputRow.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/SRSiteInputRow.tsx
@@ -15,13 +15,23 @@
// along with this program. If not, see .
import React, { Fragment } from "react";
-import { Box } from "@mui/material";
-import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
-import Grid from "@mui/material/Grid";
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
-import { AddIcon, Button, RemoveIcon } from "mds";
+import { AddIcon, Box, Button, Grid, InputBox, RemoveIcon } from "mds";
import { SiteInputRow } from "./Types";
+interface ISRSiteInputRowProps {
+ rowData: SiteInputRow;
+ rowId: number;
+ onFieldChange: (e: any, fieldName: string, index: number) => void;
+ onAddClick?: (index: number) => void;
+ onRemoveClick?: (index: number) => void;
+ canAdd?: boolean;
+ canRemove?: boolean;
+ showRowActions?: boolean;
+ disabledFields?: string[];
+ fieldErrors?: Record;
+}
+
const SRSiteInputRow = ({
rowData,
rowId: index,
@@ -33,30 +43,17 @@ const SRSiteInputRow = ({
showRowActions = true,
disabledFields = [],
fieldErrors = {},
-}: {
- rowData: SiteInputRow;
- rowId: number;
- onFieldChange: (e: any, fieldName: string, index: number) => void;
- onAddClick?: (index: number) => void;
- onRemoveClick?: (index: number) => void;
- canAdd?: boolean;
- canRemove?: boolean;
- showRowActions?: boolean;
- disabledFields?: string[];
- fieldErrors?: Record;
-}) => {
+}: ISRSiteInputRowProps) => {
const { endpoint = "", accessKey = "", secretKey = "", name = "" } = rowData;
return (
- {
onFieldChange(e, "name", index);
@@ -65,14 +62,12 @@ const SRSiteInputRow = ({
/>
- {
@@ -83,7 +78,7 @@ const SRSiteInputRow = ({
-
-
-
+
{
return (
} />
-
-
- {hasSites ? (
-
-
- }
- onClick={() => {
- setIsDeleteAll(true);
- }}
- />
-
-
- }
- onClick={(e) => {
- e.preventDefault();
- navigate(IAM_PAGES.SITE_REPLICATION_STATUS);
- }}
- />
-
-
- ) : null}
-
- }
- onClick={() => {
- navigate(IAM_PAGES.SITE_REPLICATION_ADD);
+
-
-
+ >
+ {hasSites ? (
+
+
+ }
+ onClick={() => {
+ setIsDeleteAll(true);
+ }}
+ />
+
+
+ }
+ onClick={(e) => {
+ e.preventDefault();
+ navigate(IAM_PAGES.SITE_REPLICATION_STATUS);
+ }}
+ />
+
+
+ ) : null}
+
+ }
+ onClick={() => {
+ navigate(IAM_PAGES.SITE_REPLICATION_ADD);
+ }}
+ />
+
+
+ }
+ >
+ {hasSites ? "List of Replicated Sites" : ""}
+
{hasSites ? (
{
) : null}
{!hasSites && !isSiteInfoLoading ? (
-
+
{
To get started,{" "}
- {
navigate(IAM_PAGES.SITE_REPLICATION_ADD);
}}
>
Add a Replication Site
-
+
.
You can learn more at our{" "}
@@ -294,9 +297,9 @@ const SiteReplication = () => {
setIsDeleteAll(false);
}}
confirmationContent={
-
+
Are you sure you want to remove all the replication sites?.
-
+
}
/>
) : null}
diff --git a/portal-ui/src/screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx b/portal-ui/src/screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx
index 387b932a9..60286929d 100644
--- a/portal-ui/src/screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx
+++ b/portal-ui/src/screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx
@@ -15,30 +15,31 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
-import { Box, Grid } from "@mui/material";
import {
BackLink,
+ Box,
+ breakPoints,
BucketsIcon,
Button,
+ Grid,
GroupsIcon,
IAMPoliciesIcon,
Loader,
PageLayout,
RefreshIcon,
UsersIcon,
+ SectionTitle,
} from "mds";
-import useApi from "../../Common/Hooks/useApi";
-
+import { useNavigate } from "react-router-dom";
import { IAM_PAGES } from "../../../../common/SecureComponent/permissions";
-import ScreenTitle from "../../Common/ScreenTitle/ScreenTitle";
+import { useAppDispatch } from "../../../../store";
+import { setHelpName } from "../../../../systemSlice";
+import useApi from "../../Common/Hooks/useApi";
import StatusCountCard from "../../Dashboard/BasicDashboard/StatusCountCard";
import EntityReplicationLookup from "./EntityReplicationLookup";
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
-import { useNavigate } from "react-router-dom";
import PageHeaderWrapper from "../../Common/PageHeaderWrapper/PageHeaderWrapper";
import HelpMenu from "../../HelpMenu";
-import { useAppDispatch } from "../../../../store";
-import { setHelpName } from "../../../../systemSlice";
export type StatsResponseType = {
maxBuckets?: number;
@@ -66,11 +67,11 @@ const SREntityStatus = ({
const statEntityLen = Object.keys(entityStatObj || {})?.length;
return (
@@ -140,8 +141,7 @@ const SiteReplicationStatus = () => {
/>
-
@@ -158,17 +158,22 @@ const SiteReplicationStatus = () => {
}
- />
+ separator
+ >
+ Replication status from all Sites
+
{!isStatsLoading ? (
{
)}
.
import React from "react";
-import { Box } from "@mui/material";
-import { CircleIcon } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, breakPoints, CircleIcon } from "mds";
+
+const StatusCountBase = styled.div(({ theme }) => ({
+ fontFamily: "Inter,sans-serif",
+ maxWidth: "321px",
+ display: "flex",
+ marginLeft: "auto",
+ marginRight: "auto",
+ cursor: "default",
+ color: get(theme, "signalColors.main", "#07193E"),
+ "& .mainBox": {
+ flex: 1,
+ display: "flex",
+ padding: "0 8px 0 8px",
+ [`@media (max-width: ${breakPoints.sm}px)`]: {
+ padding: "0 10px 0 10px",
+ },
+ "& .indicatorIcon": {
+ width: "20px",
+ height: "20px",
+ marginTop: "8px",
+ maxWidth: "26px",
+ "& .min-icon": {
+ width: "16px",
+ height: "16px",
+ },
+ },
+ "& .indicatorContainer": {
+ flex: 1,
+ display: "flex",
+ flexFlow: "column",
+ "& .indicatorLabel": {
+ fontSize: "16px",
+ fontWeight: 600,
+ },
+ "& .counterIndicator": {
+ display: "flex",
+ alignItems: "center",
+ gap: "5px",
+ justifyContent: "space-between",
+ paddingBottom: 0,
+ fontSize: "55px",
+ [`@media (max-width: ${breakPoints.sm}px)`]: {
+ paddingBottom: 10,
+ fontSize: "35px",
+ },
+ [`@media (max-width: ${breakPoints.lg}px)`]: {
+ fontSize: "45px",
+ },
+ [`@media (max-width: ${breakPoints.xl}px)`]: {
+ fontSize: "50px",
+ },
+ flexFlow: "row",
+ fontWeight: 600,
+
+ "& .stat-text": {
+ color: get(theme, "mutedText", "#87888D"),
+ fontSize: "12px",
+ marginTop: "8px",
+ },
+ "& .stat-value": {
+ textAlign: "center",
+ height: "50px",
+ },
+ "& .min-icon": {
+ marginRight: "8px",
+ marginTop: "8px",
+ height: "10px",
+ width: "10px",
+ },
+ },
+ "& .onlineCounter": {
+ display: "flex",
+ alignItems: "center",
+ marginTop: "5px",
+ "& .min-icon": {
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ },
+ "& .offlineCount": {
+ display: "flex",
+ alignItems: "center",
+ marginTop: "8px",
+ "& .min-icon": {
+ fill: get(theme, "signalColors.danger", "#C51B3F"),
+ },
+ },
+ },
+ },
+}));
export const StatusCountCard = ({
onlineCount = 0,
@@ -34,91 +124,15 @@ export const StatusCountCard = ({
notOkStatusText?: string;
}) => {
return (
-
-
-
-
- {label}
-
+
+
+
+ {label}
-
+
{onlineCount}
-
+
{okStatusText}
@@ -126,38 +140,16 @@ export const StatusCountCard = ({
{offlineCount}
-
+
{" "}
{notOkStatusText}
-
- {icon}
-
+ {icon}
-
+
);
};