Merge pull request #334 from PatchMon/release/1-3-5

Release/1 3 6
This commit is contained in:
9 Technology Group LTD
2025-11-18 20:36:12 +00:00
committed by GitHub
12 changed files with 56 additions and 34 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{
"name": "patchmon-backend",
"version": "1.3.5",
"version": "1.3.6",
"description": "Backend API for Linux Patch Monitoring System",
"license": "AGPL-3.0",
"main": "src/server.js",

View File

@@ -103,6 +103,7 @@ model hosts {
gateway_ip String?
hostname String?
kernel_version String?
installed_kernel_version String?
load_average Json?
network_interfaces Json?
ram_installed Int?

View File

@@ -506,6 +506,10 @@ router.post(
.optional()
.isString()
.withMessage("Kernel version must be a string"),
body("installedKernelVersion")
.optional()
.isString()
.withMessage("Installed kernel version must be a string"),
body("selinuxStatus")
.optional()
.isIn(["enabled", "disabled", "permissive"])
@@ -587,6 +591,8 @@ router.post(
// System Information
if (req.body.kernelVersion)
updateData.kernel_version = req.body.kernelVersion;
if (req.body.installedKernelVersion)
updateData.installed_kernel_version = req.body.installedKernelVersion;
if (req.body.selinuxStatus)
updateData.selinux_status = req.body.selinuxStatus;
if (req.body.systemUptime)

View File

@@ -6,5 +6,5 @@ VITE_API_URL=http://localhost:3001/api/v1
# Application Metadata
VITE_APP_NAME=PatchMon
VITE_APP_VERSION=1.3.5
VITE_APP_VERSION=1.3.6

View File

@@ -1,7 +1,7 @@
{
"name": "patchmon-frontend",
"private": true,
"version": "1.3.5",
"version": "1.3.6",
"license": "AGPL-3.0",
"type": "module",
"scripts": {

View File

@@ -1013,29 +1013,25 @@ const HostDetail = () => {
</div>
)}
{(host.kernel_version ||
host.installed_kernel_version) && (
<div className="flex flex-col gap-2">
{host.kernel_version && (
<div>
<p className="text-xs text-secondary-500 dark:text-secondary-300 mb-1">
Running Kernel
</p>
<p className="font-medium text-secondary-900 dark:text-white font-mono text-sm break-all">
{host.kernel_version}
</p>
</div>
)}
{host.installed_kernel_version && (
<div>
<p className="text-xs text-secondary-500 dark:text-secondary-300 mb-1">
Installed Kernel
</p>
<p className="font-medium text-secondary-900 dark:text-white font-mono text-sm break-all">
{host.installed_kernel_version}
</p>
</div>
)}
{host.kernel_version && (
<div>
<p className="text-xs text-secondary-500 dark:text-secondary-300">
Running Kernel
</p>
<p className="font-medium text-secondary-900 dark:text-white font-mono text-sm break-all">
{host.kernel_version}
</p>
</div>
)}
{host.installed_kernel_version && (
<div>
<p className="text-xs text-secondary-500 dark:text-secondary-300">
Installed Kernel
</p>
<p className="font-medium text-secondary-900 dark:text-white font-mono text-sm break-all">
{host.installed_kernel_version}
</p>
</div>
)}

View File

@@ -649,11 +649,27 @@ const Hosts = () => {
);
};
const handleSelectAll = () => {
if (selectedHosts.length === hosts.length) {
setSelectedHosts([]);
const handleSelectAll = (hostsToSelect) => {
const hostIdsToSelect = hostsToSelect.map((host) => host.id);
const allSelected = hostIdsToSelect.every((id) =>
selectedHosts.includes(id),
);
if (allSelected) {
// Deselect all hosts in this group
setSelectedHosts((prev) =>
prev.filter((id) => !hostIdsToSelect.includes(id)),
);
} else {
setSelectedHosts(hosts.map((host) => host.id));
// Select all hosts in this group (merge with existing selections)
setSelectedHosts((prev) => {
const newSelection = [...prev];
hostIdsToSelect.forEach((id) => {
if (!newSelection.includes(id)) {
newSelection.push(id);
}
});
return newSelection;
});
}
};
@@ -1655,11 +1671,14 @@ const Hosts = () => {
{column.id === "select" ? (
<button
type="button"
onClick={handleSelectAll}
onClick={() =>
handleSelectAll(groupHosts)
}
className="flex items-center gap-2 hover:text-secondary-700"
>
{selectedHosts.length ===
groupHosts.length ? (
{groupHosts.every((host) =>
selectedHosts.includes(host.id),
) ? (
<CheckSquare className="h-4 w-4" />
) : (
<Square className="h-4 w-4" />

View File

@@ -1,6 +1,6 @@
{
"name": "patchmon",
"version": "1.3.5",
"version": "1.3.6",
"description": "Linux Patch Monitoring System",
"license": "AGPL-3.0",
"private": true,