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
63bdd672
Commit
63bdd672
authored
Oct 14, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change enforcement label to status
- enforcement is unnecessary Changelog: changed EE: true
parent
eb78edda
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
33 deletions
+21
-33
doc/user/application_security/policies/index.md
doc/user/application_security/policies/index.md
+2
-2
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/base_policy.vue
...hreat_monitoring/components/policy_drawer/base_policy.vue
+2
-2
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/cilium_network_policy.vue
...toring/components/policy_drawer/cilium_network_policy.vue
+2
-4
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/scan_execution_policy.vue
...toring/components/policy_drawer/scan_execution_policy.vue
+3
-3
ee/spec/frontend/threat_monitoring/components/policy_drawer/__snapshots__/cilium_network_policy_spec.js.snap
...y_drawer/__snapshots__/cilium_network_policy_spec.js.snap
+1
-1
ee/spec/frontend/threat_monitoring/components/policy_drawer/base_policy_spec.js
...t_monitoring/components/policy_drawer/base_policy_spec.js
+11
-15
locale/gitlab.pot
locale/gitlab.pot
+0
-6
No files found.
doc/user/application_security/policies/index.md
View file @
63bdd672
...
@@ -118,9 +118,9 @@ examining the Cilium logs:
...
@@ -118,9 +118,9 @@ examining the Cilium logs:
kubectl
-n
gitlab-managed-apps logs
-l
k8s-app
=
cilium
-c
cilium-monitor
kubectl
-n
gitlab-managed-apps logs
-l
k8s-app
=
cilium
-c
cilium-monitor
```
```
### Change the
enforcement
status
### Change the status
To change a network policy's
enforcement
status:
To change a network policy's status:
-
Select the network policy you want to update.
-
Select the network policy you want to update.
-
Select
**Edit policy**
.
-
Select
**Edit policy**
.
...
...
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/base_policy.vue
View file @
63bdd672
...
@@ -10,7 +10,7 @@ export default {
...
@@ -10,7 +10,7 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
enforcementS
tatusLabel
()
{
s
tatusLabel
()
{
return
this
.
policy
?.
enabled
?
__
(
'
Enabled
'
)
:
__
(
'
Disabled
'
);
return
this
.
policy
?.
enabled
?
__
(
'
Enabled
'
)
:
__
(
'
Disabled
'
);
},
},
},
},
...
@@ -23,6 +23,6 @@ export default {
...
@@ -23,6 +23,6 @@ export default {
<p
data-testid=
"policy-type"
>
<p
data-testid=
"policy-type"
>
<slot
name=
"type"
></slot>
<slot
name=
"type"
></slot>
</p>
</p>
<slot
v-bind=
"
{
enforcementS
tatusLabel }">
</slot>
<slot
v-bind=
"
{
s
tatusLabel }">
</slot>
</div>
</div>
</
template
>
</
template
>
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/cilium_network_policy.vue
View file @
63bdd672
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
<base-policy
:policy=
"policy"
>
<base-policy
:policy=
"policy"
>
<template
#type
>
{{
s__
(
'
NetworkPolicies|Network
'
)
}}
</
template
>
<template
#type
>
{{
s__
(
'
NetworkPolicies|Network
'
)
}}
</
template
>
<
template
#default=
"{
enforcementS
tatusLabel }"
>
<
template
#default=
"{
s
tatusLabel }"
>
<div
v-if=
"parsedYaml"
>
<div
v-if=
"parsedYaml"
>
<policy-info-row
<policy-info-row
v-if=
"parsedYaml.description"
v-if=
"parsedYaml.description"
...
@@ -57,9 +57,7 @@ export default {
...
@@ -57,9 +57,7 @@ export default {
>
{{
parsedYaml
.
description
}}
</policy-info-row
>
{{
parsedYaml
.
description
}}
</policy-info-row
>
>
<policy-info-row
:label=
"s__('NetworkPolicies|Enforcement status')"
>
{{
<policy-info-row
:label=
"__('Status')"
>
{{
statusLabel
}}
</policy-info-row>
enforcementStatusLabel
}}
</policy-info-row>
<policy-info-row
<policy-info-row
v-if=
"environments.length"
v-if=
"environments.length"
...
...
ee/app/assets/javascripts/threat_monitoring/components/policy_drawer/scan_execution_policy.vue
View file @
63bdd672
...
@@ -42,7 +42,7 @@ export default {
...
@@ -42,7 +42,7 @@ export default {
<base-policy
:policy=
"policy"
>
<base-policy
:policy=
"policy"
>
<template
#type
>
{{
s__
(
'
SecurityOrchestration|Scan execution
'
)
}}
</
template
>
<template
#type
>
{{
s__
(
'
SecurityOrchestration|Scan execution
'
)
}}
</
template
>
<
template
#default=
"{
enforcementS
tatusLabel }"
>
<
template
#default=
"{
s
tatusLabel }"
>
<div
v-if=
"parsedYaml"
>
<div
v-if=
"parsedYaml"
>
<policy-info-row
<policy-info-row
v-if=
"parsedYaml.description"
v-if=
"parsedYaml.description"
...
@@ -60,8 +60,8 @@ export default {
...
@@ -60,8 +60,8 @@ export default {
<p
v-for=
"action in humanizedActions"
:key=
"action"
>
{{
action
}}
</p>
<p
v-for=
"action in humanizedActions"
:key=
"action"
>
{{
action
}}
</p>
</policy-info-row>
</policy-info-row>
<policy-info-row
:label=
"
s__('SecurityOrchestration|Enforcement
Status')"
>
<policy-info-row
:label=
"
__('
Status')"
>
{{
enforcementS
tatusLabel
}}
{{
s
tatusLabel
}}
</policy-info-row>
</policy-info-row>
<policy-info-row
<policy-info-row
...
...
ee/spec/frontend/threat_monitoring/components/policy_drawer/__snapshots__/cilium_network_policy_spec.js.snap
View file @
63bdd672
...
@@ -23,7 +23,7 @@ exports[`CiliumNetworkPolicy component supported YAML renders policy preview tab
...
@@ -23,7 +23,7 @@ exports[`CiliumNetworkPolicy component supported YAML renders policy preview tab
</policy-info-row-stub>
</policy-info-row-stub>
<policy-info-row-stub
<policy-info-row-stub
label="
Enforcement s
tatus"
label="
S
tatus"
>
>
Disabled
Disabled
</policy-info-row-stub>
</policy-info-row-stub>
...
...
ee/spec/frontend/threat_monitoring/components/policy_drawer/base_policy_spec.js
View file @
63bdd672
...
@@ -5,7 +5,7 @@ describe('BasePolicy component', () => {
...
@@ -5,7 +5,7 @@ describe('BasePolicy component', () => {
let
wrapper
;
let
wrapper
;
const
findPolicyType
=
()
=>
wrapper
.
findByTestId
(
'
policy-type
'
);
const
findPolicyType
=
()
=>
wrapper
.
findByTestId
(
'
policy-type
'
);
const
find
EnforcementStatusLabel
=
()
=>
wrapper
.
findByTestId
(
'
enforcement-
status-label
'
);
const
find
StatusLabel
=
()
=>
wrapper
.
findByTestId
(
'
status-label
'
);
const
factory
=
(
propsData
=
{})
=>
{
const
factory
=
(
propsData
=
{})
=>
{
wrapper
=
shallowMountExtended
(
BasePolicy
,
{
wrapper
=
shallowMountExtended
(
BasePolicy
,
{
...
@@ -14,8 +14,7 @@ describe('BasePolicy component', () => {
...
@@ -14,8 +14,7 @@ describe('BasePolicy component', () => {
type
:
'
Policy type
'
,
type
:
'
Policy type
'
,
},
},
scopedSlots
:
{
scopedSlots
:
{
default
:
default
:
'
<span data-testid="status-label">{{ props.statusLabel }}</span>
'
,
'
<span data-testid="enforcement-status-label">{{ props.enforcementStatusLabel }}</span>
'
,
},
},
});
});
};
};
...
@@ -34,16 +33,13 @@ describe('BasePolicy component', () => {
...
@@ -34,16 +33,13 @@ describe('BasePolicy component', () => {
description | enabled | expectedLabel
description | enabled | expectedLabel
${
'
enabled
'
}
|
${
true
}
|
${
'
Enabled
'
}
${
'
enabled
'
}
|
${
true
}
|
${
'
Enabled
'
}
${
'
disabled
'
}
|
${
false
}
|
${
'
Disabled
'
}
${
'
disabled
'
}
|
${
false
}
|
${
'
Disabled
'
}
`
(
`
(
'
renders the status label when policy is $description
'
,
({
enabled
,
expectedLabel
})
=>
{
'
renders the enforcement status label when policy is $description
'
,
({
enabled
,
expectedLabel
})
=>
{
factory
({
factory
({
policy
:
{
policy
:
{
enabled
,
enabled
,
},
},
});
});
expect
(
findEnforcementStatusLabel
().
text
()).
toBe
(
expectedLabel
);
expect
(
findStatusLabel
().
text
()).
toBe
(
expectedLabel
);
},
});
);
});
});
locale/gitlab.pot
View file @
63bdd672
...
@@ -22591,9 +22591,6 @@ msgstr ""
...
@@ -22591,9 +22591,6 @@ msgstr ""
msgid "NetworkPolicies|Edit policy"
msgid "NetworkPolicies|Edit policy"
msgstr ""
msgstr ""
msgid "NetworkPolicies|Enforcement status"
msgstr ""
msgid "NetworkPolicies|Environment does not have deployment platform"
msgid "NetworkPolicies|Environment does not have deployment platform"
msgstr ""
msgstr ""
...
@@ -30251,9 +30248,6 @@ msgstr ""
...
@@ -30251,9 +30248,6 @@ msgstr ""
msgid "SecurityOrchestration|Enforce security for this project. %{linkStart}More information.%{linkEnd}"
msgid "SecurityOrchestration|Enforce security for this project. %{linkStart}More information.%{linkEnd}"
msgstr ""
msgstr ""
msgid "SecurityOrchestration|Enforcement Status"
msgstr ""
msgid "SecurityOrchestration|Executes a %{scanType} scan"
msgid "SecurityOrchestration|Executes a %{scanType} scan"
msgstr ""
msgstr ""
...
...
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