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
62d09256
Commit
62d09256
authored
Aug 21, 2020
by
Zamir Martins Filho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'add_standard_field_into_payload' into 'master'"
This reverts merge request !37527
parent
a7d59ca0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
74 deletions
+10
-74
ee/app/assets/javascripts/threat_monitoring/store/modules/network_policies/actions.js
...reat_monitoring/store/modules/network_policies/actions.js
+0
-2
ee/changelogs/unreleased/revert-365bcd8d.yml
ee/changelogs/unreleased/revert-365bcd8d.yml
+5
-0
ee/spec/frontend/threat_monitoring/components/__snapshots__/network_policy_list_spec.js.snap
...components/__snapshots__/network_policy_list_spec.js.snap
+2
-43
ee/spec/frontend/threat_monitoring/mock_data.js
ee/spec/frontend/threat_monitoring/mock_data.js
+0
-22
ee/spec/frontend/threat_monitoring/store/modules/network_policies/actions_spec.js
...monitoring/store/modules/network_policies/actions_spec.js
+3
-7
No files found.
ee/app/assets/javascripts/threat_monitoring/store/modules/network_policies/actions.js
View file @
62d09256
...
...
@@ -44,7 +44,6 @@ export const createPolicy = ({ state, commit }, { environmentId, policy }) => {
.
post
(
state
.
policiesEndpoint
,
{
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
is_standard
:
policy
.
isStandard
,
})
.
then
(({
data
})
=>
{
commit
(
types
.
RECEIVE_CREATE_POLICY_SUCCESS
,
data
);
...
...
@@ -72,7 +71,6 @@ export const updatePolicy = ({ state, commit }, { environmentId, policy }) => {
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
enabled
:
policy
.
isEnabled
,
is_standard
:
policy
.
isStandard
,
})
.
then
(({
data
})
=>
{
commit
(
types
.
RECEIVE_UPDATE_POLICY_SUCCESS
,
{
...
...
ee/changelogs/unreleased/revert-365bcd8d.yml
0 → 100644
View file @
62d09256
---
title
:
Revert Merge branch add_standard_field_into_payload into master
merge_request
:
40162
author
:
type
:
changed
ee/spec/frontend/threat_monitoring/components/__snapshots__/network_policy_list_spec.js.snap
View file @
62d09256
...
...
@@ -6,10 +6,10 @@ exports[`NetworkPolicyList component renders policies table 1`] = `
<table
aria-busy="false"
aria-colcount="3"
aria-describedby="__BVID__1
51
__caption_"
aria-describedby="__BVID__1
43
__caption_"
aria-multiselectable="false"
class="table b-table gl-table table-hover b-table-stacked-md b-table-selectable b-table-select-single"
id="__BVID__1
51
"
id="__BVID__1
43
"
role="table"
>
<!---->
...
...
@@ -92,47 +92,6 @@ exports[`NetworkPolicyList component renders policies table 1`] = `
2 weeks ago
</div>
</td>
</tr>
<tr
aria-selected="false"
class=""
role="row"
tabindex="0"
>
<td
aria-colindex="1"
class=""
data-label="Name"
role="cell"
>
<div>
cilium_policy
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
Enabled
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Last modified"
role="cell"
>
<div>
</div>
</td>
</tr>
...
...
ee/spec/frontend/threat_monitoring/mock_data.js
View file @
62d09256
...
...
@@ -38,28 +38,6 @@ spec:
project: myproject`
,
creation_timestamp
:
'
2020-04-14T00:08:30Z
'
,
is_enabled
:
true
,
is_standard
:
true
,
},
{
name
:
'
cilium_policy
'
,
namespace
:
'
production
'
,
manifest
:
`---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: cilium_policy
namespace: production
spec:
endpointSelector:
matchLabels:
role: db
ingress:
- fromEndpoints:
- matchLabels:
project: myproject`
,
created_timestamp
:
'
2020-04-15T00:08:30Z
'
,
is_enabled
:
true
,
is_standard
:
false
,
},
];
...
...
ee/spec/frontend/threat_monitoring/store/modules/network_policies/actions_spec.js
View file @
62d09256
...
...
@@ -19,7 +19,7 @@ describe('Network Policy actions', () => {
let
state
;
let
mock
;
const
environmentId
=
3
;
const
policy
=
{
name
:
'
policy
'
,
manifest
:
'
foo
'
,
isEnabled
:
true
,
isStandard
:
true
};
const
policy
=
{
name
:
'
policy
'
,
manifest
:
'
foo
'
,
isEnabled
:
true
};
beforeEach
(()
=>
{
state
=
getInitialState
();
...
...
@@ -138,7 +138,7 @@ describe('Network Policy actions', () => {
});
describe
(
'
createPolicy
'
,
()
=>
{
const
createdPolicy
=
{
name
:
'
policy
'
,
manifest
:
'
bar
'
,
isEnabled
:
true
,
isStandard
:
true
};
const
createdPolicy
=
{
name
:
'
policy
'
,
manifest
:
'
bar
'
,
isEnabled
:
true
};
describe
(
'
on success
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
@@ -146,7 +146,6 @@ describe('Network Policy actions', () => {
.
onPost
(
networkPoliciesEndpoint
,
{
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
is_standard
:
true
,
})
.
replyOnce
(
httpStatus
.
OK
,
createdPolicy
);
});
...
...
@@ -177,7 +176,6 @@ describe('Network Policy actions', () => {
.
onPost
(
networkPoliciesEndpoint
,
{
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
is_standard
:
true
,
})
.
replyOnce
(
500
,
error
);
});
...
...
@@ -242,7 +240,7 @@ describe('Network Policy actions', () => {
});
describe
(
'
updatePolicy
'
,
()
=>
{
const
updatedPolicy
=
{
name
:
'
policy
'
,
manifest
:
'
bar
'
,
isEnabled
:
true
,
isStandard
:
true
};
const
updatedPolicy
=
{
name
:
'
policy
'
,
manifest
:
'
bar
'
,
isEnabled
:
true
};
describe
(
'
on success
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
@@ -251,7 +249,6 @@ describe('Network Policy actions', () => {
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
enabled
:
policy
.
isEnabled
,
is_standard
:
policy
.
isStandard
,
})
.
replyOnce
(
httpStatus
.
OK
,
updatedPolicy
);
});
...
...
@@ -281,7 +278,6 @@ describe('Network Policy actions', () => {
environment_id
:
environmentId
,
manifest
:
policy
.
manifest
,
enabled
:
policy
.
isEnabled
,
is_standard
:
policy
.
isStandard
,
})
.
replyOnce
(
500
,
error
);
});
...
...
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