Add Preview Seat Link payload on "Metrics and Profiling" Settings page
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 theSyncSeatLinkWorker
and the new preview payload feature. - Moves spec helper method
create_current_license
toEE::LicenseHelpers
for reuse. - Genericize the
UsagePingPayload
JS class asPayloadPreviewer
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: After preview button pressed:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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