Skip to content

Commit

Permalink
[7.x] [Infra UI] Strictly pick fields sent upon source config creation (
Browse files Browse the repository at this point in the history
elastic#32897) (elastic#32988)

Backports the following commits to 7.x:
 - [Infra UI] Strictly pick fields sent upon source config creation  (elastic#32897)
  • Loading branch information
weltenwort authored Mar 13, 2019
1 parent 3f591cc commit 86939ae
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,21 @@ const createContainerProps = memoizeLast((sourceId: string, apolloClient: Apollo
create: (sourceConfiguration: CreateSourceInput) => ({ setState }) => {
const variables = {
sourceId,
sourceConfiguration,
sourceConfiguration: {
name: sourceConfiguration.name,
description: sourceConfiguration.description,
metricAlias: sourceConfiguration.metricAlias,
logAlias: sourceConfiguration.logAlias,
fields: sourceConfiguration.fields
? {
container: sourceConfiguration.fields.container,
host: sourceConfiguration.fields.host,
pod: sourceConfiguration.fields.pod,
tiebreaker: sourceConfiguration.fields.tiebreaker,
timestamp: sourceConfiguration.fields.timestamp,
}
: undefined,
},
};

setState(actions.startOperation({ name: 'create', parameters: variables }));
Expand Down

0 comments on commit 86939ae

Please sign in to comment.