Skip to content

Commit

Permalink
Merge branch 'master' into storybook-4
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Feb 14, 2020
2 parents 987e11f + 8513498 commit 782c035
Show file tree
Hide file tree
Showing 284 changed files with 6,682 additions and 2,808 deletions.
Binary file modified docs/infrastructure/images/infra-sysmon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/infrastructure/images/infra-view-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/infrastructure/images/metrics-add-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/infrastructure/images/metrics-explorer-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logs/images/log-rate-anomalies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logs/images/log-rate-entries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logs/images/log-time-filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logs/images/logs-add-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logs/images/logs-console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/logs/using.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ You can also view related application traces or uptime information where availab

[role="screenshot"]
image::logs/images/logs-console.png[Logs Console in Kibana]
// ++ Update this

[float]
[[logs-search]]
Expand Down
5 changes: 0 additions & 5 deletions src/core/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ This document outlines best practices and patterns for testing Kibana Plugins.
- [Testing dependencies usages](#testing-dependencies-usages)
- [Testing components consuming the dependencies](#testing-components-consuming-the-dependencies)
- [Testing optional plugin dependencies](#testing-optional-plugin-dependencies)
- [Plugin Contracts](#plugin-contracts)

## Strategy

Expand Down Expand Up @@ -1082,7 +1081,3 @@ describe('Plugin', () => {
});
});
```
## Plugin Contracts
_How to test your plugin's exposed API_
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { migrations } from './migrations';
import { importApi } from './server/routes/api/import';
import { exportApi } from './server/routes/api/export';
import { managementApi } from './server/routes/api/management';
import * as systemApi from './server/lib/system_api';
import mappings from './mappings.json';
import { getUiSettingDefaults } from './ui_setting_defaults';
import { registerCspCollector } from './server/lib/csp_usage_collector';
Expand Down Expand Up @@ -323,7 +322,6 @@ export default function(kibana) {
exportApi(server);
managementApi(server);
registerCspCollector(usageCollection, server);
server.expose('systemApi', systemApi);
server.injectUiAppVars('kibana', () => injectVars(server));
},
});
Expand Down

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
Expand Up @@ -112,6 +112,7 @@ export class SampleDataViewDataButton extends React.Component {
closePopover={this.closePopover}
panelPaddingSize="none"
anchorPosition="downCenter"
data-test-subj={`launchSampleDataSet${this.props.id}`}
>
<EuiContextMenu initialPanelId={0} panels={panels} />
</EuiPopover>
Expand Down
41 changes: 0 additions & 41 deletions src/legacy/core_plugins/kibana/server/lib/__tests__/system_api.js

This file was deleted.

31 changes: 0 additions & 31 deletions src/legacy/core_plugins/kibana/server/lib/system_api.js

This file was deleted.

15 changes: 12 additions & 3 deletions src/legacy/ui/public/system_api/__tests__/system_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,25 @@ describe('system_api', () => {
};
const newHeaders = addSystemApiHeader(headers);

expect(newHeaders).to.have.property('kbn-system-api');
expect(newHeaders['kbn-system-api']).to.be(true);
expect(newHeaders).to.have.property('kbn-system-request');
expect(newHeaders['kbn-system-request']).to.be(true);

expect(newHeaders).to.have.property('kbn-version');
expect(newHeaders['kbn-version']).to.be('4.6.0');
});
});

describe('#isSystemApiRequest', () => {
it('returns true for a system API HTTP request', () => {
it('returns true for a system HTTP request', () => {
const mockRequest = {
headers: {
'kbn-system-request': true,
},
};
expect(isSystemApiRequest(mockRequest)).to.be(true);
});

it('returns true for a legacy system API HTTP request', () => {
const mockRequest = {
headers: {
'kbn-system-api': true,
Expand Down
9 changes: 6 additions & 3 deletions src/plugins/kibana_legacy/public/utils/system_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

import { IRequestConfig } from 'angular';

const SYSTEM_API_HEADER_NAME = 'kbn-system-api';
const SYSTEM_REQUEST_HEADER_NAME = 'kbn-system-request';
const LEGACY_SYSTEM_API_HEADER_NAME = 'kbn-system-api';

/**
* Adds a custom header designating request as system API
Expand All @@ -28,7 +29,7 @@ const SYSTEM_API_HEADER_NAME = 'kbn-system-api';
*/
export function addSystemApiHeader(originalHeaders: Record<string, string>) {
const systemApiHeaders = {
[SYSTEM_API_HEADER_NAME]: true,
[SYSTEM_REQUEST_HEADER_NAME]: true,
};
return {
...originalHeaders,
Expand All @@ -44,5 +45,7 @@ export function addSystemApiHeader(originalHeaders: Record<string, string>) {
*/
export function isSystemApiRequest(request: IRequestConfig) {
const { headers } = request;
return headers && !!headers[SYSTEM_API_HEADER_NAME];
return (
headers && (!!headers[SYSTEM_REQUEST_HEADER_NAME] || !!headers[LEGACY_SYSTEM_API_HEADER_NAME])
);
}
8 changes: 4 additions & 4 deletions test/functional/apps/home/_sample_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('should launch sample flights data set dashboard', async () => {
await PageObjects.home.launchSampleDataSet('flights');
await PageObjects.home.launchSampleDashboard('flights');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const todayYearMonthDay = moment().format('MMM D, YYYY');
Expand All @@ -96,7 +96,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('should render visualizations', async () => {
await PageObjects.home.launchSampleDataSet('flights');
await PageObjects.home.launchSampleDashboard('flights');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
log.debug('Checking pie charts rendered');
Expand All @@ -115,7 +115,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('should launch sample logs data set dashboard', async () => {
await PageObjects.home.launchSampleDataSet('logs');
await PageObjects.home.launchSampleDashboard('logs');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const todayYearMonthDay = moment().format('MMM D, YYYY');
Expand All @@ -127,7 +127,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
});

it('should launch sample ecommerce data set dashboard', async () => {
await PageObjects.home.launchSampleDataSet('ecommerce');
await PageObjects.home.launchSampleDashboard('ecommerce');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const todayYearMonthDay = moment().format('MMM D, YYYY');
Expand Down
13 changes: 12 additions & 1 deletion test/functional/page_objects/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@

import { FtrProviderContext } from '../ftr_provider_context';

export function HomePageProvider({ getService }: FtrProviderContext) {
export function HomePageProvider({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const find = getService('find');
const PageObjects = getPageObjects(['common']);
let isOss = true;

class HomePage {
async clickSynopsis(title: string) {
Expand Down Expand Up @@ -63,6 +66,14 @@ export function HomePageProvider({ getService }: FtrProviderContext) {
});
}

async launchSampleDashboard(id: string) {
await this.launchSampleDataSet(id);
isOss = await PageObjects.common.isOss();
if (!isOss) {
await find.clickByLinkText('Dashboard');
}
}

async launchSampleDataSet(id: string) {
await this.addSampleDataSet(id);
await testSubjects.click(`launchSampleDataSet${id}`);
Expand Down

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

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

3 changes: 1 addition & 2 deletions x-pack/legacy/plugins/apm/public/style/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ export function pct(value: number): string {
export const borderRadius = '4px';

// Fonts
export const fontFamily = '"Open Sans", Helvetica, Arial, sans-serif';
export const fontFamilyCode =
'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace';
'"Roboto Mono", Consolas, Menlo, Courier, monospace';

// Font sizes
export const fontSize = '14px';
Expand Down
Loading

0 comments on commit 782c035

Please sign in to comment.