Devices
Standortinformationen hinzugefügt (Wenn keine Pop ausgewählt) Umschaltbar Adresse/Koordinaten Adresse: Straße/Hausnummer/PLZ/Ort Huawei Backups Implementation
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
?>
|
||||
<?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"/>
|
||||
<style>
|
||||
.card-border {
|
||||
|
||||
@@ -63,7 +64,7 @@ if ($devices->power != "0.0") {
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Device Name</th>
|
||||
<th class="w-30">Device Name</th>
|
||||
<td><?= $devices->name ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -104,29 +105,54 @@ if ($devices->power != "0.0") {
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ((trim($devices->pop->name))) {
|
||||
$StdHeader = "Pop Informationen";
|
||||
$vlans = "";
|
||||
if (!empty(trim($devices->pop->vlan_public)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $devices->pop->vlan_public . '</span class="font-weight-500"></span>';
|
||||
if (!empty(trim($devices->pop->vlan_nat)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $devices->pop->vlan_nat . '</span></span>';
|
||||
if (!empty(trim($devices->pop->vlan_ipv6)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $devices->pop->vlan_ipv6 . '</span></span>';
|
||||
} else if (trim($devices->addr_street)) {
|
||||
if (trim($devices->addr_extended)) {
|
||||
$addrExtended = ' / ' . $devices->addr_extended;
|
||||
} else {
|
||||
$addrExtended = "";
|
||||
}
|
||||
$StdHeader = "Standort Informationen";
|
||||
$mapsHeader = "Adresse";
|
||||
$mapsLink = '<a class="mapsLink"
|
||||
href="http://maps.google.com/?q=' . $devices->addr_street . ' ' . $devices->addr_number . ' ' . $devices->addr_zip . ' ' . $devices->addr_city . '"
|
||||
target="_blank"><div>' . $devices->addr_street . ' ' . $devices->addr_number . $addrExtended . '</div>
|
||||
<div>' . $devices->addr_zip . ' ' . $devices->addr_city . '</div></a>';
|
||||
|
||||
} else if (trim($devices->gps_lat)) {
|
||||
$StdHeader = "Standort Informationen";
|
||||
$mapsHeader = "Koordinaten";
|
||||
$mapsLink = '<a class="mapsLink"
|
||||
href="http://maps.google.com/?q=' . $devices->gps_lat . ',' . $devices->gps_long . '"
|
||||
target="_blank"><div>' . $devices->gps_lat . ' , ' . $devices->gps_long . '</div></a>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="col-4 card-border">
|
||||
<div>
|
||||
<h4>Pop Informationen</h4>
|
||||
<h4><?= $StdHeader ?></h4>
|
||||
</div>
|
||||
<?php
|
||||
if (!empty(trim($devices->pop->name))) {
|
||||
|
||||
|
||||
$vlans = "";
|
||||
|
||||
if (!empty(trim($devices->pop->vlan_public)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $devices->pop->vlan_public . '</span class="font-weight-500"></span>';
|
||||
if (!empty(trim($devices->pop->vlan_nat)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $devices->pop->vlan_nat . '</span></span>';
|
||||
if (!empty(trim($devices->pop->vlan_ipv6)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $devices->pop->vlan_ipv6 . '</span></span>';
|
||||
if ((trim($devices->pop->name))) {
|
||||
|
||||
?>
|
||||
<div>
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Pop Name</th>
|
||||
<th class="w-30">Pop Name</th>
|
||||
<td>
|
||||
<a href="<?= self::getUrl("Pop", "Detail", ["id" => $devices->pop->id]) ?>"><?= $devices->pop->name ?></a>
|
||||
</td>
|
||||
@@ -152,6 +178,24 @@ if ($devices->power != "0.0") {
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} elseif (trim($devices->addr_street) || trim($devices->gps_lat)) {
|
||||
?>
|
||||
<div>
|
||||
<table class="table table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="align-middle w-30"> <?= $mapsHeader ?></th>
|
||||
<td>
|
||||
<?= $mapsLink ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<h5 class="text-center">Keine Standort Informationen vorhanden</h5>
|
||||
@@ -190,17 +234,23 @@ if ($devices->power != "0.0") {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($devicesconfig->data as $config) :
|
||||
$configfileCleartext = $config->config_cleartext;
|
||||
$configfileCompressed = $config->config_compressed;
|
||||
$configfileCleartext = trim($config->config_cleartext);
|
||||
$configfileCompressed = trim($config->config_compressed);
|
||||
$configid = $config->id;
|
||||
if ($configfileCleartext && $configfileCompressed) :
|
||||
$configLinks = '<a href="https://' . $_SERVER['SERVER_NAME'] . '/Device/api?do=getconfig&id=<?= $configid; ?>&format=txt&filename=' . $configfileCleartext . '">
|
||||
TXT</a> / <a
|
||||
href="https://' . $_SERVER['SERVER_NAME'] . '/Device/api?do=getconfig&id=<?= $configid; ?>&format=xml&filename=' . $configfileCompressed . '">
|
||||
XML</a>';
|
||||
elseif ($configfileCleartext || $configfileCompressed) :
|
||||
$configLinks = '<a href="https://' . $_SERVER['SERVER_NAME'] . '/Device/api?do=getconfig&id=<?= $configid; ?>&format=txt&filename=' . $configfileCleartext .$configfileCompressed . '">
|
||||
TXT</a>';
|
||||
|
||||
endif;
|
||||
?>
|
||||
<tr>
|
||||
<td><?= date("d.m.Y/H:i", $config->config_timestamp); ?></td>
|
||||
<td>
|
||||
<a href="https://<?= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getconfig&id=<?= $configid; ?>&format=txt&filename=<?= $configfileCleartext; ?>">
|
||||
TXT</a> / <a
|
||||
href="https://<?= $_SERVER['SERVER_NAME']; ?>/Device/api?do=getconfig&id=<?= $configid; ?>&format=xml&filename=<?= $configfileCompressed; ?>">
|
||||
XML</a></td>
|
||||
<td><?= $configLinks; ?></td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user