Merge branch 'devbyspi' into 'master'

Devices-Übersicht/DeviceApicontroller/SmsNotification

See merge request fronk/thetool!56
This commit is contained in:
Frank Schubert
2023-07-27 03:35:38 +00:00
5 changed files with 153 additions and 6 deletions
+26 -4
View File
@@ -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" title="Letztes Configbackup älter als 48 Stunden"><span style="display: none">AGED</span></i>';
}
} else {
$backup = '<i class="fa-regular fa-ban" title="Kein Configbackup"><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"); ?>