From 8290fee3f7ab92bf4d332f5f436ab756be4198de Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 9 Nov 2023 15:52:23 -0500 Subject: [PATCH] fix: remove accidental scrollbar from deployment banner (#10616) * chore: clean up DeploymentBannerView markup * fix: remove extra scrollbar * refactor: remove needless calc call --- .../DeploymentBanner/DeploymentBannerView.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx b/site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx index 847761dced..61f68cc5b0 100644 --- a/site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx +++ b/site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx @@ -75,13 +75,14 @@ export interface DeploymentBannerViewProps { export const DeploymentBannerView: FC = (props) => { const { health, stats, fetchStats } = props; const theme = useTheme(); + const aggregatedMinutes = useMemo(() => { if (!stats) { return; } return dayjs(stats.collected_at).diff(stats.aggregated_from, "minutes"); }, [stats]); - const displayLatency = stats?.workspaces.connection_latency_ms.P50 || -1; + const [timeUntilRefresh, setTimeUntilRefresh] = useState(0); useEffect(() => { if (!stats || !fetchStats) { @@ -130,7 +131,7 @@ export const DeploymentBannerView: FC = (props) => { justify-content: center; background-color: ${unhealthy ? colors.red[10] : undefined}; padding: 0 12px; - height: ${bannerHeight}px; + height: 100%; color: #fff; & svg { @@ -151,10 +152,13 @@ export const DeploymentBannerView: FC = (props) => { pointer-events: none; `; + const displayLatency = stats?.workspaces.connection_latency_ms.P50 || -1; + return (
= (props) => {
)} +
Workspaces
@@ -245,6 +250,7 @@ export const DeploymentBannerView: FC = (props) => { />
+
Transmission
@@ -279,6 +285,7 @@ export const DeploymentBannerView: FC = (props) => {
+
Active Connections
@@ -317,6 +324,7 @@ export const DeploymentBannerView: FC = (props) => {
+