Skip to content

Commit

Permalink
Merge branch 'master' into feature/mappings_editor/histogram_field
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Sep 17, 2020
2 parents a24d8a8 + d1a6e89 commit ed38891
Show file tree
Hide file tree
Showing 365 changed files with 12,543 additions and 5,382 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=10.22.0
ARG NODE_VERSION=10.22.1

FROM node:${NODE_VERSION} AS base

Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ in their infrastructure.
|This plugins adopts some conventions in addition to or in place of conventions in Kibana (at the time of the plugin's creation):
|{kib-repo}blob/{branch}/x-pack/plugins/xpack_legacy/README.md[xpackLegacy]
|Contains HTTP endpoints and UiSettings that are slated for removal.
|===
include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1]
Expand Down
23 changes: 7 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,18 @@
},
"resolutions": {
"**/@types/node": ">=10.17.17 <10.20.0",
"**/@types/react": "^16.9.36",
"**/@types/hapi": "^17.0.18",
"**/@types/angular": "^1.6.56",
"**/@types/hoist-non-react-statics": "^3.3.1",
"**/@types/chai": "^4.2.11",
"**/cypress/@types/lodash": "^4.14.159",
"**/cypress/lodash": "^4.17.20",
"**/typescript": "4.0.2",
"**/cross-fetch/node-fetch": "^2.6.1",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1",
"**/graphql-toolkit/lodash": "^4.17.15",
"**/hoist-non-react-statics": "^3.3.2",
"**/isomorphic-git/**/base64-js": "^1.2.1",
"**/isomorphic-fetch/node-fetch": "^2.6.1",
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
"**/minimist": "^1.2.5",
"**/node-jose/node-forge": "^0.10.0",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-test-renderer": "^16.12.0",
"**/request": "^2.88.2",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1"
"**/typescript": "4.0.2"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -194,7 +185,7 @@
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"mustache": "2.3.2",
"node-fetch": "1.7.3",
"node-fetch": "2.6.1",
"node-forge": "^0.10.0",
"opn": "^5.5.0",
"oppsy": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-es/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"execa": "^4.0.2",
"getopts": "^2.2.4",
"glob": "^7.1.2",
"node-fetch": "^2.6.0",
"node-fetch": "^2.6.1",
"simple-git": "^1.91.0",
"tar-fs": "^2.1.0",
"tree-kill": "^1.2.2",
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/context/context_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import type { PublicMethodsOf } from '@kbn/utility-types';
import { ContextService, ContextSetup } from './context_service';
import { contextMock } from '../../utils/context.mock';

const createSetupContractMock = () => {
const createSetupContractMock = (mockContext = {}) => {
const setupContract: jest.Mocked<ContextSetup> = {
createContextContainer: jest.fn().mockImplementation(() => contextMock.create()),
createContextContainer: jest.fn().mockImplementation(() => contextMock.create(mockContext)),
};
return setupContract;
};
Expand Down
19 changes: 19 additions & 0 deletions src/core/server/metrics/metrics_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ describe('MetricsService', () => {
`"#setup() needs to be run first"`
);
});

it('emits the last value on each getOpsMetrics$ call', async () => {
const firstMetrics = { metric: 'first' };
const secondMetrics = { metric: 'second' };
mockOpsCollector.collect
.mockResolvedValueOnce(firstMetrics)
.mockResolvedValueOnce(secondMetrics);

await metricsService.setup({ http: httpMock });
const { getOpsMetrics$ } = await metricsService.start();

const firstEmission = getOpsMetrics$().pipe(take(1)).toPromise();
jest.advanceTimersByTime(testInterval);
expect(await firstEmission).toEqual({ metric: 'first' });

const secondEmission = getOpsMetrics$().pipe(take(1)).toPromise();
jest.advanceTimersByTime(testInterval);
expect(await secondEmission).toEqual({ metric: 'second' });
});
});

describe('#stop', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/metrics_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class MetricsService
private readonly logger: Logger;
private metricsCollector?: OpsMetricsCollector;
private collectInterval?: NodeJS.Timeout;
private metrics$ = new ReplaySubject<OpsMetrics>();
private metrics$ = new ReplaySubject<OpsMetrics>(1);
private service?: InternalMetricsServiceSetup;

constructor(private readonly coreContext: CoreContext) {
Expand Down
1 change: 1 addition & 0 deletions src/core/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export { typeRegistryMock as savedObjectsTypeRegistryMock } from './saved_object
export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock';
export { metricsServiceMock } from './metrics/metrics_service.mock';
export { renderingMock } from './rendering/rendering_service.mock';
export { contextServiceMock } from './context/context_service.mock';

export function pluginInitializerContextConfigMock<T>(config: T) {
const globalConfig: SharedGlobalConfig = {
Expand Down
8 changes: 3 additions & 5 deletions src/core/utils/context.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ import { IContextContainer } from './context';

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

const createContextMock = () => {
const createContextMock = (mockContext = {}) => {
const contextMock: ContextContainerMock = {
registerContext: jest.fn(),
createHandler: jest.fn((id, handler) => (...args: any[]) =>
Promise.resolve(handler({}, ...args))
),
createHandler: jest.fn(),
};
contextMock.createHandler.mockImplementation((pluginId, handler) => (...args) =>
handler({}, ...args)
handler(mockContext, ...args)
);
return contextMock;
};
Expand Down
51 changes: 48 additions & 3 deletions src/plugins/discover/public/application/_discover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
overflow: hidden;
}

.dscAppContainer {
> * {
position: relative;
}
}
discover-app {
flex-grow: 1;
}
Expand All @@ -17,9 +22,12 @@ discover-app {

// SASSTODO: replace the z-index value with a variable
.dscWrapper {
padding-left: $euiSizeXL;
padding-right: $euiSizeS;
padding-left: 21px;
z-index: 1;
@include euiBreakpoint('xs', 's', 'm') {
padding-left: $euiSizeS;
}
}

@include euiPanel('.dscWrapper__content');
Expand Down Expand Up @@ -104,14 +112,51 @@ discover-app {
top: $euiSizeXS;
}

[fixed-scroll] {
.dscTableFixedScroll {
overflow-x: auto;
padding-bottom: 0;

+ .fixed-scroll-scroller {
+ .dscTableFixedScroll__scroller {
position: fixed;
bottom: 0;
overflow-x: auto;
overflow-y: hidden;
}
}

.dscCollapsibleSidebar {
position: relative;
z-index: $euiZLevel1;

.dscCollapsibleSidebar__collapseButton {
position: absolute;
top: 0;
right: -$euiSizeXL + 4;
cursor: pointer;
z-index: -1;
min-height: $euiSizeM;
min-width: $euiSizeM;
padding: $euiSizeXS * .5;
}

&.closed {
width: 0 !important;
border-right-width: 0;
border-left-width: 0;
.dscCollapsibleSidebar__collapseButton {
right: -$euiSizeL + 4;
}
}
}

@include euiBreakpoint('xs', 's', 'm') {
.dscCollapsibleSidebar {
&.closed {
display: none;
}

.dscCollapsibleSidebar__collapseButton {
display: none;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import 'no_results';
@import 'histogram';
@import './collapsible_sidebar/index';
Loading

0 comments on commit ed38891

Please sign in to comment.