Justified URL, added placeholders

This commit is contained in:
Alex Holliday committed 2024-08-13 15:54:23 -07:00
1 parent 801f962af9
commit ac5385746a
4 files changed
+16 -11

No files matched your search

@@ -16,8 +16,14 @@ const MonitorDetails60MinChart = ({ data }) => {
fontSize: "8px",
fill: "black",
};
const color = {
true: "var(--env-var-color-23)",
false: "var(--env-var-color-24)",
undefined: "var(--env-var-color-33)",
};
return (
<ResponsiveContainer width="100%" height={50}>
<ResponsiveContainer width="100%" height={35}>
<BarChart
height={20}
data={data}
@@ -27,14 +33,7 @@ const MonitorDetails60MinChart = ({ data }) => {
<YAxis hide={true} domain={[0, 100]} />
<Bar dataKey="value" barSize={15}>
{data.map((check, index) => (
<Cell
key={`cell-${index}`}
fill={
check.status === true
? "var(--env-var-color-23)"
: "var(--env-var-color-24)"
}
/>
<Cell key={`cell-${index}`} fill={color[check.status]} />
))}
</Bar>
<ReferenceLine x={0} stroke="black" strokeDasharray="3 3">
+6 -1
View File
@@ -177,7 +177,12 @@ const DetailsPage = () => {
}}
/>
<Stack gap={theme.gap.xl} mt={theme.gap.medium}>
<Stack direction="row" gap={theme.gap.small} mt={theme.gap.small}>
<Stack
direction="row"
gap={theme.gap.small}
mt={theme.gap.small}
alignItems={"end"}
>
{monitor?.status ? <GreenCheck /> : <RedCheck />}
<Typography component="h1" sx={{ lineHeight: 1 }}>
{monitor.url?.replace(/^https?:\/\//, "") || "..."}
+1
View File
@@ -58,6 +58,7 @@
--env-var-color-30: #fcfcfd;
--env-var-color-31: #1a1919;
--env-var-color-32: #f5f5f5;
--env-var-color-33: rgba(83, 83, 83, 0.1);
--env-var-radius-1: 4px;
--env-var-radius-2: 8px;
+1 -1
View File
@@ -139,7 +139,7 @@ const getStatusBarValues = (monitor, checks) => {
});
for (let i = 0; i < noBlankChecks; i++) {
statusBarValues.push({ status: false, responseTime: 0, value: 0 });
statusBarValues.push({ status: undefined, responseTime: 0, value: 75 });
}
return statusBarValues.reverse();
};