Skip to content

fix(web): show target host/record in monitor header for TCP and DNS monitors - #270

Open
HartD92 wants to merge 1 commit into
0xfurai:mainfrom
HartD92:fix/monitor-header-tcp-dns-target
Open

fix(web): show target host/record in monitor header for TCP and DNS monitors#270
HartD92 wants to merge 1 commit into
0xfurai:mainfrom
HartD92:fix/monitor-header-tcp-dns-target

Conversation

@HartD92

@HartD92 HartD92 commented May 29, 2026

Copy link
Copy Markdown

Summary

The monitor detail header currently only renders the configured target for HTTP monitors. TCP and DNS monitors show just the monitor type with no indication of the host:port or DNS record being monitored, forcing users to open the edit dialog to confirm what each monitor is pointed at.

This PR adds a formatMonitorTarget(monitor) helper that returns the most identifying configured value per monitor type, and uses it in the monitor view header. HTTP behavior is unchanged. TCP renders host:port, DNS renders record (type @ resolver:port).

Changes

  • apps/web/src/app/monitors/view/format-monitor-target.ts - adds a small config parser/formatter for monitor header targets.
  • apps/web/src/app/monitors/view/page.tsx - uses the formatter in the detail header and only links HTTP targets.

Test plan

  • git diff --check passed.
  • Attempted targeted lint/typecheck, but this environment does not have pnpm/corepack; installing dependencies with npx pnpm@9.0.0 install --frozen-lockfile failed with ENOSPC: no space left on device before eslint/tsc became available.
  • Manual code inspection: existing HTTP URL display path is preserved; TCP now formats host+port; DNS now formats host + resolve type + resolver.
  • Unit tests were not added because apps/web/src does not currently contain component/helper tests and I did not scaffold a new test framework.

Notes

Add a monitor target formatter for the detail header so TCP and DNS monitors show their configured endpoint instead of an empty target. Keep HTTP target rendering unchanged and hide the suffix when no target can be derived.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented May 29, 2026

Copy link
Copy Markdown

Deploy Preview for docspeekaping ready!

Name Link
🔨 Latest commit aede38e
🔍 Latest deploy log https://app.netlify.com/projects/docspeekaping/deploys/6a19f6a00c299800093b8920
😎 Deploy Preview https://deploy-preview-270--docspeekaping.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented May 29, 2026

Copy link
Copy Markdown

Deploy Preview for peekaping ready!

Name Link
🔨 Latest commit aede38e
🔍 Latest deploy log https://app.netlify.com/projects/peekaping/deploys/6a19f6a07b0c7300082d08e5
😎 Deploy Preview https://deploy-preview-270--peekaping.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@HartD92 HartD92 closed this May 29, 2026
@HartD92 HartD92 reopened this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitor detail header omits target for non-HTTP monitor types (TCP, DNS)

1 participant