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
877a3d2a
Commit
877a3d2a
authored
Oct 06, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update path name to policies
- this matches where the path actually send the user
parent
f0590e1d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
ee/app/assets/javascripts/threat_monitoring/components/policy_editor/network_policy/network_policy_editor.vue
...ts/policy_editor/network_policy/network_policy_editor.vue
+3
-3
ee/app/assets/javascripts/threat_monitoring/components/policy_editor/policy_editor_layout.vue
...itoring/components/policy_editor/policy_editor_layout.vue
+2
-2
ee/app/assets/javascripts/threat_monitoring/policy_editor.js
ee/app/assets/javascripts/threat_monitoring/policy_editor.js
+2
-2
ee/app/helpers/projects/security/policies_helper.rb
ee/app/helpers/projects/security/policies_helper.rb
+1
-1
ee/spec/frontend/threat_monitoring/components/policy_editor/network_policy/network_policy_editor_spec.js
...olicy_editor/network_policy/network_policy_editor_spec.js
+1
-1
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_editor_layout_spec.js
...ing/components/policy_editor/policy_editor_layout_spec.js
+2
-2
ee/spec/helpers/projects/security/policies_helper_spec.rb
ee/spec/helpers/projects/security/policies_helper_spec.rb
+1
-1
No files found.
ee/app/assets/javascripts/threat_monitoring/components/policy_editor/network_policy/network_policy_editor.vue
View file @
877a3d2a
...
...
@@ -71,7 +71,7 @@ export default {
'
networkDocumentationPath
'
,
'
noEnvironmentSvgPath
'
,
'
projectId
'
,
'
threatMonitoring
Path
'
,
'
policies
Path
'
,
],
props
:
{
existingPolicy
:
{
...
...
@@ -188,14 +188,14 @@ export default {
}
return
saveFn
({
environmentId
:
this
.
currentEnvironmentId
,
policy
}).
then
(()
=>
{
if
(
!
this
.
errorUpdatingPolicy
)
redirectTo
(
this
.
threatMonitoring
Path
);
if
(
!
this
.
errorUpdatingPolicy
)
redirectTo
(
this
.
policies
Path
);
});
},
removePolicy
()
{
const
policy
=
{
name
:
this
.
existingPolicy
.
name
,
manifest
:
this
.
yamlEditorValue
};
return
this
.
deletePolicy
({
environmentId
:
this
.
currentEnvironmentId
,
policy
}).
then
(()
=>
{
if
(
!
this
.
errorRemovingPolicy
)
redirectTo
(
this
.
threatMonitoring
Path
);
if
(
!
this
.
errorRemovingPolicy
)
redirectTo
(
this
.
policies
Path
);
});
},
},
...
...
ee/app/assets/javascripts/threat_monitoring/components/policy_editor/policy_editor_layout.vue
View file @
877a3d2a
...
...
@@ -23,7 +23,7 @@ export default {
import
(
/* webpackChunkName: 'policy_yaml_editor' */
'
../policy_yaml_editor.vue
'
),
},
directives
:
{
GlModal
:
GlModalDirective
,
GlTooltip
:
GlTooltipDirective
},
inject
:
[
'
threatMonitoring
Path
'
],
inject
:
[
'
policies
Path
'
],
props
:
{
customSaveButtonText
:
{
type
:
String
,
...
...
@@ -186,7 +186,7 @@ export default {
:loading=
"isRemovingPolicy"
>
{{
s__
(
'
NetworkPolicies|Delete policy
'
)
}}
</gl-button
>
<gl-button
category=
"secondary"
:href=
"
threatMonitoring
Path"
>
{{
__
(
'
Cancel
'
)
}}
</gl-button>
<gl-button
category=
"secondary"
:href=
"
policies
Path"
>
{{
__
(
'
Cancel
'
)
}}
</gl-button>
<gl-modal
modal-id=
"delete-modal"
:title=
"deleteModalTitle"
...
...
ee/app/assets/javascripts/threat_monitoring/policy_editor.js
View file @
877a3d2a
...
...
@@ -24,7 +24,7 @@ export default () => {
networkDocumentationPath
,
networkPoliciesEndpoint
,
noEnvironmentSvgPath
,
threatMonitoring
Path
,
policies
Path
,
policy
,
policyType
,
projectPath
,
...
...
@@ -66,7 +66,7 @@ export default () => {
projectId
,
projectPath
,
hasEnvironment
:
isValidEnvironmentId
(
parseInt
(
defaultEnvironmentId
,
10
)),
threatMonitoring
Path
,
policies
Path
,
},
store
,
render
(
createElement
)
{
...
...
ee/app/helpers/projects/security/policies_helper.rb
View file @
877a3d2a
...
...
@@ -35,7 +35,7 @@ module Projects::Security::PoliciesHelper
policy_type:
policy_type
,
project_path:
project
.
full_path
,
project_id:
project
.
id
,
threat_monitoring
_path:
project_security_policies_path
(
project
)
policies
_path:
project_security_policies_path
(
project
)
}
end
end
ee/spec/frontend/threat_monitoring/components/policy_editor/network_policy/network_policy_editor_spec.js
View file @
877a3d2a
...
...
@@ -52,7 +52,7 @@ describe('NetworkPolicyEditor component', () => {
hasEnvironment
:
true
,
networkDocumentationPath
:
'
path/to/docs
'
,
noEnvironmentSvgPath
:
'
path/to/svg
'
,
threatMonitoring
Path
:
'
/threat-monitoring
'
,
policies
Path
:
'
/threat-monitoring
'
,
projectId
:
'
21
'
,
...
provide
,
},
...
...
ee/spec/frontend/threat_monitoring/components/policy_editor/policy_editor_layout_spec.js
View file @
877a3d2a
...
...
@@ -6,7 +6,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
describe
(
'
PolicyEditorLayout component
'
,
()
=>
{
let
wrapper
;
let
glTooltipDirectiveMock
;
const
threatMonitoring
Path
=
'
/threat-monitoring
'
;
const
policies
Path
=
'
/threat-monitoring
'
;
const
factory
=
({
propsData
=
{}
}
=
{})
=>
{
glTooltipDirectiveMock
=
jest
.
fn
();
...
...
@@ -18,7 +18,7 @@ describe('PolicyEditorLayout component', () => {
...
propsData
,
},
provide
:
{
threatMonitoring
Path
,
policies
Path
,
},
stubs
:
{
PolicyYamlEditor
:
true
},
});
...
...
ee/spec/helpers/projects/security/policies_helper_spec.rb
View file @
877a3d2a
...
...
@@ -49,7 +49,7 @@ RSpec.describe Projects::Security::PoliciesHelper do
no_environment_svg_path:
kind_of
(
String
),
project_path:
project
.
full_path
,
project_id:
project
.
id
,
threat_monitoring
_path:
kind_of
(
String
),
policies
_path:
kind_of
(
String
),
environment_id:
environment
&
.
id
,
policy:
policy
&
.
to_json
,
policy_type:
policy_type
...
...
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