+
+ {loading && }
+ {!loading && (
- {zoomActivated && (
-
- Series
-
-
-
- )}
- {biggerThanMd && (
-
- {linearConfiguration.map((section, index) => {
- return (
-
-
+
+
+ {areaWidget && (
+
+
+
+
+
+
+
+
+ )}
+
+
+ xAxisFormatter(value, dspLongDate, true)
+ }
+ interval={intervalCount}
+ tick={{
+ fontSize: "68%",
+ fontWeight: "normal",
+ color: "#404143",
+ }}
+ tickCount={10}
+ stroke={"#082045"}
+ />
+ yAxisFormatter(value)}
+ tick={{
+ fontSize: "68%",
+ fontWeight: "normal",
+ color: "#404143",
+ }}
+ stroke={"#082045"}
+ />
+ {linearConfiguration.map((section, index) => {
+ return (
+ : false}
/>
-
- {section.keyLabel}
-
-
- );
- })}
-
+ );
+ })}
+
+ }
+ wrapperStyle={{
+ zIndex: 5000,
+ }}
+ />
+
+
+
+ {!areaWidget && (
+
+ {zoomActivated && (
+
+ Series
+
+
+
+ )}
+
+
+ {linearConfiguration.map((section, index) => {
+ return (
+
+
+
+ {section.keyLabel}
+
+
+ );
+ })}
+
+
)}
)}
-
- )}
+
+
-
+
);
};
-export default withStyles(styles)(LinearGraphWidget);
+export default LinearGraphWidget;
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/MergedWidgetsRenderer.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/MergedWidgetsRenderer.tsx
index 0ad4d9955..32d464c1c 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/MergedWidgetsRenderer.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/MergedWidgetsRenderer.tsx
@@ -16,8 +16,8 @@
import React from "react";
import { componentToUse } from "../widgetUtils";
-import MergedWidgets from "../MergedWidgets";
import { IDashboardPanel } from "../types";
+import MergedWidgets from "../MergedWidgets";
import EntityStateItemRenderer from "./EntityStateItemRenderer";
import NetworkItem from "./NetworkItem";
import DashboardItemBox from "../../DashboardItemBox";
@@ -46,7 +46,6 @@ const MergedWidgetsRenderer = ({
info={info}
timeStart={timeStart}
timeEnd={timeEnd}
- loading={loading}
apiPrefix={apiPrefix}
/>
@@ -61,7 +60,6 @@ const MergedWidgetsRenderer = ({
timeEnd={timeEnd}
timeStart={timeStart}
value={info}
- propLoading={loading}
/>
);
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkGetItem.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkGetItem.tsx
index 90606a067..83e961574 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkGetItem.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkGetItem.tsx
@@ -15,8 +15,35 @@
// along with this program. If not, see
.
import React from "react";
-import { Box } from "@mui/material";
-import { Loader, NetworkGetIcon } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Loader, NetworkGetIcon, Box } from "mds";
+
+const NetworkGetBase = styled.div(({ theme }) => ({
+ "& .putLabel": {
+ display: "flex",
+ gap: 10,
+ alignItems: "center",
+ marginTop: "10px",
+
+ "& .min-icon": {
+ height: 15,
+ width: 15,
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ },
+
+ "& .getText": {
+ fontSize: "18px",
+ color: get(theme, "mutedText", "#87888d"),
+ fontWeight: "bold",
+ },
+ "& .valueText": {
+ fontSize: 50,
+ fontFamily: "Inter",
+ fontWeight: 600,
+ },
+ },
+}));
const NetworkGetItem = ({
value,
@@ -28,44 +55,17 @@ const NetworkGetItem = ({
id?: number;
}) => {
return (
-
-
-
- GET
-
+
+
+ GET
{loading ? (
) : (
)}
-
- {value}
-
-
+ {value}
+
);
};
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkItem.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkItem.tsx
index 5d494ee61..2c4dfc795 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkItem.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkItem.tsx
@@ -15,24 +15,45 @@
// along with this program. If not, see .
import React from "react";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, breakPoints, SpeedtestIcon } from "mds";
import { IDashboardPanel } from "../types";
-import { Box } from "@mui/material";
-import { SpeedtestIcon } from "mds";
import SingleValueWidget from "./SingleValueWidget";
import NetworkGetItem from "./NetworkGetItem";
import NetworkPutItem from "./NetworkPutItem";
+const NetworkItemBase = styled.div(({ theme }) => ({
+ flex: 1,
+ display: "flex",
+ alignItems: "center",
+ flexFlow: "row",
+ gap: "15px",
+ "& .unitText": {
+ fontSize: "14px",
+ color: get(theme, "mutedText", "#87888d"),
+ marginLeft: "5px",
+ },
+ "& .unit": {
+ color: get(theme, "mutedText", "#87888d"),
+ fontSize: "18px",
+ marginLeft: "12px",
+ marginTop: "10px",
+ },
+ [`@media (max-width: ${breakPoints.sm}px)`]: {
+ flexFlow: "column",
+ },
+}));
+
const NetworkItem = ({
value,
timeStart,
timeEnd,
- propLoading,
apiPrefix,
}: {
value: IDashboardPanel;
timeStart: any;
timeEnd: any;
- propLoading: boolean;
apiPrefix: string;
}) => {
const { mergedPanels = [] } = value;
@@ -44,7 +65,6 @@ const NetworkItem = ({
panelItem={leftPanel}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={propLoading}
apiPrefix={apiPrefix}
renderFn={({ valueToRender, loading, title, id }) => {
return (
@@ -64,7 +84,6 @@ const NetworkItem = ({
panelItem={rightPanel}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={propLoading}
apiPrefix={apiPrefix}
renderFn={({ valueToRender, loading, title, id }) => {
return (
@@ -80,23 +99,7 @@ const NetworkItem = ({
);
return (
-
+
@@ -126,7 +129,6 @@ const NetworkItem = ({
left: "50%",
transform: "translate(-50%, -50%)",
fontWeight: "bold",
- color: "#000",
fontSize: 12,
}}
>
@@ -137,9 +139,9 @@ const NetworkItem = ({
sx={{
display: "flex",
alignItems: "center",
- marginLeft: {
- sm: "auto",
- xs: "",
+ marginLeft: "auto",
+ [`@media (max-width: ${breakPoints.sm}px)`]: {
+ marginLeft: "0",
},
}}
>
@@ -148,12 +150,6 @@ const NetworkItem = ({
display: "flex",
alignItems: "center",
"& .value": { fontSize: "50px", fontFamily: "Inter" },
- "& .unit": {
- color: "#5E5E5E",
- fontSize: "18px",
- marginLeft: "12px",
- marginTop: "10px",
- },
}}
>
{rightCmp}
@@ -173,7 +169,7 @@ const NetworkItem = ({
>
-
+
);
};
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkPutItem.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkPutItem.tsx
index b90115ab7..3cfd5e983 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkPutItem.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NetworkPutItem.tsx
@@ -15,8 +15,35 @@
// along with this program. If not, see .
import React from "react";
-import { Box } from "@mui/material";
-import { Loader, NetworkPutIcon } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, Loader, NetworkPutIcon } from "mds";
+
+const NetworkPutBase = styled.div(({ theme }) => ({
+ "& .putLabel": {
+ display: "flex",
+ gap: 10,
+ alignItems: "center",
+ marginTop: "10px",
+
+ "& .min-icon": {
+ height: 15,
+ width: 15,
+ fill: get(theme, "signalColors.info", "#2781B0"),
+ },
+
+ "& .putText": {
+ fontSize: "18px",
+ color: get(theme, "mutedText", "#87888d"),
+ fontWeight: "bold",
+ },
+ "& .valueText": {
+ fontSize: 50,
+ fontFamily: "Inter",
+ fontWeight: 600,
+ },
+ },
+}));
const NetworkPutItem = ({
value,
@@ -28,46 +55,17 @@ const NetworkPutItem = ({
id?: number;
}) => {
return (
-
-
-
- PUT
-
+
+
+ PUT
{loading ? (
) : (
)}
-
- {value}
-
-
+ {value}
+
);
};
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NumericStatCard.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NumericStatCard.tsx
index 46895842f..eed4dcf20 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NumericStatCard.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/NumericStatCard.tsx
@@ -15,8 +15,21 @@
// along with this program. If not, see .
import React from "react";
-import { Box, Tooltip } from "@mui/material";
-import { Loader } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, breakPoints, Loader, Tooltip } from "mds";
+
+const StatCardMain = styled.div(({ theme }) => ({
+ fontFamily: "Inter,sans-serif",
+ color: get(theme, "signalColors.main", "#07193E"),
+ maxWidth: "300px",
+ display: "flex",
+ marginLeft: "auto",
+ marginRight: "auto",
+ cursor: "default",
+ position: "relative",
+ width: "100%",
+}));
const NumericStatCard = ({
value,
@@ -36,9 +49,9 @@ const NumericStatCard = ({
flex: 1,
display: "flex",
width: "100%",
- padding: {
- sm: "0 8px 0 8px",
- xs: "0 10px 0 10px",
+ padding: "0 8px 0 8px",
+ [`@media (max-width: ${breakPoints.sm}px)`]: {
+ padding: "0 10px 0 10px",
},
}}
>
@@ -61,26 +74,28 @@ const NumericStatCard = ({
{label}
-
+
@@ -113,23 +128,7 @@ const NumericStatCard = ({
);
};
- return (
-
- {getContent()}
-
- );
+ return {getContent()};
};
export default NumericStatCard;
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx
index dc3e116ed..01e90e3dc 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx
@@ -15,68 +15,57 @@
// along with this program. If not, see .
import React, { useEffect, useState } from "react";
-
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
+import get from "lodash/get";
+import styled from "styled-components";
+import { Box, Loader } from "mds";
import { Cell, Pie, PieChart, ResponsiveContainer } from "recharts";
+import { useSelector } from "react-redux";
+import api from "../../../../../common/api";
import { IPieChartConfiguration } from "./types";
import { widgetCommon } from "../../../Common/FormComponents/common/styleLibrary";
-
import { IDashboardPanel } from "../types";
import { splitSizeMetric, widgetDetailsToPanel } from "../utils";
import { ErrorResponseHandler } from "../../../../../common/types";
-import get from "lodash/get";
-import api from "../../../../../common/api";
-import { Loader } from "mds";
import { setErrorSnackMessage } from "../../../../../systemSlice";
import { AppState, useAppDispatch } from "../../../../../store";
-import { useSelector } from "react-redux";
interface IPieChartWidget {
- classes: any;
title: string;
panelItem: IDashboardPanel;
timeStart: any;
timeEnd: any;
- propLoading: boolean;
-
apiPrefix: string;
}
-const styles = (theme: Theme) =>
- createStyles({
- ...widgetCommon,
- loadingAlign: {
- width: "100%",
- paddingTop: "15px",
- textAlign: "center",
- margin: "auto",
+const PieChartMain = styled.div(({ theme }) => ({
+ ...widgetCommon(theme),
+ "& .loadingAlign": {
+ width: "100%",
+ paddingTop: "15px",
+ textAlign: "center",
+ margin: "auto",
+ },
+ "& .pieChartLabel": {
+ fontSize: 60,
+ color: get(theme, "signalColors.main", "#07193E"),
+ fontWeight: "bold",
+ width: "100%",
+ "& .unitText": {
+ color: get(theme, "mutedText", "#87888d"),
+ fontSize: 12,
},
- pieChartLabel: {
- fontSize: 60,
- color: "#07193E",
- fontWeight: "bold",
- width: "100%",
- "& .unitText": {
- color: "#767676",
- fontSize: 12,
- },
- },
- chartContainer: {
- width: "100%",
- height: 140,
- },
- });
+ },
+ "& .chartContainer": {
+ width: "100%",
+ height: 140,
+ },
+}));
const PieChartWidget = ({
- classes,
title,
panelItem,
timeStart,
timeEnd,
- propLoading,
-
apiPrefix,
}: IPieChartWidget) => {
const dispatch = useAppDispatch();
@@ -137,110 +126,112 @@ const PieChartWidget = ({
const outerColors = get(pieChartConfiguration, "outerChart.colorList", []);
return (
-
-
{title}
- {loading && (
-
-
-
- )}
- {!loading && (
-
-
- {middleLabel && splitSizeMetric(middleLabel)}
-
-
-
-
- {dataOuter && (
-
- {dataOuter.map((entry, index) => (
- |
- ))}
-
- )}
- {dataInner && (
-
- {dataInner.map((entry, index) => {
- return (
+
+
+ {title}
+ {loading && (
+
+
+
+ )}
+ {!loading && (
+
+
+ {middleLabel && splitSizeMetric(middleLabel)}
+
+
+
+
+ {dataOuter && (
+
+ {dataOuter.map((entry, index) => (
|
- );
- })}
-
- )}
-
-
-
-
- )}
-
+ ))}
+
+ )}
+ {dataInner && (
+
+ {dataInner.map((entry, index) => {
+ return (
+ |
+ );
+ })}
+
+ )}
+
+
+
+
+ )}
+
+
);
};
-export default withStyles(styles)(PieChartWidget);
+export default PieChartWidget;
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/ScanActivityRenderer.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/ScanActivityRenderer.tsx
index ad3417ec0..ae7d94ecf 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/ScanActivityRenderer.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/ScanActivityRenderer.tsx
@@ -15,7 +15,7 @@
// along with this program. If not, see
.
import React from "react";
-import { Box } from "@mui/material";
+import { Box, breakPoints } from "mds";
import TimeStatItem from "../../TimeStatItem";
import { SimpleWidgetRenderProps } from "./HealActivityRenderer";
@@ -44,9 +44,9 @@ const ScanActivityRenderer = ({
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SimpleWidget.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SimpleWidget.tsx
index bb790321b..6d76f31b6 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SimpleWidget.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SimpleWidget.tsx
@@ -15,63 +15,53 @@
// along with this program. If not, see .
import React, { Fragment, useEffect, useState } from "react";
-import { connect, useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
+import styled from "styled-components";
+import get from "lodash/get";
+import { useSelector } from "react-redux";
+import { Loader } from "mds";
import api from "../../../../../common/api";
import { widgetDetailsToPanel } from "../utils";
import { IDashboardPanel } from "../types";
-
import { ErrorResponseHandler } from "../../../../../common/types";
-import { Loader } from "mds";
import { setErrorSnackMessage } from "../../../../../systemSlice";
import { AppState, useAppDispatch } from "../../../../../store";
interface ISimpleWidget {
- classes: any;
iconWidget: any;
title: string;
panelItem: IDashboardPanel;
timeStart: any;
timeEnd: any;
- propLoading: boolean;
-
apiPrefix: string;
renderFn?: undefined | null | ((arg: Record) => any);
}
-const styles = (theme: Theme) =>
- createStyles({
- mainWidgetContainer: {
- display: "inline-flex",
- color: "#072A4D",
- alignItems: "center",
- },
- icon: {
- color: "#072A4D",
- fill: "#072A4D",
- marginRight: 5,
- marginLeft: 12,
- },
- widgetLabel: {
- fontWeight: "bold",
- textTransform: "uppercase",
- marginRight: 10,
- },
- widgetValue: {
- marginRight: 25,
- },
- });
+const SimpleWidgetMain = styled.span(({ theme }) => ({
+ display: "inline-flex",
+ color: get(theme, "signalColors.main", "#07193E"),
+ alignItems: "center",
+ "& .icon": {
+ color: get(theme, "signalColors.main", "#07193E"),
+ fill: get(theme, "signalColors.main", "#07193E"),
+ marginRight: 5,
+ marginLeft: 12,
+ },
+ "& .widgetLabel": {
+ fontWeight: "bold",
+ textTransform: "uppercase",
+ marginRight: 10,
+ },
+ "& .widgetValue": {
+ marginRight: 25,
+ },
+}));
const SimpleWidget = ({
- classes,
iconWidget,
title,
panelItem,
timeStart,
timeEnd,
- propLoading,
apiPrefix,
renderFn,
}: ISimpleWidget) => {
@@ -132,23 +122,19 @@ const SimpleWidget = ({
return (
{loading && (
-
+
)}
{!loading && (
-
- {iconWidget ? iconWidget : null}
- {title}:
- {data}
-
+
+ {iconWidget ? iconWidget : null}
+ {title}:
+ {data}
+
)}
);
};
-const connector = connect(null, {
- setErrorSnackMessage: setErrorSnackMessage,
-});
-
-export default withStyles(styles)(connector(SimpleWidget));
+export default SimpleWidget;
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx
index c926912ee..630c829fd 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx
@@ -15,73 +15,65 @@
// along with this program. If not, see
.
import React, { Fragment, useEffect, useState } from "react";
-import { connect, useSelector } from "react-redux";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import api from "../../../../../common/api";
-import { Loader } from "mds";
+import { useSelector } from "react-redux";
+import { Box, Loader } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
import { widgetCommon } from "../../../Common/FormComponents/common/styleLibrary";
import { splitSizeMetric, widgetDetailsToPanel } from "../utils";
import { IDashboardPanel } from "../types";
import { ErrorResponseHandler } from "../../../../../common/types";
import { setErrorSnackMessage } from "../../../../../systemSlice";
import { AppState, useAppDispatch } from "../../../../../store";
+import api from "../../../../../common/api";
interface ISingleValueWidget {
title: string;
panelItem: IDashboardPanel;
timeStart: any;
timeEnd: any;
- propLoading: boolean;
-
- classes: any;
apiPrefix: string;
renderFn?: (arg: Record
) => any;
}
-const styles = (theme: Theme) =>
- createStyles({
- ...widgetCommon,
- loadingAlign: {
- width: "100%",
- textAlign: "center",
- margin: "auto",
- },
- metric: {
- fontSize: 60,
- lineHeight: 1,
- color: "#07193E",
- fontWeight: 700,
- },
- titleElement: {
- fontSize: 10,
- color: "#767676",
- fontWeight: 700,
- },
- containerAlignment: {
- display: "flex",
- height: 140,
- flexDirection: "column",
- justifyContent: "center",
- "& .unitText": {
- color: "#767676",
- fontSize: 12,
- },
- },
- });
+const SingleValueWidgetMain = styled.div(({ theme }) => ({
+ display: "flex",
+ height: 140,
+ flexDirection: "column",
+ justifyContent: "center",
+ "& .unitText": {
+ color: get(theme, "mutedText", "#87888d"),
+ fontSize: 12,
+ },
+ "& .loadingAlign": {
+ width: "100%",
+ textAlign: "center",
+ margin: "auto",
+ },
+ "& .metric": {
+ fontSize: 60,
+ lineHeight: 1,
+ color: get(theme, "signalColors.main", "#07193E"),
+ fontWeight: 700,
+ },
+ "& .titleElement": {
+ fontSize: 10,
+ color: get(theme, "mutedText", "#87888d"),
+ fontWeight: 700,
+ },
+ ...widgetCommon(theme),
+}));
const SingleValueWidget = ({
title,
panelItem,
timeStart,
timeEnd,
- propLoading,
- classes,
apiPrefix,
renderFn,
}: ISingleValueWidget) => {
const dispatch = useAppDispatch();
+
const [loading, setLoading] = useState(false);
const [data, setData] = useState("");
const widgetVersion = useSelector(
@@ -132,24 +124,20 @@ const SingleValueWidget = ({
return renderFn({ valueToRender, loading, title, id: panelItem.id });
}
return (
-
+
{loading && (
-
+
-
+
)}
{!loading && (
- {splitSizeMetric(data)}
- {title}
+ {splitSizeMetric(data)}
+ {title}
)}
-
+
);
};
-const connector = connect(null, {
- setErrorSnackMessage: setErrorSnackMessage,
-});
-
-export default withStyles(styles)(connector(SingleValueWidget));
+export default SingleValueWidget;
diff --git a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/UptimeActivityRenderer.tsx b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/UptimeActivityRenderer.tsx
index 7a3f0e321..a0d3e5f5d 100644
--- a/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/UptimeActivityRenderer.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/UptimeActivityRenderer.tsx
@@ -15,7 +15,7 @@
// along with this program. If not, see .
import React from "react";
-import { Box } from "@mui/material";
+import { Box } from "mds";
import TimeStatItem from "../../TimeStatItem";
export type SimpleWidgetRenderProps = {
@@ -34,8 +34,8 @@ const UptimeActivityRenderer = ({
);
@@ -86,7 +85,6 @@ export const componentToUse = (
panelItem={value}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={loading}
apiPrefix={apiPrefix}
iconWidget={value.widgetIcon}
renderFn={renderFn}
@@ -100,7 +98,6 @@ export const componentToUse = (
value={value}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={loading}
apiPrefix={apiPrefix}
/>
@@ -112,7 +109,6 @@ export const componentToUse = (
panelItem={value}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={loading}
apiPrefix={apiPrefix}
/>
);
@@ -124,7 +120,6 @@ export const componentToUse = (
panelItem={value}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={loading}
hideYAxis={value.disableYAxis}
xAxisFormatter={value.xAxisFormatter}
yAxisFormatter={value.yAxisFormatter}
@@ -140,7 +135,6 @@ export const componentToUse = (
panelItem={value}
timeStart={timeStart}
timeEnd={timeEnd}
- propLoading={loading}
apiPrefix={apiPrefix}
zoomActivated={zoomActivated}
/>
diff --git a/portal-ui/src/screens/Console/Dashboard/TimeStatItem.tsx b/portal-ui/src/screens/Console/Dashboard/TimeStatItem.tsx
index 93ed0636c..d768b18cd 100644
--- a/portal-ui/src/screens/Console/Dashboard/TimeStatItem.tsx
+++ b/portal-ui/src/screens/Console/Dashboard/TimeStatItem.tsx
@@ -15,8 +15,39 @@
// along with this program. If not, see .
import React from "react";
-import { Box } from "@mui/material";
-import { Loader, SuccessIcon } from "mds";
+import styled from "styled-components";
+import get from "lodash/get";
+import { Box, Loader, SuccessIcon } from "mds";
+
+const TimeStatBase = styled.div(({ theme }) => ({
+ display: "grid",
+ alignItems: "center",
+ gap: 8,
+ height: 33,
+ paddingLeft: 15,
+ gridTemplateColumns: "20px 1.5fr .5fr 20px",
+ background: get(theme, "boxBackground", "#FBFAFA"), // #EBF9EE
+ "& .min-icon": {
+ height: "12px",
+ width: "12px",
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ "& .ok-icon": {
+ height: "8px",
+ width: "8px",
+ fill: get(theme, "signalColors.good", "#4CCB92"),
+ color: get(theme, "signalColors.good", "#4CCB92"),
+ },
+ "& .timeStatLabel": {
+ fontSize: "12px",
+ color: get(theme, "signalColors.good", "#4CCB92"),
+ fontWeight: 600,
+ },
+ "& .timeStatValue": {
+ fontSize: "12px",
+ color: get(theme, "signalColors.good", "#4CCB92"),
+ },
+}));
const TimeStatItem = ({
icon,
@@ -30,46 +61,12 @@ const TimeStatItem = ({
loading?: boolean;
}) => {
return (
-
+
{loading ? : icon}
-
- {label}
-
- {value}
+ {label}
+ {value}
{value !== "n/a" ? : null}
-
+
);
};
diff --git a/portal-ui/src/screens/Console/Policies/PolicyView.tsx b/portal-ui/src/screens/Console/Policies/PolicyView.tsx
index d914076bf..24f980697 100644
--- a/portal-ui/src/screens/Console/Policies/PolicyView.tsx
+++ b/portal-ui/src/screens/Console/Policies/PolicyView.tsx
@@ -15,21 +15,11 @@
// along with this program. If not, see .
import React, { Fragment, useState } from "react";
-import SearchBox from "../Common/SearchBox";
-import { Theme } from "@mui/material/styles";
-import { searchField } from "../Common/FormComponents/common/styleLibrary";
import { DisabledIcon, EnabledIcon, Box, Grid } from "mds";
+import SearchBox from "../Common/SearchBox";
import { STATUS_COLORS } from "../Dashboard/BasicDashboard/Utils";
-import makeStyles from "@mui/styles/makeStyles";
import { IAMStatement } from "./types";
-const useStyles = makeStyles((theme: Theme) => ({
- searchField: {
- ...searchField.searchField,
- maxWidth: 380,
- },
-}));
-
const rowGridStyle = {
display: "grid",
gridTemplateColumns: "70px 1fr",
@@ -57,8 +47,6 @@ const PolicyView = ({
}: {
policyStatements: IAMStatement[];
}) => {
- const classes = useStyles();
-
const [filter, setFilter] = useState("");
return (
@@ -77,8 +65,10 @@ const PolicyView = ({