now remove everything and then Build a IoT Dashboard with the same color theme for regular and dark theme, and the keep the multillinguage selection.
Browse files- index.html +3 -7
- iot-dashboard.html +261 -126
index.html
CHANGED
|
@@ -52,13 +52,9 @@
|
|
| 52 |
<div class="max-w-6xl mx-auto flex justify-between items-center">
|
| 53 |
<div class="flex items-center space-x-4">
|
| 54 |
<div class="flex items-center">
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
<div class="hidden md:flex space-x-6 ml-6">
|
| 59 |
-
<a href="index.html" class="text-gray-700 dark:text-gray-200 hover:text-primary-500 dark:hover:text-primary-400">Login</a>
|
| 60 |
-
<a href="iot-dashboard.html" class="text-primary-500 dark:text-primary-400 font-medium">IoT Dashboard</a>
|
| 61 |
-
</div>
|
| 62 |
</div>
|
| 63 |
<div class="flex items-center space-x-4">
|
| 64 |
<!-- Language Selector -->
|
|
|
|
| 52 |
<div class="max-w-6xl mx-auto flex justify-between items-center">
|
| 53 |
<div class="flex items-center space-x-4">
|
| 54 |
<div class="flex items-center">
|
| 55 |
+
<i data-feather="lock" class="text-primary-500 dark:text-primary-400 w-6 h-6"></i>
|
| 56 |
+
<span class="ml-2 font-semibold text-gray-800 dark:text-white">AuthPortal Pro</span>
|
| 57 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
</div>
|
| 59 |
<div class="flex items-center space-x-4">
|
| 60 |
<!-- Language Selector -->
|
iot-dashboard.html
CHANGED
|
@@ -46,9 +46,15 @@
|
|
| 46 |
<div class="max-w-7xl mx-auto flex justify-between items-center">
|
| 47 |
<div class="flex items-center space-x-4">
|
| 48 |
<div class="flex items-center">
|
| 49 |
-
<i data-feather="
|
| 50 |
<span class="ml-2 font-semibold text-gray-800 dark:text-white">IoT Dashboard</span>
|
| 51 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
</div>
|
| 53 |
<div class="flex items-center space-x-4">
|
| 54 |
<!-- Language Selector -->
|
|
@@ -68,158 +74,283 @@
|
|
| 68 |
<button id="theme-toggle" class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm p-2">
|
| 69 |
<i id="theme-icon" data-feather="moon" class="w-5 h-5"></i>
|
| 70 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
</div>
|
| 72 |
</div>
|
| 73 |
</nav>
|
| 74 |
|
| 75 |
<!-- Main Content -->
|
| 76 |
-
<main class="flex-grow
|
| 77 |
<div class="max-w-7xl mx-auto">
|
| 78 |
-
<!--
|
| 79 |
-
<div class="
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 82 |
-
<div class="flex items-center">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
<div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900/30">
|
| 84 |
<i data-feather="cpu" class="h-6 w-6 text-primary-500 dark:text-primary-400"></i>
|
| 85 |
</div>
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
| 89 |
</div>
|
| 90 |
</div>
|
| 91 |
</div>
|
| 92 |
|
| 93 |
<!-- Temperature -->
|
| 94 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 95 |
-
<div class="flex items-center">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
<div class="p-3 rounded-full bg-red-100 dark:bg-red-900/30">
|
| 97 |
<i data-feather="thermometer" class="h-6 w-6 text-red-500 dark:text-red-400"></i>
|
| 98 |
</div>
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
| 102 |
</div>
|
| 103 |
</div>
|
| 104 |
</div>
|
| 105 |
|
| 106 |
<!-- Humidity -->
|
| 107 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 108 |
-
<div class="flex items-center">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
<div class="p-3 rounded-full bg-blue-100 dark:bg-blue-900/30">
|
| 110 |
<i data-feather="droplet" class="h-6 w-6 text-blue-500 dark:text-blue-400"></i>
|
| 111 |
</div>
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
| 115 |
</div>
|
| 116 |
</div>
|
| 117 |
</div>
|
| 118 |
|
| 119 |
-
<!--
|
| 120 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 121 |
-
<div class="flex items-center">
|
| 122 |
-
<div
|
| 123 |
-
<
|
|
|
|
| 124 |
</div>
|
| 125 |
-
<div class="
|
| 126 |
-
<
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
</div>
|
| 129 |
</div>
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
-
<!-- Charts
|
| 134 |
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-
|
| 135 |
<!-- Temperature Chart -->
|
| 136 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 137 |
-
<
|
| 138 |
-
|
| 139 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
</div>
|
|
|
|
| 141 |
</div>
|
| 142 |
|
| 143 |
<!-- Humidity Chart -->
|
| 144 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 145 |
-
<
|
| 146 |
-
|
| 147 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
</div>
|
|
|
|
| 149 |
</div>
|
| 150 |
</div>
|
| 151 |
|
| 152 |
-
<!-- Device
|
| 153 |
<div class="card bg-white dark:bg-gray-800 rounded-lg overflow-hidden">
|
| 154 |
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
|
| 155 |
-
<
|
| 156 |
</div>
|
| 157 |
-
<div class="
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
<
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
<
|
| 166 |
-
<
|
| 167 |
-
</
|
| 168 |
-
</
|
| 169 |
-
<
|
| 170 |
-
<
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
<
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
<
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
<
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
<
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
</div>
|
| 220 |
-
<div class="flex
|
| 221 |
-
<
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
</div>
|
| 224 |
</div>
|
| 225 |
</div>
|
|
@@ -267,13 +398,14 @@
|
|
| 267 |
const tempChart = new Chart(tempCtx, {
|
| 268 |
type: 'line',
|
| 269 |
data: {
|
| 270 |
-
labels:
|
| 271 |
datasets: [{
|
| 272 |
label: 'Temperature (°C)',
|
| 273 |
-
data: [20, 19,
|
| 274 |
borderColor: '#EF4444',
|
| 275 |
backgroundColor: 'rgba(239, 68, 68, 0.1)',
|
| 276 |
-
|
|
|
|
| 277 |
fill: true
|
| 278 |
}]
|
| 279 |
},
|
|
@@ -283,25 +415,25 @@
|
|
| 283 |
plugins: {
|
| 284 |
legend: {
|
| 285 |
labels: {
|
| 286 |
-
color: html.classList.contains('dark') ? '#F3F4F6' : '#
|
| 287 |
}
|
| 288 |
}
|
| 289 |
},
|
| 290 |
scales: {
|
| 291 |
-
|
| 292 |
-
ticks: {
|
| 293 |
-
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 294 |
-
},
|
| 295 |
grid: {
|
| 296 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 297 |
-
}
|
| 298 |
-
},
|
| 299 |
-
x: {
|
| 300 |
ticks: {
|
| 301 |
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 302 |
-
}
|
|
|
|
|
|
|
| 303 |
grid: {
|
| 304 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
|
|
|
|
|
|
|
|
|
| 305 |
}
|
| 306 |
}
|
| 307 |
}
|
|
@@ -313,13 +445,14 @@
|
|
| 313 |
const humidityChart = new Chart(humidityCtx, {
|
| 314 |
type: 'line',
|
| 315 |
data: {
|
| 316 |
-
labels:
|
| 317 |
datasets: [{
|
| 318 |
label: 'Humidity (%)',
|
| 319 |
-
data: [
|
| 320 |
borderColor: '#3B82F6',
|
| 321 |
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 322 |
-
|
|
|
|
| 323 |
fill: true
|
| 324 |
}]
|
| 325 |
},
|
|
@@ -329,25 +462,25 @@
|
|
| 329 |
plugins: {
|
| 330 |
legend: {
|
| 331 |
labels: {
|
| 332 |
-
color: html.classList.contains('dark') ? '#F3F4F6' : '#
|
| 333 |
}
|
| 334 |
}
|
| 335 |
},
|
| 336 |
scales: {
|
| 337 |
-
|
| 338 |
-
ticks: {
|
| 339 |
-
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 340 |
-
},
|
| 341 |
grid: {
|
| 342 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 343 |
-
}
|
| 344 |
-
},
|
| 345 |
-
x: {
|
| 346 |
ticks: {
|
| 347 |
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 348 |
-
}
|
|
|
|
|
|
|
| 349 |
grid: {
|
| 350 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
|
|
|
|
|
|
|
|
|
| 351 |
}
|
| 352 |
}
|
| 353 |
}
|
|
@@ -355,9 +488,11 @@
|
|
| 355 |
});
|
| 356 |
}
|
| 357 |
|
| 358 |
-
// Initialize feather icons and charts
|
| 359 |
-
|
| 360 |
-
|
|
|
|
|
|
|
| 361 |
</script>
|
| 362 |
</body>
|
| 363 |
</html>
|
|
|
|
| 46 |
<div class="max-w-7xl mx-auto flex justify-between items-center">
|
| 47 |
<div class="flex items-center space-x-4">
|
| 48 |
<div class="flex items-center">
|
| 49 |
+
<i data-feather="wifi" class="text-primary-500 dark:text-primary-400 w-6 h-6"></i>
|
| 50 |
<span class="ml-2 font-semibold text-gray-800 dark:text-white">IoT Dashboard</span>
|
| 51 |
</div>
|
| 52 |
+
<div class="hidden md:flex space-x-1">
|
| 53 |
+
<a href="#" class="px-3 py-2 text-sm font-medium rounded-md text-primary-500 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/30">Dashboard</a>
|
| 54 |
+
<a href="#" class="px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Devices</a>
|
| 55 |
+
<a href="#" class="px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Alerts</a>
|
| 56 |
+
<a href="#" class="px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Settings</a>
|
| 57 |
+
</div>
|
| 58 |
</div>
|
| 59 |
<div class="flex items-center space-x-4">
|
| 60 |
<!-- Language Selector -->
|
|
|
|
| 74 |
<button id="theme-toggle" class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm p-2">
|
| 75 |
<i id="theme-icon" data-feather="moon" class="w-5 h-5"></i>
|
| 76 |
</button>
|
| 77 |
+
<!-- User Profile -->
|
| 78 |
+
<div class="relative">
|
| 79 |
+
<button class="flex items-center space-x-2 focus:outline-none">
|
| 80 |
+
<div class="h-8 w-8 rounded-full bg-primary-100 dark:bg-primary-900/30 flex items-center justify-center">
|
| 81 |
+
<i data-feather="user" class="h-4 w-4 text-primary-500 dark:text-primary-400"></i>
|
| 82 |
+
</div>
|
| 83 |
+
<span class="hidden md:inline text-sm font-medium text-gray-700 dark:text-gray-300">Admin</span>
|
| 84 |
+
</button>
|
| 85 |
+
</div>
|
| 86 |
</div>
|
| 87 |
</div>
|
| 88 |
</nav>
|
| 89 |
|
| 90 |
<!-- Main Content -->
|
| 91 |
+
<main class="flex-grow p-6">
|
| 92 |
<div class="max-w-7xl mx-auto">
|
| 93 |
+
<!-- Header -->
|
| 94 |
+
<div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6">
|
| 95 |
+
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Device Dashboard</h1>
|
| 96 |
+
<div class="flex space-x-2">
|
| 97 |
+
<button class="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
| 98 |
+
<i data-feather="refresh-cw" class="mr-2 h-4 w-4"></i>
|
| 99 |
+
Refresh
|
| 100 |
+
</button>
|
| 101 |
+
<button class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-500 hover:bg-primary-600">
|
| 102 |
+
<i data-feather="plus" class="mr-2 h-4 w-4"></i>
|
| 103 |
+
Add Device
|
| 104 |
+
</button>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<!-- Stats Cards -->
|
| 109 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
|
| 110 |
+
<!-- Active Devices -->
|
| 111 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 112 |
+
<div class="flex items-center justify-between">
|
| 113 |
+
<div>
|
| 114 |
+
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Active Devices</p>
|
| 115 |
+
<p class="text-2xl font-bold text-gray-900 dark:text-white">24</p>
|
| 116 |
+
</div>
|
| 117 |
<div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900/30">
|
| 118 |
<i data-feather="cpu" class="h-6 w-6 text-primary-500 dark:text-primary-400"></i>
|
| 119 |
</div>
|
| 120 |
+
</div>
|
| 121 |
+
<div class="mt-4">
|
| 122 |
+
<div class="flex items-center text-sm text-green-500">
|
| 123 |
+
<i data-feather="trending-up" class="h-4 w-4 mr-1"></i>
|
| 124 |
+
<span>12% from last week</span>
|
| 125 |
</div>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
|
| 129 |
<!-- Temperature -->
|
| 130 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 131 |
+
<div class="flex items-center justify-between">
|
| 132 |
+
<div>
|
| 133 |
+
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Avg Temperature</p>
|
| 134 |
+
<p class="text-2xl font-bold text-gray-900 dark:text-white">23.5°C</p>
|
| 135 |
+
</div>
|
| 136 |
<div class="p-3 rounded-full bg-red-100 dark:bg-red-900/30">
|
| 137 |
<i data-feather="thermometer" class="h-6 w-6 text-red-500 dark:text-red-400"></i>
|
| 138 |
</div>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="mt-4">
|
| 141 |
+
<div class="flex items-center text-sm text-yellow-500">
|
| 142 |
+
<i data-feather="alert-circle" class="h-4 w-4 mr-1"></i>
|
| 143 |
+
<span>1.2°C above average</span>
|
| 144 |
</div>
|
| 145 |
</div>
|
| 146 |
</div>
|
| 147 |
|
| 148 |
<!-- Humidity -->
|
| 149 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 150 |
+
<div class="flex items-center justify-between">
|
| 151 |
+
<div>
|
| 152 |
+
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Avg Humidity</p>
|
| 153 |
+
<p class="text-2xl font-bold text-gray-900 dark:text-white">65%</p>
|
| 154 |
+
</div>
|
| 155 |
<div class="p-3 rounded-full bg-blue-100 dark:bg-blue-900/30">
|
| 156 |
<i data-feather="droplet" class="h-6 w-6 text-blue-500 dark:text-blue-400"></i>
|
| 157 |
</div>
|
| 158 |
+
</div>
|
| 159 |
+
<div class="mt-4">
|
| 160 |
+
<div class="flex items-center text-sm text-green-500">
|
| 161 |
+
<i data-feather="check-circle" class="h-4 w-4 mr-1"></i>
|
| 162 |
+
<span>Within optimal range</span>
|
| 163 |
</div>
|
| 164 |
</div>
|
| 165 |
</div>
|
| 166 |
|
| 167 |
+
<!-- Alerts -->
|
| 168 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 169 |
+
<div class="flex items-center justify-between">
|
| 170 |
+
<div>
|
| 171 |
+
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Active Alerts</p>
|
| 172 |
+
<p class="text-2xl font-bold text-gray-900 dark:text-white">3</p>
|
| 173 |
</div>
|
| 174 |
+
<div class="p-3 rounded-full bg-yellow-100 dark:bg-yellow-900/30">
|
| 175 |
+
<i data-feather="alert-triangle" class="h-6 w-6 text-yellow-500 dark:text-yellow-400"></i>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
<div class="mt-4">
|
| 179 |
+
<div class="flex items-center text-sm text-red-500">
|
| 180 |
+
<i data-feather="arrow-up" class="h-4 w-4 mr-1"></i>
|
| 181 |
+
<span>2 new today</span>
|
| 182 |
</div>
|
| 183 |
</div>
|
| 184 |
</div>
|
| 185 |
</div>
|
| 186 |
|
| 187 |
+
<!-- Charts Row -->
|
| 188 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
|
| 189 |
<!-- Temperature Chart -->
|
| 190 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 191 |
+
<div class="flex items-center justify-between mb-4">
|
| 192 |
+
<h2 class="text-lg font-medium text-gray-900 dark:text-white">Temperature Trends</h2>
|
| 193 |
+
<div class="flex space-x-2">
|
| 194 |
+
<button class="text-xs px-2 py-1 rounded bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300">24h</button>
|
| 195 |
+
<button class="text-xs px-2 py-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700">7d</button>
|
| 196 |
+
<button class="text-xs px-2 py-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700">30d</button>
|
| 197 |
+
</div>
|
| 198 |
</div>
|
| 199 |
+
<canvas id="temperatureChart" height="250"></canvas>
|
| 200 |
</div>
|
| 201 |
|
| 202 |
<!-- Humidity Chart -->
|
| 203 |
<div class="card bg-white dark:bg-gray-800 rounded-lg p-6">
|
| 204 |
+
<div class="flex items-center justify-between mb-4">
|
| 205 |
+
<h2 class="text-lg font-medium text-gray-900 dark:text-white">Humidity Levels</h2>
|
| 206 |
+
<div class="flex space-x-2">
|
| 207 |
+
<button class="text-xs px-2 py-1 rounded bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300">24h</button>
|
| 208 |
+
<button class="text-xs px-2 py-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700">7d</button>
|
| 209 |
+
<button class="text-xs px-2 py-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700">30d</button>
|
| 210 |
+
</div>
|
| 211 |
</div>
|
| 212 |
+
<canvas id="humidityChart" height="250"></canvas>
|
| 213 |
</div>
|
| 214 |
</div>
|
| 215 |
|
| 216 |
+
<!-- Device Status Table -->
|
| 217 |
<div class="card bg-white dark:bg-gray-800 rounded-lg overflow-hidden">
|
| 218 |
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
|
| 219 |
+
<h2 class="text-lg font-medium text-gray-900 dark:text-white">Connected Devices</h2>
|
| 220 |
</div>
|
| 221 |
+
<div class="overflow-x-auto">
|
| 222 |
+
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
| 223 |
+
<thead class="bg-gray-50 dark:bg-gray-700">
|
| 224 |
+
<tr>
|
| 225 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Device</th>
|
| 226 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Status</th>
|
| 227 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Temperature</th>
|
| 228 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Humidity</th>
|
| 229 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Last Active</th>
|
| 230 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Actions</th>
|
| 231 |
+
</tr>
|
| 232 |
+
</thead>
|
| 233 |
+
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
|
| 234 |
+
<tr>
|
| 235 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 236 |
+
<div class="flex items-center">
|
| 237 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
|
| 238 |
+
<i data-feather="thermometer" class="h-5 w-5 text-blue-500 dark:text-blue-400"></i>
|
| 239 |
+
</div>
|
| 240 |
+
<div class="ml-4">
|
| 241 |
+
<div class="text-sm font-medium text-gray-900 dark:text-white">Living Room Sensor</div>
|
| 242 |
+
<div class="text-sm text-gray-500 dark:text-gray-400">ID: SENS-001</div>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
</td>
|
| 246 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 247 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300">
|
| 248 |
+
Active
|
| 249 |
+
</span>
|
| 250 |
+
</td>
|
| 251 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 252 |
+
22.4°C
|
| 253 |
+
</td>
|
| 254 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 255 |
+
62%
|
| 256 |
+
</td>
|
| 257 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
| 258 |
+
2 minutes ago
|
| 259 |
+
</td>
|
| 260 |
+
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
| 261 |
+
<button class="text-primary-500 dark:text-primary-400 hover:text-primary-600 dark:hover:text-primary-300 mr-3">
|
| 262 |
+
<i data-feather="settings" class="h-4 w-4"></i>
|
| 263 |
+
</button>
|
| 264 |
+
<button class="text-red-500 dark:text-red-400 hover:text-red-600 dark:hover:text-red-300">
|
| 265 |
+
<i data-feather="trash-2" class="h-4 w-4"></i>
|
| 266 |
+
</button>
|
| 267 |
+
</td>
|
| 268 |
+
</tr>
|
| 269 |
+
<tr>
|
| 270 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 271 |
+
<div class="flex items-center">
|
| 272 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center">
|
| 273 |
+
<i data-feather="thermometer" class="h-5 w-5 text-blue-500 dark:text-blue-400"></i>
|
| 274 |
+
</div>
|
| 275 |
+
<div class="ml-4">
|
| 276 |
+
<div class="text-sm font-medium text-gray-900 dark:text-white">Kitchen Sensor</div>
|
| 277 |
+
<div class="text-sm text-gray-500 dark:text-gray-400">ID: SENS-002</div>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
</td>
|
| 281 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 282 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300">
|
| 283 |
+
Active
|
| 284 |
+
</span>
|
| 285 |
+
</td>
|
| 286 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 287 |
+
24.1°C
|
| 288 |
+
</td>
|
| 289 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 290 |
+
58%
|
| 291 |
+
</td>
|
| 292 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
| 293 |
+
5 minutes ago
|
| 294 |
+
</td>
|
| 295 |
+
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
| 296 |
+
<button class="text-primary-500 dark:text-primary-400 hover:text-primary-600 dark:hover:text-primary-300 mr-3">
|
| 297 |
+
<i data-feather="settings" class="h-4 w-4"></i>
|
| 298 |
+
</button>
|
| 299 |
+
<button class="text-red-500 dark:text-red-400 hover:text-red-600 dark:hover:text-red-300">
|
| 300 |
+
<i data-feather="trash-2" class="h-4 w-4"></i>
|
| 301 |
+
</button>
|
| 302 |
+
</td>
|
| 303 |
+
</tr>
|
| 304 |
+
<tr>
|
| 305 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 306 |
+
<div class="flex items-center">
|
| 307 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center">
|
| 308 |
+
<i data-feather="alert-triangle" class="h-5 w-5 text-yellow-500 dark:text-yellow-400"></i>
|
| 309 |
+
</div>
|
| 310 |
+
<div class="ml-4">
|
| 311 |
+
<div class="text-sm font-medium text-gray-900 dark:text-white">Bedroom Sensor</div>
|
| 312 |
+
<div class="text-sm text-gray-500 dark:text-gray-400">ID: SENS-003</div>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
</td>
|
| 316 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 317 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300">
|
| 318 |
+
Warning
|
| 319 |
+
</span>
|
| 320 |
+
</td>
|
| 321 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 322 |
+
28.7°C
|
| 323 |
+
</td>
|
| 324 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
| 325 |
+
45%
|
| 326 |
+
</td>
|
| 327 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
| 328 |
+
15 minutes ago
|
| 329 |
+
</td>
|
| 330 |
+
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
| 331 |
+
<button class="text-primary-500 dark:text-primary-400 hover:text-primary-600 dark:hover:text-primary-300 mr-3">
|
| 332 |
+
<i data-feather="settings" class="h-4 w-4"></i>
|
| 333 |
+
</button>
|
| 334 |
+
<button class="text-red-500 dark:text-red-400 hover:text-red-600 dark:hover:text-red-300">
|
| 335 |
+
<i data-feather="trash-2" class="h-4 w-4"></i>
|
| 336 |
+
</button>
|
| 337 |
+
</td>
|
| 338 |
+
</tr>
|
| 339 |
+
</tbody>
|
| 340 |
+
</table>
|
| 341 |
+
</div>
|
| 342 |
+
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
|
| 343 |
+
<div class="flex items-center justify-between">
|
| 344 |
+
<div class="text-sm text-gray-500 dark:text-gray-400">
|
| 345 |
+
Showing <span class="font-medium">1</span> to <span class="font-medium">3</span> of <span class="font-medium">24</span> devices
|
| 346 |
</div>
|
| 347 |
+
<div class="flex space-x-2">
|
| 348 |
+
<button class="px-3 py-1 rounded-md border border-gray-300 dark:border-gray-600 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
| 349 |
+
Previous
|
| 350 |
+
</button>
|
| 351 |
+
<button class="px-3 py-1 rounded-md border border-gray-300 dark:border-gray-600 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
| 352 |
+
Next
|
| 353 |
+
</button>
|
| 354 |
</div>
|
| 355 |
</div>
|
| 356 |
</div>
|
|
|
|
| 398 |
const tempChart = new Chart(tempCtx, {
|
| 399 |
type: 'line',
|
| 400 |
data: {
|
| 401 |
+
labels: Array.from({length: 24}, (_, i) => `${i}:00`),
|
| 402 |
datasets: [{
|
| 403 |
label: 'Temperature (°C)',
|
| 404 |
+
data: [22, 21, 20, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 19],
|
| 405 |
borderColor: '#EF4444',
|
| 406 |
backgroundColor: 'rgba(239, 68, 68, 0.1)',
|
| 407 |
+
borderWidth: 2,
|
| 408 |
+
tension: 0.3,
|
| 409 |
fill: true
|
| 410 |
}]
|
| 411 |
},
|
|
|
|
| 415 |
plugins: {
|
| 416 |
legend: {
|
| 417 |
labels: {
|
| 418 |
+
color: html.classList.contains('dark') ? '#F3F4F6' : '#111827'
|
| 419 |
}
|
| 420 |
}
|
| 421 |
},
|
| 422 |
scales: {
|
| 423 |
+
x: {
|
|
|
|
|
|
|
|
|
|
| 424 |
grid: {
|
| 425 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 426 |
+
},
|
|
|
|
|
|
|
| 427 |
ticks: {
|
| 428 |
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 429 |
+
}
|
| 430 |
+
},
|
| 431 |
+
y: {
|
| 432 |
grid: {
|
| 433 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 434 |
+
},
|
| 435 |
+
ticks: {
|
| 436 |
+
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 437 |
}
|
| 438 |
}
|
| 439 |
}
|
|
|
|
| 445 |
const humidityChart = new Chart(humidityCtx, {
|
| 446 |
type: 'line',
|
| 447 |
data: {
|
| 448 |
+
labels: Array.from({length: 24}, (_, i) => `${i}:00`),
|
| 449 |
datasets: [{
|
| 450 |
label: 'Humidity (%)',
|
| 451 |
+
data: [65, 64, 63, 62, 63, 64, 65, 66, 67, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 60, 61, 62, 63, 64],
|
| 452 |
borderColor: '#3B82F6',
|
| 453 |
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 454 |
+
borderWidth: 2,
|
| 455 |
+
tension: 0.3,
|
| 456 |
fill: true
|
| 457 |
}]
|
| 458 |
},
|
|
|
|
| 462 |
plugins: {
|
| 463 |
legend: {
|
| 464 |
labels: {
|
| 465 |
+
color: html.classList.contains('dark') ? '#F3F4F6' : '#111827'
|
| 466 |
}
|
| 467 |
}
|
| 468 |
},
|
| 469 |
scales: {
|
| 470 |
+
x: {
|
|
|
|
|
|
|
|
|
|
| 471 |
grid: {
|
| 472 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 473 |
+
},
|
|
|
|
|
|
|
| 474 |
ticks: {
|
| 475 |
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 476 |
+
}
|
| 477 |
+
},
|
| 478 |
+
y: {
|
| 479 |
grid: {
|
| 480 |
color: html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'
|
| 481 |
+
},
|
| 482 |
+
ticks: {
|
| 483 |
+
color: html.classList.contains('dark') ? '#9CA3AF' : '#6B7280'
|
| 484 |
}
|
| 485 |
}
|
| 486 |
}
|
|
|
|
| 488 |
});
|
| 489 |
}
|
| 490 |
|
| 491 |
+
// Initialize feather icons and charts when DOM is loaded
|
| 492 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 493 |
+
feather.replace();
|
| 494 |
+
initCharts();
|
| 495 |
+
});
|
| 496 |
</script>
|
| 497 |
</body>
|
| 498 |
</html>
|