Skip to content

Commit

Permalink
Change UI
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Apr 16, 2020
1 parent 65cbac9 commit 1f48d52
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ describe('Case Configuration API', () => {
await pushToService(connectorId, casePushParams, abortCtrl.signal);
expect(fetchMock).toHaveBeenCalledWith(`/api/action/${connectorId}/_execute`, {
method: 'POST',
body: JSON.stringify({ params: casePushParams }),
body: JSON.stringify({ params: { action: 'pushToService', actionParams: casePushParams } }),
signal: abortCtrl.signal,
});
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/siem/public/containers/case/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const pushToService = async (
`/api/action/${connectorId}/_execute`,
{
method: 'POST',
body: JSON.stringify({ params: casePushParams }),
body: JSON.stringify({ params: { action: 'pushToService', actionParams: casePushParams } }),
signal,
}
);
Expand Down
6 changes: 3 additions & 3 deletions x-pack/legacy/plugins/siem/public/containers/case/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export const pushedCase: Case = {
};

export const serviceConnector: ServiceConnectorCaseResponse = {
number: '123',
incidentId: '444',
title: '123',
id: '444',
pushedDate: basicUpdatedAt,
url: 'connector.com',
comments: [
Expand All @@ -129,7 +129,7 @@ export const casePushParams = {
caseId: basicCaseId,
createdAt: basicCreatedAt,
createdBy: elasticUser,
incidentId: null,
externalId: null,
title: 'what a cool value',
commentId: null,
updatedAt: basicCreatedAt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ describe('usePostPushToService', () => {
{
connector_id: samplePush.connectorId,
connector_name: samplePush.connectorName,
external_id: serviceConnector.incidentId,
external_title: serviceConnector.number,
external_id: serviceConnector.id,
external_title: serviceConnector.title,
external_url: serviceConnector.url,
},
abortCtrl.signal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export const usePostPushToService = (): UsePostPushToService => {
{
connector_id: connectorId,
connector_name: connectorName,
external_id: responseService.incidentId,
external_title: responseService.number,
external_id: responseService.id,
external_title: responseService.title,
external_url: responseService.url,
},
abortCtrl.signal
Expand Down Expand Up @@ -180,7 +180,7 @@ export const formatServiceRequestData = (myCase: Case): ServiceConnectorCasePara
: null,
})),
description,
incidentId: externalService?.externalId ?? null,
externalId: externalService?.externalId ?? null,
title,
updatedAt,
updatedBy:
Expand Down

0 comments on commit 1f48d52

Please sign in to comment.