Skip to content

Populate Audit Feed with Data #3608

Closed
Closed
@Kira-Pilot

Description

@Kira-Pilot

As a user, I would like to be able to view my audit data in a human readable log. I would like to be able to click and expand a log to view more detail, if applicable.

Audit RFC

Audit Mocks

Technical Considerations

We scaffolded out the audit log CSS and JSX in #3429. We are creating a machine to load the Audit Log data in #3428. We should have all the pieces we need to populate the audit log feed.
Screen Shot 2022-08-19 at 4 27 45 PM

The API response should look something like:

type AuditLog struct {
	ID               uuid.UUID       `json:"id"`
	RequestID        uuid.UUID       `json:"request_id"`
	Time             time.Time       `json:"time"`
	OrganizationID   uuid.UUID       `json:"organization_id"`
	IP               netip.Addr      `json:"ip"`
	UserAgent        string          `json:"user_agent"`
	ResourceType     ResourceType    `json:"resource_type"`
	ResourceID       uuid.UUID       `json:"resource_id"`
	ResourceTarget   string          `json:"resource_target"`
	Action           AuditAction     `json:"action"`
	Diff             AuditDiff       `json:"diff"`
	StatusCode       int32           `json:"status_code"`
	AdditionalFields json.RawMessage `json:"additional_fields"`
	Description      string          `json:"description"`

	User     *User           `json:"user"`
	Resource json.RawMessage `json:"resource"`
}

AC

  • Each event should be represented by a friendly string provided by the BE, i.e. Description.
  • The human-readable date (BE time property) should have a tooltip that displays the actual date.
  • The OS and Browser fields should be derived on FE; it is a pain for the BE to parse these.
  • Don't worry about the diff section scaffolded out in Scaffold out audit feed #3429 - this will be populated in Display audit log diffs in a git diff format #3607.
  • Add tests and stories

Definition of Done

When audit logs are returned from the API
then primary events our displayed in the audit log feed.

Metadata

Metadata

Assignees

Labels

siteArea: frontend dashboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions