Skip to content
Snippets Groups Projects

Show list of stream audit event types in UI

Merged Lorenz van Herwaarden requested to merge render-audit-events-backend into master

What does this MR do and why?

Relates to #413581 (closed)

This MR displays available audit event types coming from backend (HAML injected) in a GlCollapsibleListbox in the event filtering section of a streaming destination.

Before, each event type had to be created via the API and could only be unchecked via the UI later.

Some notes:

  • The list of events is quite long, in next iterations, the listbox will handle grouping by category and searching.
  • The event types don't have any label supplied, so it was decided that we would use sentence case; "add_gpg_key" becomes "Add gpg key"

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
before after

audit-events-filter-listbox

How to set up and validate locally

Make sure you have an EE license

  1. Go to any group
  2. Go to "Secure" > "Audit events"
  3. Click "Streams" tab
  4. Create a new streaming destination by clicking "Add streaming destination"
  5. Provide a "Destination URL"
  6. Validate you see the "Filter by stream event" accordion and click it
  7. Validate you see a dropdown with a placeholder "Select events", click it
  8. Validate you can see a long list of event types and these are selectable
  9. Validate that if you select some it updates the text of the dropdown button with a comma-separated list of the event type names
  10. Validate that clicking "Unselect all", actually unselects all event types
  11. Validate that clicking "Select all" selects all event types (button is only shown if no event types are selected)
  12. Select some event types and click "Add"
  13. Validate that the editor is closed and a new streaming destination is added
  14. Validate that if you edit that new destination and go to event type dropdown the same events are selected from before.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lorenz van Herwaarden

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lorenz van Herwaarden changed milestone to %16.1

    changed milestone to %16.1

  • Contributor
    3 Warnings
    :warning: This merge request is quite big (647 lines changed), please consider splitting it into multiple merge requests.
    :warning: a84839a3: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.
    :warning: This merge request changed files with disabled eslint rules. Please consider fixing them.
    1 Message
    :book: This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge.

    Documentation review

    The following files require a review from a technical writer:

    The review does not need to block merging this merge request. See the:

    Disabled eslint rules

    The following files have disabled eslint rules. Please consider fixing them:

    • ee/app/assets/javascripts/audit_events/constants.js

    Run the following command for more details

    node_modules/.bin/eslint --report-unused-disable-directives --no-inline-config \
      'ee/app/assets/javascripts/audit_events/constants.js'

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend Tarun Vellishetty current availability (@tvellishetty) (UTC+5.5, 3.5 hours ahead of @lorenzvanherwaarden) Peter Leitzen current availability (@splattael) (UTC+2, same timezone as @lorenzvanherwaarden)
    frontend Tomas Vik current availability (@viktomas) (UTC+2, same timezone as @lorenzvanherwaarden) Coung Ngo current availability (@cngo) (UTC+1, 1 hour behind @lorenzvanherwaarden)
    UX Libor Vanc current availability (@lvanc) (UTC-10, 12 hours behind @lorenzvanherwaarden) Maintainer review is optional for UX
    groupcompliance Reviewer review is optional for groupcompliance Aaron Huntsman current availability (@ahuntsman) (UTC-5, 7 hours behind @lorenzvanherwaarden)

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Contributor

    Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits 1c141f6e and dbc33b3d

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 4.12 MB 4.12 MB - 0.0 %
    mainChunk 3 MB 3 MB - 0.0 %

    :fearful: Significant Growth: 3

    Expand
    Entrypoint / Name Size before Size after Diff Diff in percent
    pages.admin.audit_logs 851.78 KB 879.71 KB +27.93 KB 3.3 %
    pages.groups.audit_events 862.17 KB 890.1 KB +27.93 KB 3.2 %
    pages.projects.audit_events 934.5 KB 962.43 KB +27.93 KB 3.0 %

    Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.

    Please consider pinging someone from the FE Foundations (@leipert, @markrian, @ohoral or @pgascouvaillancourt) for review, if you are unsure about the size increase.

    Note: We do not have exact data for 1c141f6e. So we have used data from: 50662b89.
    The intended commit has no webpack pipeline, so we chose the last commit with one before it.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Contributor

    Allure report

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :exclamation: test report for dbc33b3d

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Data Stores      | 2      | 0      | 0       | 1     | 2     | ❗     |
    | Govern           | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Create           | 8      | 0      | 1       | 0     | 9     | ✅     |
    | Plan             | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Manage           | 1      | 0      | 0       | 0     | 1     | ✅     |
    | Monitor          | 4      | 0      | 0       | 0     | 4     | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 21     | 0      | 2       | 1     | 23    | ❗     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-review-qa: :exclamation: test report for dbc33b3d

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Monitor          | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Create           | 8      | 0      | 1       | 0     | 9     | ✅     |
    | Plan             | 3      | 0      | 1       | 0     | 4     | ✅     |
    | Data Stores      | 2      | 0      | 0       | 1     | 2     | ❗     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Govern           | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Manage           | 1      | 0      | 0       | 0     | 1     | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 20     | 0      | 3       | 1     | 23    | ❗     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :x: test report for dbc33b3d

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Create           | 687    | 1      | 117     | 5     | 805   | ❌     |
    | Govern           | 245    | 0      | 10      | 5     | 255   | ❗     |
    | Plan             | 390    | 0      | 3       | 0     | 393   | ✅     |
    | Verify           | 250    | 0      | 25      | 0     | 275   | ✅     |
    | Package          | 268    | 0      | 49      | 228   | 317   | ❗     |
    | Manage           | 207    | 18     | 17      | 29    | 242   | ❌     |
    | Fulfillment      | 12     | 0      | 125     | 0     | 137   | ✅     |
    | Monitor          | 52     | 0      | 11      | 0     | 63    | ✅     |
    | Data Stores      | 185    | 0      | 3       | 0     | 188   | ✅     |
    | Analytics        | 11     | 0      | 0       | 0     | 11    | ✅     |
    | Configure        | 1      | 0      | 15      | 0     | 16    | ✅     |
    | Release          | 30     | 0      | 0       | 0     | 30    | ✅     |
    | Framework sanity | 0      | 0      | 7       | 0     | 7     | ➖     |
    | Secure           | 10     | 0      | 45      | 0     | 55    | ✅     |
    | Growth           | 0      | 0      | 10      | 0     | 10    | ➖     |
    | Systems          | 19     | 0      | 0       | 0     | 19    | ✅     |
    | GitLab Metrics   | 2      | 0      | 1       | 0     | 3     | ✅     |
    | ModelOps         | 0      | 0      | 5       | 0     | 5     | ➖     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 2369   | 19     | 443     | 267   | 2831  | ❌     |
    +------------------+--------+--------+---------+-------+-------+--------+
  • added 1 commit

    • 68644877 - Add tests to stream_filters_spec for listbox

    Compare with previous version

  • added 3 commits

    • 0dbe7e18 - Show fixed list of audit events in listbox
    • a1543188 - Inject audit event definitions to page
    • a7f87f5f - Use GlCollapsibleListbox instead of GlFormCheckboxTree

    Compare with previous version

  • added 1 commit

    • 41812300 - Update audit event streaming documentation

    Compare with previous version

  • Lorenz van Herwaarden changed the description

    changed the description

  • Lorenz van Herwaarden changed the description

    changed the description

  • added 2 commits

    • 05e97783 - Fix non-existing constant import
    • d08b685b - Remove use of mockFiltersOptions

    Compare with previous version

  • Lorenz van Herwaarden marked this merge request as ready

    marked this merge request as ready

  • mentioned in merge request !123093 (closed)

  • Lorenz van Herwaarden
  • Lorenz van Herwaarden
  • Lorenz van Herwaarden
  • Lorenz van Herwaarden marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • requested review from @sming-gitlab

  • Lorenz van Herwaarden requested review from @eread

    requested review from @eread

  • requested review from @wandering_person

  • Lorenz van Herwaarden requested review from @cam.x

    requested review from @cam.x

  • requested review from @hraghuvanshi

  • added 1 commit

    • 6cc3e104 - Update audit event streaming documentation

    Compare with previous version

  • Evan Read removed review request for @eread

    removed review request for @eread

  • Samantha Ming
  • Samantha Ming removed review request for @sming-gitlab

    removed review request for @sming-gitlab

  • Samantha Ming approved this merge request

    approved this merge request

  • :wave: @sming-gitlab, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Hitesh Raghuvanshi approved this merge request

    approved this merge request

  • Hitesh Raghuvanshi removed review request for @hraghuvanshi

    removed review request for @hraghuvanshi

  • added 1 commit

    • 95cd0286 - Apply writing suggestion for docs

    Compare with previous version

  • added 202 commits

    • 95cd0286...5d1bf198 - 198 commits from branch master
    • 5866bd36 - Show fixed list of audit events in listbox
    • fe0ac43b - Inject audit event definitions to page
    • 8a229893 - Use GlCollapsibleListbox instead of GlFormCheckboxTree
    • 7fe4748d - Update audit event streaming documentation

    Compare with previous version

  • added 1 commit

    • 608a997f - Apply writing suggestions for doc

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading