diff --git a/web/components/stream-health-overview.tsx b/web/components/stream-health-overview.tsx
index 6d08d421b..2393b533c 100644
--- a/web/components/stream-health-overview.tsx
+++ b/web/components/stream-health-overview.tsx
@@ -4,16 +4,19 @@ import Link from 'next/link';
import React, { useContext } from 'react';
import { ServerStatusContext } from '../utils/server-status-context';
-export default function StreamHealthOverview() {
+interface StreamHealthOverviewProps {
+ showTroubleshootButton?: Boolean;
+}
+export default function StreamHealthOverview({
+ showTroubleshootButton,
+}: StreamHealthOverviewProps) {
const serverStatusData = useContext(ServerStatusContext);
const { health } = serverStatusData;
-
if (!health) {
return null;
}
const { healthy, healthPercentage, message, representation } = health;
- console.log(healthPercentage);
let color = '#3f8600';
let icon: 'success' | 'info' | 'warning' | 'error' = 'info';
if (healthPercentage < 80) {
@@ -26,7 +29,7 @@ export default function StreamHealthOverview() {
return (
-
+
-
+
-
+
-
- TROUBLESHOOT
-
-
+ showTroubleshootButton && (
+
+
+ TROUBLESHOOT
+
+
+ )
}
/>
@@ -72,3 +80,7 @@ export default function StreamHealthOverview() {
);
}
+
+StreamHealthOverview.defaultProps = {
+ showTroubleshootButton: true,
+};
diff --git a/web/pages/stream-health.tsx b/web/pages/stream-health.tsx
index f598f2d70..ea50de579 100644
--- a/web/pages/stream-health.tsx
+++ b/web/pages/stream-health.tsx
@@ -1,10 +1,11 @@
/* eslint-disable react/no-unescaped-entities */
// import { BulbOutlined, LaptopOutlined, SaveOutlined } from '@ant-design/icons';
-import { Row, Col, Typography, Space, Statistic, Card, Alert } from 'antd';
+import { Row, Col, Typography, Space, Statistic, Card, Alert, Spin } from 'antd';
import React, { ReactNode, useEffect, useState } from 'react';
import { ClockCircleOutlined, WarningOutlined, WifiOutlined } from '@ant-design/icons';
import { fetchData, FETCH_INTERVAL, API_STREAM_HEALTH_METRICS } from '../utils/apis';
import Chart from '../components/chart';
+import StreamHealthOverview from '../components/stream-health-overview';
interface TimedValue {
time: Date;
@@ -90,10 +91,15 @@ export default function StreamHealth() {
const noData = (
Stream Performance
-
+
+
+
+
);
if (!errors?.length) {
@@ -259,6 +265,13 @@ export default function StreamHealth() {
insight into external players people may be using such as VLC, MPV, QuickTime, etc.
+
+
+
+
+
+
+
}
suffix=""
- />{' '}
+ />
-
- Provided playback metrics represent {representation}% of all known players. Specifics
- around other players consuming this video stream are unknown.
-
+ {representation !== 0 && (
+
+ Provided playback metrics represent {representation}% of all known players. Specifics
+ around other players consuming this video stream are unknown.
+
+ )}