update routes
This commit is contained in:
parent
82c0e81152
commit
32cee3e3d1
|
|
@ -52,6 +52,8 @@ Route.post("/api/account/checkLogin", "UsersController.checkLogin");
|
|||
//Log
|
||||
Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
||||
try {
|
||||
// fghf
|
||||
console.log(request.params().name)
|
||||
let fileDetect = await LogDetectFile.findBy(
|
||||
"file_name",
|
||||
request.params().name
|
||||
|
|
@ -125,41 +127,43 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
|||
});
|
||||
let modelSpecial = modelSpecialDetected.length>0?"\n\n<b>Extra items:</b>\n" + modelSpecialDetected.join("\n") + "\n":"\n"
|
||||
let issueItem = issueSpecialDetected.length>0?"\n<b>Issue found:</b>\n" + issueSpecialDetected.join("\n")+"\n\n":"\n";
|
||||
response.send(
|
||||
"<html>\
|
||||
<body>\
|
||||
<div style='width:100%;height:100%;word-wrap:break-word;white-space:pre;overflow: auto;font-family: monospace;text-rendering: auto;\
|
||||
color: fieldtext;\
|
||||
letter-spacing: normal;\
|
||||
word-spacing: normal;\
|
||||
line-height: normal;\
|
||||
text-transform: none;\
|
||||
text-indent: 0px;\
|
||||
text-shadow: none;\
|
||||
display: inline-block;\
|
||||
text-align: start;\
|
||||
appearance: auto;\
|
||||
-webkit-rtl-ordering: logical;\
|
||||
resize: auto;\
|
||||
cursor: text;\
|
||||
background-color: field;\
|
||||
column-count: initial !important;\
|
||||
writing-mode: horizontal-tb !important;\
|
||||
box-sizing: border-box;\
|
||||
margin: 0em;\
|
||||
border-width: 1px;\
|
||||
border-style: solid;\
|
||||
border-color: -internal-light-dark(rgb(118, 118, 118), rgb(133, 133, 133));\
|
||||
border-image: initial;\
|
||||
padding: 2px;'><b>"+request.params().name+"</b>" + modelSpecial + issueItem
|
||||
+
|
||||
data.join("\n") +
|
||||
"</div>\
|
||||
</body>\
|
||||
</html>"
|
||||
);
|
||||
// response.send(
|
||||
// "<html>\
|
||||
// <body>\
|
||||
// <div style='width:100%;height:100%;word-wrap:break-word;white-space:pre;overflow: auto;font-family: monospace;text-rendering: auto;\
|
||||
// color: fieldtext;\
|
||||
// letter-spacing: normal;\
|
||||
// word-spacing: normal;\
|
||||
// line-height: normal;\
|
||||
// text-transform: none;\
|
||||
// text-indent: 0px;\
|
||||
// text-shadow: none;\
|
||||
// display: inline-block;\
|
||||
// text-align: start;\
|
||||
// appearance: auto;\
|
||||
// -webkit-rtl-ordering: logical;\
|
||||
// resize: auto;\
|
||||
// cursor: text;\
|
||||
// background-color: field;\
|
||||
// column-count: initial !important;\
|
||||
// writing-mode: horizontal-tb !important;\
|
||||
// box-sizing: border-box;\
|
||||
// margin: 0em;\
|
||||
// border-width: 1px;\
|
||||
// border-style: solid;\
|
||||
// border-color: -internal-light-dark(rgb(118, 118, 118), rgb(133, 133, 133));\
|
||||
// border-image: initial;\
|
||||
// padding: 2px;'><b>"+request.params().name+"</b>" + modelSpecial + issueItem
|
||||
// +
|
||||
// data.join("\n") +
|
||||
// "</div>\
|
||||
// </body>\
|
||||
// </html>"
|
||||
// );
|
||||
|
||||
response.status(200).send({modelSpecial:modelSpecial, issueItem:issueItem, contentFile: data.join("\n")})
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.error(error);
|
||||
response.send("<h1>-------------- File not found --------------</h1>");
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue