diff --git a/portal-ui/src/icons/SuccessIcon.tsx b/portal-ui/src/icons/SuccessIcon.tsx new file mode 100644 index 000000000..192446068 --- /dev/null +++ b/portal-ui/src/icons/SuccessIcon.tsx @@ -0,0 +1,41 @@ +// This file is part of MinIO Console Server +// Copyright (c) 2022 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, { SVGProps } from "react"; + +const SuccessIcon = (props: SVGProps) => { + return ( + + + + ); +}; + +export default SuccessIcon; diff --git a/portal-ui/src/icons/index.ts b/portal-ui/src/icons/index.ts index 36db9276f..4dafbff50 100644 --- a/portal-ui/src/icons/index.ts +++ b/portal-ui/src/icons/index.ts @@ -183,3 +183,4 @@ export { default as BackIcon } from "./BackIcon"; export { default as DeleteNonCurrentIcon } from "./DeleteNonCurrentIcon"; export { default as FilterIcon } from "./FilterIcon"; export { default as EditTenantIcon } from "./EditTenantIcon"; +export { default as SuccessIcon } from "./SuccessIcon"; diff --git a/portal-ui/src/screens/Console/Common/IconsScreen.tsx b/portal-ui/src/screens/Console/Common/IconsScreen.tsx index 7d2534805..774cbd891 100644 --- a/portal-ui/src/screens/Console/Common/IconsScreen.tsx +++ b/portal-ui/src/screens/Console/Common/IconsScreen.tsx @@ -1105,6 +1105,11 @@ const IconsScreen = ({ classes }: IIconsScreenSimple) => {
FilterIcon + + +
+ SuccessIcon +

Menu Icons

{ return ( { ); }; +const TimeStatItem = ({ + icon, + label, + value, +}: { + icon: any; + label: any; + value: string; +}) => { + return ( + + {icon} + + {label} + + {value} + {value !== "n/a" ? : null} + + ); +}; + interface IDashboardProps { usage: Usage | null; } @@ -82,6 +151,8 @@ const BasicDashboard = ({ usage }: IDashboardProps) => { const usageValue = usage && usage.usage ? usage.usage.toString() : "0"; const usageToRepresent = prettyUsage(usageValue); + const { lastScan = "n/a", lastHeal = "n/a", upTime = "n/a" } = usage || {}; + const serverList = getServersList(usage || null); let allDrivesArray: IDriveInfo[] = []; @@ -180,7 +251,6 @@ const BasicDashboard = ({ usage }: IDashboardProps) => { { @@ -202,6 +274,26 @@ const BasicDashboard = ({ usage }: IDashboardProps) => { label={"Buckets"} icon={} counterValue={usage ? representationNumber(usage.buckets) : 0} + actions={ + + {}} + text={"Browse"} + icon={} + color={"primary"} + variant={"outlined"} + /> + + } /> @@ -211,6 +303,7 @@ const BasicDashboard = ({ usage }: IDashboardProps) => { counterValue={usage ? representationNumber(usage.objects) : 0} /> + { icon={} /> + + + + + + } + label={ + + + Time since last + {" "} + Heal Activity + + } + value={lastHeal} + /> + } + label={ + + + Time since last + {" "} + Scan Activity + + } + value={lastScan} + /> + } + label={"Uptime"} + value={upTime} + /> + + - - - { return ( {icon} + + {actions} diff --git a/portal-ui/src/screens/Console/Dashboard/BasicDashboard/ReportedUsage.tsx b/portal-ui/src/screens/Console/Dashboard/BasicDashboard/ReportedUsage.tsx index aaeef0e62..e2de38b89 100644 --- a/portal-ui/src/screens/Console/Dashboard/BasicDashboard/ReportedUsage.tsx +++ b/portal-ui/src/screens/Console/Dashboard/BasicDashboard/ReportedUsage.tsx @@ -14,9 +14,9 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -import { ReportedUsageIcon } from "../../../../icons"; import { Box, Tooltip } from "@mui/material"; import React from "react"; +import { Cell, Pie, PieChart } from "recharts"; const ReportedUsage = ({ usageValue, @@ -27,13 +27,22 @@ const ReportedUsage = ({ total: number | string; unit: string; }) => { + const plotValues = [ + { value: total, color: "#D6D6D6", label: "Free Space" }, + { + value: usageValue, + color: "#073052", + label: "Used Space", + }, + ]; + return ( -
- Reported Usage -
+ +
+ Reported Usage +
- - - - + + + + +
+ + + +
+
+ + + {plotValues.map((entry, index) => ( + + ))} + + +
+
+
+
); }; diff --git a/portal-ui/src/screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx b/portal-ui/src/screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx index fcf61a17c..305dfa74b 100644 --- a/portal-ui/src/screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx +++ b/portal-ui/src/screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx @@ -38,8 +38,7 @@ export const StatusCountCard = ({ sx={{ fontFamily: "Lato,sans-serif", color: "#07193E", - maxWidth: "260px", - minHeight: "143px", + maxWidth: "321px", display: "flex", marginLeft: "auto", marginRight: "auto", @@ -61,7 +60,6 @@ export const StatusCountCard = ({ flex: 1, display: "flex", flexFlow: "column", - marginTop: "22px", }} >