change format file
This commit is contained in:
parent
abdcbb2357
commit
48a261b9d9
|
|
@ -102,7 +102,6 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
.filter((i) => i.$original.key === "MODEL_SPECIAL")
|
||||
.map((obj) => obj.$original.value);
|
||||
|
||||
console.log(listExtraItem)
|
||||
content.map((line, index) => {
|
||||
listKeyValues
|
||||
.map((obj) => obj.$original.value)
|
||||
|
|
|
|||
|
|
@ -77,6 +77,11 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
|||
i.$original.key === "MODEL_SPECIAL" ||
|
||||
i.$original.key === "CATCH_FAULTY"
|
||||
);
|
||||
|
||||
let listExcludeErr = allValue
|
||||
.filter((i) => i.$original.key === "EXCLUDE_ERR")
|
||||
.map((obj) => obj.$original.value);
|
||||
|
||||
let data = content.data.split("\n");
|
||||
data.map((line, index) => {
|
||||
data[index] =
|
||||
|
|
@ -99,7 +104,9 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
|||
});
|
||||
});
|
||||
listLine.map((u) => {
|
||||
if (listExcludeErr.filter((err) => u.includes(err)).length === 0) {
|
||||
detectedLines.push(data[u - 1]);
|
||||
}
|
||||
});
|
||||
// console.log(data)
|
||||
response.send(
|
||||
|
|
@ -138,6 +145,7 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
|||
</html>"
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
response.send("<h1>-------------- File not found --------------</h1>");
|
||||
}
|
||||
});
|
||||
|
|
@ -184,8 +192,8 @@ Route.post("/api/gitea-webhook", ({ request, response }) => {
|
|||
// }
|
||||
console.log(request.headers());
|
||||
console.log(request.all());
|
||||
console.log("first3215423")
|
||||
console.log("New event ---> ", request.header('x-gitea-event'));
|
||||
console.log("first3215423");
|
||||
console.log("New event ---> ", request.header("x-gitea-event"));
|
||||
|
||||
// exec(
|
||||
// "/home/joseph/adonis-gitlab-webhook/gitea.sh",
|
||||
|
|
|
|||
Loading…
Reference in New Issue