diff --git a/portal-ui/src/icons/AzureTierIcon.tsx b/portal-ui/src/icons/AzureTierIcon.tsx index dc31789a5..16553a81c 100644 --- a/portal-ui/src/icons/AzureTierIcon.tsx +++ b/portal-ui/src/icons/AzureTierIcon.tsx @@ -31,7 +31,7 @@ const AzureTierIcon = (props: SVGProps) => { id="path21" d="M459.411,505.944c6.055-1.07,11.056-1.953,11.115-1.965l.1-.024-5.717-6.8c-3.143-3.74-5.717-6.815-5.717-6.831,0-.032,5.9-16.291,5.936-16.347.012-.019,4.03,6.919,9.738,16.812,5.347,9.266,9.755,16.9,9.8,16.975l.075.132-18.168,0-18.169,0S459.411,505.944,459.411,505.944ZM437.6,503.868c0-.008,2.693-4.686,5.987-10.391l5.987-10.375,6.978-5.856c3.839-3.219,6.986-5.86,7-5.864a1.448,1.448,0,0,1-.112.282c-.075.159-3.485,7.471-7.574,16.247l-7.44,15.957-5.41.008C440.037,503.884,437.6,503.88,437.6,503.868Z" transform="translate(-437.603 -471.382)" - fill="#c22e4a" + fill="#2a94dc" /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx index c31609573..aba5f7f8c 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx @@ -19,7 +19,7 @@ import { connect } from "react-redux"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button, Paper } from "@mui/material"; +import { Paper } from "@mui/material"; import { AppState } from "../../../../store"; import { setErrorSnackMessage } from "../../../../actions"; import { ISessionResponse } from "../../types"; @@ -44,6 +44,7 @@ import SecureComponent, { } from "../../../../common/SecureComponent/SecureComponent"; import withSuspense from "../../Common/Components/withSuspense"; +import RBIconButton from "./SummaryItems/RBIconButton"; const AddAccessRuleModal = withSuspense( React.lazy(() => import("./AddAccessRule")) @@ -226,18 +227,16 @@ const AccessRule = ({ matchAll errorProps={{ disabled: true }} > - + text={"Add Access Rule"} + icon={} + color="primary" + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx index 10716cfd0..ec48f5c25 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx @@ -274,14 +274,14 @@ const BucketDetails = ({ errorProps={{ disabled: true }} > { setDeleteOpen(true); }} - text={`Delete Bucket`} + text={"Delete Bucket"} icon={} + color={"secondary"} + variant={"outlined"} /> import("./DeleteEvent"))); const AddEvent = withSuspense(React.lazy(() => import("./AddEvent"))); @@ -162,17 +162,16 @@ const BucketEventsPanel = ({ matchAll errorProps={{ disabled: true }} > - + text={"Subscribe to Event"} + icon={} + color="primary" + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketLifecyclePanel.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketLifecyclePanel.tsx index e623e1ab1..e4217b155 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketLifecyclePanel.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketLifecyclePanel.tsx @@ -19,7 +19,6 @@ import { connect } from "react-redux"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button } from "@mui/material"; import get from "lodash/get"; import * as reactMoment from "react-moment"; import Grid from "@mui/material/Grid"; @@ -42,6 +41,7 @@ import SecureComponent, { hasPermission, } from "../../../../common/SecureComponent/SecureComponent"; import { IAM_SCOPES } from "../../../../common/SecureComponent/permissions"; +import RBIconButton from "./SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -213,17 +213,16 @@ const BucketLifecyclePanel = ({ matchAll errorProps={{ disabled: true }} > - + text={"Add Lifecycle Rule"} + icon={} + color="primary" + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketReplicationPanel.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketReplicationPanel.tsx index 130092035..5be9657fc 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketReplicationPanel.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/BucketReplicationPanel.tsx @@ -19,7 +19,6 @@ import { connect } from "react-redux"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button } from "@mui/material"; import Grid from "@mui/material/Grid"; import AddIcon from "../../../../icons/AddIcon"; import BucketsIcon from "../../../../icons/BucketsIcon"; @@ -47,6 +46,7 @@ import SecureComponent, { import { IAM_SCOPES } from "../../../../common/SecureComponent/permissions"; import withSuspense from "../../Common/Components/withSuspense"; +import RBIconButton from "./SummaryItems/RBIconButton"; const AddReplicationModal = withSuspense( React.lazy(() => import("./AddReplicationModal")) @@ -190,17 +190,16 @@ const BucketReplicationPanel = ({ matchAll errorProps={{ disabled: true }} > - + text={"Add Replication Rule"} + icon={} + color="primary" + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/SummaryItems/RBIconButton.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/SummaryItems/RBIconButton.tsx index a5993db26..313324e4f 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/SummaryItems/RBIconButton.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/SummaryItems/RBIconButton.tsx @@ -16,10 +16,9 @@ import React from "react"; import BoxIconButton from "../../../Common/BoxIconButton/BoxIconButton"; -import { Theme } from "@mui/material/styles"; -import createStyles from "@mui/styles/createStyles"; -import withStyles from "@mui/styles/withStyles"; import { IconButtonProps } from "@mui/material"; +import makeStyles from "@mui/styles/makeStyles"; +import { Theme } from "@mui/material/styles"; type DeleteButtonProps = { onClick: (e: any) => void; @@ -32,29 +31,57 @@ type DeleteButtonProps = { [x: string]: any; }; -const styles = (theme: Theme) => - createStyles({ +type RBIconProps = Partial & DeleteButtonProps; + +const useStyles = makeStyles((theme: Theme) => { + const getButtonColor = (props: RBIconProps) => { + const { variant, color } = props; + + let tgtColor = theme.palette.primary.main; + + if (color === "primary" && variant === "contained") { + tgtColor = theme.palette.primary.contrastText; + } else if (color === "primary" && variant === "outlined") { + tgtColor = theme.palette.primary.main; + } else if (color === "secondary") { + tgtColor = theme.palette.secondary.main; + } + + return tgtColor; + }; + + return { root: { - "& .min-icon": { + padding: "7px", + color: (props: RBIconProps) => getButtonColor(props), + borderColor: (props: RBIconProps) => + props.color === "secondary" + ? theme.palette.secondary.main + : theme.palette.primary.main, + "& svg.min-icon": { width: 12, - marginLeft: "5px", + marginLeft: (props: RBIconProps) => (props.text ? "5px" : "0px"), "@media (max-width: 900px)": { width: 16, - marginLeft: 0, + marginLeft: "0px !important", }, }, }, - }); + }; +}); + +const RBIconButton = (props: RBIconProps) => { + const classes = useStyles(props); + + const { + onClick, + text = "", + disabled = false, + tooltip, + icon = null, + ...restProps + } = props; -const RBIconButton = ({ - onClick, - text = "", - disabled = false, - tooltip, - classes, - icon = null, - ...restProps -}: Partial & DeleteButtonProps) => { return ( ); }; -export default withStyles(styles)(RBIconButton); +export default RBIconButton; diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/BucketListItem.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/BucketListItem.tsx index 3fd7d05d4..47dbd030a 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/BucketListItem.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/BucketListItem.tsx @@ -25,7 +25,7 @@ import { TotalObjectsIcon, } from "../../../../icons"; import { Bucket } from "../types"; -import { Box, Button, Grid, Typography } from "@mui/material"; +import { Box, Grid, Typography } from "@mui/material"; import { niceBytes, prettyNumber } from "../../../../common/utils"; import CheckboxWrapper from "../../Common/FormComponents/CheckboxWrapper/CheckboxWrapper"; import { Link } from "react-router-dom"; @@ -34,6 +34,7 @@ import { IAM_ROLES, } from "../../../../common/SecureComponent/permissions"; import SecureComponent from "../../../../common/SecureComponent/SecureComponent"; +import RBIconButton from "../BucketDetails/SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -244,26 +245,28 @@ const BucketListItem = ({ to={`/buckets/${bucket.name}/admin`} style={{ textDecoration: "none" }} > - + /> - + {}} + text={"Browse"} + icon={} + color={"primary"} + variant={"contained"} + />
diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/ListBuckets.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/ListBuckets.tsx index 3b64d9ec7..a3f4428c4 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/ListBuckets.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/ListBuckets.tsx @@ -19,7 +19,7 @@ import { connect } from "react-redux"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button, LinearProgress } from "@mui/material"; +import { LinearProgress } from "@mui/material"; import Grid from "@mui/material/Grid"; import { Bucket, BucketList } from "../types"; import { AddIcon, BucketsIcon } from "../../../../icons"; @@ -37,7 +37,6 @@ import BucketListItem from "./BucketListItem"; import BulkReplicationModal from "./BulkReplicationModal"; import HelpBox from "../../../../common/HelpBox"; import { ISessionResponse } from "../../types"; -import BoxIconButton from "../../Common/BoxIconButton/BoxIconButton"; import RefreshIcon from "../../../../icons/RefreshIcon"; import AButton from "../../Common/AButton/AButton"; import MultipleBucketsIcon from "../../../../icons/MultipleBucketsIcon"; @@ -50,6 +49,7 @@ import { import PageLayout from "../../Common/Layout/PageLayout"; import SearchBox from "../../Common/SearchBox"; import VirtualizedList from "../../Common/VirtualizedList/VirtualizedList"; +import RBIconButton from "../BucketDetails/SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -226,55 +226,55 @@ const ListBuckets = ({ alignItems={"center"} justifyContent={"flex-end"} > - { setBulkSelect(!bulkSelect); }} - size={"small"} - className={classes.bulkSelect} - > - - - } + color={"primary"} + variant={bulkSelect ? "contained" : "outlined"} + /> + + { setReplicationModalOpen(true); }} + text={""} + icon={} disabled={selectedBuckets.length === 0} - size={"small"} - > - - - + + { setLoading(true); }} - size="large" - > - - + text={""} + icon={} + color={"primary"} + variant={"outlined"} + /> + - + text={"Create Bucket"} + icon={} + color={"primary"} + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx index 2a5de21c1..47e358685 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx @@ -54,7 +54,7 @@ import { searchField, tableStyles, } from "../../../../Common/FormComponents/common/styleLibrary"; -import { Badge, Button, Typography } from "@mui/material"; +import { Badge, Typography } from "@mui/material"; import * as reactMoment from "react-moment"; import BrowserBreadcrumbs from "../../../../ObjectBrowser/BrowserBreadcrumbs"; import { @@ -80,7 +80,6 @@ import ScreenTitle from "../../../../Common/ScreenTitle/ScreenTitle"; import { setBucketDetailsLoad, setBucketInfo } from "../../../actions"; import { AppState } from "../../../../../../store"; import PageLayout from "../../../../Common/Layout/PageLayout"; -import BoxIconButton from "../../../../Common/BoxIconButton/BoxIconButton"; import { IAM_SCOPES } from "../../../../../../common/SecureComponent/permissions"; import SecureComponent, { @@ -91,6 +90,7 @@ import SearchBox from "../../../../Common/SearchBox"; import withSuspense from "../../../../Common/Components/withSuspense"; import { displayName } from "./utils"; import { DownloadIcon, UploadFolderIcon } from "../../../../../../icons"; +import RBIconButton from "../../../BucketDetails/SummaryItems/RBIconButton"; const AddFolderIcon = React.lazy( () => import("../../../../../../icons/AddFolderIcon") @@ -1159,44 +1159,41 @@ const ListObjects = ({ scopes={[IAM_SCOPES.S3_PUT_OBJECT]} errorProps={{ disabled: true }} > - { setCreateFolderOpen(true); }} + text={""} + icon={} + color="primary" disabled={rewindEnabled} - size="large" - > - - + variant={"outlined"} + /> - { if (fileUpload && fileUpload.current) { fileUpload.current.click(); } }} + text={""} + icon={} + color="primary" disabled={rewindEnabled} - size="large" - > - - + variant={"outlined"} + /> @@ -1205,37 +1202,28 @@ const ListObjects = ({ scopes={[IAM_SCOPES.S3_PUT_OBJECT]} errorProps={{ disabled: true }} > - { if (folderUpload && folderUpload.current) { folderUpload.current.click(); } }} + text={""} + icon={} + color="primary" disabled={rewindEnabled} - size="large" - > - - + variant={"outlined"} + /> - + - { setRewindSelect(true); }} + text={""} + icon={} + color="primary" disabled={!isVersioned} - size="large" - > - - + variant={"outlined"} + /> - { setLoading(true); }} + text={""} + icon={} + color="primary" disabled={rewindEnabled} - size="large" variant={"contained"} - > - - + /> } @@ -1298,32 +1283,32 @@ const ListObjects = ({ />
- - + variant={"outlined"} + /> + } + color="primary" + disabled={selectedObjects.length === 0} + variant={"contained"} + />
diff --git a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx index a3f63acc3..24d071bd4 100644 --- a/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx +++ b/portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx @@ -74,13 +74,13 @@ import PreviewFileContent from "../Preview/PreviewFileContent"; import RestoreFileVersion from "./RestoreFileVersion"; import PageLayout from "../../../../Common/Layout/PageLayout"; import VerticalTabs from "../../../../Common/VerticalTabs/VerticalTabs"; -import BoxIconButton from "../../../../Common/BoxIconButton/BoxIconButton"; import SecureComponent from "../../../../../../common/SecureComponent/SecureComponent"; import { completeObject, setNewObject, updateProgress, } from "../../../../ObjectBrowser/actions"; +import RBIconButton from "../../../BucketDetails/SummaryItems/RBIconButton"; const RecoverIcon = React.lazy( () => import("../../../../../../icons/RecoverIcon") @@ -551,18 +551,36 @@ const ObjectDetails = ({ } actions={ - + { + setDeleteOpen(true); + }} + text={""} + icon={} + color="secondary" + disabled={actualInfo.is_delete_marker} + variant={"outlined"} + /> + + + { shareObject(); }} + text={""} + icon={} + color="primary" disabled={actualInfo.is_delete_marker} - size="large" - > - - + variant={"outlined"} + /> {downloadingFiles.includes( `${bucketName}/${actualInfo.name}` @@ -575,38 +593,18 @@ const ObjectDetails = ({ />
) : ( - } color="primary" - aria-label="download" onClick={() => { downloadObject(actualInfo); }} disabled={actualInfo.is_delete_marker} - size="large" - > - - + variant={"outlined"} + /> )} - - { - setDeleteOpen(true); - }} - disabled={actualInfo.is_delete_marker} - size="large" - > - - - } /> diff --git a/portal-ui/src/screens/Console/Groups/Groups.tsx b/portal-ui/src/screens/Console/Groups/Groups.tsx index 89deff2fc..6026ec790 100644 --- a/portal-ui/src/screens/Console/Groups/Groups.tsx +++ b/portal-ui/src/screens/Console/Groups/Groups.tsx @@ -20,7 +20,7 @@ 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 { Button, LinearProgress } from "@mui/material"; +import { LinearProgress } from "@mui/material"; import { AddIcon, GroupsIcon, UsersIcon } from "../../../icons"; import { setErrorSnackMessage } from "../../../actions"; import { GroupsList } from "./types"; @@ -49,6 +49,7 @@ import SecureComponent, { } from "../../../common/SecureComponent/SecureComponent"; import withSuspense from "../Common/Components/withSuspense"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const DeleteGroup = withSuspense(React.lazy(() => import("./DeleteGroup"))); const AddGroup = withSuspense(React.lazy(() => import("../Groups/AddGroup"))); @@ -221,17 +222,17 @@ const Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => { matchAll errorProps={{ disabled: true }} > - + />
{loading && } diff --git a/portal-ui/src/screens/Console/Groups/GroupsDetails.tsx b/portal-ui/src/screens/Console/Groups/GroupsDetails.tsx index 57202cdd1..4f5681138 100644 --- a/portal-ui/src/screens/Console/Groups/GroupsDetails.tsx +++ b/portal-ui/src/screens/Console/Groups/GroupsDetails.tsx @@ -15,9 +15,14 @@ import { } from "../../../actions"; import { connect } from "react-redux"; import withStyles from "@mui/styles/withStyles"; -import { Button, Grid, Tooltip } from "@mui/material"; +import { Grid } from "@mui/material"; import ScreenTitle from "../Common/ScreenTitle/ScreenTitle"; -import { IAMPoliciesIcon, TrashIcon, GroupsIcon } from "../../../icons"; +import { + IAMPoliciesIcon, + TrashIcon, + GroupsIcon, + AddIcon, +} from "../../../icons"; import TableWrapper from "../Common/TableWrapper/TableWrapper"; import history from "../../../history"; import api from "../../../common/api"; @@ -30,7 +35,6 @@ import FormSwitchWrapper from "../Common/FormComponents/FormSwitchWrapper/FormSw import PageLayout from "../Common/Layout/PageLayout"; import BackLink from "../../../common/BackLink"; import PanelTitle from "../Common/PanelTitle/PanelTitle"; -import BoxIconButton from "../Common/BoxIconButton/BoxIconButton"; import SearchBox from "../Common/SearchBox"; import { CONSOLE_UI_RESOURCE, @@ -40,6 +44,7 @@ import SecureComponent, { hasPermission, } from "../../../common/SecureComponent/SecureComponent"; import GroupDetailsHeader from "./GroupDetailsHeader"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -191,17 +196,16 @@ const GroupsDetails = ({ classes }: IGroupDetailsProps) => { scopes={[IAM_SCOPES.ADMIN_ADD_USER_TO_GROUP]} errorProps={{ disabled: true }} > - + /> @@ -236,17 +240,17 @@ const GroupsDetails = ({ classes }: IGroupDetailsProps) => {
Policies - + />
{ scopes={[IAM_SCOPES.ADMIN_REMOVE_USER_FROM_GROUP]} errorProps={{ disabled: true }} > - -
- { - setDeleteOpen(true); - }} - size="large" - > - - -
-
+
+ } + onClick={() => { + setDeleteOpen(true); + }} + /> +
} diff --git a/portal-ui/src/screens/Console/NotificationEndpoints/ListNotificationEndpoints.tsx b/portal-ui/src/screens/Console/NotificationEndpoints/ListNotificationEndpoints.tsx index a532e0cbc..073c79f43 100644 --- a/portal-ui/src/screens/Console/NotificationEndpoints/ListNotificationEndpoints.tsx +++ b/portal-ui/src/screens/Console/NotificationEndpoints/ListNotificationEndpoints.tsx @@ -23,7 +23,6 @@ import { LinearProgress } from "@mui/material"; import { red } from "@mui/material/colors"; import Grid from "@mui/material/Grid"; import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord"; -import Button from "@mui/material/Button"; import { NotificationEndpointItem, NotificationEndpointsList, @@ -45,10 +44,10 @@ import api from "../../../common/api"; import RefreshIcon from "../../../icons/RefreshIcon"; import history from "../../../history"; import HelpBox from "../../../common/HelpBox"; -import BoxIconButton from "../Common/BoxIconButton/BoxIconButton"; import AButton from "../Common/AButton/AButton"; import PageLayout from "../Common/Layout/PageLayout"; import SearchBox from "../Common/SearchBox"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface IListNotificationEndpoints { classes: any; @@ -68,6 +67,7 @@ const styles = (theme: Theme) => }, rightActionItems: { display: "flex", + alignItems: "center", "& button": { whiteSpace: "nowrap", }, @@ -148,26 +148,27 @@ const ListNotificationEndpoints = ({ overrideClass={classes.searchField} />
- } onClick={() => { setIsLoading(true); }} - size="large" - > - - - + />
{isLoading && } diff --git a/portal-ui/src/screens/Console/Policies/ListPolicies.tsx b/portal-ui/src/screens/Console/Policies/ListPolicies.tsx index 2952fca71..8fa276bb7 100644 --- a/portal-ui/src/screens/Console/Policies/ListPolicies.tsx +++ b/portal-ui/src/screens/Console/Policies/ListPolicies.tsx @@ -20,7 +20,6 @@ import get from "lodash/get"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button } from "@mui/material"; import Grid from "@mui/material/Grid"; import { Policy, PolicyList } from "./types"; import { AddIcon, IAMPoliciesIcon } from "../../../icons"; @@ -49,6 +48,7 @@ import SecureComponent, { import SearchBox from "../Common/SearchBox"; import withSuspense from "../Common/Components/withSuspense"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const AddPolicy = withSuspense(React.lazy(() => import("./AddPolicy"))); const DeletePolicy = withSuspense(React.lazy(() => import("./DeletePolicy"))); @@ -208,17 +208,17 @@ const ListPolicies = ({ classes, setErrorSnackMessage }: IPoliciesProps) => { resource={CONSOLE_UI_RESOURCE} errorProps={{ disabled: true }} > - + /> diff --git a/portal-ui/src/screens/Console/Policies/PolicyDetails.tsx b/portal-ui/src/screens/Console/Policies/PolicyDetails.tsx index 2e496b0c8..4c175351a 100644 --- a/portal-ui/src/screens/Console/Policies/PolicyDetails.tsx +++ b/portal-ui/src/screens/Console/Policies/PolicyDetails.tsx @@ -46,7 +46,6 @@ import TrashIcon from "../../../icons/TrashIcon"; import PageLayout from "../Common/Layout/PageLayout"; import VerticalTabs from "../Common/VerticalTabs/VerticalTabs"; import BackLink from "../../../common/BackLink"; -import BoxIconButton from "../Common/BoxIconButton/BoxIconButton"; import { CONSOLE_UI_RESOURCE, IAM_SCOPES, @@ -57,6 +56,7 @@ import SecureComponent, { import withSuspense from "../Common/Components/withSuspense"; import { AppState } from "../../../store"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const DeletePolicy = withSuspense(React.lazy(() => import("./DeletePolicy"))); @@ -355,29 +355,28 @@ const PolicyDetails = ({ resource={CONSOLE_UI_RESOURCE} errorProps={{ disabled: true }} > - } onClick={deletePolicy} - > - - + /> - } onClick={() => { setLoadingUsers(true); setLoadingGroups(true); setLoadingPolicy(true); }} - size="large" - > - - + /> } /> diff --git a/portal-ui/src/screens/Console/Tenants/ListTenants/ListTenants.tsx b/portal-ui/src/screens/Console/Tenants/ListTenants/ListTenants.tsx index bb1095562..9d5a245db 100644 --- a/portal-ui/src/screens/Console/Tenants/ListTenants/ListTenants.tsx +++ b/portal-ui/src/screens/Console/Tenants/ListTenants/ListTenants.tsx @@ -17,9 +17,7 @@ import React, { Fragment, useEffect, useState } from "react"; import { connect } from "react-redux"; import Grid from "@mui/material/Grid"; -import TextField from "@mui/material/TextField"; -import InputAdornment from "@mui/material/InputAdornment"; -import { Box, Button, LinearProgress } from "@mui/material"; +import { LinearProgress } from "@mui/material"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; @@ -37,15 +35,16 @@ import { ErrorResponseHandler } from "../../../../common/types"; import api from "../../../../common/api"; import history from "../../../../history"; import RefreshIcon from "../../../../icons/RefreshIcon"; -import SearchIcon from "../../../../icons/SearchIcon"; import PageHeader from "../../Common/PageHeader/PageHeader"; import TenantListItem from "./TenantListItem"; import HelpBox from "../../../../common/HelpBox"; -import BoxIconButton from "../../Common/BoxIconButton/BoxIconButton"; import AButton from "../../Common/AButton/AButton"; import withSuspense from "../../Common/Components/withSuspense"; import VirtualizedList from "../../Common/VirtualizedList/VirtualizedList"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; +import SearchBox from "../../Common/SearchBox"; +import PageLayout from "../../Common/Layout/PageLayout"; const CredentialsPrompt = withSuspense( React.lazy(() => import("../../Common/CredentialsPrompt/CredentialsPrompt")) @@ -99,6 +98,11 @@ const styles = (theme: Theme) => marginTop: 25, height: "calc(100vh - 195px)", }, + searchField: { + ...searchField.searchField, + marginRight: "auto", + maxWidth: 380, + }, }); const ListTenants = ({ classes, setErrorSnackMessage }: ITenantsList) => { @@ -188,141 +192,91 @@ const ListTenants = ({ classes, setErrorSnackMessage }: ITenantsList) => { - - - -
- Filter Tenants: -
-
-
- - { - setFilterTenants(val.target.value); - }} - inputProps={{ - disableUnderline: true, - endAdornment: ( - - - - ), - }} - /> - - - { - setFilterTenants(val.target.value); - }} - inputProps={{ - disableUnderline: true, - endAdornment: ( - - - - ), - }} - /> - + + { + setFilterTenants(val); + }} + overrideClass={classes.searchField} + /> - - - - - + { + setIsLoading(true); + }} + icon={} + color="primary" + variant={"outlined"} + /> + { + history.push("/tenants/add"); + }} + icon={} + color="primary" + variant={"contained"} + /> +
} /> - - - - - { - setIsLoading(true); - }} - size="large" - > - - - - - - {isLoading && } - {!isLoading && ( - - {filteredRecords.length !== 0 && ( - - )} - {filteredRecords.length === 0 && ( - - - } - title={"Tenants"} - help={ - - Tenant is the logical structure to represent a - MinIO deployment. A tenant can have different size - and configurations from other tenants, even a - different storage class. -
-
- To get started,  - { - history.push("/tenants/add"); - }} - > - Create a Tenant. - -
- } - /> -
-
- )} -
+ + + {isLoading && } + {!isLoading && ( + + {filteredRecords.length !== 0 && ( + )} - -
+ {filteredRecords.length === 0 && ( + + + } + title={"Tenants"} + help={ + + Tenant is the logical structure to represent a MinIO + deployment. A tenant can have different size and + configurations from other tenants, even a different + storage class. +
+
+ To get started,  + { + history.push("/tenants/add"); + }} + > + Create a Tenant. + +
+ } + /> +
+
+ )} + + )}
-
+ ); }; diff --git a/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx b/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx index e032d7931..1b3395ad5 100644 --- a/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx +++ b/portal-ui/src/screens/Console/Tenants/ListTenants/TenantListItem.tsx @@ -15,12 +15,11 @@ // along with this program. If not, see . import React, { Fragment } from "react"; -import { Button } from "@mui/material"; import { ITenant, ValueUnit } from "./types"; import { connect } from "react-redux"; import { setErrorSnackMessage } from "../../../../actions"; import Grid from "@mui/material/Grid"; -import { ArrowRightIcon, CircleIcon } from "../../../../icons"; +import { ArrowRightIcon, CircleIcon, SettingsIcon } from "../../../../icons"; import history from "../../../../history"; import TenantsIcon from "../../../../icons/TenantsIcon"; import { Theme } from "@mui/material/styles"; @@ -29,6 +28,7 @@ import withStyles from "@mui/styles/withStyles"; import { niceBytes } from "../../../../common/utils"; import UsageBarWrapper from "../../Common/UsageBarWrapper/UsageBarWrapper"; import { tenantIsOnline } from "./utils"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -176,31 +176,32 @@ const TenantListItem = ({ tenant, classes }: ITenantListItem) => {
- - + icon={} + color="primary" + variant={"contained"} + />
diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/PoolsSummary.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/PoolsSummary.tsx index 9db029b77..6ddafb065 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/PoolsSummary.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/PoolsSummary.tsx @@ -25,7 +25,7 @@ import { tableStyles, tenantDetailsStyles, } from "../../Common/FormComponents/common/styleLibrary"; -import { Button, TextField } from "@mui/material"; +import { TextField } from "@mui/material"; import Grid from "@mui/material/Grid"; import { AddIcon } from "../../../../icons"; import { IPool, ITenant } from "../ListTenants/types"; @@ -36,6 +36,7 @@ import InputAdornment from "@mui/material/InputAdornment"; import { AppState } from "../../../../store"; import { setTenantDetailsLoad } from "../actions"; import SearchIcon from "../../../../icons/SearchIcon"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface IPoolsSummary { classes: any; @@ -117,16 +118,17 @@ const PoolsSummary = ({ }} variant="standard" /> - + icon={} + color="primary" + variant={"contained"} + />

diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx index 8b78ecd98..5a6af631c 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx @@ -20,13 +20,14 @@ 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 { Button, Typography } from "@mui/material"; +import { Typography } from "@mui/material"; import { niceBytes } from "../../../../common/utils"; import Moment from "react-moment"; import { Link } from "react-router-dom"; import Paper from "@mui/material/Paper"; import { ITenant } from "../ListTenants/types"; import { LicenseInfo } from "../../License/types"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface ISubnetLicenseTenant { classes: any; @@ -229,25 +230,24 @@ const SubnetLicenseTenant = ({ }} className={classes.noUnderLine} > - + variant={"contained"} + /> )} {licenseInfo && tenant && ( - + color="primary" + variant={"contained"} + /> )}
) diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantLogging.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantLogging.tsx index c2a2b98b1..e1d298bf5 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantLogging.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantLogging.tsx @@ -26,7 +26,7 @@ import { tenantDetailsStyles, } from "../../Common/FormComponents/common/styleLibrary"; import Grid from "@mui/material/Grid"; -import { Button, CircularProgress, DialogContentText } from "@mui/material"; +import { CircularProgress, DialogContentText } from "@mui/material"; import Paper from "@mui/material/Paper"; import api from "../../../../common/api"; import { ITenant } from "../ListTenants/types"; @@ -39,6 +39,7 @@ import KeyPairView from "./KeyPairView"; import { ITenantLogsStruct } from "../ListTenants/types"; import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog"; import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface ITenantLogs { classes: any; @@ -220,16 +221,16 @@ const TenantLogging = ({ indicatorLabels={["Enabled", "Disabled"]} /> {!disabled && !loadingTenantLogs && ( - + icon={} + color="primary" + variant={"contained"} + /> )} {!disabled && !loadingTenantLogs && ( diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantMonitoring.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantMonitoring.tsx index b90c3d19f..925b98bb5 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantMonitoring.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantMonitoring.tsx @@ -26,7 +26,7 @@ import { searchField, tenantDetailsStyles, } from "../../Common/FormComponents/common/styleLibrary"; -import { Button, CircularProgress, DialogContentText } from "@mui/material"; +import { CircularProgress, DialogContentText } from "@mui/material"; import Paper from "@mui/material/Paper"; import { ITenant } from "../ListTenants/types"; import { setErrorSnackMessage } from "../../../../actions"; @@ -39,6 +39,7 @@ import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/For import { ITenantMonitoringStruct } from "../ListTenants/types"; import KeyPairView from "./KeyPairView"; import ConfirmDialog from "../../Common/ModalWrapper/ConfirmDialog"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface ITenantMonitoring { classes: any; @@ -198,16 +199,16 @@ const TenantMonitoring = ({ description="" /> {prometheusMonitoringEnabled && ( - + icon={} + color="primary" + variant={"contained"} + /> )} {prometheusMonitoringEnabled && monitoringInfo !== undefined && ( diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx index 4b5871fda..64638a117 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/TenantSummary.tsx @@ -24,7 +24,7 @@ import { containerForHeader, tenantDetailsStyles, } from "../../Common/FormComponents/common/styleLibrary"; -import { Box, Button, Grid, Stack } from "@mui/material"; +import { Box, Grid, Stack } from "@mui/material"; import Paper from "@mui/material/Paper"; import { ITenant } from "../ListTenants/types"; import UpdateTenantModal from "./UpdateTenantModal"; @@ -37,6 +37,8 @@ import SummaryUsageBar from "../../Common/UsageBarWrapper/SummaryUsageBar"; import LabelValuePair from "../../Common/UsageBarWrapper/LabelValuePair"; import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper"; import StackRow from "../../Common/UsageBarWrapper/StackRow"; +import { SettingsIcon } from "../../../../icons"; +import RBIconButton from "../../Buckets/BucketDetails/SummaryItems/RBIconButton"; interface ITenantsSummary { classes: any; @@ -236,20 +238,19 @@ const TenantSummary = ({

Details

- + icon={} + color="primary" + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Users/ListUsers.tsx b/portal-ui/src/screens/Console/Users/ListUsers.tsx index 30d3b1d6e..22d0c0bcd 100644 --- a/portal-ui/src/screens/Console/Users/ListUsers.tsx +++ b/portal-ui/src/screens/Console/Users/ListUsers.tsx @@ -20,11 +20,10 @@ import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; import api from "../../../common/api"; -import { Button, Grid, LinearProgress } from "@mui/material"; -import GroupIcon from "@mui/icons-material/Group"; +import { Grid, LinearProgress } from "@mui/material"; import { User, UsersList } from "./types"; import { usersSort } from "../../../utils/sortFunctions"; -import { AddIcon, UsersIcon } from "../../../icons"; +import { GroupsIcon, AddIcon, UsersIcon } from "../../../icons"; import { actionsTray, containerForHeader, @@ -50,6 +49,7 @@ import { import SecureComponent, { hasPermission, } from "../../../common/SecureComponent/SecureComponent"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const AddUser = withSuspense(React.lazy(() => import("./AddUser"))); const SetPolicy = withSuspense( @@ -249,19 +249,19 @@ const ListUsers = ({ classes, setErrorSnackMessage, history }: IUsersProps) => { resource={CONSOLE_UI_RESOURCE} errorProps={{ disabled: true }} > - + variant={"outlined"} + /> { matchAll errorProps={{ disabled: true }} > - + variant={"contained"} + /> diff --git a/portal-ui/src/screens/Console/Users/UserDetails.tsx b/portal-ui/src/screens/Console/Users/UserDetails.tsx index 9016e89ce..db87ccd75 100644 --- a/portal-ui/src/screens/Console/Users/UserDetails.tsx +++ b/portal-ui/src/screens/Console/Users/UserDetails.tsx @@ -21,11 +21,11 @@ import { Link } from "react-router-dom"; import { Theme } from "@mui/material/styles"; import createStyles from "@mui/styles/createStyles"; import withStyles from "@mui/styles/withStyles"; -import { Button, Grid } from "@mui/material"; +import { Grid } from "@mui/material"; import { AddIcon, IAMPoliciesIcon, - LockIcon, + PasswordKeyIcon, TrashIcon, UsersIcon, } from "../../../icons"; @@ -51,12 +51,12 @@ import UserServiceAccountsPanel from "./UserServiceAccountsPanel"; import ChangeUserPasswordModal from "../Account/ChangeUserPasswordModal"; import DeleteUserString from "./DeleteUserString"; import ScreenTitle from "../Common/ScreenTitle/ScreenTitle"; -import BoxIconButton from "../Common/BoxIconButton/BoxIconButton"; import PanelTitle from "../Common/PanelTitle/PanelTitle"; import PageLayout from "../Common/Layout/PageLayout"; import VerticalTabs from "../Common/VerticalTabs/VerticalTabs"; import FormSwitchWrapper from "../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper"; import BackLink from "../../../common/BackLink"; +import RBIconButton from "../Buckets/BucketDetails/SummaryItems/RBIconButton"; const styles = (theme: Theme) => createStyles({ @@ -261,24 +261,23 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => { switchOnly /> - - - + icon={} + color="secondary" + variant={"outlined"} + /> - - - + icon={} + color="primary" + variant={"outlined"} + /> } /> @@ -294,17 +293,16 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => {
Groups - + icon={} + color="primary" + variant={"contained"} + />
{
Policies - + icon={} + color="primary" + variant={"contained"} + />
Service Accounts - + />
{ if (field.pattern && field.customPatternMessage) { const rgx = new RegExp(field.pattern, "g"); - console.log(field); if ( field.value && field.value.trim() !== "" &&