update findValue
This commit is contained in:
parent
3a377f9f25
commit
ecf5cc4ccf
|
|
@ -11,7 +11,7 @@ const ListLog = () => {
|
|||
const [value, setValue] = useState("");
|
||||
const getListFile = async () => {
|
||||
try {
|
||||
const res = await axios.get(getListLog,{value: value});
|
||||
const res = await axios.get(getListLog);
|
||||
setListFile(res.data);
|
||||
setStatus(res.status);
|
||||
} catch (error) {
|
||||
|
|
@ -21,7 +21,7 @@ const ListLog = () => {
|
|||
|
||||
const findValueInLog = async () =>{
|
||||
try {
|
||||
const res = await axios.post(findValue);
|
||||
const res = await axios.post(findValue,{value: value});
|
||||
|
||||
setValue(res.data)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ Route.post("/api/find-value", async ({ request, response }) => {
|
|||
try {
|
||||
const { value } = request.all();
|
||||
|
||||
console.log(value)
|
||||
const { stdout, stderr } = await exec(`grep -nr "${value}" /home/logs`);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue