Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Apr 13, 2020
1 parent 10b9210 commit 6bba3da
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export const PipelineForm: React.FunctionComponent<Props> = ({
<>
<FormattedMessage
id="xpack.ingestPipelines.form.onFailureDescription"
defaultMessage="Processors to be executed following a failed processor. {learnMoreLink}"
defaultMessage="The processors to be executed following a failed processor. {learnMoreLink}"
values={{
learnMoreLink: (
<EuiLink href={services.documentation.getHandlingFailureUrl()} target="_blank">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export const pipelineFormSchema: FormSchema = {
label: i18n.translate('xpack.ingestPipelines.form.processorsFieldLabel', {
defaultMessage: 'Processors',
}),
serializer: processors => parseJson(processors),
deserializer: processors => stringifyJson(processors),
serializer: parseJson,
deserializer: stringifyJson,
validations: [
{
validator: emptyField(
Expand All @@ -97,8 +97,8 @@ export const pipelineFormSchema: FormSchema = {
label: i18n.translate('xpack.ingestPipelines.form.onFailureFieldLabel', {
defaultMessage: 'On-failure processors (optional)',
}),
serializer: onFailureProcessors => parseJson(onFailureProcessors),
deserializer: onFailureProcessors => stringifyJson(onFailureProcessors),
serializer: parseJson,
deserializer: stringifyJson,
validations: [
{
validator: ({ value }: ValidationFuncArg<any, any>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const PipelinesCreate: React.FunctionComponent<RouteComponentProps> = ({
<h1 data-test-subj="pageTitle">
<FormattedMessage
id="xpack.ingestPipelines.create.pageTitle"
defaultMessage="Create a pipeline"
defaultMessage="Create pipeline"
/>
</h1>
</EuiTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ApiService {
public async createPipeline(pipeline: Pipeline) {
const result = await this.sendRequest({
path: API_BASE_PATH,
method: 'put',
method: 'post',
body: JSON.stringify(pipeline),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const registerCreateRoute = ({
license,
lib: { isEsError },
}: RouteDependencies): void => {
router.put(
router.post(
{
path: API_BASE_PATH,
validate: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function({ getService }: FtrProviderContext) {

it('should create a pipeline', async () => {
const { body } = await supertest
.put(API_BASE_PATH)
.post(API_BASE_PATH)
.set('kbn-xsrf', 'xxx')
.send({
name: PIPELINE_ID,
Expand Down Expand Up @@ -54,7 +54,7 @@ export default function({ getService }: FtrProviderContext) {

it('should not allow creation of an existing pipeline', async () => {
const { body } = await supertest
.put(API_BASE_PATH)
.post(API_BASE_PATH)
.set('kbn-xsrf', 'xxx')
.send({
name: PIPELINE_ID,
Expand Down

0 comments on commit 6bba3da

Please sign in to comment.