190 lines
8.6 KiB
PHP
190 lines
8.6 KiB
PHP
<?php
|
|
|
|
?>
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
|
|
<style>
|
|
.card-border {
|
|
|
|
border-left: 1px solid #428bca;
|
|
border-left-width: 5px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.font-weight-500 {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.order-date-pill {
|
|
margin: 2px;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
|
</li>
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Pop") ?>">Pops</a>
|
|
</li>
|
|
<li class="breadcrumb-item active">Pop Detail</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Pop: <span class="font-weight-normal ml-1"><?= $pops->data->name ?></span> <span class="ml-2">
|
|
<a href="<?= self::getUrl("Pop", "edit", ["id" => $pops->id, 'returnto' => "pop-detail"]) ?>">
|
|
<button class="btn btn-primary">Bearbeiten</button>
|
|
</a>
|
|
</span></h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
<?php
|
|
|
|
$vlans = "";
|
|
|
|
if (!empty(trim($pops->vlan_public)))
|
|
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $pops->vlan_public . '</span class="font-weight-500"></span>';
|
|
if (!empty(trim($pops->vlan_nat)))
|
|
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $pops->vlan_nat . '</span></span>';
|
|
if (!empty(trim($pops->vlan_ipv6)))
|
|
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $pops->vlan_ipv6 . '</span></span>';
|
|
?>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-5 card-border">
|
|
<div>
|
|
<h4>Allgemeine Informationen </h4>
|
|
|
|
</div>
|
|
<div>
|
|
<table class="table table-sm">
|
|
<tbody>
|
|
<tr>
|
|
<th style="min-width: 250px; width: 300px;">Netzgebiet</th>
|
|
<td><?= $pops->network->name ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td><?= $pops->name ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th>Standort</th>
|
|
<td>
|
|
<a title="Google-Maps: <?= rtrim($pop->gps_lat, '0') ?> , <?= $pop->gps_long ?>"
|
|
class="mapsLink"
|
|
href="http://maps.google.com/?q=<?= $pops->gps_lat ?> , <?= $pops->gps_long ?>"
|
|
target="_blank"><?= rtrim($pops->gps_lat, '0') ?>
|
|
, <?= rtrim($pops->gps_long, 0) ?></a></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Standort Info</th>
|
|
<td><?= nl2br($pops->location) ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th>Access VLANs</th>
|
|
<td><?= $vlans ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th>Interne Notiz</th>
|
|
<td><?= nl2br($pops->note) ?> </td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="col-7 card-border">
|
|
<div>
|
|
<h4>Pop Devices</h4>
|
|
</div>
|
|
<?php
|
|
if (!empty($devices)) {
|
|
?>
|
|
<div>
|
|
<table id="datatable" class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Geräte Name</th>
|
|
<th class="text-center">Geräte Typ</th>
|
|
<th class="text-center">Hersteller</th>
|
|
<th class="text-center">IP-Adresse</th>
|
|
<th class="text-center">Seriennummer</th>
|
|
<th class="text-center">Preis</th>
|
|
<th class="text-center">max. Leistung</th>
|
|
</tr>
|
|
<tr id="filterrow">
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
|
|
foreach ($devices as $device):
|
|
if (!empty($device->price)) {
|
|
$price = $device->price;
|
|
} else {
|
|
$price = $device->devicetype->price;
|
|
}
|
|
?>
|
|
|
|
<tr>
|
|
<td>
|
|
<a href="<?= self::getUrl("Device", "detail", ["id" => $device->id]) ?>"><?= $device->name ?></a>
|
|
</td>
|
|
<td class="text-center"><?= $device->devicetype->name ?></td>
|
|
<td class="text-center"><?= $device->devicetype->devicemanufactor->name ?></td>
|
|
<td class="text-center"><?= $device->ip ?></td>
|
|
<td class="text-center"><?= $device->serial ?></td>
|
|
<td class="text-right"><?= $price ?> €</td>
|
|
<td class="text-right"><?= $device->devicetype->power ?> Watt</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<h5 class="text-center">Keine Devices vorhanden</h5>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
</script>
|
|
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|