Skip to content

Add Preview Seat Link payload on "Metrics and Profiling" Settings page

Tyler Amos requested to merge 212493-preview-seat-link-payload into master

What does this MR do?

This MR is a followup from the MR which introduced the Seat Link admin toggle. The original requirements were to add a "Preview Payload" button below the toggle demonstrating to customers what a Seat Link payload back to GitLab would look like. We decided to push that feature into a separate issue in an effort to get the admin toggle out iteratively. This MR introduces that preview payload feature similar to the Usage Ping "Preview Payload" feature.

There were some opportunities for refactoring and code use while working on this feature:

  • Introduces the SeatLinkData module as a place to store common logic needed to construct the Seat Link request payload. This is used by the SyncSeatLinkWorker and the new preview payload feature.
  • Moves spec helper method create_current_license to EE::LicenseHelpers for reuse.
  • Genericize the UsagePingPayload JS class as PayloadPreviewer for reuse. This is used by seat link and usage ping payload previews.

Also, added information about this new feature to the Seat Link documentation.

Screenshots

Before preview button pressed: Screen_Shot_2020-04-02_at_4.01.12_PM After preview button pressed: Screen_Shot_2020-04-02_at_4.01.58_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #212493

Edited by 🤖 GitLab Bot 🤖

Merge request reports