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 scan = fs.watchFile(
filePath,
{ interval: 5000 },
{ interval: 300000 },
async (eventType) => {
//check special item, extra RAM, error in log
let lines = [];

View File

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

View File

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