mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 17:06:28 +02:00
Add phone reliability features
This commit is contained in:
parent
44b855dd48
commit
52c849e043
22 changed files with 837 additions and 188 deletions
10
templates/email/phone-reliability-failed.php
Normal file
10
templates/email/phone-reliability-failed.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
Le téléphone <?php $this->s($phone['name']); ?> semble rencontrer un taux de SMS échoués anormalement élevé.
|
||||
|
||||
Période prise en compte : <?php $this->s($period); ?> dernières minutes
|
||||
Total de SMS : <?php $this->s($total); ?>
|
||||
Nombre d'échecs : <?php $this->s($unreliable); ?>
|
||||
Taux d'échecs : <?php $this->s($rate); ?>%
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------
|
||||
Pour plus d'informations sur le système RaspiSMS, rendez-vous sur le site https://raspisms.fr
|
10
templates/email/phone-reliability-unknown.php
Normal file
10
templates/email/phone-reliability-unknown.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
Le téléphone <?php $this->s($phone['name']); ?> semble rencontrer un taux de SMS incconnus anormalement élevé.
|
||||
|
||||
Période prise en compte : <?php $this->s($period); ?> dernières minutes
|
||||
Total de SMS : <?php $this->s($total); ?>
|
||||
Nombre d'inconnus : <?php $this->s($unreliable); ?>
|
||||
Taux d'inconnus : <?php $this->s($rate); ?>%
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------
|
||||
Pour plus d'informations sur le système RaspiSMS, rendez-vous sur le site https://raspisms.fr
|
|
@ -62,9 +62,11 @@
|
|||
</div>
|
||||
<div class="text-right col-xs-6 no-padding">
|
||||
<strong>Action pour la séléction :</strong>
|
||||
<button class="btn btn-default" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'update_status', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-refresh"></span> Rafraichir le status</button>
|
||||
<button class="btn btn-default" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'edit'); ?>"><span class="fa fa-edit"></span> Modifier</button>
|
||||
<button class="btn btn-default btn-confirm" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||
<button class="btn btn-default mb-2" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'update_status', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-refresh"></span> Rafraichir le status</button>
|
||||
<button class="btn btn-default mb-2" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'change_status', ['csrf' => $_SESSION['csrf'], 'new_status' => 'available']); ?>"><span class="fa fa-toggle-on"></span> Activer</button>
|
||||
<button class="btn btn-default mb-2" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'change_status', ['csrf' => $_SESSION['csrf'], 'new_status' => 'disabled']); ?>"><span class="fa fa-toggle-off"></span> Désactiver</button>
|
||||
<button class="btn btn-default mb-2" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'edit'); ?>"><span class="fa fa-edit"></span> Modifier</button>
|
||||
<button class="btn btn-default btn-confirm mb-2" type="submit" formaction="<?php echo \descartes\Router::url('Phone', 'delete', ['csrf' => $_SESSION['csrf']]); ?>"><span class="fa fa-trash-o"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -105,6 +107,10 @@ jQuery(document).ready(function ()
|
|||
html += ' - <span class="text-success">Disponible</span>'
|
||||
break;
|
||||
|
||||
case 'disabled':
|
||||
html += ' - <span class="text-warning">Désactivé</span>'
|
||||
break;
|
||||
|
||||
case 'unavailable':
|
||||
html += ' - <span class="text-danger">Indisponible</span>'
|
||||
break;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<option value="send_sms" <?= ($_SESSION['previous_http_post']['type'] ?? '') == 'send_sms' ? 'selected' : '' ?>>Envoi d'un SMS</option>
|
||||
<option value="send_sms_status_change" <?= ($_SESSION['previous_http_post']['type'] ?? '') == 'send_sms_status_change' ? 'selected' : '' ?>>Mise à jour du statut d'un SMS envoyé</option>
|
||||
<option value="inbound_call" <?= ($_SESSION['previous_http_post']['type'] ?? '') == 'inbound_call' ? 'selected' : '' ?>>Réception d'un appel téléphonique</option>
|
||||
<option value="phone_reliability" <?= ($_SESSION['previous_http_post']['type'] ?? '') == 'phone_reliability' ? 'selected' : '' ?>>Détection d'un problème de fiabilité sur un téléphone</option>
|
||||
</select>
|
||||
</div>
|
||||
<a class="btn btn-danger" href="<?php echo \descartes\Router::url('Webhook', 'list'); ?>">Annuler</a>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<option <?php echo $webhook['type'] == 'send_sms' ? 'selected="selected"' : '' ?> value="send_sms">Envoi d'un SMS</option>
|
||||
<option <?php echo $webhook['type'] == 'send_sms_status_change' ? 'selected="selected"' : '' ?> value="send_sms_status_change">Mise à jour du statut d'un SMS envoyé</option>
|
||||
<option <?php echo $webhook['type'] == 'inbound_call' ? 'selected="selected"' : '' ?> value="inbound_call">Réception d'un appel téléphonique</option>
|
||||
<option <?php echo $webhook['type'] == 'phone_reliability' ? 'selected="selected"' : '' ?> value="phone_reliability">Détection d'un problème de fiabilité sur un téléphone</option>
|
||||
</select>
|
||||
</div>
|
||||
<hr/>
|
||||
|
|
|
@ -96,6 +96,8 @@ jQuery(document).ready(function ()
|
|||
return 'Réception de SMS';
|
||||
case 'inbound_call':
|
||||
return 'Réception d\'un appel téléphonique';
|
||||
case 'phone_reliability':
|
||||
return 'Détection d\'un problème de fiabilité sur un téléphone';
|
||||
default:
|
||||
return 'Inconnu';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue