diff --git a/package.json b/package.json index eb2c092..55c0ead 100755 --- a/package.json +++ b/package.json @@ -16,8 +16,10 @@ "@hot-loader/react-dom": "^17.0.2", "echarts": "^5.3.2", "react": "^17.0.2", + "react-data-grid": "^7.0.0-beta.13", "react-dom": "^17.0.2", - "react-hot-loader": "^4.13.0" + "react-hot-loader": "^4.13.0", + "react-tabs": "^4.2.1" }, "devDependencies": { "@babel/core": "^7.17.0", diff --git a/src/pages/Panel/Panel.css b/src/pages/Panel/Panel.css deleted file mode 100644 index e1ed79b..0000000 --- a/src/pages/Panel/Panel.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - background-color: white; -} - -.container { - color: black; -} diff --git a/src/pages/Panel/Panel.jsx b/src/pages/Panel/Panel.jsx deleted file mode 100644 index 6ae786c..0000000 --- a/src/pages/Panel/Panel.jsx +++ /dev/null @@ -1,71 +0,0 @@ -import React, { useState } from 'react'; -import './Panel.css'; -import { startCapturing, stopCapturing, getMessages } from '../../capturer'; - -const INTERVAL = 333; - -const Panel = () => { - const [capturing, setCapturing] = useState(false); - const [messages, setMessages] = useState([]); - const [timer, setTimer] = useState(null); - - const addMessages = () => { - getMessages() - .then((messages) => { - setMessages((oldMessages) => [...oldMessages, ...messages]); - }) - .catch((error) => { - console.error('Getting messages failed!'); - console.error(error.stack || error); - }); - }; - - const start = () => { - startCapturing() - .then(() => { - setCapturing(true); - setTimer(setInterval(() => addMessages(), INTERVAL)); - }) - .catch((error) => { - console.error('Starting capturing failed!'); - console.error(error.stack || error); - }); - }; - - const stop = () => { - stopCapturing() - .then(() => { - setCapturing(false); - clearInterval(timer); - setTimer(null); - }) - .catch((error) => { - console.error('Stoping capturing failed!'); - console.error(error.stack || error); - }); - }; - - return ( -
{capturing ? 'capturing' : 'not capturing'}
- -{index} | -{msg.time} | -{msg.msg} | -