Skip to content

Commit ed38891

Browse files
Merge branch 'master' into feature/mappings_editor/histogram_field
2 parents a24d8a8 + d1a6e89 commit ed38891

365 files changed

Lines changed: 12543 additions & 5382 deletions

File tree

Some content is hidden

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

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=10.22.0
4+
ARG NODE_VERSION=10.22.1
55

66
FROM node:${NODE_VERSION} AS base
77

docs/developer/plugin-list.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ in their infrastructure.
494494
|This plugins adopts some conventions in addition to or in place of conventions in Kibana (at the time of the plugin's creation):
495495
496496
497+
|{kib-repo}blob/{branch}/x-pack/plugins/xpack_legacy/README.md[xpackLegacy]
498+
|Contains HTTP endpoints and UiSettings that are slated for removal.
499+
500+
497501
|===
498502
499503
include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1]

package.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,18 @@
7878
},
7979
"resolutions": {
8080
"**/@types/node": ">=10.17.17 <10.20.0",
81-
"**/@types/react": "^16.9.36",
82-
"**/@types/hapi": "^17.0.18",
83-
"**/@types/angular": "^1.6.56",
84-
"**/@types/hoist-non-react-statics": "^3.3.1",
85-
"**/@types/chai": "^4.2.11",
86-
"**/cypress/@types/lodash": "^4.14.159",
87-
"**/cypress/lodash": "^4.17.20",
88-
"**/typescript": "4.0.2",
81+
"**/cross-fetch/node-fetch": "^2.6.1",
82+
"**/deepmerge": "^4.2.2",
83+
"**/fast-deep-equal": "^3.1.1",
8984
"**/graphql-toolkit/lodash": "^4.17.15",
9085
"**/hoist-non-react-statics": "^3.3.2",
91-
"**/isomorphic-git/**/base64-js": "^1.2.1",
86+
"**/isomorphic-fetch/node-fetch": "^2.6.1",
9287
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
93-
"**/image-diff/gm/debug": "^2.6.9",
9488
"**/load-grunt-config/lodash": "^4.17.20",
89+
"**/minimist": "^1.2.5",
9590
"**/node-jose/node-forge": "^0.10.0",
96-
"**/react-dom": "^16.12.0",
97-
"**/react": "^16.12.0",
98-
"**/react-test-renderer": "^16.12.0",
9991
"**/request": "^2.88.2",
100-
"**/deepmerge": "^4.2.2",
101-
"**/fast-deep-equal": "^3.1.1"
92+
"**/typescript": "4.0.2"
10293
},
10394
"workspaces": {
10495
"packages": [
@@ -194,7 +185,7 @@
194185
"moment": "^2.24.0",
195186
"moment-timezone": "^0.5.27",
196187
"mustache": "2.3.2",
197-
"node-fetch": "1.7.3",
188+
"node-fetch": "2.6.1",
198189
"node-forge": "^0.10.0",
199190
"opn": "^5.5.0",
200191
"oppsy": "^2.0.0",

packages/kbn-es/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"execa": "^4.0.2",
1515
"getopts": "^2.2.4",
1616
"glob": "^7.1.2",
17-
"node-fetch": "^2.6.0",
17+
"node-fetch": "^2.6.1",
1818
"simple-git": "^1.91.0",
1919
"tar-fs": "^2.1.0",
2020
"tree-kill": "^1.2.2",

src/core/server/context/context_service.mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import type { PublicMethodsOf } from '@kbn/utility-types';
2121
import { ContextService, ContextSetup } from './context_service';
2222
import { contextMock } from '../../utils/context.mock';
2323

24-
const createSetupContractMock = () => {
24+
const createSetupContractMock = (mockContext = {}) => {
2525
const setupContract: jest.Mocked<ContextSetup> = {
26-
createContextContainer: jest.fn().mockImplementation(() => contextMock.create()),
26+
createContextContainer: jest.fn().mockImplementation(() => contextMock.create(mockContext)),
2727
};
2828
return setupContract;
2929
};

src/core/server/metrics/metrics_service.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,25 @@ describe('MetricsService', () => {
106106
`"#setup() needs to be run first"`
107107
);
108108
});
109+
110+
it('emits the last value on each getOpsMetrics$ call', async () => {
111+
const firstMetrics = { metric: 'first' };
112+
const secondMetrics = { metric: 'second' };
113+
mockOpsCollector.collect
114+
.mockResolvedValueOnce(firstMetrics)
115+
.mockResolvedValueOnce(secondMetrics);
116+
117+
await metricsService.setup({ http: httpMock });
118+
const { getOpsMetrics$ } = await metricsService.start();
119+
120+
const firstEmission = getOpsMetrics$().pipe(take(1)).toPromise();
121+
jest.advanceTimersByTime(testInterval);
122+
expect(await firstEmission).toEqual({ metric: 'first' });
123+
124+
const secondEmission = getOpsMetrics$().pipe(take(1)).toPromise();
125+
jest.advanceTimersByTime(testInterval);
126+
expect(await secondEmission).toEqual({ metric: 'second' });
127+
});
109128
});
110129

111130
describe('#stop', () => {

src/core/server/metrics/metrics_service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class MetricsService
3737
private readonly logger: Logger;
3838
private metricsCollector?: OpsMetricsCollector;
3939
private collectInterval?: NodeJS.Timeout;
40-
private metrics$ = new ReplaySubject<OpsMetrics>();
40+
private metrics$ = new ReplaySubject<OpsMetrics>(1);
4141
private service?: InternalMetricsServiceSetup;
4242

4343
constructor(private readonly coreContext: CoreContext) {

src/core/server/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export { typeRegistryMock as savedObjectsTypeRegistryMock } from './saved_object
5252
export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock';
5353
export { metricsServiceMock } from './metrics/metrics_service.mock';
5454
export { renderingMock } from './rendering/rendering_service.mock';
55+
export { contextServiceMock } from './context/context_service.mock';
5556

5657
export function pluginInitializerContextConfigMock<T>(config: T) {
5758
const globalConfig: SharedGlobalConfig = {

src/core/utils/context.mock.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ import { IContextContainer } from './context';
2121

2222
export type ContextContainerMock = jest.Mocked<IContextContainer<any>>;
2323

24-
const createContextMock = () => {
24+
const createContextMock = (mockContext = {}) => {
2525
const contextMock: ContextContainerMock = {
2626
registerContext: jest.fn(),
27-
createHandler: jest.fn((id, handler) => (...args: any[]) =>
28-
Promise.resolve(handler({}, ...args))
29-
),
27+
createHandler: jest.fn(),
3028
};
3129
contextMock.createHandler.mockImplementation((pluginId, handler) => (...args) =>
32-
handler({}, ...args)
30+
handler(mockContext, ...args)
3331
);
3432
return contextMock;
3533
};

src/plugins/discover/public/application/_discover.scss

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
overflow: hidden;
66
}
77

8+
.dscAppContainer {
9+
> * {
10+
position: relative;
11+
}
12+
}
813
discover-app {
914
flex-grow: 1;
1015
}
@@ -17,9 +22,12 @@ discover-app {
1722

1823
// SASSTODO: replace the z-index value with a variable
1924
.dscWrapper {
25+
padding-left: $euiSizeXL;
2026
padding-right: $euiSizeS;
21-
padding-left: 21px;
2227
z-index: 1;
28+
@include euiBreakpoint('xs', 's', 'm') {
29+
padding-left: $euiSizeS;
30+
}
2331
}
2432

2533
@include euiPanel('.dscWrapper__content');
@@ -104,14 +112,51 @@ discover-app {
104112
top: $euiSizeXS;
105113
}
106114

107-
[fixed-scroll] {
115+
.dscTableFixedScroll {
108116
overflow-x: auto;
109117
padding-bottom: 0;
110118

111-
+ .fixed-scroll-scroller {
119+
+ .dscTableFixedScroll__scroller {
112120
position: fixed;
113121
bottom: 0;
114122
overflow-x: auto;
115123
overflow-y: hidden;
116124
}
117125
}
126+
127+
.dscCollapsibleSidebar {
128+
position: relative;
129+
z-index: $euiZLevel1;
130+
131+
.dscCollapsibleSidebar__collapseButton {
132+
position: absolute;
133+
top: 0;
134+
right: -$euiSizeXL + 4;
135+
cursor: pointer;
136+
z-index: -1;
137+
min-height: $euiSizeM;
138+
min-width: $euiSizeM;
139+
padding: $euiSizeXS * .5;
140+
}
141+
142+
&.closed {
143+
width: 0 !important;
144+
border-right-width: 0;
145+
border-left-width: 0;
146+
.dscCollapsibleSidebar__collapseButton {
147+
right: -$euiSizeL + 4;
148+
}
149+
}
150+
}
151+
152+
@include euiBreakpoint('xs', 's', 'm') {
153+
.dscCollapsibleSidebar {
154+
&.closed {
155+
display: none;
156+
}
157+
158+
.dscCollapsibleSidebar__collapseButton {
159+
display: none;
160+
}
161+
}
162+
}

0 commit comments

Comments
 (0)