Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into status/api-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Sep 17, 2020
2 parents b327503 + 06e8c54 commit 9f619ee
Show file tree
Hide file tree
Showing 91 changed files with 3,348 additions and 1,780 deletions.
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,30 @@
"url": "https://github.com/elastic/kibana.git"
},
"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",
"**/@types/hapi": "^17.0.18",
"**/@types/hoist-non-react-statics": "^3.3.1",
"**/@types/node": ">=10.17.17 <10.20.0",
"**/@types/react": "^16.9.36",
"**/cross-fetch/node-fetch": "^2.6.1",
"**/cypress/@types/lodash": "^4.14.159",
"**/cypress/lodash": "^4.17.20",
"**/typescript": "4.0.2",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1",
"**/graphql-toolkit/lodash": "^4.17.15",
"**/hoist-non-react-statics": "^3.3.2",
"**/image-diff/gm/debug": "^2.6.9",
"**/isomorphic-fetch/node-fetch": "^2.6.1",
"**/isomorphic-git/**/base64-js": "^1.2.1",
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
"**/node-jose/node-forge": "^0.10.0",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-dom": "^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 +196,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
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
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';

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9f619ee

Please sign in to comment.