Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(site): add connection log page#18708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/fe-connection-log
Jul 15, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedJul 2, 2025
edited
Loading

This is the fourth PR for moving connection events out of the audit log.

This PR adds/connectionlog to the frontend. This page is identical in structure to the audit log, but with different filters and contents.

The connection log lists sessions, and the time they start. If we support tracking the end time of a session, and we've received a disconnect event for that session, the end timestamp is also included.

Demo:

connectionlogdemo2.mov
imageimage

Since the styling is identical to that of the audit log, I've continued to use MUI table components. When the audit log is migrated off MUI/restyled, this table can be too, relatively easily.

Future PRs:

  • Write a query to delete old events from the audit log, call it from dbpurge.
  • Write documentation for the endpoint / feature


return (
<Filter
// TODO(ethanndickson): Add docs
Copy link
MemberAuthor

@ethanndicksonethanndicksonJul 2, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Will be done in this PR stack.

Copilot

This comment was marked as outdated.

@ethanndicksonethanndicksonforce-pushed theethan/fe-connection-log branch 3 times, most recently from3accbf8 to7de824cCompareJuly 2, 2025 06:46
@ethanndicksonethanndickson marked this pull request as ready for reviewJuly 2, 2025 07:07
@ethanndicksonethanndickson marked this pull request as draftJuly 2, 2025 07:07
@ethanndickson
Copy link
MemberAuthor

This is ready for review, but marked as a draft so it's not merged early.

@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from33d8acb to1e3334bCompareJuly 2, 2025 09:31
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from1e3334b to332f8daCompareJuly 2, 2025 09:46
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from6cd9d68 to6fa4d22CompareJuly 10, 2025 05:58
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from6fa4d22 to769b7a5CompareJuly 10, 2025 10:28
@ethanndicksonethanndicksonforce-pushed theethan/fe-connection-log branch 2 times, most recently fromd6ec519 to15aac3fCompareJuly 10, 2025 10:37
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from769b7a5 tofc195c3CompareJuly 10, 2025 10:50
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR introduces a new Connection Log page in the frontend, mirroring the existing audit log structure but showing connection sessions, start/end times, and status codes.

  • Added utilities and API endpoints for fetching and color-coding connection logs.
  • Created ConnectionLogPage and related components (row, description, filter, help tooltip) plus stories and tests.
  • Updated router, permissions, and navigation (Navbar, MobileMenu, DeploymentDropdown) to include the new page.

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
site/src/utils/http.tsAddedhttpStatusColor helper for status code color mapping
site/src/utils/connection.tsAddedconnectionTypeToFriendlyName andconnectionTypeIsWeb
site/src/api/queries/connectionlog.ts & api/api.tsNew paginatedConnectionLogs query andAPI.getConnectionLogs
site/src/testHelpers/entities.tsNew mocks for connection log entitlements and entries
site/src/router.tsxRegistered/connectionlog route
site/src/pages/ConnectionLogPage/**/*New page components, stories, filter, tooltip & tests
site/src/modules/permissions/index.tsAddedviewAnyConnectionLog permission
site/src/modules/dashboard/Navbar/**/*Updated navigation to show Connection Log links
site/src/components/StatusPill/StatusPill.tsxEnhancedStatusPill to handle HTTP/SSH codes
site/src/components/Filter/UserFilter.tsxAddedplaceholder prop toUserMenu
site/src/pages/AuditPage/**/*Refactored to reuse newStatusPill for HTTP codes
Comments suppressed due to low confidence (2)

site/src/pages/ConnectionLogPage/ConnectionLogPage.tsx:28

  • [nitpick] The variable nameconnectionlogsQuery is lower-camel but the second word isn’t capitalized (connectionLogsQuery). Renaming for consistent camelCase improves readability.
const connectionlogsQuery = usePaginatedQuery(

site/src/pages/ConnectionLogPage/ConnectionLogRow/ConnectionLogDescription/ConnectionLogDescription.tsx:1

  • There are no unit tests coveringConnectionLogDescription. Adding tests for each connection type and variousstatus_code paths (e.g., redirect, error, unauthenticated) would ensure correct rendering logic.
import Link from "@mui/material/Link";

@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch fromfc195c3 todf2d839CompareJuly 14, 2025 02:04
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch fromdf2d839 to78cc56bCompareJuly 14, 2025 06:13
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch from78cc56b toe61fc41CompareJuly 15, 2025 03:33
@ethanndicksonethanndicksonforce-pushed theethan/populate-connection-log-count branch frome61fc41 to4055dd7CompareJuly 15, 2025 04:00
@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedJul 15, 2025
edited
Loading

Merge activity

  • Jul 15, 4:35 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Jul 15, 4:45 AM UTC:Graphite couldn't merge this pull request because a downstack PRfeat: addconnectionlogs API #18628 failed to merge.
  • Jul 15, 4:55 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Jul 15, 5:05 AM UTC:Graphite rebased this pull request as part of a merge.
  • Jul 15, 5:11 AM UTC:@ethanndickson merged this pull request withGraphite.

@ethanndicksonethanndickson changed the base branch fromethan/populate-connection-log-count tographite-base/18708July 15, 2025 04:56
@ethanndicksonethanndickson changed the base branch fromgraphite-base/18708 tomainJuly 15, 2025 05:03
@ethanndicksonethanndickson merged commitb5260d5 intomainJul 15, 2025
30 of 32 checks passed
@ethanndicksonethanndickson deleted the ethan/fe-connection-log branchJuly 15, 2025 05:11
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

Copilot code reviewCopilotCopilot left review comments

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

@ParkreinerParkreinerAwaiting requested review from Parkreiner

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethanndickson@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp