From 9f1d2b998a875c27de46d48c443989c23bd2c29a Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 13 Nov 2022 12:39:52 -0700 Subject: [PATCH] Get support for vainfo --- web/src/routes/System.jsx | 44 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/web/src/routes/System.jsx b/web/src/routes/System.jsx index e5afcd22f..b3cc0931a 100644 --- a/web/src/routes/System.jsx +++ b/web/src/routes/System.jsx @@ -63,7 +63,7 @@ export default function System() { }); if (response.status === 200) { - setState({ showFfprobe: true, ffprobe: JSON.stringify(response.data, null, 2) }); + setState({ ...state, showFfprobe: true, ffprobe: JSON.stringify(response.data, null, 2) }); } else { setState({ ...state, ffprobe: 'There was an error getting the ffprobe output.' }); } @@ -74,11 +74,26 @@ export default function System() { setState({ ...state, ffprobe: '', showFfprobe: false }); }; + const onHandleVainfo = async (e) => { + if (e) { + e.stopPropagation(); + } + + const response = axios.get('vainfo'); + + if (response.status === 200) { + setState({ ...state, showVainfo: true, vainfo: JSON.stringify(resonse.data, null, 2)}) + } else { + setState({ ...state, showVainfo: true, 'There was an error getting the vainfo output.'}) + } + }; + return (
System {service.version} + {state.showFfprobe && (
@@ -100,6 +115,27 @@ export default function System() {
)} + {state.showVainfo && ( + +
+ Vainfo Output + {state.ffprobe != '' ?

{state.vainfo}

: } +
+
+ + +
+
+ )} + {!detectors ? (
@@ -133,7 +169,11 @@ export default function System() { ))}
- GPUs +
+ GPUs + +
+ {!gpu_usages ? (