FIX-1848 made changes in the contents tab in the status page.
This commit is contained in:
1 parent
1cadb2c45f
commit
4820c1ee8a
2 files changed
+35
-18
No files matched your search
@@ -1,13 +1,13 @@
|
|||||||
// Components
|
// Components
|
||||||
import { Stack, Typography, Button } from "@mui/material";
|
import { Stack, Typography } from "@mui/material";
|
||||||
import { TabPanel } from "@mui/lab";
|
import { TabPanel } from "@mui/lab";
|
||||||
import ConfigBox from "../../../../../Components/ConfigBox";
|
|
||||||
import MonitorList from "../MonitorList";
|
import MonitorList from "../MonitorList";
|
||||||
import Search from "../../../../../Components/Inputs/Search";
|
import Search from "../../../../../Components/Inputs/Search";
|
||||||
import Checkbox from "../../../../../Components/Inputs/Checkbox";
|
import Checkbox from "../../../../../Components/Inputs/Checkbox";
|
||||||
// Utils
|
// Utils
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
|
import SectionStack from "./SectionStack";
|
||||||
const Content = ({
|
const Content = ({
|
||||||
tabValue,
|
tabValue,
|
||||||
form,
|
form,
|
||||||
@@ -34,14 +34,10 @@ const Content = ({
|
|||||||
return (
|
return (
|
||||||
<TabPanel value={tabValue}>
|
<TabPanel value={tabValue}>
|
||||||
<Stack gap={theme.spacing(10)}>
|
<Stack gap={theme.spacing(10)}>
|
||||||
<ConfigBox>
|
<SectionStack
|
||||||
<Stack gap={theme.spacing(6)}>
|
title="Status page servers"
|
||||||
<Typography component="h2">Status page servers</Typography>
|
description="You can add any number of servers that you monitor to your status page. You can also reorder them for the best viewing experience."
|
||||||
<Typography component="p">
|
>
|
||||||
You can add any number of servers that you monitor to your status page. You
|
|
||||||
can also reorder them for the best viewing experience.
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
@@ -72,13 +68,12 @@ const Content = ({
|
|||||||
setSelectedMonitors={handleMonitorsChange}
|
setSelectedMonitors={handleMonitorsChange}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>{" "}
|
</SectionStack>
|
||||||
<ConfigBox>
|
<SectionStack
|
||||||
<Stack gap={theme.spacing(6)}>
|
title="Features"
|
||||||
<Typography component="h2">Features</Typography>
|
description="Show more details on the status page"
|
||||||
<Typography component="p">Show more details on the status page</Typography>
|
>
|
||||||
</Stack>
|
<Stack>
|
||||||
<Stack sx={{ margin: theme.spacing(6) }}>
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="showCharts"
|
id="showCharts"
|
||||||
name="showCharts"
|
name="showCharts"
|
||||||
@@ -94,7 +89,7 @@ const Content = ({
|
|||||||
onChange={handleFormChange}
|
onChange={handleFormChange}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>
|
</SectionStack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack gap={theme.spacing(6)}></Stack>
|
<Stack gap={theme.spacing(6)}></Stack>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { Stack, Typography } from "@mui/material";
|
||||||
|
import ConfigBox from "../../../../../Components/ConfigBox";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
// This can be used to add any extra/additional section/stacks on top of existing sections on the tab
|
||||||
|
const SectionStack = ({ title, description, children }) => (
|
||||||
|
<ConfigBox>
|
||||||
|
<Stack gap={2}>
|
||||||
|
<Typography component="h2">{title}</Typography>
|
||||||
|
<Typography component="p">{description}</Typography>
|
||||||
|
</Stack>
|
||||||
|
{children}
|
||||||
|
</ConfigBox>
|
||||||
|
);
|
||||||
|
|
||||||
|
SectionStack.propTypes = {
|
||||||
|
title: PropTypes.string.isRequired, // Title must be a string and is required
|
||||||
|
description: PropTypes.string.isRequired, // Description must be a string and is required
|
||||||
|
children: PropTypes.node.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SectionStack;
|
||||||
Reference in new issue
Block a user