Add display label and tooltip for nested fields in mapping builder
What does this MR do?
Formats how labels are displayed when fields are nested in alerts http integration custom mapping tool
- navigate to Operations=> Settings=>expand Alert integrations section or the direct link will be
localhost/group/project/-/settings/operations#js-alert-management-settings
- Click Add integration
- Fill the form (make sure to select HTTP endpoint type on step 1)
- Toggle active
- Now you can paste and parse payload (any valid JSON) but for this case we need fields that are nested
{
"id": "1",
"type": "articles",
"title": "lalal",
"another": {
"type": "lalal"
},
"attributes": [
{
"body": "this is a description",
"title": "CPU at 95%",
"created": "2015-05-22T14:56:29.000Z"
},
{
"body": "this is 2nd description",
"title": "CPU at 95%",
"created": "2015-05-22T14:56:29.000Z"
}
]
}
- Now make sure that in the mapping tool nested fields are displayed with
...
before the field's name and have a tooltip that shows the field path in the JSON
Screenshots (strongly suggested)
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
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
Related to #324047 (closed)
Edited by Olena Horal-Koretska