Skip to content

Commit b77c901

Browse files
committed
Merge remote-tracking branch 'upstream/master' into kbn-76003-kbn-config-package
2 parents c0abb98 + e667f2f commit b77c901

File tree

149 files changed

+4927
-1427
lines changed

Some content is hidden

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

149 files changed

+4927
-1427
lines changed

packages/kbn-utils/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"kbn:watch": "yarn build --watch"
1111
},
1212
"dependencies": {
13-
"@kbn/config-schema": "1.0.0"
13+
"@kbn/config-schema": "1.0.0",
14+
"load-json-file": "^6.2.0"
1415
},
1516
"devDependencies": {
1617
"typescript": "4.0.2"

src/dev/build/tasks/os_packages/docker_generator/templates/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ RUN groupadd --gid 1000 kibana && \
8585
useradd --uid 1000 --gid 1000 \
8686
--home-dir /usr/share/kibana --no-create-home \
8787
kibana
88-
USER kibana
8988

9089
LABEL org.label-schema.build-date="{{dockerBuildDate}}" \
9190
org.label-schema.license="{{license}}" \
@@ -115,8 +114,13 @@ LABEL name="Kibana" \
115114
release="1" \
116115
summary="Kibana" \
117116
description="Your window into the Elastic Stack."
117+
118+
RUN mkdir /licenses && \
119+
cp LICENSE.txt /licenses/LICENSE
118120
{{/ubi}}
119121

122+
USER kibana
123+
120124
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
121125

122126
CMD ["/usr/local/bin/kibana-docker"]

x-pack/plugins/enterprise_search/public/applications/shared/layout/layout.test.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import React from 'react';
88
import { shallow } from 'enzyme';
9-
import { EuiPageSideBar, EuiButton } from '@elastic/eui';
9+
import { EuiPageSideBar, EuiButton, EuiPageBody } from '@elastic/eui';
1010

1111
import { Layout, INavContext } from './layout';
1212

@@ -15,6 +15,13 @@ describe('Layout', () => {
1515
const wrapper = shallow(<Layout navigation={null} />);
1616

1717
expect(wrapper.find('.enterpriseSearchLayout')).toHaveLength(1);
18+
expect(wrapper.find(EuiPageBody).prop('restrictWidth')).toBeFalsy();
19+
});
20+
21+
it('passes the restrictWidth prop', () => {
22+
const wrapper = shallow(<Layout navigation={null} restrictWidth />);
23+
24+
expect(wrapper.find(EuiPageBody).prop('restrictWidth')).toEqual(true);
1825
});
1926

2027
it('renders navigation', () => {

x-pack/plugins/enterprise_search/public/applications/shared/layout/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ import './layout.scss';
1414

1515
interface ILayoutProps {
1616
navigation: React.ReactNode;
17+
restrictWidth?: boolean;
1718
}
1819

1920
export interface INavContext {
2021
closeNavigation(): void;
2122
}
2223
export const NavContext = React.createContext({});
2324

24-
export const Layout: React.FC<ILayoutProps> = ({ children, navigation }) => {
25+
export const Layout: React.FC<ILayoutProps> = ({ children, navigation, restrictWidth }) => {
2526
const [isNavOpen, setIsNavOpen] = useState(false);
2627
const toggleNavigation = () => setIsNavOpen(!isNavOpen);
2728
const closeNavigation = () => setIsNavOpen(false);
@@ -54,7 +55,9 @@ export const Layout: React.FC<ILayoutProps> = ({ children, navigation }) => {
5455
</div>
5556
<NavContext.Provider value={{ closeNavigation }}>{navigation}</NavContext.Provider>
5657
</EuiPageSideBar>
57-
<EuiPageBody className="enterpriseSearchLayout__body">{children}</EuiPageBody>
58+
<EuiPageBody className="enterpriseSearchLayout__body" restrictWidth={restrictWidth}>
59+
{children}
60+
</EuiPageBody>
5861
</EuiPage>
5962
);
6063
};

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.helpers.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const createActions = (testBed: TestBed<TestSubject>) => {
126126
});
127127
});
128128
await act(async () => {
129-
find('processorSettingsForm.submitButton').simulate('click');
129+
find('addProcessorForm.submitButton').simulate('click');
130130
});
131131
},
132132

@@ -166,7 +166,7 @@ const createActions = (testBed: TestBed<TestSubject>) => {
166166
});
167167
});
168168
await act(async () => {
169-
find('processorSettingsForm.submitButton').simulate('click');
169+
find('addProcessorForm.submitButton').simulate('click');
170170
});
171171
},
172172

@@ -202,8 +202,10 @@ type TestSubject =
202202
| 'pipelineEditorDoneButton'
203203
| 'pipelineEditorOnFailureToggle'
204204
| 'addProcessorsButtonLevel1'
205-
| 'processorSettingsForm'
206-
| 'processorSettingsForm.submitButton'
205+
| 'editProcessorForm'
206+
| 'editProcessorForm.submitButton'
207+
| 'addProcessorForm.submitButton'
208+
| 'addProcessorForm'
207209
| 'processorOptionsEditor'
208210
| 'processorSettingsFormFlyout'
209211
| 'processorTypeSelector'

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ describe('Pipeline Editor', () => {
180180
it('prevents moving a processor while in edit mode', () => {
181181
const { find, exists } = testBed;
182182
find('processors>0.manageItemButton').simulate('click');
183-
expect(exists('processorSettingsForm')).toBe(true);
183+
expect(exists('editProcessorForm')).toBe(true);
184184
expect(find('processors>0.moveItemButton').props().disabled).toBe(true);
185185
expect(find('processors>1.moveItemButton').props().disabled).toBe(true);
186186
});

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/test_pipeline.helpers.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ const createActions = (testBed: TestBed<TestSubject>) => {
140140
component.update();
141141
},
142142

143-
clickProcessorOutputTab() {
144-
act(() => {
143+
async clickProcessorOutputTab() {
144+
await act(async () => {
145145
find('outputTab').simulate('click');
146146
});
147147
component.update();
@@ -224,7 +224,8 @@ type TestSubject =
224224
| 'processorStatusIcon'
225225
| 'documentsTab'
226226
| 'manageItemButton'
227-
| 'processorSettingsForm'
227+
| 'addProcessorForm'
228+
| 'editProcessorForm'
228229
| 'configurationTab'
229230
| 'outputTab'
230231
| 'processorOutputTabContent'

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/test_pipeline.test.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('Test pipeline', () => {
4444

4545
describe('Test pipeline actions', () => {
4646
it('should successfully add sample documents and execute the pipeline', async () => {
47-
const { find, actions, exists } = testBed;
47+
const { actions, exists } = testBed;
4848

4949
httpRequestsMockHelpers.setSimulatePipelineResponse(SIMULATE_RESPONSE);
5050

@@ -59,7 +59,6 @@ describe('Test pipeline', () => {
5959
expect(exists('testPipelineFlyout')).toBe(true);
6060
expect(exists('documentsTabContent')).toBe(true);
6161
expect(exists('outputTabContent')).toBe(false);
62-
expect(find('outputTab').props().disabled).toEqual(true);
6362

6463
// Add sample documents and click run
6564
actions.addDocumentsJson(JSON.stringify(DOCUMENTS));
@@ -89,21 +88,25 @@ describe('Test pipeline', () => {
8988
});
9089

9190
// Verify output tab is active
92-
expect(find('outputTab').props().disabled).toEqual(false);
9391
expect(exists('documentsTabContent')).toBe(false);
9492
expect(exists('outputTabContent')).toBe(true);
9593

9694
// Click reload button and verify request
9795
const totalRequests = server.requests.length;
9896
await actions.clickRefreshOutputButton();
99-
expect(server.requests.length).toBe(totalRequests + 1);
97+
// There will be two requests made to the simulate API
98+
// the second request will have verbose enabled to update the processor results
99+
expect(server.requests.length).toBe(totalRequests + 2);
100+
expect(server.requests[server.requests.length - 2].url).toBe(
101+
'/api/ingest_pipelines/simulate'
102+
);
100103
expect(server.requests[server.requests.length - 1].url).toBe(
101104
'/api/ingest_pipelines/simulate'
102105
);
103106

104107
// Click verbose toggle and verify request
105108
await actions.toggleVerboseSwitch();
106-
expect(server.requests.length).toBe(totalRequests + 2);
109+
expect(server.requests.length).toBe(totalRequests + 3);
107110
expect(server.requests[server.requests.length - 1].url).toBe(
108111
'/api/ingest_pipelines/simulate'
109112
);
@@ -228,10 +231,10 @@ describe('Test pipeline', () => {
228231
// Click processor to open manage flyout
229232
await actions.clickProcessor('processors>0');
230233
// Verify flyout opened
231-
expect(exists('processorSettingsForm')).toBe(true);
234+
expect(exists('editProcessorForm')).toBe(true);
232235

233236
// Navigate to "Output" tab
234-
actions.clickProcessorOutputTab();
237+
await actions.clickProcessorOutputTab();
235238
// Verify content
236239
expect(exists('processorOutputTabContent')).toBe(true);
237240
});

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/documents_dropdown/documents_dropdown.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/documents_dropdown/documents_dropdown.tsx

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)