DAST on-demand scans empty tabs
What does this MR do and why?
This implements the 4 primary tabs in the DAST scans index page.
In this iteration, we're only showing the tabs with 0
item counters and empty states for each. In the next iteration, we'll start fetching some actual data for the All
tab.
Screenshots or screen recordings
Tab | Preview |
---|---|
All |
|
Running |
|
Finished |
|
Scheduled |
How to set up and validate locally
The app currently assumes that there is no pipeline to show and renders an empty state instead of the tabs. To get the tabs to show up, an internal property needs to be changed manually. This will of course not be needed anymore once the app fetches actual data from the API.
-
Enable the index page.
Feature.enable(:dast_view_scans)
-
Force the app to show the tabs instead of the empty state by applying the following patch:
diff --git a/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue b/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue index 3dcdbbdae8a..d9a7182e896 100644 --- a/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue +++ b/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue @@ -34,7 +34,7 @@ export default { data() { return { activeTabIndex: 0, - hasData: false, + hasData: true, }; }, computed: {
To apply the patch, copy the whole code block and run
pbpaste | git apply
in thegitlab/
directory. -
Visit the index page at
/:namespace/:project/on_demand_scans
.
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 #341359 (closed)