Skip to content

Commit 1d89e55

Browse files
Merge branch 'master' into field-mappings-move
2 parents b783598 + acdca75 commit 1d89e55

File tree

208 files changed

+6494
-2577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+6494
-2577
lines changed

src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => {
204204
target="_blank"
205205
color="text"
206206
className="visNewVisDialog__groupsCardLink"
207+
external={false}
207208
>
208209
<EuiBetaBadge
209210
data-test-subj="visTypeBadge"

x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const generalSettings: RawSettingDefinition[] = [
110110
{ text: 'critical', value: 'critical' },
111111
{ text: 'off', value: 'off' },
112112
],
113-
includeAgents: ['dotnet', 'ruby', 'java', 'python', 'nodejs'],
113+
includeAgents: ['dotnet', 'ruby', 'java', 'python', 'nodejs', 'go'],
114114
},
115115

116116
// Recording

x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ describe('filterByAgent', () => {
4545
expect(getSettingKeysForAgent('go')).toEqual([
4646
'capture_body',
4747
'capture_headers',
48+
'log_level',
4849
'recording',
4950
'sanitize_field_names',
5051
'span_frames_min_duration',

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/document_detail.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { EuiPageContent, EuiBasicTable } from '@elastic/eui';
1414

1515
import { Loading } from '../../../shared/loading';
1616
import { DocumentDetail } from '.';
17-
import { ResultFieldValue } from '../result_field_value';
17+
import { ResultFieldValue } from '../result';
1818

1919
describe('DocumentDetail', () => {
2020
const values = {

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/document_detail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { i18n } from '@kbn/i18n';
2323
import { Loading } from '../../../shared/loading';
2424
import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
2525
import { FlashMessages } from '../../../shared/flash_messages';
26-
import { ResultFieldValue } from '../result_field_value';
26+
import { ResultFieldValue } from '../result';
2727

2828
import { DocumentDetailLogic } from './document_detail_logic';
2929
import { FieldDetails } from './types';

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/document_detail_logic.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jest.mock('../../../shared/flash_messages', () => ({
2828
import { setQueuedSuccessMessage, flashAPIErrors } from '../../../shared/flash_messages';
2929

3030
import { DocumentDetailLogic } from './document_detail_logic';
31+
import { InternalSchemaTypes } from '../../../shared/types';
3132

3233
describe('DocumentDetailLogic', () => {
3334
const DEFAULT_VALUES = {
@@ -61,7 +62,7 @@ describe('DocumentDetailLogic', () => {
6162
describe('actions', () => {
6263
describe('setFields', () => {
6364
it('should set fields to the provided value and dataLoading to false', () => {
64-
const fields = [{ name: 'foo', value: ['foo'], type: 'string' }];
65+
const fields = [{ name: 'foo', value: ['foo'], type: 'string' as InternalSchemaTypes }];
6566

6667
mount({
6768
dataLoading: true,

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/search_experience.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
.sui-results-container {
33
flex-grow: 1;
44
padding: 0;
5+
6+
> li + li {
7+
margin-top: $euiSize;
8+
}
59
}
610

711
.documentsSearchExperience__sidebar {

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/search_experience_content.test.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ describe('SearchExperienceContent', () => {
4343
it('passes engineName to the result view', () => {
4444
const props = {
4545
result: {
46+
id: {
47+
raw: '1',
48+
},
49+
_meta: {
50+
id: '1',
51+
scopedId: '1',
52+
score: 100,
53+
engine: 'my-engine',
54+
},
4655
foo: {
4756
raw: 'bar',
4857
},
@@ -51,7 +60,7 @@ describe('SearchExperienceContent', () => {
5160

5261
const wrapper = shallow(<SearchExperienceContent />);
5362
const resultView: any = wrapper.find(Results).prop('resultView');
54-
expect(resultView(props)).toEqual(<ResultView engineName="engine1" {...props} />);
63+
expect(resultView(props)).toEqual(<ResultView {...props} />);
5564
});
5665

5766
it('renders pagination', () => {

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/search_experience_content.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,18 @@ import { useValues } from 'kea';
1414

1515
import { ResultView } from './views';
1616
import { Pagination } from './pagination';
17+
import { Props as ResultViewProps } from './views/result_view';
1718
import { useSearchContextState } from './hooks';
1819
import { DocumentCreationButton } from '../document_creation_button';
1920
import { AppLogic } from '../../../app_logic';
2021
import { EngineLogic } from '../../engine';
2122
import { DOCS_PREFIX } from '../../../routes';
2223

23-
// TODO This is temporary until we create real Result type
24-
interface Result {
25-
[key: string]: {
26-
raw: string | string[] | number | number[] | undefined;
27-
};
28-
}
29-
3024
export const SearchExperienceContent: React.FC = () => {
3125
const { resultSearchTerm, totalResults, wasSearched } = useSearchContextState();
3226

3327
const { myRole } = useValues(AppLogic);
34-
const { engineName, isMetaEngine } = useValues(EngineLogic);
28+
const { isMetaEngine } = useValues(EngineLogic);
3529

3630
if (!wasSearched) return null;
3731

@@ -49,8 +43,8 @@ export const SearchExperienceContent: React.FC = () => {
4943
<EuiSpacer />
5044
<Results
5145
titleField="id"
52-
resultView={(props: { result: Result }) => {
53-
return <ResultView {...props} engineName={engineName} />;
46+
resultView={(props: ResultViewProps) => {
47+
return <ResultView {...props} />;
5448
}}
5549
/>
5650
<EuiSpacer />

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/views/result_view.test.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ import React from 'react';
99
import { shallow } from 'enzyme';
1010

1111
import { ResultView } from '.';
12+
import { Result } from '../../../result/result';
1213

1314
describe('ResultView', () => {
1415
const result = {
1516
id: {
1617
raw: '1',
1718
},
19+
title: {
20+
raw: 'A title',
21+
},
22+
_meta: {
23+
id: '1',
24+
scopedId: '1',
25+
score: 100,
26+
engine: 'my-engine',
27+
},
1828
};
1929

2030
it('renders', () => {
21-
const wrapper = shallow(<ResultView result={result} engineName="engine1" />);
22-
expect(wrapper.find('div').length).toBe(1);
31+
const wrapper = shallow(<ResultView result={result} />);
32+
expect(wrapper.find(Result).exists()).toBe(true);
2333
});
2434
});

0 commit comments

Comments
 (0)