From ea980cd0eb5ec231c854c7c24cffdbd7ea034629 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Tue, 26 Mar 2024 21:33:52 +0800 Subject: [PATCH] feat(website): list enabled systemd services and timers found on host --- website/src/components/app/-app.tsx | 12 ++++++++++++ website/src/components/app/-data.tsx | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/website/src/components/app/-app.tsx b/website/src/components/app/-app.tsx index 7278c7c..a39fb64 100644 --- a/website/src/components/app/-app.tsx +++ b/website/src/components/app/-app.tsx @@ -129,6 +129,9 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos SSH Keys + + Systemd + Tags @@ -175,6 +178,9 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos : `${host.dockerContainers.filter((x) => x.running).length} / ${host.dockerContainers.length}`} {host.sshAuthorizedKeys.length} + + {host.systemdServices.length} / {host.systemdTimers.length} + {(host.host.tags || []).map((x) => ( @@ -319,6 +325,12 @@ export function HostDetails({ host }: { host: LhpData }) { + +
+ ({ key: x, value: '✅' }))} /> + + ({ key: x, value: '✅' }))} /> +
); } diff --git a/website/src/components/app/-data.tsx b/website/src/components/app/-data.tsx index 64348d6..f4e954d 100644 --- a/website/src/components/app/-data.tsx +++ b/website/src/components/app/-data.tsx @@ -125,8 +125,20 @@ export const LHP_PATROL_REPORT_SCHEMA = { items: { type: 'string' }, type: 'array', }, + systemdServices: { $comment: 'List of systemd services found on host.', items: { type: 'string' }, type: 'array' }, + systemdTimers: { $comment: 'List of systemd timers found on host.', items: { type: 'string' }, type: 'array' }, }, - required: ['sshAuthorizedKeys', 'dockerContainers', 'distribution', 'kernel', 'hardware', 'cloud', 'host'], + required: [ + 'systemdTimers', + 'systemdServices', + 'sshAuthorizedKeys', + 'dockerContainers', + 'distribution', + 'kernel', + 'hardware', + 'cloud', + 'host', + ], type: 'object', } as const satisfies JSONSchema;