Skip to content

Add training item loading in vulnerability details page

Samantha Ming requested to merge 349670-loading-training-item into master

What does this MR do and why?

This MR adds the loading state of the training item on the vulnerability details page.

This MR is part of the new security training feature, please see the epic for details and the implementation breakdown > &6176 (closed)

Note the implementation of adding the training section is split into the following MR > (copied from here > #346066 (comment 802988533))

Changes Issue
Add training section (basic UI) !77317 (merged)
Add loading status of query fetch of training configuration tbd
Connect graphql to display training section !78201 (merged)
Make API call to fetch training (UI) MR !78503 (merged)
Add loading status of trainer fetch This MR

Screenshots or screen recordings

How to set up and validate locally

This feature is behind a feature flag, to enable

rails c

Feature.enable(:secure_vulnerability_training)
  1. Navigate to the Vulnerability report
  2. Click on a vulnerability that is of type of CWE
  3. You will see the loading state while the external API is being called

Note: there is an issue to eventually allow the frontend to call the API from the backend > https://gitlab.com/gitlab-org/gitlab/-/issues/349910. For now, we have the API call directly from the frontend for us to implement the UI. To see it locally, you will need to make some changes to the config_loader.rb. Here's a patch for the configuration:

config-loader-provider-api.patch

MR acceptance checklist

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

Related to #349670 (closed)

Edited by Samantha Ming

Merge request reports

Loading