fix: add CSS classes to prevent URL and name overflow in monitors
This commit is contained in:
1 parent
6d236477ac
commit
1f6826e045
5 files changed
+34
-3
No files matched your search
@@ -27,7 +27,12 @@ const Status = ({ monitor }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="h1">{monitor?.name}</Typography>
|
<Typography
|
||||||
|
variant="h1"
|
||||||
|
className="monitor-name-text"
|
||||||
|
>
|
||||||
|
{monitor?.name}
|
||||||
|
</Typography>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems={"center"}
|
alignItems={"center"}
|
||||||
@@ -37,6 +42,7 @@ const Status = ({ monitor }) => {
|
|||||||
<Typography
|
<Typography
|
||||||
variant="h2"
|
variant="h2"
|
||||||
style={{ fontFamily: "monospace", fontWeight: "bolder" }}
|
style={{ fontFamily: "monospace", fontWeight: "bolder" }}
|
||||||
|
className="monitor-url-text"
|
||||||
>
|
>
|
||||||
{monitor?.url?.replace(/^https?:\/\//, "") || "..."}
|
{monitor?.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
|
|||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="h1">{monitor?.name}</Typography>
|
<Typography
|
||||||
|
variant="h1"
|
||||||
|
className="monitor-name-text"
|
||||||
|
>
|
||||||
|
{monitor?.name}
|
||||||
|
</Typography>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
alignItems={"center"}
|
alignItems={"center"}
|
||||||
@@ -29,8 +34,9 @@ const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
|
|||||||
>
|
>
|
||||||
<PulseDot color={statusColor[determineState(monitor)]} />
|
<PulseDot color={statusColor[determineState(monitor)]} />
|
||||||
<Typography
|
<Typography
|
||||||
|
component="h2"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
style={{ fontFamily: "monospace", fontWeight: "bolder" }}
|
className="monitor-url-text"
|
||||||
>
|
>
|
||||||
{monitor?.url?.replace(/^https?:\/\//, "") || "..."}
|
{monitor?.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ const PageSpeedConfigure = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h1"
|
component="h1"
|
||||||
variant="h1"
|
variant="h1"
|
||||||
|
className="monitor-name-text"
|
||||||
>
|
>
|
||||||
{monitor.name}
|
{monitor.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -235,6 +236,7 @@ const PageSpeedConfigure = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
|
className="monitor-url-text"
|
||||||
>
|
>
|
||||||
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ const Configure = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h1"
|
component="h1"
|
||||||
variant="h1"
|
variant="h1"
|
||||||
|
className="monitor-name-text"
|
||||||
>
|
>
|
||||||
{monitor.name}
|
{monitor.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -281,6 +282,7 @@ const Configure = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="h2"
|
component="h2"
|
||||||
variant="h2"
|
variant="h2"
|
||||||
|
className="monitor-url-text"
|
||||||
>
|
>
|
||||||
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -84,6 +84,21 @@ html {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*adding the classes for handling the overflow of url and name for monitors in one place*/
|
||||||
|
.monitor-url-text {
|
||||||
|
max-width: 70vh;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitor-name-text {
|
||||||
|
max-width: 70vh;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes ripple {
|
@keyframes ripple {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|||||||
Reference in new issue
Block a user