diff --git a/plugins/lime-plugin-rx/src/rxPage.tsx b/plugins/lime-plugin-rx/src/rxPage.tsx index 15f1065f..355243d2 100644 --- a/plugins/lime-plugin-rx/src/rxPage.tsx +++ b/plugins/lime-plugin-rx/src/rxPage.tsx @@ -10,7 +10,7 @@ const Page = ({}) => {
diff --git a/plugins/lime-plugin-rx/src/sections/alignment.tsx b/plugins/lime-plugin-rx/src/sections/alignment.tsx index 83fb487f..e3933a2f 100644 --- a/plugins/lime-plugin-rx/src/sections/alignment.tsx +++ b/plugins/lime-plugin-rx/src/sections/alignment.tsx @@ -19,10 +19,11 @@ function stripIface(hostIface) { } export const AlignmentCard = ({ status }: { status: StatusResponse }) => { + const hasMostActive = !!status.most_active?.iface; const { data: bathost } = useBatHost( status.most_active && status.most_active.station_mac, status.most_active && status.most_active.iface, - { enabled: !!status.most_active } + { enabled: hasMostActive } ); const traffic = Math.round( @@ -31,51 +32,61 @@ export const AlignmentCard = ({ status }: { status: StatusResponse }) => { 1024 ); return ( -
-
- -
- {status.most_active?.chains && - status.most_active.chains.map((chain, i) => ( - - - {i !== status.most_active.chains.length - 1 && - " / "} +
+ {hasMostActive && ( + <> +
+ +
+ {status.most_active?.chains && + status.most_active.chains.map((chain, i) => ( + + + {i !== + status.most_active.chains.length - + 1 && " / "} + + ))} +
+
+
+
+ Most active link +
+
+ {bathost && bathost.hostname ? ( + {stripIface(bathost.hostname)} + ) : ( + + Fetching name + + )} +
+
+ Interface: + + {status.most_active.iface} - ))} +
+
+ Traffic: + {traffic}MB/s +
+
+ + )} + {!hasMostActive && ( +
+ No most active iface
-
-
-
- Most active link -
-
- {bathost && bathost.hostname ? ( - {stripIface(bathost.hostname)} - ) : ( - - Fetching name - - )} -
-
- Interface: - - {status.most_active.iface} - -
-
- Traffic: - {traffic}MB/s -
-
-
+ )} +
); diff --git a/plugins/lime-plugin-rx/src/sections/internetPath.tsx b/plugins/lime-plugin-rx/src/sections/internetPath.tsx index 3672aa3a..5ff0fda5 100644 --- a/plugins/lime-plugin-rx/src/sections/internetPath.tsx +++ b/plugins/lime-plugin-rx/src/sections/internetPath.tsx @@ -76,7 +76,7 @@ export const InternetPath = () => { let pathComponent = (
@@ -90,7 +90,7 @@ export const InternetPath = () => { pathComponent = (