diff --git a/portal-ui/src/screens/Console/Common/FormComponents/DateRangeSelector/DateRangeSelector.tsx b/portal-ui/src/screens/Console/Common/FormComponents/DateRangeSelector/DateRangeSelector.tsx
index 2521fec2f..625ac7dcc 100644
--- a/portal-ui/src/screens/Console/Common/FormComponents/DateRangeSelector/DateRangeSelector.tsx
+++ b/portal-ui/src/screens/Console/Common/FormComponents/DateRangeSelector/DateRangeSelector.tsx
@@ -15,9 +15,9 @@
// along with this program. If not, see .
import React from "react";
-import { Button, OpenListIcon, SyncIcon } from "mds";
+import { Button, OpenListIcon, SyncIcon, Grid } from "mds";
import { DateTime } from "luxon";
-import { Box, Grid } from "@mui/material";
+import { Box } from "@mui/material";
import ScheduleIcon from "@mui/icons-material/Schedule";
import WatchLaterIcon from "@mui/icons-material/WatchLater";
import DateTimePickerWrapper from "../DateTimePickerWrapper/DateTimePickerWrapper";
diff --git a/portal-ui/src/screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx b/portal-ui/src/screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx
index 8daee48f5..e30919528 100644
--- a/portal-ui/src/screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx
+++ b/portal-ui/src/screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx
@@ -15,14 +15,9 @@
// along with this program. If not, see .
import React, { Fragment } from "react";
-import { Theme } from "@mui/material/styles";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
-import TextField from "@mui/material/TextField";
-import { searchField } from "../common/styleLibrary";
+import { InputBox, InputLabel, Box } from "mds";
interface IFilterInputWrapper {
- classes: any;
value: string;
onChange: (txtVar: string) => any;
label: string;
@@ -31,45 +26,7 @@ interface IFilterInputWrapper {
name: string;
}
-const styles = (theme: Theme) =>
- createStyles({
- searchField: {
- ...searchField.searchField,
- height: 30,
- padding: 0,
- "& input": {
- padding: "0 12px",
- height: 28,
- fontSize: 12,
- fontWeight: 600,
- color: "#393939",
- },
- "&.isDisabled": {
- "&:hover": {
- borderColor: "#EAEDEE",
- },
- },
- "& input.Mui-disabled": {
- backgroundColor: "#EAEAEA",
- },
- },
- labelStyle: {
- color: "#393939",
- fontSize: 12,
- marginBottom: 4,
- },
- buttonKit: {
- display: "flex",
- alignItems: "center",
- },
- fieldContainer: {
- flexGrow: 1,
- margin: "0 15px",
- },
- });
-
const FilterInputWrapper = ({
- classes,
label,
onChange,
value,
@@ -79,27 +36,31 @@ const FilterInputWrapper = ({
}: IFilterInputWrapper) => {
return (
-
-
{label}
-
- {
- onChange(val.target.value);
- }}
- InputProps={{
- disableUnderline: true,
- }}
- className={classes.searchField}
- value={value}
- />
-
-
+
+ {label}
+ {
+ onChange(val.target.value);
+ }}
+ sx={{
+ "& input": {
+ height: 30,
+ },
+ }}
+ value={value}
+ />
+
);
};
-export default withStyles(styles)(FilterInputWrapper);
+export default FilterInputWrapper;
diff --git a/portal-ui/src/screens/Console/Logs/LogSearch/LogSearchFullModal.tsx b/portal-ui/src/screens/Console/Logs/LogSearch/LogSearchFullModal.tsx
index dfbd9d60e..316d69339 100644
--- a/portal-ui/src/screens/Console/Logs/LogSearch/LogSearchFullModal.tsx
+++ b/portal-ui/src/screens/Console/Logs/LogSearch/LogSearchFullModal.tsx
@@ -15,14 +15,9 @@
// along with this program. If not, see .
import React, { Fragment } from "react";
-import { Grid } from "@mui/material";
-import { Theme } from "@mui/material/styles";
-import { Button } from "mds";
+import { Button, Grid } from "mds";
import get from "lodash/get";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
-import { modalBasic } from "../../Common/FormComponents/common/styleLibrary";
import { IReqInfoSearchResults } from "./types";
import { LogSearchColumnLabels } from "./utils";
@@ -30,27 +25,12 @@ interface ILogSearchFullModal {
modalOpen: boolean;
logSearchElement: IReqInfoSearchResults;
onClose: () => void;
- classes: any;
}
-const styles = (theme: Theme) =>
- createStyles({
- buttonContainer: {
- textAlign: "right",
- },
- objectKeyCol: {
- fontWeight: 700,
- paddingRight: "10px",
- textAlign: "left",
- },
- ...modalBasic,
- });
-
const LogSearchFullModal = ({
modalOpen,
logSearchElement,
onClose,
- classes,
}: ILogSearchFullModal) => {
const jsonItems = Object.keys(logSearchElement);
@@ -69,7 +49,13 @@ const LogSearchFullModal = ({
{jsonItems.map((objectKey: string, index: number) => (
-
+
{get(LogSearchColumnLabels, objectKey, `${objectKey}`)}
{get(logSearchElement, objectKey, "")}
@@ -78,7 +64,11 @@ const LogSearchFullModal = ({
-
+
.
import React, { Fragment, useCallback, useEffect, useState } from "react";
-import { useSelector } from "react-redux";
-import { Button, PageLayout, SearchIcon } from "mds";
-import { Theme } from "@mui/material/styles";
-import { Grid } from "@mui/material";
-import { DateTime } from "luxon";
import get from "lodash/get";
-import createStyles from "@mui/styles/createStyles";
-import withStyles from "@mui/styles/withStyles";
+import { useSelector } from "react-redux";
+import { CSSObject } from "styled-components";
import {
- advancedFilterToggleStyles,
- containerForHeader,
- tableStyles,
-} from "../../Common/FormComponents/common/styleLibrary";
+ Box,
+ breakPoints,
+ Button,
+ DataTable,
+ ExpandOptionsButton,
+ Grid,
+ PageLayout,
+ SearchIcon,
+} from "mds";
+import { DateTime } from "luxon";
import { IReqInfoSearchResults, ISearchResponse } from "./types";
import { niceBytes, nsToSeconds } from "../../../../common/utils";
import { ErrorResponseHandler } from "../../../../common/types";
-import api from "../../../../common/api";
-import TableWrapper from "../../Common/TableWrapper/TableWrapper";
-import FilterInputWrapper from "../../Common/FormComponents/FilterInputWrapper/FilterInputWrapper";
-import LogSearchFullModal from "./LogSearchFullModal";
import { LogSearchColumnLabels } from "./utils";
-import DateRangeSelector from "../../Common/FormComponents/DateRangeSelector/DateRangeSelector";
-import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
import {
CONSOLE_UI_RESOURCE,
IAM_SCOPES,
} from "../../../../common/SecureComponent/permissions";
-import { SecureComponent } from "../../../../common/SecureComponent";
-import MissingIntegration from "../../Common/MissingIntegration/MissingIntegration";
import { setErrorSnackMessage, setHelpName } from "../../../../systemSlice";
import { selFeatures } from "../../consoleSlice";
import { useAppDispatch } from "../../../../store";
+import { SecureComponent } from "../../../../common/SecureComponent";
+import api from "../../../../common/api";
+import FilterInputWrapper from "../../Common/FormComponents/FilterInputWrapper/FilterInputWrapper";
+import LogSearchFullModal from "./LogSearchFullModal";
+import DateRangeSelector from "../../Common/FormComponents/DateRangeSelector/DateRangeSelector";
+import MissingIntegration from "../../Common/MissingIntegration/MissingIntegration";
import PageHeaderWrapper from "../../Common/PageHeaderWrapper/PageHeaderWrapper";
import HelpMenu from "../../HelpMenu";
-interface ILogSearchProps {
- classes: any;
-}
+const filtersContainer: CSSObject = {
+ display: "flex",
+ justifyContent: "space-between",
+ marginBottom: 12,
+};
-const styles = (theme: Theme) =>
- createStyles({
- blockCollapsed: {
- display: "none",
- overflowY: "hidden",
- },
- filterOpen: {
- display: "block",
- marginBottom: 12,
- },
- endLineAction: {
- marginBottom: 15,
- padding: "0 15px 0 15px",
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-end",
- },
- filtersContainer: {
- display: "flex",
- justifyContent: "space-between",
- marginBottom: 12,
- },
- innerContainer: {
- backgroundColor: "#fff",
- },
- noticeLabel: {
- marginLeft: 15,
- marginBottom: 15,
- fontSize: 12,
- color: "#9C9C9C",
- },
-
- tableFOpen: {
- height: "calc(100vh - 520px)",
- },
- tableFClosed: {
- height: "calc(100vh - 320px)",
- },
- ...tableStyles,
- ...advancedFilterToggleStyles,
-
- searchOptions: {
- display: "flex",
- padding: 15,
- "@media (max-width: 900px)": {
- flexFlow: "column",
- },
- },
- formBox: {
- border: "1px solid #EAEAEA",
- marginBottom: 15,
- },
- dateRangePicker: {
- "& div": {
- marginBottom: 0,
- },
- },
- advancedButton: {
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-start",
- },
-
- ...containerForHeader,
- });
-
-const LogsSearchMain = ({ classes }: ILogSearchProps) => {
+const LogsSearchMain = () => {
const dispatch = useAppDispatch();
const features = useSelector(selFeatures);
@@ -239,16 +174,19 @@ const LogsSearchMain = ({ classes }: ILogSearchProps) => {
setLoading(true);
};
- const selectColumn = (colName: string, active: boolean) => {
- let newArray = [...columnsShown];
+ const selectColumn = (colID: string) => {
+ let newArray: string[];
- if (!active) {
- newArray = columnsShown.filter((element) => element !== colName);
+ const columnShown = columnsShown.findIndex((item) => item === colID);
+
+ // Column Exist, We remove from Array
+ if (columnShown >= 0) {
+ newArray = columnsShown.filter((element) => element !== colID);
} else {
- if (!newArray.includes(colName)) {
- newArray.push(colName);
- }
+ // Column not visible, we include it in the array
+ newArray = [...columnsShown, colID];
}
+
setColumnsShown(newArray);
};
@@ -298,113 +236,129 @@ const LogsSearchMain = ({ classes }: ILogSearchProps) => {
}
- documentationLink="https://github.com/minio/operator/tree/master/logsearchapi"
+ documentationLink="https://min.io/docs/minio/windows/operations/monitoring/minio-logging.html?ref=con"
/>
) : (
{" "}
-
-
-
+
+
+
setTimeEnd(time)}
setTimeStart={(time) => setTimeStart(time)}
timeEnd={timeEnd}
timeStart={timeStart}
/>
-
-
-
-
+
+ {
setFilterOpen(!filterOpen);
}}
- className={classes.advancedConfiguration}
- >
- {filterOpen ? "Hide" : "Show"} advanced Filters{" "}
-
-
-
-
-
+ />
+
-
-
- Enable your preferred options to get filtered records.
-
- You can use '*' to match any character, '.' to signify a
- single character or '\' to scape an special character (E.g.
- mybucket-*)
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Enable your preferred options to get filtered records.
+
+ You can use '*' to match any character, '.' to signify a
+ single character or '\' to scape an special character (E.g.
+ mybucket-*)
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{
label={"Get Information"}
/>
-
-
+
+
- {
columnsShown={columnsShown}
onColumnChange={selectColumn}
customPaperHeight={
- filterOpen ? classes.tableFOpen : classes.tableFClosed
+ filterOpen ? "calc(100vh - 520px)" : "calc(100vh - 320px)"
}
sortConfig={{
currentSort: "time",
@@ -524,4 +478,4 @@ const LogsSearchMain = ({ classes }: ILogSearchProps) => {
);
};
-export default withStyles(styles)(LogsSearchMain);
+export default LogsSearchMain;