Browse Source

Ajout d une page de stats

master
heuzef 6 years ago
parent
commit
87985c51fe
2 changed files with 65 additions and 20 deletions
  1. +20
    -20
      ui/index.php
  2. +45
    -0
      ui/stats.php

+ 20
- 20
ui/index.php View File

@@ -107,26 +107,26 @@ if (isset($_POST['password']) && $_POST['password'] == 'ogg') {

<div class="row">
<div class="col-lg-12">
<p class="bs-component">
<a href="index.php?action=open&msg=1">
<button type="submit" name="action" class="btn btn-primary btn-lg" id="open">🚪 <strong>OUVERTURE DE LA PORTE</strong> 🔑</button>
</a>
</p>
<hr/>
<?php
$sonette = exec("/usr/local/bin/gpio -g read 17");
echo $sonette_btn[$sonette];
?>
<hr/>
<p class="bs-component">
<a href="index.php?action=reboot&msg=2">
<button type="submit" name="action" name="actions" class="btn btn-outline-success" id="update">🔄 Redémarrer ⏻</button>
</a>
<a href="index.php?action=poweroff&msg=2">
<button type="submit" name="action" class="btn btn-outline-danger" id="poweroff">🔌 Éteindre ⚡️</button>
</a>
<p class="bs-component">
<a href="index.php?action=open&msg=1">
<button type="submit" name="action" class="btn btn-primary btn-lg" id="open">🚪 <strong>OUVERTURE DE LA PORTE</strong> 🔑</button>
</a>
</p>
<hr/>
<?php
$sonette = exec("/usr/local/bin/gpio -g read 17");
echo $sonette_btn[$sonette];
?>
<hr/>
<p class="bs-component">
<a href="index.php?action=reboot&msg=2">
<button type="submit" name="action" name="actions" class="btn btn-outline-success" id="update">🔄 Redémarrer ⏻</button>
</a>
<a href="index.php?action=poweroff&msg=2">
<button type="submit" name="action" class="btn btn-outline-danger" id="poweroff">🔌 Éteindre ⚡️</button>
</a>
</div>
<hr/>
</div>


+ 45
- 0
ui/stats.php View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="fr">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Allo-GG</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="bootstrap.css" media="screen">
</head>
<body>
<div class="container" style="text-align:center;">
<hr/>
<div class="page-header">
<div class="row">
<div class="col-lg-12">
<a href="index.php"><img src="../logo/allo-gg-logo.png" class="img-fluid" alt="Responsive image"></a>
<br/><br/>
</div>
</div>
</div>

<h2 class="text-primary">Status du module</h2>
<hr/>

<div class="row">
<div class="col-lg-12">
<p class="bs-component">
<?php
$readall = exec("gpio readall");
echo "<pre>$readall</pre>";
?>
</p>
</div>
<hr/>
</div>

</div>

<script src="jquery.js"></script>
<script src="bootstrap.js"></script>

</body>
</html>

Loading…
Cancel
Save