-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
72 lines (71 loc) · 3.82 KB
/
index.html
File metadata and controls
72 lines (71 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tableau de Bord - Irrigation</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- CSS personnalisé -->
<link rel="stylesheet" href="css/irrigation.css">
</head>
<body>
<div class="container py-5">
<!-- Bouton de bascule mode clair/sombre -->
<div class="d-flex justify-content-end mb-3">
<button id="theme-toggle" class="btn btn-outline-secondary btn-sm">
<span class="theme-icon">🌙</span> Mode Sombre
</button>
</div>
<h1 class="text-center mb-4">Tableau de Bord - Système d'Irrigation</h1>
<div class="row">
<!-- Capteurs -->
<div class="col-md-6 mb-4">
<div class="card p-4">
<h3 class="card-title">Capteurs</h3>
<p><strong>Humidité 1 :</strong> <span id="h1">...</span>%</p>
<p><strong>Humidité 2 :</strong> <span id="h2">...</span>%</p>
<p><strong>Humidité 3 :</strong> <span id="h3">...</span>%</p>
<p><strong>Humidité 4 :</strong> <span id="h4">...</span>%</p>
<p><strong>Moyenne Humidité :</strong> <span id="mean">...</span>%</p>
<p><strong>Température :</strong> <span id="temp">...</span>°C</p>
<button class="btn btn-primary mt-3" onclick="window.location.href='sensor-data.html'">Accéder aux données</button>
</div>
</div>
<!-- Contrôle des robinets -->
<div class="col-md-6 mb-4">
<div class="card p-4">
<h3 class="card-title">Contrôle des Robinets</h3>
<!-- Sélection du mode -->
<div class="mb-3">
<label class="form-label"><strong>Mode :</strong></label>
<div class="btn-group w-100" role="group">
<button id="mode-auto" class="btn btn-outline-primary active" onclick="setMode('auto')">Automatique</button>
<button id="mode-manual" class="btn btn-outline-primary" onclick="setMode('manual')">Manuel</button>
</div>
</div>
<!-- État des robinets -->
<p><strong>Robinet 1 :</strong> <span id="tap1" class="status-off">...</span></p>
<p><strong>Robinet 2 :</strong> <span id="tap2" class="status-off">...</span></p>
<!-- Contrôles manuels -->
<div id="manual-controls" class="d-none mt-3">
<h5>Contrôle Manuel</h5>
<div class="d-flex gap-2 mb-2">
<button class="btn btn-success btn-control" onclick="controlTap(1, 'on')">Activer Robinet 1</button>
<button class="btn btn-danger btn-control" onclick="controlTap(1, 'off')">Désactiver Robinet 1</button>
</div>
<div class="d-flex gap-2">
<button class="btn btn-success btn-control" onclick="controlTap(2, 'on')">Activer Robinet 2</button>
<button class="btn btn-danger btn-control" onclick="controlTap(2, 'off')">Désactiver Robinet 2</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- JavaScript personnalisé -->
<script src="js/irrigation.js"></script>
</body>
</html>