File tree Expand file tree Collapse file tree
x-pack/plugins/ingest_pipelines/public/application Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ export const PipelineForm: React.FunctionComponent<Props> = ({
8080 </ >
8181 ) : null }
8282
83- < Form form = { form } data-test-subj = "pipelineForm" >
83+ < Form
84+ form = { form }
85+ data-test-subj = "pipelineForm"
86+ isInvalid = { form . isSubmitted && ! form . isValid }
87+ error = { form . getErrors ( ) }
88+ >
8489 { /* Name field with optional version field */ }
8590 < FormRow
8691 title = {
@@ -267,7 +272,7 @@ export const PipelineForm: React.FunctionComponent<Props> = ({
267272 iconType = "check"
268273 onClick = { form . submit }
269274 data-test-subj = "submitButton"
270- disabled = { form . isValid === false }
275+ disabled = { form . isSubmitted && form . isValid === false }
271276 isLoading = { isSaving }
272277 >
273278 {
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ const { toInt } = fieldFormatters;
2222const stringifyJson = ( json : { [ key : string ] : unknown } ) : string =>
2323 Array . isArray ( json ) ? JSON . stringify ( json , null , 2 ) : '[\n\n]' ;
2424
25- const parseJson = ( jsonString : string ) => {
26- let parsedJSON ;
25+ const parseJson = ( jsonString : string ) : object [ ] => {
26+ let parsedJSON : any ;
2727
2828 try {
2929 parsedJSON = JSON . parse ( jsonString ) ;
Original file line number Diff line number Diff line change 66import React , { FunctionComponent } from 'react' ;
77import { i18n } from '@kbn/i18n' ;
88import { EuiButton , EuiEmptyPrompt } from '@elastic/eui' ;
9+ import { BASE_PATH } from '../../../../common/constants' ;
910
1011interface Props {
1112 onClick : ( ) => void ;
@@ -22,7 +23,7 @@ export const EmptyList: FunctionComponent<Props> = ({ onClick }) => (
2223 </ h2 >
2324 }
2425 actions = {
25- < EuiButton onClick = { onClick } >
26+ < EuiButton href = { `# ${ BASE_PATH } /create` } >
2627 { i18n . translate ( 'xpack.ingestPipelines.list.table.emptyPrompt.createButtonLabel' , {
2728 defaultMessage : 'Create pipeline' ,
2829 } ) }
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export const PipelinesList: React.FunctionComponent = () => {
6565 />
6666 ) ;
6767 } else {
68- content = < EmptyList onClick = { ( ) => { } } /> ;
68+ content = < EmptyList /> ;
6969 }
7070
7171 return (
Original file line number Diff line number Diff line change @@ -9,31 +9,23 @@ import { ManagementAppMountParams } from '../../../../../../src/plugins/manageme
99
1010type SetBreadcrumbs = ManagementAppMountParams [ 'setBreadcrumbs' ] ;
1111
12+ const homeBreadcrumbText = i18n . translate ( 'xpack.ingestPipelines.breadcrumb.pipelinesLabel' , {
13+ defaultMessage : 'Ingest Pipelines' ,
14+ } ) ;
15+
1216export class BreadcrumbService {
1317 private breadcrumbs : {
1418 [ key : string ] : Array < {
1519 text : string ;
1620 href ?: string ;
1721 } > ;
1822 } = {
19- home : [ ] ,
20- } ;
21- private setBreadcrumbsHandler ?: SetBreadcrumbs ;
22-
23- public setup ( setBreadcrumbsHandler : SetBreadcrumbs ) : void {
24- const homeBreadcrumbText = i18n . translate ( 'xpack.ingestPipelines.breadcrumb.pipelinesLabel' , {
25- defaultMessage : 'Ingest Pipelines' ,
26- } ) ;
27-
28- this . setBreadcrumbsHandler = setBreadcrumbsHandler ;
29-
30- this . breadcrumbs . home = [
23+ home : [
3124 {
3225 text : homeBreadcrumbText ,
3326 } ,
34- ] ;
35-
36- this . breadcrumbs . create = [
27+ ] ,
28+ create : [
3729 {
3830 text : homeBreadcrumbText ,
3931 href : `#${ BASE_PATH } ` ,
@@ -43,7 +35,13 @@ export class BreadcrumbService {
4335 defaultMessage : 'Create pipeline' ,
4436 } ) ,
4537 } ,
46- ] ;
38+ ] ,
39+ } ;
40+
41+ private setBreadcrumbsHandler ?: SetBreadcrumbs ;
42+
43+ public setup ( setBreadcrumbsHandler : SetBreadcrumbs ) : void {
44+ this . setBreadcrumbsHandler = setBreadcrumbsHandler ;
4745 }
4846
4947 public setBreadcrumbs ( type : 'create' | 'home' ) : void {
You can’t perform that action at this time.
0 commit comments