Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Nov 7, 2023
1 parent 67cf431 commit 3e7c000
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion www/models/Host.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ public function listRebootRequired()
{
$hosts = array();

$result = $this->db->query("SELECT Hostname, Ip, Os, Os_family FROM hosts WHERE Status = 'active' AND Reboot_required = 'true' ORDER BY Hostname ASC");
$result = $this->db->query("SELECT Id, Hostname, Ip, Os, Os_family FROM hosts WHERE Status = 'active' AND Reboot_required = 'true' ORDER BY Hostname ASC");

while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$hosts[] = $row;
Expand Down
4 changes: 2 additions & 2 deletions www/public/resources/js/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ function getHostWithKernel(kernel)
os_family = value;
}
});
hosts += '<div>' + printOsIcon(os, os_family) + '<span>' + hostname + ' (' + ip + ') </span></div>';
hosts += '<div class="flex align-item-center column-gap-10 div-generic-blue margin-bottom-0"><div>' + printOsIcon(os, os_family) + '</div><div class="flex flex-direction-column row-gap-4"><span class="copy">' + hostname + '</span><span class="copy font-size-12 lowopacity-cst">' + ip + '</span></div></div>';
});

$('.hosts-charts-list-label-hosts-list').html('<div class="grid row-gap-4">' + hosts + '</div>');
Expand Down Expand Up @@ -1088,7 +1088,7 @@ function getHostWithProfile(profile)
os_family = value;
}
});
hosts += '<div>' + printOsIcon(os, os_family) + '<span>' + hostname + ' (' + ip + ') </span></div>';
hosts += '<div class="flex align-item-center column-gap-10 div-generic-blue margin-bottom-0"><div>' + printOsIcon(os, os_family) + '</div><div class="flex flex-direction-column row-gap-4"><span class="copy">' + hostname + '</span><span class="copy font-size-12 lowopacity-cst">' + ip + '</span></div></div>';
});

$('.hosts-charts-list-label-hosts-list').html('<div class="grid row-gap-4">' + hosts + '</div>');
Expand Down
5 changes: 3 additions & 2 deletions www/public/resources/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ pre {
.column-gap-1{column-gap: 1px}.column-gap-2 {column-gap: 2px}.column-gap-4 {column-gap: 4px}.column-gap-5{column-gap: 5px}.column-gap-6{column-gap: 6px}.column-gap-7{column-gap: 7px}.column-gap-8{column-gap: 8px}.column-gap-9{column-gap: 9px}.column-gap-10{column-gap: 10px}
.column-gap-20{column-gap: 20px}
.row-gap-1 {row-gap: 1px;}.row-gap-2 {row-gap: 2px;}.row-gap-4 {row-gap: 4px;}.row-gap-5 {row-gap: 5px;}.row-gap-6 {row-gap: 6px;}.row-gap-7 {row-gap: 7px;}
.padding-left-15 {padding-left: 15px}
.padding-right-15 {padding-right: 15px}
.padding-left-15 {padding-left: 15px !important}
.padding-right-15 {padding-right: 15px !important}
.margin-bottom-0 {margin-bottom: 0px !important}

/**
* Tables
Expand Down
10 changes: 9 additions & 1 deletion www/public/resources/styles/stats-hosts.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ td:last-child,
font-size: 35px;
}
#hosts-requiring-reboot-chart:hover #hosts-requiring-reboot-chart-list {
display: block;
display: flex;
}

#packagesContainer, #eventsContainer {
Expand Down Expand Up @@ -315,7 +315,15 @@ td:last-child,
margin-top: 15px;
}
#hosts-requiring-reboot-chart-list {
flex-direction: column;
row-gap: 6px;
top: 100px;
max-height: 500px;
overflow: auto;
}

#hosts-requiring-reboot-chart-list div {
min-width: 200px;
}

/* Timeline de l'historique d'un paquet
Expand Down
15 changes: 12 additions & 3 deletions www/views/hosts.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,18 @@
<div id="hosts-requiring-reboot-chart-list">
<?php
foreach ($rebootRequiredList as $rebootRequiredHost) : ?>
<div class="flex align-item-center">
<?= \Controllers\Common::printOsIcon($rebootRequiredHost['Os']) ?>
<span><?= $rebootRequiredHost['Hostname'] . ' (' . $rebootRequiredHost['Ip'] . ')' ?></span>
<div class="flex align-item-center column-gap-10 div-generic-blue margin-bottom-0">
<div>
<?= \Controllers\Common::printOsIcon($rebootRequiredHost['Os']) ?>
</div>
<div class="flex flex-direction-column row-gap-4">
<span class="copy">
<a href="/host?id=<?= $rebootRequiredHost['Id'] ?>" target="_blank" rel="noopener noreferrer">
<?= $rebootRequiredHost['Hostname'] ?>
</a>
</span>
<span class="copy font-size-12 lowopacity-cst" title="<?= $rebootRequiredHost['Hostname'] ?> IP address"><?= $rebootRequiredHost['Ip'] ?></span>
</div>
</div>
<?php
endforeach; ?>
Expand Down

0 comments on commit 3e7c000

Please sign in to comment.