Request stats from wings when loading the console; closes pterodactyl/panel#2414
This commit is contained in:
parent
ff50940fa6
commit
1db7e4db66
2 changed files with 2 additions and 0 deletions
|
@ -52,6 +52,7 @@ const TerminalDiv = styled.div`
|
|||
export default () => {
|
||||
const TERMINAL_PRELUDE = '\u001b[1m\u001b[33mcontainer@pterodactyl~ \u001b[0m';
|
||||
const [ terminalElement, setTerminalElement ] = useState<HTMLDivElement | null>(null);
|
||||
|
||||
const useRef = useCallback(node => setTerminalElement(node), []);
|
||||
const terminal = useMemo(() => new Terminal({ ...terminalProps }), []);
|
||||
const { connected, instance } = ServerContext.useStoreState(state => state.socket);
|
||||
|
|
|
@ -53,6 +53,7 @@ export default () => {
|
|||
}
|
||||
|
||||
instance.addListener('stats', statsListener);
|
||||
instance.send('send stats');
|
||||
|
||||
return () => {
|
||||
instance.removeListener('stats', statsListener);
|
||||
|
|
Loading…
Reference in a new issue