Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Jan 4, 2025
1 parent e939c0a commit 553039d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 140 deletions.
73 changes: 0 additions & 73 deletions www/public/assets/icons/docker.svg

This file was deleted.

38 changes: 0 additions & 38 deletions www/public/assets/icons/tux.svg

This file was deleted.

8 changes: 7 additions & 1 deletion www/public/resources/styles/stats-hosts.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
}

.hosts-compact-view {
grid-template-columns: 35% 65%;
grid-template-columns: 35% 60%;
align-items: center;
}

.hosts-compact-view2 {
grid-template-columns: 40% 20%;
justify-content: space-evenly;
}

.host-additionnal-info {
Expand Down
58 changes: 30 additions & 28 deletions www/views/includes/containers/hosts/list.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
<div class="width-100">
<?php
if ($compactView) : ?>
<div class="grid hosts-compact-view column-gap-20">
<div class="grid hosts-compact-view column-gap-40">
<div>
<div>
<p title="Hostname">
Expand All @@ -274,37 +274,39 @@
</div>
</div>

<div class="grid grid-3 column-gap-20 align-item-center">
<div class="flex align-item-center column-gap-5" title="OS">
<?= \Controllers\Common::printOsIcon($os); ?>
<p><?= ucfirst($os) ?></p>
</div>

<div class="flex align-item-center column-gap-5" title="Type">
<?= \Controllers\Common::printTypeIcon($type); ?>
<p><?= ucfirst($type) ?></p>
<div class="grid hosts-compact-view2 column-gap-20 align-item-center">
<div class="flex flex-direction-column row-gap-10">
<div class="label-icon-tr" title="OS">
<?= \Controllers\Common::printOsIcon($os); ?>
<p class="font-size-13"><?= ucfirst($os) . ' ' . $osVersion ?> </p>
</div>

<div class="label-icon-tr" title="Type">
<?= \Controllers\Common::printTypeIcon($type); ?>
<p class="font-size-13"><?= ucfirst($type) ?></p>
</div>
</div>

<div class="grid grid-3 column-gap-10 align-item-center justify-items-center">
<p class="label-tr" title="<?= $packagesInstalledTotal . ' package(s) installed on this host' ?>"><?= $packagesInstalledTotal ?></p>

<p title="<?= $packagesAvailableTotal . ' package update(s) available on this host' ?>">
<?php
if ($packagesAvailableTotal > 0) {
if ($packagesAvailableTotal >= $packagesCountConsideredCritical) {
echo '<span class="label-white bkg-red">' . $packagesAvailableTotal . '</span>';
} elseif ($packagesAvailableTotal >= $packagesCountConsideredOutdated) {
echo '<span class="label-white bkg-yellow">' . $packagesAvailableTotal . '</span>';
} else {
echo '<span class="label-white">' . $packagesAvailableTotal . '</span>';
}
} ?>
</p>
<div class="flex flex-direction-column row-gap-10">
<div class="label-icon-tr" title="<?= $packagesInstalledTotal . ' package(s) installed on this host' ?>">
<img src="/assets/icons/package.svg" class="icon-np" />
<p class="font-size-13"><?= $packagesInstalledTotal ?></p>
</div>

<?php
if ($rebootRequired == 'true') {
echo '<img src="/assets/icons/warning.svg" class="icon-np" title="Reboot required" />';
} ?>
if ($packagesAvailableTotal > 0) :
$class = '';
if ($packagesAvailableTotal >= $packagesCountConsideredCritical) {
$class = 'bkg-red';
} elseif ($packagesAvailableTotal >= $packagesCountConsideredOutdated) {
$class = 'bkg-yellow';
} ?>
<div class="label-icon-tr <?= $class ?>" title="<?= $packagesAvailableTotal . ' package update(s) available on this host' ?>">
<img src="/assets/icons/package.svg" class="icon-np" />
<p class="font-size-13"><?= $packagesAvailableTotal ?></p>
</div>
<?php
endif ?>
</div>
</div>
</div>
Expand Down

0 comments on commit 553039d

Please sign in to comment.