mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Device links formatting changes (#15580)
Make the images inline so they appear side by side Put newlines between the major device information sections (name, model/OS, location)
This commit is contained in:
+11
-6
@@ -80,27 +80,32 @@ class Url
|
||||
|
||||
// beginning of overlib box contains large hostname followed by hardware & OS details
|
||||
$contents = '<div><span class="list-large">' . $device->displayName() . '</span>';
|
||||
$devinfo = '';
|
||||
if ($device->hardware) {
|
||||
$contents .= ' - ' . htmlentities($device->hardware);
|
||||
$devinfo .= htmlentities($device->hardware);
|
||||
}
|
||||
|
||||
if ($device->os) {
|
||||
$contents .= ' - ' . htmlentities(Config::getOsSetting($device->os, 'text'));
|
||||
$devinfo .= ($devinfo ? ' - ' : '') . htmlentities(Config::getOsSetting($device->os, 'text'));
|
||||
}
|
||||
|
||||
if ($device->version) {
|
||||
$contents .= ' ' . htmlentities($device->version);
|
||||
$devinfo .= ($devinfo ? ' - ' : '') . htmlentities($device->version);
|
||||
}
|
||||
|
||||
if ($device->features) {
|
||||
$contents .= ' (' . htmlentities($device->features) . ')';
|
||||
$devinfo .= ' (' . htmlentities($device->features) . ')';
|
||||
}
|
||||
|
||||
if ($devinfo) {
|
||||
$contents .= '<br />' . $devinfo;
|
||||
}
|
||||
|
||||
if ($device->location_id) {
|
||||
$contents .= ' - ' . htmlentities($device->location ?? '');
|
||||
$contents .= '<br />' . htmlentities($device->location ?? '');
|
||||
}
|
||||
|
||||
$contents .= '</div>';
|
||||
$contents .= '</div><br />';
|
||||
|
||||
foreach ((array) $graphs as $entry) {
|
||||
$graph = isset($entry['graph']) ? $entry['graph'] : 'unknown';
|
||||
|
||||
@@ -1567,6 +1567,7 @@ tr.search:nth-child(odd) {
|
||||
}
|
||||
|
||||
.minigraph-image {
|
||||
display: inline;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user