Removed url button link

This commit is contained in:
Daniel Cojocea committed 2024-08-23 15:37:38 -04:00
1 parent 8778fa888f
commit fb4fdec60c
2 files changed
+8 -45

No files matched your search

+3 -13
View File
@@ -1,22 +1,12 @@
.MuiTable-root .host a { .MuiTable-root .host {
width: var(--env-var-img-width-2);
height: var(--env-var-img-width-2);
color: var(--env-var-color-5);
margin-right: 10px;
}
.MuiTable-root .host a svg {
width: var(--env-var-font-size-large);
height: var(--env-var-font-size-large);
}
.MuiTable-root .host div:nth-child(2) {
width: fit-content; width: fit-content;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.MuiTable-root .host div:nth-child(2) span { .MuiTable-root .host span {
font-size: var(--env-var-font-size-small); font-size: var(--env-var-font-size-small);
margin-left: 10px; margin-left: 8px;
} }
.MuiTable-root .label { .MuiTable-root .label {
+5 -32
View File
@@ -10,11 +10,9 @@ import Button from "../../Components/Button";
import ServerStatus from "../../Components/Charts/Servers/ServerStatus"; import ServerStatus from "../../Components/Charts/Servers/ServerStatus";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import ArrowDownwardRoundedIcon from "@mui/icons-material/ArrowDownwardRounded"; import ArrowDownwardRoundedIcon from "@mui/icons-material/ArrowDownwardRounded";
import OpenInNewPage from "../../assets/icons/open-in-new-page.svg?react";
import BasicTable from "../../Components/BasicTable"; import BasicTable from "../../Components/BasicTable";
import { StatusLabel } from "../../Components/Label"; import { StatusLabel } from "../../Components/Label";
import { createToast } from "../../Utils/toastUtils"; import { createToast } from "../../Utils/toastUtils";
import ResponseTimeChart from "../../Components/Charts/ResponseTimeChart";
import { import {
Box, Box,
IconButton, IconButton,
@@ -207,7 +205,6 @@ ActionsMenu.propTypes = {
* *
* @component * @component
* @param {Object} params - An object containing the following properties: * @param {Object} params - An object containing the following properties:
* @param {string} params.url - The URL of the host.
* @param {string} params.title - The name of the host. * @param {string} params.title - The name of the host.
* @param {string} params.percentageColor - The color of the percentage text. * @param {string} params.percentageColor - The color of the percentage text.
* @param {number} params.percentage - The percentage to display. * @param {number} params.percentage - The percentage to display.
@@ -215,40 +212,17 @@ ActionsMenu.propTypes = {
*/ */
const Host = ({ params }) => { const Host = ({ params }) => {
return ( return (
<Stack direction="row" alignItems="center" className="host"> <Stack direction="row" alignItems="baseline" className="host">
<IconButton {params.title}
aria-label="monitor link" <Typography component="span" sx={{ color: params.percentageColor }}>
onClick={(event) => { {params.percentage}%
event.stopPropagation(); </Typography>
window.open(params.url, "_blank", "noreferrer");
}}
sx={{
"&:focus": {
outline: "none",
},
mr: "5px",
}}
>
<OpenInNewPage
style={{
marginTop: "-1px",
marginRight: "-1px",
}}
/>
</IconButton>
<Box>
{params.title}
<Typography component="span" sx={{ color: params.percentageColor }}>
{params.percentage}%
</Typography>
</Box>
</Stack> </Stack>
); );
}; };
Host.propTypes = { Host.propTypes = {
params: PropTypes.shape({ params: PropTypes.shape({
url: PropTypes.string,
title: PropTypes.string, title: PropTypes.string,
percentageColor: PropTypes.string, percentageColor: PropTypes.string,
percentage: PropTypes.number, percentage: PropTypes.number,
@@ -327,7 +301,6 @@ const Monitors = () => {
data.rows = monitorState.monitors.map((monitor, idx) => { data.rows = monitorState.monitors.map((monitor, idx) => {
const params = { const params = {
url: monitor.url,
title: monitor.name, title: monitor.name,
percentage: 100, percentage: 100,
percentageColor: percentageColor: