create manage-view, update message zulip

This commit is contained in:
joseph le 2023-08-30 16:27:46 +07:00
parent 0aa445960e
commit b5fd751756
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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