Skip to content

Commit

Permalink
4.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Nov 4, 2024
1 parent 21cbbed commit bec44b0
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 70 deletions.
8 changes: 4 additions & 4 deletions www/controllers/Host.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ public function setPackagesInventory(string $packagesInventory)
if (!empty($packageDetails[1])) {
$this->setPackageVersion($packageDetails[1]);
} else {
$this->setPackageVersion('unknow');
$this->setPackageVersion('unknown');
}

/**
Expand Down Expand Up @@ -707,7 +707,7 @@ public function setPackagesAvailable(string $packagesAvailable)
if (!empty($packageDetails[1])) {
$this->setPackageVersion($packageDetails[1]);
} else {
$this->setPackageVersion('unknow');
$this->setPackageVersion('unknown');
}

/**
Expand Down Expand Up @@ -1054,9 +1054,9 @@ public function register()
$this->token = bin2hex(openssl_random_pseudo_bytes(16));

/**
* The agent status is set to 'unknow' when we register a new host for the first time
* The agent status is set to 'unknown' when we register a new host for the first time
*/
$this->onlineStatus = 'unknow';
$this->onlineStatus = 'unknown';

/**
* Ajout en BDD
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Layout/Container/Render.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static function render(string $container)
* Check if container exists
*/
if (!file_exists(ROOT . '/views/includes/containers/' . $container . '.inc.php')) {
throw new Exception('Could not retrieve content: unknow container ' . $container);
throw new Exception('Could not retrieve content: unknown container ' . $container);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Layout/Table/Render.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static function render(string $table, int $offset = 0)
* Check if table exists
*/
if (!file_exists(ROOT . '/views/includes/tables/' . $table . '.inc.php')) {
throw new Exception('Could not retrieve content: unknow table ' . $table);
throw new Exception('Could not retrieve content: unknown table ' . $table);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Task/Repo/Package/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private function syncPackage()
* Task action must be specified ('create' or 'update')
*/
if (empty($this->task->getAction())) {
throw new Exception('Task action unknow (empty)');
throw new Exception('Empty task action');
}
if ($this->task->getAction() != 'create' and $this->task->getAction() != 'update') {
throw new Exception('Task action is invalid');
Expand Down
4 changes: 2 additions & 2 deletions www/models/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ private function generateMainTables()
'false',
'repomanager-',
'Europe/Paris',
'512',
'1024',
'300',
'true',
'true',
Expand Down Expand Up @@ -931,7 +931,7 @@ public function generateHostTables()
Date_end DATE NOT NULL,
Time_end TIME NOT NULL,
Report VARCHAR(255),
Status VARCHAR(7))"); /* error / warning / unknow / done */
Status VARCHAR(7))"); /* error / warning / unknown / done */

/**
* Create indexes
Expand Down
File renamed without changes
1 change: 1 addition & 0 deletions www/public/resources/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ pre.codeblock {
.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}.row-gap-8 {row-gap: 8px}.row-gap-9{row-gap: 9px}.row-gap-10{row-gap: 10px}.row-gap-15{row-gap: 15px}.row-gap-20{row-gap: 20px}
.padding-left-15{padding-left:15px !important}.padding-left-20{padding-left:20px !important}.padding-left-30{padding-left:30px !important}.padding-left-40{padding-left:40px !important}
.padding-right-15{padding-right:15px !important}.padding-right-20{padding-right:20px !important}.padding-right-30{padding-right:30px !important}.padding-right-40{padding-right:40px !important}
.margin-10{margin:10px !important}.margin-15{margin:15px !important}
.margin-left-0 {margin-left: 0px !important}.margin-left-5 {margin-left: 5px !important}.margin-left-10 {margin-left: 10px !important}.margin-left-15 {margin-left: 15px !important}.margin-left-20 {margin-left: 20px !important}.margin-left-30 {margin-left: 30px !important}.margin-left-40 {margin-left: 40px !important}
.margin-right-0 {margin-right: 0px !important}.margin-right-5 {margin-right: 5px !important}.margin-right-10 {margin-right: 10px !important}.margin-right-15 {margin-right: 15px !important}.margin-right-20 {margin-right: 20px !important}.margin-right-30 {margin-right: 30px !important}.margin-right-40 {margin-right: 40px !important}
.margin-top-0 {margin-top: 0px !important}.margin-top-5 {margin-top: 5px !important}.margin-top-10 {margin-top: 10px !important}.margin-top-15 {margin-top: 15px !important}.margin-top-20 {margin-top: 20px !important}.margin-top-30 {margin-top: 30px !important}.margin-top-40 {margin-top: 40px !important}
Expand Down
16 changes: 3 additions & 13 deletions www/public/resources/styles/stats-hosts.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,10 @@ td:last-child {
}

.hosts-chart-sub-container {
height: 250px;
min-height: 230px;
position: relative;
}

.hosts-charts-list-column-container {
column-count: 2;
}

.hosts-charts-list-container {
width: 80%;
margin: auto;
padding-top: 3px;
padding-bottom: 3px;
}

.hosts-charts-list-label > div > span:first-child {
display: inline-block;
width: 10px;
Expand All @@ -170,8 +159,9 @@ td:last-child {

#hosts-requiring-reboot-chart {
position: relative;
height: 150px;
height: 80%;
}

#hosts-requiring-reboot-chart p {
font-size: 35px;
}
Expand Down
2 changes: 1 addition & 1 deletion www/templates/source-repositories/rpm/almalinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ repositories:
- name: almalinux-crb
type: rpm
description: Alma Linux CRB
url: https://repo.almalinux.org/almalinux/$releasever/crb/$basearch/os
url: https://repo.almalinux.org/almalinux/$releasever/CRB/$basearch/os
releasever:
- name: 9
description: Alma Linux 9
Expand Down
2 changes: 1 addition & 1 deletion www/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.12.0
4.12.1
2 changes: 1 addition & 1 deletion www/views/includes/containers/host/summary.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
if ($agentStatus == "seems-stopped") {
echo '<img src="/assets/icons/warning-red.svg" class="icon" title="Linupdate agent state on this host: ' . $agentStatus . ' (' . $agentLastSendStatusMsg . ')." /> Seems stopped';
}
if ($agentStatus == "unknow") {
if ($agentStatus == "unknown") {
echo '<img src="/assets/icons/graycircle.png" class="icon" title="Linupdate agent state on this host: ' . $agentStatus . '." /> Unknown';
} ?>
</p>
Expand Down
28 changes: 14 additions & 14 deletions www/views/includes/containers/hosts/list.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,62 +144,62 @@
if (!empty($host['Hostname'])) {
$hostname = $host['Hostname'];
} else {
$hostname = 'unknow';
$hostname = 'unknown';
}
if (!empty($host['Ip'])) {
$ip = $host['Ip'];
} else {
$ip = 'unknow';
$ip = 'unknown';
}
if (!empty($host['Os'])) {
$os = $host['Os'];
} else {
$os = 'unknow';
$os = 'unknown';
}
if (!empty($host['Os_version'])) {
$os_version = $host['Os_version'];
} else {
$os_version = 'unknow';
$os_version = 'unknown';
}
if (!empty($host['Os_family'])) {
$os_family = $host['Os_family'];
} else {
$os_family = 'unknow';
$os_family = 'unknown';
}
if (!empty($host['Type'])) {
$type = $host['Type'];
} else {
$type = 'unknow';
$type = 'unknown';
}
if (!empty($host['Kernel'])) {
$kernel = $host['Kernel'];
} else {
$kernel = 'unknow';
$kernel = 'unknown';
}
if (!empty($host['Arch'])) {
$arch = $host['Arch'];
} else {
$arch = 'unknow';
$arch = 'unknown';
}
if (!empty($host['Profile'])) {
$profile = $host['Profile'];
} else {
$profile = 'unknow';
$profile = 'unknown';
}
if (!empty($host['Env'])) {
$env = $host['Env'];
} else {
$env = 'unknow';
$env = 'unknown';
}
if (!empty($host['Linupdate_version'])) {
$agentVersion = $host['Linupdate_version'];
} else {
$agentVersion = 'unknow';
$agentVersion = 'unknown';
}
if (!empty($host['Reboot_required'])) {
$rebootRequired = $host['Reboot_required'];
} else {
$rebootRequired = 'unknow';
$rebootRequired = 'unknown';
}

/**
Expand Down Expand Up @@ -267,8 +267,8 @@
if ($agentStatus == "seems-stopped") {
echo '<img src="/assets/icons/warning-red.svg" class="icon" title="Linupdate agent state on the host: ' . $agentStatus . ' (' . $agentLastSendStatusMsg . ')." />';
}
if ($agentStatus == "unknow") {
echo '<img src="/assets/icons/graycircle.png" class="icon" title="Linupdate agent state on the host: unknow." />';
if ($agentStatus == "unknown") {
echo '<img src="/assets/icons/graycircle.png" class="icon" title="Linupdate agent state on the host: unknown." />';
} ?>
</div>

Expand Down
50 changes: 23 additions & 27 deletions www/views/includes/containers/hosts/overview.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
<?php
if ($totalHosts >= 1) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>HOSTS (<?= $totalHosts ?>)</h6>
<h6 class="margin-top-0">HOSTS (<?= $totalHosts ?>)</h6>
<canvas id="hosts-count-chart" class="host-pie-chart"></canvas>
</div>

<?php
if (!empty(HOSTS_KERNEL_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>KERNELS</h6>
<h6 class="margin-top-0">KERNELS</h6>

<div class="hosts-charts-list-column-container">
<div class="grid grid-2 row-gap-5 column-gap-40 margin-15">
<?php
foreach (HOSTS_KERNEL_LIST as $kernel) :
if (empty($kernel['Kernel'])) {
Expand All @@ -36,15 +36,13 @@
$kernelName = $kernel['Kernel'];
} ?>

<div class="hosts-charts-list-container">
<div class="hosts-charts-list-label flex justify-space-between" chart-type="kernel" kernel="<?= $kernelName ?>">
<div class="flex column-gap-5 align-item-center">
<!-- square figure -->
<span style="background-color: <?= $mycolor->randomColor() ?>"></span>
<span><?= $kernelName ?></span>
</div>
<span><?= $kernel['Kernel_count'] ?></span>
<div class="hosts-charts-list-label flex justify-space-between align-item-center" chart-type="kernel" kernel="<?= $kernelName ?>">
<div class="flex column-gap-5 align-item-center">
<!-- square figure -->
<span style="background-color: <?= $mycolor->randomColor() ?>"></span>
<p class="font-size-14"><?= $kernelName ?></p>
</div>
<p class="font-size-14"><?= $kernel['Kernel_count'] ?></p>
</div>
<?php
endforeach ?>
Expand All @@ -55,8 +53,8 @@

if (!empty(HOSTS_PROFILES_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>PROFILES</h6>
<div class="hosts-charts-list-column-container">
<h6 class="margin-top-0">PROFILES</h6>
<div class="grid grid-2 row-gap-5 column-gap-40 margin-15">
<?php
foreach (HOSTS_PROFILES_LIST as $profile) {
if (empty($profile['Profile'])) {
Expand All @@ -65,15 +63,13 @@
$profileName = $profile['Profile'];
} ?>

<div class="hosts-charts-list-container">
<div class="hosts-charts-list-label flex justify-space-between" chart-type="profile" profile="<?= $profileName ?>">
<div class="flex column-gap-5 align-item-center">
<!-- square figure -->
<span style="background-color: <?= $mycolor->randomColor() ?>"></span>
<span><?= $profileName ?></span>
</div>
<span><?= $profile['Profile_count'] ?></span>
<div class="hosts-charts-list-label flex justify-space-between align-item-center" chart-type="profile" profile="<?= $profileName ?>">
<div class="flex column-gap-5 align-item-center">
<!-- square figure -->
<span style="background-color: <?= $mycolor->randomColor() ?>"></span>
<p class="font-size-14"><?= $profileName ?></p>
</div>
<p class="font-size-14"><?= $profile['Profile_count'] ?></p>
</div>
<?php
} ?>
Expand All @@ -84,46 +80,46 @@

if (!empty(HOSTS_OS_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>OPERATING SYSTEMS</h6>
<h6 class="margin-top-0">OPERATING SYSTEMS</h6>
<canvas id="hosts-os-chart" class="host-bar-chart"></canvas>
</div>
<?php
endif;

if (!empty(HOSTS_ARCHS_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>ARCHITECTURES</h6>
<h6 class="margin-top-0">ARCHITECTURES</h6>
<canvas id="hosts-arch-chart" class="host-pie-chart"></canvas>
</div>
<?php
endif;

if (!empty(HOSTS_ENVS_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>ENVIRONMENTS</h6>
<h6 class="margin-top-0">ENVIRONMENTS</h6>
<canvas id="hosts-env-chart" class="host-pie-chart"></canvas>
</div>
<?php
endif;

if (!empty(HOSTS_AGENT_STATUS_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>AGENT STATUS</h6>
<h6 class="margin-top-0">AGENT STATUS</h6>
<canvas id="hosts-agent-status-chart" class="host-pie-chart"></canvas>
</div>
<?php
endif;

if (!empty(HOSTS_AGENT_VERSION_LIST)) : ?>
<div class="hosts-chart-sub-container div-generic-blue">
<h6>AGENT VERSION</h6>
<h6 class="margin-top-0">AGENT VERSION</h6>
<canvas id="hosts-agent-version-chart" class="host-pie-chart"></canvas>
</div>
<?php
endif ?>

<div class="hosts-chart-sub-container div-generic-blue">
<h6>HOSTS REQUIRING REBOOT</h6>
<h6 class="margin-top-0">HOSTS REQUIRING REBOOT</h6>

<div id="hosts-requiring-reboot-chart" class="flex justify-center align-item-center">
<div>
Expand Down
Loading

0 comments on commit bec44b0

Please sign in to comment.