Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add dao and manager for audit log ext #21379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stonezdj
Copy link
Contributor

@stonezdj stonezdj commented Jan 6, 2025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@stonezdj stonezdj requested a review from a team as a code owner January 6, 2025 08:23
@stonezdj stonezdj added the release-note/new-feature New Harbor Feature label Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.30%. Comparing base (c8c11b4) to head (fe6afee).
Report is 347 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21379      +/-   ##
==========================================
+ Coverage   45.36%   46.30%   +0.93%     
==========================================
  Files         244      247       +3     
  Lines       13333    13883     +550     
  Branches     2719     2875     +156     
==========================================
+ Hits         6049     6429     +380     
- Misses       6983     7116     +133     
- Partials      301      338      +37     
Flag Coverage Δ
unittests 46.30% <ø> (+0.93%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 491 files with indirect coverage changes

@stonezdj stonezdj force-pushed the 25jan06_auditlogext_model branch 3 times, most recently from 484d4e2 to c07a50e Compare January 6, 2025 08:53
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
@stonezdj stonezdj force-pushed the 25jan06_auditlogext_model branch from c07a50e to fe6afee Compare January 6, 2025 09:11
@stonezdj stonezdj requested review from wy65701436 and chlins January 6, 2025 09:12
Resource string `orm:"column(resource)" json:"resource"`
Username string `orm:"column(username)" json:"username"`
OpTime time.Time `orm:"column(op_time)" json:"op_time" sort:"default:desc"`
Payload string `orm:"column(payload)" json:"payload"`
Copy link
Contributor

Choose a reason for hiding this comment

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

since we just leave it as empty for further use, so let's skip it in this model.

}

// EventTypes defines the types of audit log event
var EventTypes = []string{
Copy link
Contributor

@wy65701436 wy65701436 Jan 10, 2025

Choose a reason for hiding this comment

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

why we put the EventTypes into DB model?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
release-note/new-feature New Harbor Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants