Ver código fonte

ajout du bouton d acces log

master
heuzef 5 anos atrás
pai
commit
2af5879cc0
2 arquivos alterados com 12 adições e 7 exclusões
  1. +2
    -5
      ui/check_services.php
  2. +10
    -2
      ui/index.php

+ 2
- 5
ui/check_services.php Ver arquivo

@@ -21,9 +21,6 @@
$sonette_status[0]='danger';
$sonette_status[1]='light';

exec("../scripts/check_services.sh >> allogg.log &");
exec("sleep 3");

?>

<body>
@@ -41,7 +38,7 @@
</div>
</div>

<h2 class="text-primary">Interface de contrôle du module</h2>
<h2 class="text-primary">Journal d'activité du module</h2>
<?php $etat = exec("/usr/local/bin/gpio -g read 18"); ?>
<?php $sonette = exec("/usr/local/bin/gpio -g read 17"); ?>
<?php $porte = exec("/usr/local/bin/gpio -g read 4"); ?>
@@ -62,10 +59,10 @@
echo '<pre style="text-align:left;">'.$log.'</pre>';
?>
</p>
<hr/>
</div>
</div>

<hr/>
</div>

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


+ 10
- 2
ui/index.php Ver arquivo

@@ -148,7 +148,7 @@ if (isset($_POST['password']) && $_POST['password'] == 'heuzef') {
<?php $sonette = exec("/usr/local/bin/gpio -g read 17"); ?>
<?php $porte = exec("/usr/local/bin/gpio -g read 4"); ?>

<a href="check_services.php"><span class="badge badge-pill badge-<?php echo $etat_status[$etat]; ?>">&nbsp;</span></a>
<span class="badge badge-pill badge-<?php echo $etat_status[$etat]; ?>">&nbsp;</span>
&nbsp;
<span class="badge badge-pill badge-<?php echo $porte_status[$porte]; ?>">&nbsp;</span>
&nbsp;
@@ -169,11 +169,19 @@ if (isset($_POST['password']) && $_POST['password'] == 'heuzef') {
<hr/>
<p class="bs-component">
<a href="index.php?action=reboot&msg=4">
<button type="submit" name="action" name="actions" class="btn btn-outline-success" id="update">🔄 Redémarrer ⏻</button>
<button type="submit" name="action" class="btn btn-outline-success" id="update">🔄 Redémarrer ⏻</button>
</a>
<a href="index.php?action=poweroff&msg=5">
<button type="submit" name="action" class="btn btn-outline-danger" id="poweroff">🔌 Éteindre ⚡️</button>
</a>
</p>

<hr/>
<p class="bs-component">
<a href="check_services.php">
<button type="button" class="btn btn-outline-secondary" id="log">📜 Journal d'activité 🔍</button>
</a>
</p>
</div>
<hr/>
</div>


Carregando…
Cancelar
Salvar