diff --git a/manage-view/src/api/apiLog.js b/manage-view/src/api/apiLog.js index 9d12284..bdebcd2 100644 --- a/manage-view/src/api/apiLog.js +++ b/manage-view/src/api/apiLog.js @@ -7,4 +7,5 @@ export const editValue = API + "/editValue"; export const getLog = API + "/log/showLog"; export const getListLog = API + "/getAllLogDetect"; export const listOnFolder = API + "/private-log/getFileOnFolder"; -export const getContentFile = API + "/private-log/readFile"; \ No newline at end of file +export const getContentFile = API + "/private-log/readFile"; +export const findValue = API + "/find-value"; \ No newline at end of file diff --git a/manage-view/src/components/ListLog/ListLog.jsx b/manage-view/src/components/ListLog/ListLog.jsx index 27f6582..5b2ac93 100644 --- a/manage-view/src/components/ListLog/ListLog.jsx +++ b/manage-view/src/components/ListLog/ListLog.jsx @@ -1,12 +1,14 @@ import axios from "axios"; import React, { useEffect, useState } from "react"; import { Link, Navigate, useParams } from "react-router-dom"; -import { getListLog } from "../../api/apiLog"; +import { findValue, getListLog } from "../../api/apiLog"; import "./ListLog.css"; const ListLog = () => { const [listFile, setListFile] = useState([]); const [status, setStatus] = useState(200); const [nameSearch, setNameSearch] = useState(""); + const [valueSearch, setValueSearch] = useState(""); + const [value, setValue] = useState(""); const getListFile = async () => { try { const res = await axios.get(getListLog); @@ -17,6 +19,15 @@ const ListLog = () => { } }; + const findValueInLog = async () =>{ + try { + const res = await axios.get(findValue); + + setValue(res.data) + } catch (error) { + console.log(error) + } + } useEffect(() => { getListFile(); }, []); @@ -25,28 +36,59 @@ const ListLog = () => { return (