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
5d4cb809
Commit
5d4cb809
authored
Jun 21, 2021
by
Paul Gascou-Vaillancourt
Committed by
Paul Gascou-Vaillancourt
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename manifest to yaml in getPolicyKind
parent
21e2604e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ee/app/assets/javascripts/threat_monitoring/utils.js
ee/app/assets/javascripts/threat_monitoring/utils.js
+4
-4
No files found.
ee/app/assets/javascripts/threat_monitoring/utils.js
View file @
5d4cb809
...
...
@@ -14,14 +14,14 @@ export const getContentWrapperHeight = (contentWrapperClass) => {
/**
* Get a policy's type
* @param {String}
manifest
policy's YAML manifest
* @param {String}
yaml
policy's YAML manifest
* @returns {String|null} policy type if available
*/
export
const
getPolicyKind
=
(
manifest
=
''
)
=>
{
if
(
manifest
?.
includes
(
POLICY_KINDS
.
ciliumNetwork
))
{
export
const
getPolicyKind
=
(
yaml
=
''
)
=>
{
if
(
yaml
?.
includes
(
POLICY_KINDS
.
ciliumNetwork
))
{
return
POLICY_KINDS
.
ciliumNetwork
;
}
if
(
manifest
?.
includes
(
POLICY_KINDS
.
scanExecution
))
{
if
(
yaml
?.
includes
(
POLICY_KINDS
.
scanExecution
))
{
return
POLICY_KINDS
.
scanExecution
;
}
return
null
;
...
...
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