create manage-view, update message zulip
This commit is contained in:
parent
0aa445960e
commit
b5fd751756
|
|
@ -72,7 +72,7 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
const filePath = `${folderPath}/${fileName}`;
|
||||
const scan = fs.watchFile(
|
||||
filePath,
|
||||
{ interval: 5000 },
|
||||
{ interval: 120000 },
|
||||
async (eventType) => {
|
||||
//check special item, extra RAM, error in log
|
||||
let lines = [];
|
||||
|
|
@ -143,7 +143,6 @@ export async function runtimeCheckLogs(folderPath) {
|
|||
.readFileSync(filePath)
|
||||
.toString()
|
||||
?.split("\n");
|
||||
console.log(file)
|
||||
if (logsDetect[0].length > 10) {
|
||||
spoiler = spoiler + "```spoiler ..."+ (logsDetect[0].length - 5) +" more items\n" + content
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ Route.post("/api/account/checkLogin", "UsersController.checkLogin");
|
|||
|
||||
//Log
|
||||
Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
||||
try {
|
||||
const content = await axios.get(
|
||||
"http://192.168.5.7:8080/" + request.params().name
|
||||
);
|
||||
|
|
@ -103,6 +104,11 @@ Route.get("/api/log/showLog/:name?", async ({ request, response }) => {
|
|||
</body>\
|
||||
</html>"
|
||||
);
|
||||
} catch (error) {
|
||||
response.send(
|
||||
"<h1>-------------- File not found --------------</h1>"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
//Key-Value
|
||||
|
|
|
|||
Loading…
Reference in New Issue