From 750b18193e7c97938dd79555b3ca7f20bf14a3d1 Mon Sep 17 00:00:00 2001 From: Bernd Ahlers Date: Fri, 2 Oct 2026 13:54:04 +0200 Subject: [PATCH] Add macos_unified_logging to SOURCE_PLATFORM in SourceStatusSection (#27635) The status section now correctly shows "Not applicable on " for platforms that don't support it. (cherry picked from commit ae3eed061cc87613de32823c5ac20bbc2d575dfa) --- changelog/unreleased/pr-27635.toml | 4 ++++ .../overview/onboarding/SourceStatusSection.test.tsx | 5 +++-- .../collectors/overview/onboarding/SourceStatusSection.tsx | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/pr-27635.toml diff --git a/changelog/unreleased/pr-27635.toml b/changelog/unreleased/pr-27635.toml new file mode 100644 index 000000000000..e0e795d4c6ef --- /dev/null +++ b/changelog/unreleased/pr-27635.toml @@ -0,0 +1,4 @@ +type = "fixed" +message = "Fix Collector onboarding source status section for the macOS Unified Logging source on unsupported platforms." + +pulls = ["27635"] diff --git a/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.test.tsx b/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.test.tsx index 589693701790..0d22a72cad30 100644 --- a/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.test.tsx +++ b/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.test.tsx @@ -98,13 +98,14 @@ describe('SourceStatusSection', () => { source({ id: 's1', type: 'journald', name: 'System Journal' }), source({ id: 's2', type: 'windows_event_log', name: 'Windows Event Log' }), source({ id: 's3', type: 'file', name: 'Syslog' }), + source({ id: 's4', type: 'macos_unified_logging', name: 'macOS Unified Logging' }), ]} receiving />, ); - // journald cannot run on Windows, the event log can, and a plain file source runs everywhere. - expect(screen.getByText('Not applicable on Windows')).toBeInTheDocument(); + // journald and macos_unified_logging cannot run on Windows, the event log can, and a plain file source runs everywhere. + expect(screen.getAllByText('Not applicable on Windows')).toHaveLength(2); expect(screen.getAllByText('Receiving')).toHaveLength(2); }); diff --git a/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.tsx b/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.tsx index 71e4bff20454..0f1b0183539f 100644 --- a/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.tsx +++ b/graylog2-web-interface/src/components/collectors/overview/onboarding/SourceStatusSection.tsx @@ -112,6 +112,7 @@ const Footer = styled.div( const SOURCE_PLATFORM: Partial> = { journald: 'linux', windows_event_log: 'windows', + macos_unified_logging: 'darwin', }; /**