Skip to content

Commit

Permalink
add url to monitor overview
Browse files Browse the repository at this point in the history
  • Loading branch information
naueramant committed Mar 16, 2024
1 parent 66e82ec commit c0e2eff
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Stack, Typography } from "@mui/material";
import { DataGridProps, GridColDef, GridRowsProp } from "@mui/x-data-grid";
import { FunctionComponent } from "react";
import { AiOutlinePause } from "react-icons/ai";
Expand All @@ -9,8 +10,9 @@ import DataGrid from "../../../../components/DataGrid";
import { Role } from "../../../../components/Restrict";
import ResultThumbGraph from "../../../../components/ResultThumbGraph";
import { useCurrentUserRole } from "../../../../hooks/user.query";
import ItemMenu from "./ItemMenu";
import { secondsHumanize } from "../../../../utilities/time";
import { stripProtocolAndPath } from "../../../../utilities/url";
import ItemMenu from "./ItemMenu";

interface MonitorsDataGridProps
extends Omit<DataGridProps, "columns" | "rows"> {
Expand Down Expand Up @@ -49,6 +51,21 @@ const MonitorsDataGrid: FunctionComponent<MonitorsDataGridProps> = (props) => {
headerName: "Name",
flex: 1,
sortable: false,
renderCell: (col) => (
<Stack>
<Typography
variant="subtitle1"
sx={{
lineHeight: 1,
}}
>
{col.row.name}
</Typography>
<Typography variant="caption" color="text.secondary">
{stripProtocolAndPath(col.row.settings.url)}
</Typography>
</Stack>
),
},
{
field: "stats",
Expand Down

0 comments on commit c0e2eff

Please sign in to comment.