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
f14c286b
Commit
f14c286b
authored
Dec 21, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Count scheduled scans in memory
parent
8dc36b19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ee/app/helpers/projects/on_demand_scans_helper.rb
ee/app/helpers/projects/on_demand_scans_helper.rb
+3
-3
No files found.
ee/app/helpers/projects/on_demand_scans_helper.rb
View file @
f14c286b
...
...
@@ -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
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
s
aved_scans
=
::
Dast
::
ProfilesFinder
.
new
({
project_id:
project
.
id
}).
execute
s
cheduled_scans_count
=
saved_scans
.
count
{
|
scan
|
scan
.
dast_profile_schedule
}
common_data
(
project
).
merge
({
'project-on-demand-scan-counts-etag'
=>
graphql_etag_project_on_demand_scan_counts_path
(
project
),
...
...
@@ -15,7 +15,7 @@ module Projects::OnDemandScansHelper
running:
running_scan_count
,
finished:
finished_scan_count
,
scheduled:
scheduled_scans_count
,
saved:
saved_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