Devices-Übersicht:
* Anzeige des Backupstatus (OK,älter als 48 Stunden, kein Backup vorhanden)
DeviceApicontroller:
* Update Devices hinzugefügt (nur last_config_backup update erlaubt)
Funktionsweise:
Sobald eine Config am API Server registriert wird, wird per API Richtung Tool der Timestamp der Config in der Tool-DB geupdated
Somit ist für die Übersicht keine direkte API Schnittstelle notwendig.
SmsNotification Klasse hinzugefügt.
Habs gleich wie die Emailnotification gehalten.
Ist zum puschen von SMSen an ein Absenderarray oder Einzelabsender.
Erfüllt in dem Commit noch keine Funktion.
Config Erweiterungen:
define("TT_OUTGOING_SMS_API_KEY", "key");
define("TT_OUTGOING_SMS_API_URL", "api.websms.com/rest");
This commit is contained in:
@@ -4,7 +4,8 @@ $pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Device";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<link href="<?=self::getResourcePath()?>assets/css/datatables-std.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -52,6 +53,7 @@ $pagination_entity_name = "Device";
|
||||
<th class="text-center">Seriennummer</th>
|
||||
<th class="text-center">Preis</th>
|
||||
<th class="text-center">max. Leistung</th>
|
||||
<th class="text-center">Backup</th>
|
||||
<th class="edit-width"></th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
@@ -65,6 +67,7 @@ $pagination_entity_name = "Device";
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -81,6 +84,20 @@ $pagination_entity_name = "Device";
|
||||
} else {
|
||||
$power = $device->devicetype->power;
|
||||
}
|
||||
|
||||
if ($device->last_config_backup) {
|
||||
if (time() - $device->last_config_backup <= 172800) {
|
||||
$backup = '<i class="fa-regular fa-circle-check"><span style="display: none">OK</span></i>';
|
||||
} else {
|
||||
$backup = '<i class="fa-regular fa-circle-xmark"><span style="display: none">AGED</span></i>';
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$backup = '<i class="fa-regular fa-ban"><span style="display: none">N/A</span></i>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@@ -97,6 +114,7 @@ $pagination_entity_name = "Device";
|
||||
<td class="text-center"><?= $device->serial ?></td>
|
||||
<td class="text-right"><?= $price ?> €</td>
|
||||
<td class="text-right"><?= $power ?> Watt</td>
|
||||
<td class="text-center"><?= $backup ?></td>
|
||||
|
||||
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em; width: 80px">
|
||||
@@ -126,13 +144,17 @@ $pagination_entity_name = "Device";
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch=[9];
|
||||
var columndefs={ type: 'ip-address', targets: 4 };
|
||||
var hidesearch = [10];
|
||||
var columndefs = {type: 'ip-address', targets: 4};
|
||||
|
||||
var columnfilter = [9];
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/datatables-std.js?<?=date('U')?>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
Reference in New Issue
Block a user