mirror of https://github.com/Aelita4/sshmon.git
Code cleanup
This commit is contained in:
parent
a4166221de
commit
5fad7eb8cb
|
@ -1,6 +1,6 @@
|
|||
import express, { Request, Response } from 'express';
|
||||
import express from 'express';
|
||||
import Ping from 'ping';
|
||||
import { existsSync, readdirSync, writeFileSync, readFileSync } from 'fs';
|
||||
import { readdirSync } from 'fs';
|
||||
import sessions from "express-session"
|
||||
import cookieParser from "cookie-parser"
|
||||
import mysql from 'mysql'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { existsSync, writeFileSync, readFileSync } from 'fs'
|
||||
import { connection } from '../index.js';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { existsSync, writeFileSync, readFileSync } from 'fs'
|
||||
import { connection } from '../index.js';
|
||||
|
||||
export default {
|
||||
|
@ -20,8 +19,5 @@ export default {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
/*res.setHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify({ status: "OK" }));*/
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { readFileSync } from 'fs';
|
||||
import { getIP } from '../index.js';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -13,12 +13,6 @@
|
|||
const b = document.getElementById(ip + "_status");
|
||||
await fetch('http://localhost:8080/addIP/' + ip)
|
||||
window.location.reload(true);
|
||||
/*await fetch('http://localhost:8080/ping/' + ip)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
b.innerHTML = data.alive ? '<span style="color:green;">UP (' + data.numeric_host + ") " + data.time + 'ms</span>' : '<span style="color:red;">DOWN' + ((data.host == "unknown") ? " (UNKNOWN HOST)" : (" (" + data.numeric_host + ")")) + '</span>'
|
||||
});*/
|
||||
|
||||
}
|
||||
|
||||
async function removeIP(ip) {
|
||||
|
|
Loading…
Reference in New Issue