|
2 | 2 | use \Controllers\User\Permission\Host as HostPermission; ?> |
3 | 3 |
|
4 | 4 | <section class="section-main reloadable-container" container="host/summary"> |
5 | | - <div id="title-button-div"> |
6 | | - <h3><?= strtoupper($hostname) ?></h3> |
| 5 | + <div class="margin-top-50 margin-bottom-40"> |
| 6 | + <div class="flex flex-wrap justify-space-between column-gap-20 row-gap-15"> |
| 7 | + <div class="flex align-item-center column-gap-10"> |
| 8 | + <h3 class="margin-0"><?= strtoupper($hostname) ?></h3> |
7 | 9 |
|
8 | | - <div class="flex justify-space-between"> |
9 | | - <?php |
10 | | - if (HostPermission::allowedAction('reset')) : ?> |
11 | | - <div id="host-reset-btn" class="slide-btn-yellow" host-id="<?= $id ?>" title="Reset host informations"> |
12 | | - <img src="/assets/icons/update.svg"> |
13 | | - <span>Reset</span> |
| 10 | + <div class="flex column-gap-8"> |
| 11 | + <?php |
| 12 | + if ($compliance['compliant']) { |
| 13 | + echo '<img src="/assets/icons/check.svg" class="icon-np" title="Host is compliant" />'; |
| 14 | + } else { |
| 15 | + echo '<img src="/assets/icons/warning-red.svg" class="icon-np" title="Host is not compliant: ' . strtolower($compliance['reason']) . '" />'; |
| 16 | + } ?> |
14 | 17 | </div> |
15 | | - <?php |
16 | | - endif; |
| 18 | + </div> |
17 | 19 |
|
18 | | - if (HostPermission::allowedAction('delete')) : ?> |
19 | | - <div id="host-delete-btn" class="slide-btn-red" host-id="<?= $id ?>" title="Delete host"> |
20 | | - <img src="/assets/icons/delete.svg"> |
21 | | - <span>Delete</span> |
22 | | - </div> |
| 20 | + <div class="flex justify-space-between"> |
23 | 21 | <?php |
24 | | - endif ?> |
| 22 | + if (HostPermission::allowedAction('reset')) : ?> |
| 23 | + <div id="host-reset-btn" class="slide-btn-yellow" host-id="<?= $id ?>" title="Reset host informations"> |
| 24 | + <img src="/assets/icons/update.svg"> |
| 25 | + <span>Reset</span> |
| 26 | + </div> |
| 27 | + <?php |
| 28 | + endif; |
| 29 | + |
| 30 | + if (HostPermission::allowedAction('delete')) : ?> |
| 31 | + <div id="host-delete-btn" class="slide-btn-red" host-id="<?= $id ?>" title="Delete host"> |
| 32 | + <img src="/assets/icons/delete.svg"> |
| 33 | + <span>Delete</span> |
| 34 | + </div> |
| 35 | + <?php |
| 36 | + endif ?> |
| 37 | + </div> |
25 | 38 | </div> |
26 | 39 | </div> |
27 | 40 |
|
|
0 commit comments