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
29e60d47
Commit
29e60d47
authored
Apr 16, 2020
by
Alan Paruszewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add last fetched at timestamp on show vulnerability page
parent
6fdd8b52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
ee/app/helpers/vulnerabilities_helper.rb
ee/app/helpers/vulnerabilities_helper.rb
+2
-1
ee/spec/helpers/vulnerabilities_helper_spec.rb
ee/spec/helpers/vulnerabilities_helper_spec.rb
+6
-1
No files found.
ee/app/helpers/vulnerabilities_helper.rb
View file @
29e60d47
...
@@ -11,7 +11,8 @@ module VulnerabilitiesHelper
...
@@ -11,7 +11,8 @@ module VulnerabilitiesHelper
pipeline_json:
vulnerability_pipeline_data
(
pipeline
).
to_json
,
pipeline_json:
vulnerability_pipeline_data
(
pipeline
).
to_json
,
has_mr:
!!
vulnerability
.
finding
.
merge_request_feedback
.
try
(
:merge_request_iid
),
has_mr:
!!
vulnerability
.
finding
.
merge_request_feedback
.
try
(
:merge_request_iid
),
vulnerability_feedback_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'interacting-with-the-vulnerabilities'
),
vulnerability_feedback_help_path:
help_page_path
(
'user/application_security/index'
,
anchor:
'interacting-with-the-vulnerabilities'
),
finding_json:
vulnerability_finding_data
(
vulnerability
.
finding
).
to_json
finding_json:
vulnerability_finding_data
(
vulnerability
.
finding
).
to_json
,
timestamp:
Time
.
now
.
to_i
}
}
end
end
...
...
ee/spec/helpers/vulnerabilities_helper_spec.rb
View file @
29e60d47
...
@@ -49,6 +49,10 @@ describe VulnerabilitiesHelper do
...
@@ -49,6 +49,10 @@ describe VulnerabilitiesHelper do
expect
(
occurrence_serializer_stub
).
to
receive
(
:represent
).
with
(
finding
).
and_return
(
occurrence_serializer_hash
)
expect
(
occurrence_serializer_stub
).
to
receive
(
:represent
).
with
(
finding
).
and_return
(
occurrence_serializer_hash
)
end
end
around
do
|
example
|
Timecop
.
freeze
{
example
.
run
}
end
it
'has expected vulnerability properties'
do
it
'has expected vulnerability properties'
do
expect
(
subject
).
to
include
(
expect
(
subject
).
to
include
(
vulnerability_json:
kind_of
(
String
),
vulnerability_json:
kind_of
(
String
),
...
@@ -56,7 +60,8 @@ describe VulnerabilitiesHelper do
...
@@ -56,7 +60,8 @@ describe VulnerabilitiesHelper do
create_issue_url:
kind_of
(
String
),
create_issue_url:
kind_of
(
String
),
has_mr:
anything
,
has_mr:
anything
,
vulnerability_feedback_help_path:
kind_of
(
String
),
vulnerability_feedback_help_path:
kind_of
(
String
),
finding_json:
kind_of
(
String
)
finding_json:
kind_of
(
String
),
timestamp:
Time
.
now
.
to_i
)
)
end
end
end
end
...
...
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