68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
<!-- views/home.ejs -->
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Home</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
<h1>ECOSAVER MANAGEMENT</h1>
|
|
</header>
|
|
|
|
<nav>
|
|
<a href="/inusers">In-House Users</a>
|
|
<a href="#">Users</a>
|
|
<a href="/sensors">Sensors</a>
|
|
<a href="/locations">Locations</a>
|
|
<a href="/apilog">Api Logs</a>
|
|
<a href="/logout">Logout</a>
|
|
</nav>
|
|
|
|
<main>
|
|
<h2>Welcome to the Home Page, <%= username %>!</h2>
|
|
</main>
|
|
<section>
|
|
<div class="health-container">
|
|
<h4>Server Uptime</h4>
|
|
<ul>
|
|
<li><strong>Uptime:</strong> <span id="serverUptime"><%= systemHealth && systemHealth.serverStatus ? (systemHealth.serverStatus.uptime / 60).toFixed(2) : 'N/A' %> minutes</span></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="health-container">
|
|
<h4>Database Status</h4>
|
|
<ul>
|
|
<li><strong>Status:</strong> <%= systemHealth && systemHealth.databaseStatus ? (systemHealth.databaseStatus.connected ? 'Connected' : 'Disconnected') : 'N/A' %></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="health-container">
|
|
<h4>CPU Usage</h4>
|
|
<ul>
|
|
<li><strong>Usage:</strong> <span id="cpuUsage"><%= systemHealth && systemHealth.resourceUtilization ? systemHealth.resourceUtilization.cpuUsage.toFixed(2) : 'N/A' %> %</span></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="health-container">
|
|
<h4>Memory Usage</h4>
|
|
<ul>
|
|
<li><strong>Usage:</strong> <%= systemHealth && systemHealth.resourceUtilization ? (systemHealth.resourceUtilization.memoryUsage.rss / (1024 * 1024)).toFixed(2) : 'N/A' %> MB</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
<footer>
|
|
Any Issue faced, Please contact the administrator at 11111111 or ecosaverAdmin@gmail.com
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html> |