feat: add patches missing filter and count indicator to deploy page
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 36s
CI Pipeline / Clippy Lints (push) Successful in 5m53s
CI Pipeline / Rust Unit Tests (push) Successful in 6m23s
CI Pipeline / Security Audit (push) Successful in 1m30s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 4m29s
CI Pipeline / Build .deb & Release (push) Has been skipped
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 36s
CI Pipeline / Clippy Lints (push) Successful in 5m53s
CI Pipeline / Rust Unit Tests (push) Successful in 6m23s
CI Pipeline / Security Audit (push) Successful in 1m30s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 4m29s
CI Pipeline / Build .deb & Release (push) Has been skipped
This commit is contained in:
@ -109,10 +109,13 @@ async fn list_hosts(
|
||||
let hosts: Vec<HostSummary> = if auth.role.is_admin() {
|
||||
sqlx::query_as(
|
||||
r#"
|
||||
SELECT id, fqdn, host(ip_address)::text AS ip_address, display_name,
|
||||
os_family, os_name, health_status, agent_version, registered_at
|
||||
FROM hosts
|
||||
ORDER BY fqdn
|
||||
SELECT h.id, h.fqdn, host(h.ip_address)::text AS ip_address, h.display_name,
|
||||
h.os_family, h.os_name, h.health_status, h.agent_version,
|
||||
COALESCE(hpd.patch_count, 0) AS patches_missing,
|
||||
h.registered_at
|
||||
FROM hosts h
|
||||
LEFT JOIN host_patch_data hpd ON hpd.host_id = h.id
|
||||
ORDER BY h.fqdn
|
||||
LIMIT $1 OFFSET $2
|
||||
"#,
|
||||
)
|
||||
@ -125,8 +128,11 @@ async fn list_hosts(
|
||||
r#"
|
||||
SELECT DISTINCT h.id, h.fqdn, host(h.ip_address)::text AS ip_address,
|
||||
h.display_name, h.os_family, h.os_name,
|
||||
h.health_status, h.agent_version, h.registered_at
|
||||
h.health_status, h.agent_version,
|
||||
COALESCE(hpd.patch_count, 0) AS patches_missing,
|
||||
h.registered_at
|
||||
FROM hosts h
|
||||
LEFT JOIN host_patch_data hpd ON hpd.host_id = h.id
|
||||
WHERE
|
||||
-- Hosts in operator's groups
|
||||
EXISTS (
|
||||
|
||||
Reference in New Issue
Block a user