Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8dc36b19
Commit
8dc36b19
authored
Dec 20, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get saved scan counts from finder
parent
d3ca75aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ee/app/helpers/projects/on_demand_scans_helper.rb
ee/app/helpers/projects/on_demand_scans_helper.rb
+4
-4
No files found.
ee/app/helpers/projects/on_demand_scans_helper.rb
View file @
8dc36b19
...
...
@@ -5,8 +5,8 @@ module Projects::OnDemandScansHelper
def
on_demand_scans_data
(
project
)
on_demand_scans
=
project
.
all_pipelines
.
where
(
source:
Enums
::
Ci
::
Pipeline
.
sources
[
:ondemand_dast_scan
])
running_scan_count
,
finished_scan_count
=
count_running_and_finished_scans
(
on_demand_scans
)
s
aved_scans
=
::
Dast
::
ProfilesFinder
.
new
({
project_id:
project
.
id
}).
execute
s
cheduled_scans
=
saved_scans
.
count
{
|
scan
|
!
scan
.
dast_profile_schedule
.
nil?
}
s
cheduled_scans_count
=
::
Dast
::
ProfilesFinder
.
new
({
project_id:
project
.
id
,
has_dast_profile_schedule:
true
}).
execute
.
count
s
aved_scans_count
=
::
Dast
::
ProfilesFinder
.
new
({
project_id:
project
.
id
}).
execute
.
count
common_data
(
project
).
merge
({
'project-on-demand-scan-counts-etag'
=>
graphql_etag_project_on_demand_scan_counts_path
(
project
),
...
...
@@ -14,8 +14,8 @@ module Projects::OnDemandScansHelper
all:
on_demand_scans
.
length
,
running:
running_scan_count
,
finished:
finished_scan_count
,
scheduled:
scheduled_scans
,
saved:
saved_scans
.
length
scheduled:
scheduled_scans
_count
,
saved:
saved_scans
_count
}.
to_json
,
'new-dast-scan-path'
=>
new_project_on_demand_scan_path
(
project
),
'empty-state-svg-path'
=>
image_path
(
'illustrations/empty-state/ondemand-scan-empty.svg'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment