Skip to content

Commit 119ce7d

Browse files
Merge branch '7.x' into backport/7.x/pr-50831
2 parents 7c2cc41 + 7dfd3a0 commit 119ce7d

20 files changed

Lines changed: 439 additions & 345 deletions

File tree

x-pack/legacy/plugins/grokdebugger/public/components/custom_patterns_input/custom_patterns_input.js

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import {
1010
EuiCallOut,
1111
EuiCodeBlock,
1212
EuiFormRow,
13-
EuiPanel,
1413
EuiCodeEditor,
15-
EuiSpacer
14+
EuiSpacer,
1615
} from '@elastic/eui';
1716
import { EDITOR } from '../../../common/constants';
1817
import { FormattedMessage } from '@kbn/i18n/react';
@@ -24,51 +23,43 @@ MSG message-id=<%{GREEDYDATA}>`;
2423
return (
2524
<EuiAccordion
2625
id="customPatternsInput"
27-
buttonContent={(
26+
buttonContent={
2827
<FormattedMessage
2928
id="xpack.grokDebugger.customPatternsButtonLabel"
3029
defaultMessage="Custom Patterns"
3130
/>
32-
)}
31+
}
3332
data-test-subj="btnToggleCustomPatternsInput"
3433
>
35-
3634
<EuiSpacer size="m" />
3735

3836
<EuiCallOut
39-
title={(
37+
title={
4038
<FormattedMessage
4139
id="xpack.grokDebugger.customPatterns.callOutTitle"
4240
defaultMessage="Enter one custom pattern per line. For example:"
4341
/>
44-
)}
42+
}
4543
>
46-
<EuiCodeBlock>
47-
{ sampleCustomPatterns }
48-
</EuiCodeBlock>
44+
<EuiCodeBlock>{sampleCustomPatterns}</EuiCodeBlock>
4945
</EuiCallOut>
5046

5147
<EuiSpacer size="m" />
5248

53-
<EuiFormRow
54-
fullWidth
55-
data-test-subj="aceCustomPatternsInput"
56-
>
57-
<EuiPanel paddingSize="s">
58-
<EuiCodeEditor
59-
width="100%"
60-
theme="textmate"
61-
mode="text"
62-
value={value}
63-
onChange={onChange}
64-
setOptions={{
65-
highlightActiveLine: false,
66-
highlightGutterLine: false,
67-
minLines: EDITOR.PATTERN_MIN_LINES,
68-
maxLines: EDITOR.PATTERN_MAX_LINES,
69-
}}
70-
/>
71-
</EuiPanel>
49+
<EuiFormRow fullWidth data-test-subj="aceCustomPatternsInput">
50+
<EuiCodeEditor
51+
width="100%"
52+
theme="textmate"
53+
mode="text"
54+
value={value}
55+
onChange={onChange}
56+
setOptions={{
57+
highlightActiveLine: false,
58+
highlightGutterLine: false,
59+
minLines: EDITOR.PATTERN_MIN_LINES,
60+
maxLines: EDITOR.PATTERN_MAX_LINES,
61+
}}
62+
/>
7263
</EuiFormRow>
7364
</EuiAccordion>
7465
);

x-pack/legacy/plugins/grokdebugger/public/components/event_input/event_input.js

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,32 @@
55
*/
66

77
import React from 'react';
8-
import {
9-
EuiFormRow,
10-
EuiPanel,
11-
EuiCodeEditor
12-
} from '@elastic/eui';
8+
import { EuiFormRow, EuiCodeEditor } from '@elastic/eui';
139
import { EDITOR } from '../../../common/constants';
1410
import { FormattedMessage } from '@kbn/i18n/react';
1511

1612
export function EventInput({ value, onChange }) {
1713
return (
1814
<EuiFormRow
19-
label={(
20-
<FormattedMessage
21-
id="xpack.grokDebugger.sampleDataLabel"
22-
defaultMessage="Sample Data"
23-
/>
24-
)}
15+
label={
16+
<FormattedMessage id="xpack.grokDebugger.sampleDataLabel" defaultMessage="Sample Data" />
17+
}
2518
fullWidth
2619
data-test-subj="aceEventInput"
2720
>
28-
<EuiPanel paddingSize="s">
29-
<EuiCodeEditor
30-
width="100%"
31-
theme="textmate"
32-
mode="text"
33-
value={value}
34-
onChange={onChange}
35-
setOptions={{
36-
highlightActiveLine: false,
37-
highlightGutterLine: false,
38-
minLines: EDITOR.SAMPLE_DATA_MIN_LINES,
39-
maxLines: EDITOR.SAMPLE_DATA_MAX_LINES
40-
}}
41-
/>
42-
</EuiPanel>
21+
<EuiCodeEditor
22+
width="100%"
23+
theme="textmate"
24+
mode="text"
25+
value={value}
26+
onChange={onChange}
27+
setOptions={{
28+
highlightActiveLine: false,
29+
highlightGutterLine: false,
30+
minLines: EDITOR.SAMPLE_DATA_MIN_LINES,
31+
maxLines: EDITOR.SAMPLE_DATA_MAX_LINES,
32+
}}
33+
/>
4334
</EuiFormRow>
4435
);
4536
}

x-pack/legacy/plugins/grokdebugger/public/components/event_output/event_output.js

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,33 @@
55
*/
66

77
import React from 'react';
8-
import {
9-
EuiFormRow,
10-
EuiPanel,
11-
EuiCodeEditor
12-
} from '@elastic/eui';
8+
import { EuiFormRow, EuiCodeEditor } from '@elastic/eui';
139
import { FormattedMessage } from '@kbn/i18n/react';
1410

1511
export function EventOutput({ value }) {
1612
return (
1713
<EuiFormRow
18-
label={(
14+
label={
1915
<FormattedMessage
2016
id="xpack.grokDebugger.structuredDataLabel"
2117
defaultMessage="Structured Data"
2218
/>
23-
)}
19+
}
2420
fullWidth
2521
data-test-subj="aceEventOutput"
2622
>
27-
<EuiPanel paddingSize="s">
28-
<EuiCodeEditor
29-
mode="json"
30-
theme="textmate"
31-
isReadOnly
32-
width="100%"
33-
height="340px"
34-
value={JSON.stringify(value, null, 2)}
35-
setOptions={{
36-
highlightActiveLine: false,
37-
highlightGutterLine: false,
38-
}}
39-
/>
40-
</EuiPanel>
23+
<EuiCodeEditor
24+
mode="json"
25+
theme="textmate"
26+
isReadOnly
27+
width="100%"
28+
height="340px"
29+
value={JSON.stringify(value, null, 2)}
30+
setOptions={{
31+
highlightActiveLine: false,
32+
highlightGutterLine: false,
33+
}}
34+
/>
4135
</EuiFormRow>
4236
);
4337
}

x-pack/legacy/plugins/grokdebugger/public/components/pattern_input/pattern_input.js

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,33 @@
55
*/
66

77
import React from 'react';
8-
import {
9-
EuiFormRow,
10-
EuiPanel,
11-
EuiCodeEditor
12-
} from '@elastic/eui';
8+
import { EuiFormRow, EuiCodeEditor } from '@elastic/eui';
139
import { EDITOR } from '../../../common/constants';
1410
import { GrokMode } from '../../lib/ace';
1511
import { FormattedMessage } from '@kbn/i18n/react';
1612

1713
export function PatternInput({ value, onChange }) {
1814
return (
1915
<EuiFormRow
20-
label={(
21-
<FormattedMessage
22-
id="xpack.grokDebugger.grokPatternLabel"
23-
defaultMessage="Grok Pattern"
24-
/>
25-
)}
16+
label={
17+
<FormattedMessage id="xpack.grokDebugger.grokPatternLabel" defaultMessage="Grok Pattern" />
18+
}
2619
fullWidth
2720
data-test-subj="acePatternInput"
2821
>
29-
<EuiPanel paddingSize="s">
30-
<EuiCodeEditor
31-
width="100%"
32-
theme="textmate"
33-
value={value}
34-
onChange={onChange}
35-
mode={new GrokMode()}
36-
setOptions={{
37-
highlightActiveLine: false,
38-
highlightGutterLine: false,
39-
minLines: EDITOR.PATTERN_MIN_LINES,
40-
maxLines: EDITOR.PATTERN_MAX_LINES,
41-
}}
42-
/>
43-
</EuiPanel>
22+
<EuiCodeEditor
23+
width="100%"
24+
theme="textmate"
25+
value={value}
26+
onChange={onChange}
27+
mode={new GrokMode()}
28+
setOptions={{
29+
highlightActiveLine: false,
30+
highlightGutterLine: false,
31+
minLines: EDITOR.PATTERN_MIN_LINES,
32+
maxLines: EDITOR.PATTERN_MAX_LINES,
33+
}}
34+
/>
4435
</EuiFormRow>
4536
);
4637
}

0 commit comments

Comments
 (0)