add component ShowLog

This commit is contained in:
joseph le 2023-09-12 16:57:58 +07:00
parent e20aaec372
commit 3d3e3862be
3 changed files with 3 additions and 5 deletions

View File

@ -79,7 +79,7 @@ export async function runtimeCheckLogs(folderPath) {
const filePath = `${folderPath}/${fileName}`; const filePath = `${folderPath}/${fileName}`;
const scan = fs.watchFile( const scan = fs.watchFile(
filePath, filePath,
{ interval: 5000 }, { interval: 300000 },
async (eventType) => { async (eventType) => {
//check special item, extra RAM, error in log //check special item, extra RAM, error in log
let lines = []; let lines = [];

View File

@ -17,10 +17,7 @@ function App() {
<Route path="/" element={<ManageValues />}> <Route path="/" element={<ManageValues />}>
{/* Render the UserProfile component */} {/* Render the UserProfile component */}
</Route> </Route>
<Route path="/logs" element={ <Route path="/logs/:name" element={<ShowLog/>}>
// <ShowLog/>
<h1>abshjvsakjgvhaskj</h1>
}>
</Route> </Route>
</Routes> </Routes>

View File

@ -1,6 +1,7 @@
import axios from "axios"; import axios from "axios";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { addKeyValue, deleteValue, getKeyValues } from "../api/apiLog"; import { addKeyValue, deleteValue, getKeyValues } from "../api/apiLog";
import { Link } from "react-router-dom";
const ManageValues = () => { const ManageValues = () => {
const [keyValue, setKeyValue] = useState([]); const [keyValue, setKeyValue] = useState([]);
const [key, setKey] = useState([]); const [key, setKey] = useState([]);