header create
This commit is contained in:
1 parent
3dbbe035a8
commit
f5c6abad1b
8 files changed
+42
-8
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ import Box from "@mui/material/Box";
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import type { Check } from "@/Types/Check";
|
import type { Check } from "@/Types/Check";
|
||||||
import { getResponseColor } from "@/Utils/DataUtils";
|
import { getResponseColor } from "@/Utils/DataUtils";
|
||||||
import { HeatmapResponseTimeTooltip } from "./HeatmapResponseTimeTooltip";
|
import { HeatmapResponseTimeTooltip } from "@/Components/v2/common/charts/HeatmapResponseTimeTooltip";
|
||||||
import type { SxProps } from "@mui/material/styles";
|
import type { SxProps } from "@mui/material/styles";
|
||||||
import type { ResponsiveStyleValue } from "@mui/system";
|
import type { ResponsiveStyleValue } from "@mui/system";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,33 @@
|
|||||||
|
import { Stack } from "@mui/material";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import { ButtonInput } from "../../inputs/Button";
|
||||||
|
|
||||||
|
interface HeaderCreateProps {
|
||||||
|
label?: string;
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const HeaderCreate = ({ label = "Create", path }: HeaderCreateProps) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
navigate(path);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
alignItems="center"
|
||||||
|
width="100%"
|
||||||
|
>
|
||||||
|
<ButtonInput
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
onClick={handleClick}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</ButtonInput>
|
||||||
|
</Stack>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
export * from "./HistogramResponseTime";
|
export * from "../common/charts/HistogramResponseTime";
|
||||||
export * from "./HeatmapResponseTime";
|
export * from "../common/charts/HeatmapResponseTime";
|
||||||
export * from "./HeatmapResponseTimeTooltip";
|
export * from "../common/charts/HeatmapResponseTimeTooltip";
|
||||||
|
export * from "../common/controls/HeaderCreate";
|
||||||
+1
-1
@@ -10,7 +10,7 @@ const types = ["http", "ping", "port", "docker"];
|
|||||||
const statuses = ["up", "down"];
|
const statuses = ["up", "down"];
|
||||||
const states = ["active", "paused"];
|
const states = ["active", "paused"];
|
||||||
|
|
||||||
export const FilterControls = ({
|
export const ControlsFilter = ({
|
||||||
selectedTypes,
|
selectedTypes,
|
||||||
setSelectedTypes,
|
setSelectedTypes,
|
||||||
selectedStatus,
|
selectedStatus,
|
||||||
@@ -1 +1 @@
|
|||||||
export * from "./FilterControls";
|
export * from "./ControlsFilter";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { FilterControls } from "@/Components/v2/monitors";
|
import { ControlsFilter } from "@/Components/v2/monitors";
|
||||||
import {
|
import {
|
||||||
MonitorBasePageWithStates,
|
MonitorBasePageWithStates,
|
||||||
UpStatusBox,
|
UpStatusBox,
|
||||||
@@ -131,7 +131,7 @@ const UptimeMonitorsPage = () => {
|
|||||||
justifyContent={isSmall ? "flex-start" : "space-between"}
|
justifyContent={isSmall ? "flex-start" : "space-between"}
|
||||||
gap={theme.spacing(4)}
|
gap={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
<FilterControls
|
<ControlsFilter
|
||||||
selectedTypes={selectedTypes}
|
selectedTypes={selectedTypes}
|
||||||
setSelectedTypes={setSelectedTypes}
|
setSelectedTypes={setSelectedTypes}
|
||||||
selectedStatus={selectedStatus}
|
selectedStatus={selectedStatus}
|
||||||
|
|||||||
Reference in new issue
Block a user