87 lines
2.8 KiB
Plaintext
87 lines
2.8 KiB
Plaintext
<!-- views/sensor.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="#" id="allSensorLink">All Sensor</a>
|
|
<a href="#"id="addSensorLink">Add Sensor</a>
|
|
<a href="#">Update Sensor</a>
|
|
<a href="#">Delete Sensor</a>
|
|
<a href="/home" id="homeLink">Home</a>
|
|
</nav>
|
|
|
|
<main>
|
|
<h2>Welcome to the Sensor Page</h2>
|
|
</main>
|
|
<div id="sensorContainer">
|
|
<table class="nice-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Sensor Name</th>
|
|
<th>Added By</th>
|
|
<th>Mac Address</th>
|
|
<th>Description</th>
|
|
<th>Location</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="sensorTableBody"></tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="createSensorForm" class="sensor-creation-container" style="display: none;">
|
|
<h3>Add Sensor</h3>
|
|
<div class="content">
|
|
<form action="/api/v0/sensor/update" id="sensorForm" method="post">
|
|
<div class="Sensor-details">
|
|
<div class="input-box">
|
|
<span class="details">ID</span>
|
|
<input type="text" name="id" id="id" placeholder="Enter an ID Number" required>
|
|
</div>
|
|
<div class="input-box">
|
|
<span class="details">Sensor Name</span>
|
|
<input type="text" name="sensor" id="sensor" placeholder="Enter Sensor name" required>
|
|
</div>
|
|
<div class="input-box">
|
|
<span class="details">Mac Address</span>
|
|
<input type="text" name="macAddress" id="macAddress" placeholder="Enter the Mac Address" required>
|
|
</div>
|
|
<div class="input-box">
|
|
<span class="details">Description</span>
|
|
<input type="text" name="description" id="description" placeholder="Enter the description here" required>
|
|
</div>
|
|
<div class="input-box">
|
|
<span class="details">Location</span>
|
|
<select name="location" id="locationDropdown" required>
|
|
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="button">
|
|
<input type="submit" value="Submit">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
Any Issue faced, Please contact the administrator at 11111111 or ecosaverAdmin@gmail.com
|
|
</footer>
|
|
</body>
|
|
<script src="sensor.js"></script>
|
|
</html> |