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")
|
.filter((i) => i.$original.key === "MODEL_SPECIAL")
|
||||||
.map((obj) => obj.$original.value);
|
.map((obj) => obj.$original.value);
|
||||||
|
|
||||||
console.log(listExtraItem)
|
|
||||||
content.map((line, index) => {
|
content.map((line, index) => {
|
||||||
listKeyValues
|
listKeyValues
|
||||||
.map((obj) => obj.$original.value)
|
.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 === "MODEL_SPECIAL" ||
|
||||||
i.$original.key === "CATCH_FAULTY"
|
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");
|
let data = content.data.split("\n");
|
||||||
data.map((line, index) => {
|
data.map((line, index) => {
|
||||||
data[index] =
|
data[index] =
|
||||||
|
|
@ -99,7 +104,9 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
listLine.map((u) => {
|
listLine.map((u) => {
|
||||||
detectedLines.push(data[u - 1]);
|
if (listExcludeErr.filter((err) => u.includes(err)).length === 0) {
|
||||||
|
detectedLines.push(data[u - 1]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
response.send(
|
response.send(
|
||||||
|
|
@ -138,6 +145,7 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
||||||
</html>"
|
</html>"
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
response.send("<h1>-------------- File not found --------------</h1>");
|
response.send("<h1>-------------- File not found --------------</h1>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -184,9 +192,9 @@ Route.post("/api/gitea-webhook", ({ request, response }) => {
|
||||||
// }
|
// }
|
||||||
console.log(request.headers());
|
console.log(request.headers());
|
||||||
console.log(request.all());
|
console.log(request.all());
|
||||||
console.log("first3215423")
|
console.log("first3215423");
|
||||||
console.log("New event ---> ", request.header('x-gitea-event'));
|
console.log("New event ---> ", request.header("x-gitea-event"));
|
||||||
|
|
||||||
// exec(
|
// exec(
|
||||||
// "/home/joseph/adonis-gitlab-webhook/gitea.sh",
|
// "/home/joseph/adonis-gitlab-webhook/gitea.sh",
|
||||||
// (error, stdout, stderr) => {
|
// (error, stdout, stderr) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue