File: //home/jibhires/brightsolutionsindia.com/demo1.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Environmental Monitoring Dashboard</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #0f1b3a, #1c2e50);
color: white;
min-height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
.header {
padding: 15px 30px;
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.app-title {
font-size: 24px;
font-weight: 700;
background: linear-gradient(to right, #3498db, #1abc9c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.container {
display: grid;
grid-template-columns: 1fr 2fr 1fr;
height: calc(100vh - 70px);
padding: 20px;
gap: 20px;
}
.panel {
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.15);
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
.panel::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(to right, #3498db, #1abc9c);
}
/* Left Panel - Logo & Status */
.left-panel {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.logo-container {
text-align: center;
padding: 10px 0 30px;
}
.logo {
width: 140px;
height: 140px;
margin: 0 auto 15px;
border-radius: 50%;
background: #0a1a30;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
overflow: hidden;
border: 3px solid rgba(52, 152, 219, 0.3);
}
.logo img {
width: 80%;
height: 80%;
object-fit: contain;
}
.logo-text {
font-size: 24px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
background: linear-gradient(to right, #3498db, #1abc9c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.status-indicators {
display: flex;
flex-direction: column;
gap: 15px;
}
.status-item {
display: flex;
align-items: center;
gap: 10px;
padding: 12px;
background: rgba(255, 255, 255, 0.05);
border-radius: 10px;
border-left: 3px solid #3498db;
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
}
.online { background-color: #2ecc71; }
.active { background-color: #3498db; }
.stable { background-color: #f1c40f; }
.settings {
margin-top: 20px;
background: rgba(0, 0, 0, 0.2);
border-radius: 15px;
padding: 20px;
}
.settings-title {
font-size: 18px;
margin-bottom: 15px;
color: #3498db;
display: flex;
align-items: center;
gap: 8px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-size: 14px;
color: #a0b3c6;
}
.form-group input {
width: 100%;
padding: 10px;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: white;
font-size: 16px;
}
.btn {
width: 100%;
padding: 12px;
background: linear-gradient(to right, #3498db, #1abc9c);
border: none;
border-radius: 8px;
color: white;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
/* Center Panel - Main Readings */
.center-panel {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 40px;
}
.reading-container {
text-align: center;
width: 100%;
transition: all 0.3s;
}
.reading-label {
font-size: 28px;
font-weight: 600;
margin-bottom: 15px;
color: #ecf0f1;
letter-spacing: 1px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.reading-value {
font-size: 120px;
font-weight: 800;
line-height: 1;
text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
position: relative;
transition: all 0.5s;
}
.temperature .reading-value {
background: linear-gradient(to right, #ff9a9e, #fad0c4);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.humidity .reading-value {
background: linear-gradient(to right, #a1c4fd, #c2e9fb);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.reading-unit {
font-size: 40px;
position: absolute;
top: 10px;
margin-left: 5px;
}
.trend {
font-size: 18px;
margin-top: 10px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.up { color: #e74c3c; }
.down { color: #2ecc71; }
/* Alert styles */
.alert {
animation: blink 1s infinite;
}
@keyframes blink {
0% { opacity: 1; }
50% { opacity: 0.3; }
100% { opacity: 1; }
}
.alert-border {
box-shadow: 0 0 20px rgba(231, 76, 60, 0.7);
}
/* Right Panel - Time & Date */
.right-panel {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.time-container {
text-align: center;
margin-top: 20px;
}
.time {
font-size: 60px;
font-weight: 700;
letter-spacing: 2px;
margin-bottom: 10px;
background: linear-gradient(to right, #3498db, #1abc9c);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.date {
font-size: 24px;
font-weight: 500;
color: #ecf0f1;
letter-spacing: 1px;
}
.location {
text-align: center;
margin: 20px 0;
font-size: 18px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: #a0b3c6;
}
.sensor-data {
background: rgba(255, 255, 255, 0.05);
border-radius: 15px;
padding: 20px;
margin-top: 20px;
border-left: 3px solid #3498db;
}
.sensor-title {
text-align: center;
font-size: 18px;
margin-bottom: 15px;
color: #3498db;
}
.sensor-item {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sensor-value {
font-weight: 600;
color: #3498db;
}
/* Chart Container */
.chart-container {
width: 100%;
height: 150px;
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
margin-top: 30px;
position: relative;
overflow: hidden;
}
.chart {
position: absolute;
bottom: 0;
width: 100%;
height: 80%;
display: flex;
align-items: flex-end;
padding: 0 10px;
gap: 3px;
}
.chart-bar {
flex: 1;
background: linear-gradient(to top, #3498db, #1abc9c);
border-radius: 3px 3px 0 0;
min-height: 1px;
}
/* Alert banner */
.alert-banner {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(231, 76, 60, 0.9);
padding: 15px 30px;
border-radius: 50px;
font-weight: 600;
display: flex;
align-items: center;
gap: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
z-index: 1000;
opacity: 0;
transition: opacity 0.5s;
}
.alert-banner.show {
opacity: 1;
}
/* Responsive */
@media (max-width: 1200px) {
.reading-value {
font-size: 100px;
}
.time {
font-size: 50px;
}
}
@media (max-width: 992px) {
.container {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr auto;
padding: 10px;
}
.panel {
padding: 20px;
}
.reading-value {
font-size: 80px;
}
.time {
font-size: 40px;
}
}
</style>
</head>
<body>
<div class="header">
<div class="app-title">Environmental Monitoring Dashboard</div>
<div class="current-status">
<span>System Status: </span>
<span id="system-status" style="color:#2ecc71; font-weight:600">NORMAL</span>
</div>
</div>
<div class="container">
<!-- Left Panel -->
<div class="panel left-panel">
<div class="logo-container">
<div class="logo">
<img src="DAIKIN.png">
</div>
<div class="logo-text">Climate Control System</div>
</div>
<div class="status-indicators">
<div class="status-item">
<div class="status-dot online"></div>
<div>System Online</div>
</div>
<div class="status-item">
<div class="status-dot active"></div>
<div>Real-time Monitoring</div>
</div>
<div class="status-item">
<div class="status-dot stable"></div>
<div>Stable Conditions</div>
</div>
</div>
<div class="settings">
<div class="settings-title">
<i class="fas fa-sliders-h"></i>
<span>Set Alert Limits</span>
</div>
<form id="limits-form">
<div class="form-group">
<label for="temp-limit">Max Temperature (°C):</label>
<input type="number" id="temp-limit" step="0.1" value="26.0" min="15" max="40">
</div>
<div class="form-group">
<label for="hum-limit">Max Humidity (%):</label>
<input type="number" id="hum-limit" step="0.1" value="70.0" min="30" max="90">
</div>
<button type="button" class="btn" id="set-limits">
<i class="fas fa-save"></i> Apply Limits
</button>
</form>
</div>
</div>
<!-- Center Panel -->
<div class="panel center-panel">
<div class="reading-container temperature" id="temp-container">
<div class="reading-label">
<i class="fas fa-thermometer-half"></i>
<span>Temperature</span>
</div>
<div class="reading-value">
<span id="temp-value">24.7</span>
<span class="reading-unit">°C</span>
</div>
<div class="trend">
<i class="fas fa-arrow-up up"></i>
<span>+0.3° in last hour</span>
</div>
</div>
<div class="reading-container humidity" id="hum-container">
<div class="reading-label">
<i class="fas fa-tint"></i>
<span>Humidity</span>
</div>
<div class="reading-value">
<span id="hum-value">65.2</span>
<span class="reading-unit">%</span>
</div>
<div class="trend">
<i class="fas fa-arrow-down down"></i>
<span>-2.1% in last hour</span>
</div>
</div>
<div class="chart-container">
<div class="chart" id="temp-chart"></div>
</div>
</div>
<!-- Right Panel -->
<div class="panel right-panel">
<div>
<div class="time-container">
<div class="time" id="current-time">00:00:00</div>
<div class="date" id="current-date">Friday, July 25, 2025</div>
</div>
<div class="location">
<i class="fas fa-map-marker-alt"></i>
<span>Monitoring Station: Lab 3</span>
</div>
<div class="sensor-data">
<div class="sensor-title">Sensor Status</div>
<div class="sensor-item">
<span>Temp Sensor:</span>
<span class="sensor-value">Active <i class="fas fa-check-circle" style="color: #2ecc71;"></i></span>
</div>
<div class="sensor-item">
<span>Humidity Sensor:</span>
<span class="sensor-value">Active <i class="fas fa-check-circle" style="color: #2ecc71;"></i></span>
</div>
<div class="sensor-item">
<span>Last Calibration:</span>
<span class="sensor-value">2025-07-20</span>
</div>
<div class="sensor-item">
<span>Update Frequency:</span>
<span class="sensor-value">5 seconds</span>
</div>
</div>
</div>
<div class="chart-container">
<div class="chart" id="hum-chart"></div>
</div>
</div>
</div>
<div class="alert-banner" id="alert-banner">
<i class="fas fa-exclamation-triangle"></i>
<span id="alert-message">Alert: System parameter out of range!</span>
</div>
<script>
// Configuration
let tempLimit = 26.0;
let humLimit = 70.0;
let alertActive = false;
// DOM Elements
const tempValueEl = document.getElementById('temp-value');
const humValueEl = document.getElementById('hum-value');
const tempContainerEl = document.getElementById('temp-container');
const humContainerEl = document.getElementById('hum-container');
const alertBannerEl = document.getElementById('alert-banner');
const alertMessageEl = document.getElementById('alert-message');
const systemStatusEl = document.getElementById('system-status');
const tempLimitInput = document.getElementById('temp-limit');
const humLimitInput = document.getElementById('hum-limit');
const setLimitsBtn = document.getElementById('set-limits');
// Set limits from form
setLimitsBtn.addEventListener('click', () => {
tempLimit = parseFloat(tempLimitInput.value);
humLimit = parseFloat(humLimitInput.value);
// Show confirmation
alertMessageEl.textContent = `Limits updated: Temp ≤${tempLimit}°C, Humidity ≤${humLimit}%`;
alertBannerEl.classList.add('show');
setTimeout(() => {
alertBannerEl.classList.remove('show');
}, 3000);
});
// Update time and date
function updateDateTime() {
const now = new Date();
// Format time
const timeString = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit', second:'2-digit'});
document.getElementById('current-time').textContent = timeString;
// Format date
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const dateString = now.toLocaleDateString(undefined, options);
document.getElementById('current-date').textContent = dateString;
}
// Check if values exceed limits
function checkLimits(temp, hum) {
let tempAlert = false;
let humAlert = false;
// Reset all alerts first
tempContainerEl.classList.remove('alert');
humContainerEl.classList.remove('alert');
tempContainerEl.classList.remove('alert-border');
humContainerEl.classList.remove('alert-border');
// Check temperature
if (temp > tempLimit) {
tempContainerEl.classList.add('alert');
tempContainerEl.classList.add('alert-border');
tempAlert = true;
}
// Check humidity
if (hum > humLimit) {
humContainerEl.classList.add('alert');
humContainerEl.classList.add('alert-border');
humAlert = true;
}
// Update system status and alert banner
if (tempAlert || humAlert) {
systemStatusEl.textContent = "ALERT";
systemStatusEl.style.color = "#e74c3c";
let message = "Alert: ";
if (tempAlert && humAlert) {
message += `Temperature (${temp}°C) and Humidity (${hum}%) exceed limits!`;
} else if (tempAlert) {
message += `Temperature (${temp}°C) exceeds limit (${tempLimit}°C)!`;
} else {
message += `Humidity (${hum}%) exceeds limit (${humLimit}%)!`;
}
alertMessageEl.textContent = message;
alertBannerEl.classList.add('show');
alertActive = true;
} else if (alertActive) {
systemStatusEl.textContent = "NORMAL";
systemStatusEl.style.color = "#2ecc71";
alertBannerEl.classList.remove('show');
alertActive = false;
}
}
// Update sensor readings with random variations
function updateSensorData() {
// Temperature with random fluctuation
const tempElement = document.getElementById('temp-value');
let temp = parseFloat(tempElement.textContent);
temp = temp + (Math.random() - 0.5) * 0.3;
temp = Math.min(Math.max(temp, 23.5), 26.5);
tempElement.textContent = temp.toFixed(1);
// Humidity with random fluctuation
const humElement = document.getElementById('hum-value');
let hum = parseFloat(humElement.textContent);
hum = hum + (Math.random() - 0.5) * 0.5;
hum = Math.min(Math.max(hum, 62), 68);
humElement.textContent = hum.toFixed(1);
// Check if values exceed limits
checkLimits(temp, hum);
// Update charts
updateCharts(temp, hum);
}
// Initialize charts
function initializeCharts() {
const tempChart = document.getElementById('temp-chart');
const humChart = document.getElementById('hum-chart');
// Clear existing bars
tempChart.innerHTML = '';
humChart.innerHTML = '';
// Create initial bars for both charts
for (let i = 0; i < 24; i++) {
const tempBar = document.createElement('div');
tempBar.className = 'chart-bar';
tempBar.style.height = `${30 + Math.random() * 70}%`;
tempChart.appendChild(tempBar);
const humBar = document.createElement('div');
humBar.className = 'chart-bar';
humBar.style.height = `${40 + Math.random() * 60}%`;
humChart.appendChild(humBar);
}
}
// Update charts with new data
function updateCharts(temp, hum) {
const tempChart = document.getElementById('temp-chart');
const humChart = document.getElementById('hum-chart');
// Shift all bars to the left
const tempBars = tempChart.querySelectorAll('.chart-bar');
const humBars = humChart.querySelectorAll('.chart-bar');
// Remove the first bar
if (tempBars.length > 0) {
tempBars[0].remove();
humBars[0].remove();
}
// Add new bar to the end
const newTempBar = document.createElement('div');
newTempBar.className = 'chart-bar';
// Scale temperature to chart height (assuming 20-30°C range)
newTempBar.style.height = `${((temp - 20) / 10) * 100}%`;
tempChart.appendChild(newTempBar);
const newHumBar = document.createElement('div');
newHumBar.className = 'chart-bar';
// Scale humidity to chart height (assuming 50-80% range)
newHumBar.style.height = `${((hum - 50) / 30) * 100}%`;
humChart.appendChild(newHumBar);
}
// Initialize on page load
window.onload = function() {
updateDateTime();
initializeCharts();
// Update time every second
setInterval(updateDateTime, 1000);
// Update sensor data every 5 seconds
setInterval(updateSensorData, 5000);
};
</script>
</body>
</html>