Move the refresh header query to parent
What does this MR do and why?
Move the refresh header query to parent
As part of #228746 we are changing the fetching of a vulnerability to GraphQL. Currently, it's being injected through HAML. Since the GraphQL fields are still not complete, we decided to go step by step and work on this iteratively. The first step is moving the refetching of the header to the vulnerability component.
Screenshots or screen recordings
UI-wise nothing significant changes here. The only change is when the footer updates the header, the reload effect has been removed. This happens only because the footer keeps polling for discussions, and when it finds a system note with state change it notifies the header so that the header refreshes itself. Since this is a very rare case for the user to see it, I thought not adding additional complexity.
Despite not having any signification UI change here's screencast that shows that it works properly.
I first update the state. Then change the tab and update it again and change the tab back. Wait for footer to poll the changes and update the header.
How to set up and validate locally
If you already have a working runner, skip to the bullet-list below.
You should have the runner installed in order to run the pipeline. Then using the following command you can register the runner, it guides you pretty good on how to set the runner:
$ gitlab-runner register
Once it's installed this is how I run the runner:
$ gitlab-runner --log-level debug run local-runner --config ~/.gitlab-runner/config.toml restart
After you got the runner running:
- Clone https://gitlab.com/gitlab-examples/security/security-reports/
- Run the pipeline by going into Your project > CI/CD > Pipelines
- Click on run pipeline for master branch
- Go to Security & Compliance > Vulnerability Report
- Click on a vulnerability
- Play around with the dropdown on the header, it should reflect the changes when the state is updated.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #228746