36 lines
2.0 KiB
PHP
36 lines
2.0 KiB
PHP
<?php ob_start(); ?>
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<h2><?= htmlspecialchars($device->name) ?></h2>
|
|
<div>
|
|
<a href="/devices/<?= $device->id ?>/edit" class="btn btn-sm btn-outline-primary">Изменить</a>
|
|
<form method="POST" action="/devices/<?= $device->id ?>/delete" class="d-inline" onsubmit="return confirm('Удалить устройство?')">
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">Удалить</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<table class="table table-borderless">
|
|
<tr><th>Тип</th><td><?= htmlspecialchars($device->type) ?></td></tr>
|
|
<tr><th>IP</th><td><?= htmlspecialchars($device->primaryIp ?? '-') ?></td></tr>
|
|
<tr><th>MAC</th><td><?= htmlspecialchars($device->macAddress ?? '-') ?></td></tr>
|
|
<tr><th>Hostname</th><td><?= htmlspecialchars($device->hostname ?? '-') ?></td></tr>
|
|
<tr><th>Vendor</th><td><?= htmlspecialchars($device->vendor ?? '-') ?></td></tr>
|
|
<tr><th>OS</th><td><?= htmlspecialchars(($device->osName ?? '') . ' ' . ($device->osVersion ?? '')) ?></td></tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<table class="table table-borderless">
|
|
<tr><th>Важность</th><td><?= htmlspecialchars($device->importance) ?></td></tr>
|
|
<tr><th>Статус</th><td><?= htmlspecialchars($device->status) ?></td></tr>
|
|
<tr><th>Location</th><td><?= htmlspecialchars($device->location ?? '-') ?></td></tr>
|
|
<tr><th>Описание</th><td><?= htmlspecialchars($device->description ?? '-') ?></td></tr>
|
|
<tr><th>Создано</th><td><?= $device->createdAt->format('Y-m-d H:i') ?></td></tr>
|
|
<tr><th>Обновлено</th><td><?= $device->updatedAt->format('Y-m-d H:i') ?></td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php $content = ob_get_clean(); ?>
|
|
<?php require dirname(__DIR__) . '/layout.php'; ?>
|