Skip to content

Conversation

@marcelofukumoto
Copy link
Contributor

@marcelofukumoto marcelofukumoto commented Dec 16, 2025

Summary

Fixes #12961

Occurred changes and/or fixed issues

  • Added the CRUD to the AuditPolicy
  • Added a Growl to when a resource is created when the name is autogenerated
  • List fixed as well, added action and bulk action for the AuditPolicy

shell/assets/translations/en-us.yaml Added all the new texts for audit policies
shell/config/types.js Added the types to use it on the list
shell/config/product/explorer.js Changed to add to the list, add to Policy as the last one (-1)
shell/edit/auditlog.cattle.io.auditpolicy/AdditionalRedactions.vue New file for the new options (Composition)
shell/edit/auditlog.cattle.io.auditpolicy/Filters.vue New file for the filters options (Composition)
shell/edit/auditlog.cattle.io.auditpolicy/General.vue New file for the general part (Composition)
shell/edit/auditlog.cattle.io.auditpolicy/index.vue New file to merge all togehter (Option), could not make (Composition) for the lack of composables
shell/list/auditlog.cattle.io.auditpolicy.vue Added to interactive change the list
shell/edit/auditlog.cattle.io.auditpolicy/types.ts Added new types

Tests created with snapshots
shell/edit/auditlog.cattle.io.auditpolicy/tests/AdditionalRedactions.test.ts
shell/edit/auditlog.cattle.io.auditpolicy/tests/Filters.test.ts
shell/edit/auditlog.cattle.io.auditpolicy/tests/General.test.ts
shell/edit/auditlog.cattle.io.auditpolicy/tests/index.test.ts
shell/edit/auditlog.cattle.io.auditpolicy/tests/snapshots/AdditionalRedactions.test.ts.snap
shell/edit/auditlog.cattle.io.auditpolicy/tests/snapshots/Filters.test.ts.snap
shell/edit/auditlog.cattle.io.auditpolicy/tests/snapshots/General.test.ts.snap
shell/edit/auditlog.cattle.io.auditpolicy/tests/snapshots/index.test.ts.snap
shell/models/auditlog.cattle.io.auditpolicy.js

shell/list/auditlog.cattle.io.auditpolicy.vue List changed
shell/models/auditlog.cattle.io.auditpolicy.js Model changed to add the actions

Toast added:
shell/plugins/steve/steve-class.js Added toast to the processSaveResponse
shell/plugins/steve/tests/steve-class.test.ts New tests

Technical notes summary

  • Removed the VALID from the list, the BackEnd should have removed but kept on the list
  • Removed the ACTIVE from the list, without the VALID the active has same value as the STATE so not required
  • Added AGE to the list since it helps to know the newly created one
  • On General, added Verbosity and Enable together
  • On the Filter, used the ArrayList since not required to have a complex structure. Tried to use KeyValue, but the usage was different and the UI as well was not right with a big select. ArrayList feels more natural to use.
  • AdditionalRedaction, added based on the Network Policies Ingress Rules, a complex list.
  • Name is not required, not namespaced
  • It seems there are some problems when setting up the environment, validation seems to not be working with the YAML

Areas or cases that should be tested

  • Value on the List - Policy
  • List
  • List actions, bulk and no bulk
  • Create Audit Log Policy
  • Edit Audit Log Policy
  • PDF with the test cases list:

Areas which could experience regressions

  • The growl should show on all the places where it is autogenerated, not only AuditPolicy

Screenshot/Video

PDF with the test cases
test cases - 12961.pdf

image image image image image image image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

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.

Enhance CRUD Experience for new Audit Log CR

1 participant