Skip to content

Commit

Permalink
Merge branch 'master' into eui/16.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Nov 20, 2019
2 parents e46e9fa + 87e77e9 commit eeee828
Show file tree
Hide file tree
Showing 107 changed files with 2,285 additions and 750 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/core/public/application/**/*.{js,ts,tsx}'],
rules: {
'react/no-danger': 'off',
},
},
{
files: ['src/legacy/core_plugins/console/**/*.{js,ts,tsx}'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library 'kibana-pipeline-library'
kibanaLibrary.load()

stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
timeout(time: 180, unit: 'MINUTES') {
timeout(time: 120, unit: 'MINUTES') {
timestamps {
ansiColor('xterm') {
catchError {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) &gt; [appName](./kibana-plugin-public.chromehelpextension.appname.md)

## ChromeHelpExtension.appName property

Provide your plugin's name to create a header for separation

<b>Signature:</b>

```typescript
appName: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) &gt; [content](./kibana-plugin-public.chromehelpextension.content.md)

## ChromeHelpExtension.content property

Custom content to occur below the list of links

<b>Signature:</b>

```typescript
content?: (element: HTMLDivElement) => () => void;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) &gt; [links](./kibana-plugin-public.chromehelpextension.links.md)

## ChromeHelpExtension.links property

Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button

<b>Signature:</b>

```typescript
links?: ChromeHelpExtensionMenuLink[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md)

## ChromeHelpExtension type
## ChromeHelpExtension interface


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtension = (element: HTMLDivElement) => () => void;
export interface ChromeHelpExtension
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [appName](./kibana-plugin-public.chromehelpextension.appname.md) | <code>string</code> | Provide your plugin's name to create a header for separation |
| [content](./kibana-plugin-public.chromehelpextension.content.md) | <code>(element: HTMLDivElement) =&gt; () =&gt; void</code> | Custom content to occur below the list of links |
| [links](./kibana-plugin-public.chromehelpextension.links.md) | <code>ChromeHelpExtensionMenuLink[]</code> | Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button |

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtensionMenuCustomLink](./kibana-plugin-public.chromehelpextensionmenucustomlink.md)

## ChromeHelpExtensionMenuCustomLink type


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtensionMenuCustomLink = EuiButtonEmptyProps & {
linkType: 'custom';
content: React.ReactNode;
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtensionMenuDiscussLink](./kibana-plugin-public.chromehelpextensionmenudiscusslink.md)

## ChromeHelpExtensionMenuDiscussLink type


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtensionMenuDiscussLink = EuiButtonEmptyProps & {
linkType: 'discuss';
href: string;
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtensionMenuDocumentationLink](./kibana-plugin-public.chromehelpextensionmenudocumentationlink.md)

## ChromeHelpExtensionMenuDocumentationLink type


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtensionMenuDocumentationLink = EuiButtonEmptyProps & {
linkType: 'documentation';
href: string;
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtensionMenuGitHubLink](./kibana-plugin-public.chromehelpextensionmenugithublink.md)

## ChromeHelpExtensionMenuGitHubLink type


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtensionMenuGitHubLink = EuiButtonEmptyProps & {
linkType: 'github';
labels: string[];
title?: string;
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeHelpExtensionMenuLink](./kibana-plugin-public.chromehelpextensionmenulink.md)

## ChromeHelpExtensionMenuLink type


<b>Signature:</b>

```typescript
export declare type ChromeHelpExtensionMenuLink = ExclusiveUnion<ChromeHelpExtensionMenuGitHubLink, ExclusiveUnion<ChromeHelpExtensionMenuDiscussLink, ExclusiveUnion<ChromeHelpExtensionMenuDocumentationLink, ChromeHelpExtensionMenuCustomLink>>>;
```
7 changes: 6 additions & 1 deletion docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ChromeBadge](./kibana-plugin-public.chromebadge.md) | |
| [ChromeBrand](./kibana-plugin-public.chromebrand.md) | |
| [ChromeDocTitle](./kibana-plugin-public.chromedoctitle.md) | APIs for accessing and updating the document title. |
| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | |
| [ChromeNavControl](./kibana-plugin-public.chromenavcontrol.md) | |
| [ChromeNavControls](./kibana-plugin-public.chromenavcontrols.md) | [APIs](./kibana-plugin-public.chromenavcontrols.md) for registering new controls to be displayed in the navigation bar. |
| [ChromeNavLink](./kibana-plugin-public.chromenavlink.md) | |
Expand Down Expand Up @@ -98,7 +99,11 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| --- | --- |
| [AppUnmount](./kibana-plugin-public.appunmount.md) | A function called when an application should be unmounted from the page. This function should be synchronous. |
| [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) | |
| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | |
| [ChromeHelpExtensionMenuCustomLink](./kibana-plugin-public.chromehelpextensionmenucustomlink.md) | |
| [ChromeHelpExtensionMenuDiscussLink](./kibana-plugin-public.chromehelpextensionmenudiscusslink.md) | |
| [ChromeHelpExtensionMenuDocumentationLink](./kibana-plugin-public.chromehelpextensionmenudocumentationlink.md) | |
| [ChromeHelpExtensionMenuGitHubLink](./kibana-plugin-public.chromehelpextensionmenugithublink.md) | |
| [ChromeHelpExtensionMenuLink](./kibana-plugin-public.chromehelpextensionmenulink.md) | |
| [ChromeNavLinkUpdateableFields](./kibana-plugin-public.chromenavlinkupdateablefields.md) | |
| [HandlerContextType](./kibana-plugin-public.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-public.handlerfunction.md) to represent the type of the context. |
| [HandlerFunction](./kibana-plugin-public.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-public.icontextcontainer.md) |
Expand Down
4 changes: 2 additions & 2 deletions docs/management/managing-fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include::field-formatters/url-formatter.asciidoc[]

Date fields support the `Date`, `Url`, and `String` formatters.

The `Date` formatter enables you to choose the display format of date stamps using the http://moment.js[moment.js]
The `Date` formatter enables you to choose the display format of date stamps using the https://momentjs.com/[moment.js]
standard format definitions.

include::field-formatters/string-formatter.asciidoc[]
Expand Down Expand Up @@ -65,7 +65,7 @@ the https://adamwdraper.github.io/Numeral-js/[numeral.js] standard format defini
Scripted fields compute data on the fly from the data in your Elasticsearch indices. Scripted field data is shown on
the Discover tab as part of the document data, and you can use scripted fields in your visualizations.
Scripted field values are computed at query time so they aren't indexed and cannot be searched using Kibana's default
query language. However they can be queried using Kibana's new <<kuery-query, experimental query language>>. Scripted
query language. However they can be queried using Kibana's new <<kuery-query, experimental query language>>. Scripted
fields are also supported in the filter bar.

WARNING: Computing data on the fly with scripted fields can be very resource intensive and can have a direct impact on
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"@types/recompose": "^0.30.5",
"JSONStream": "1.3.5",
"abortcontroller-polyfill": "^1.3.0",
"angular": "^1.7.8",
"angular": "^1.7.9",
"angular-aria": "^1.7.8",
"angular-elastic": "^2.5.1",
"angular-recursion": "^1.0.5",
Expand Down
10 changes: 2 additions & 8 deletions src/core/public/application/integration_tests/router.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

import React from 'react';
import ReactDOM from 'react-dom';
import { mount, ReactWrapper } from 'enzyme';
import { createMemoryHistory, History } from 'history';
import { BehaviorSubject } from 'rxjs';
Expand All @@ -31,13 +30,8 @@ import { AppRouter, AppNotFound } from '../ui';

const createMountHandler = (htmlString: string) =>
jest.fn(async ({ appBasePath: basename, element: el }: AppMountParameters) => {
ReactDOM.render(
<div
dangerouslySetInnerHTML={{ __html: `\nbasename: ${basename}\nhtml: ${htmlString}\n` }}
/>,
el
);
return jest.fn(() => ReactDOM.unmountComponentAtNode(el));
el.innerHTML = `<div>\nbasename: ${basename}\nhtml: ${htmlString}\n</div>`;
return jest.fn(() => (el.innerHTML = ''));
});

describe('AppContainer', () => {
Expand Down
17 changes: 10 additions & 7 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,20 @@ describe('start', () => {
.pipe(toArray())
.toPromise();

chrome.setHelpExtension(() => () => undefined);
chrome.setHelpExtension({ appName: 'App name', content: () => () => undefined });
chrome.setHelpExtension(undefined);
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
undefined,
[Function],
undefined,
]
`);
Array [
undefined,
Object {
"appName": "App name",
"content": [Function],
},
undefined,
]
`);
});
});
});
Expand Down
16 changes: 15 additions & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { NavControlsService, ChromeNavControls } from './nav_controls';
import { DocTitleService, ChromeDocTitle } from './doc_title';
import { LoadingIndicator, HeaderWrapper as Header } from './ui';
import { DocLinksStart } from '../doc_links';
import { ChromeHelpExtensionMenuLink } from './ui/header/header_help_menu';

export { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle };

Expand All @@ -58,7 +59,20 @@ export interface ChromeBrand {
export type ChromeBreadcrumb = EuiBreadcrumb;

/** @public */
export type ChromeHelpExtension = (element: HTMLDivElement) => () => void;
export interface ChromeHelpExtension {
/**
* Provide your plugin's name to create a header for separation
*/
appName: string;
/**
* Creates unified links for sending users to documentation, GitHub, Discuss, or a custom link/button
*/
links?: ChromeHelpExtensionMenuLink[];
/**
* Custom content to occur below the list of links
*/
content?: (element: HTMLDivElement) => () => void;
}

interface ConstructorParams {
browserSupportsCsp: boolean;
Expand Down
7 changes: 7 additions & 0 deletions src/core/public/chrome/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export {
ChromeBrand,
ChromeHelpExtension,
} from './chrome_service';
export {
ChromeHelpExtensionMenuLink,
ChromeHelpExtensionMenuCustomLink,
ChromeHelpExtensionMenuDiscussLink,
ChromeHelpExtensionMenuDocumentationLink,
ChromeHelpExtensionMenuGitHubLink,
} from './ui/header/header_help_menu';
export { ChromeNavLink, ChromeNavLinks, ChromeNavLinkUpdateableFields } from './nav_links';
export { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem } from './recently_accessed';
export { ChromeNavControl, ChromeNavControls } from './nav_controls';
Expand Down
8 changes: 0 additions & 8 deletions src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,13 @@ import * as Rx from 'rxjs';

import {
// TODO: add type annotations
// @ts-ignore
EuiHeader,
// @ts-ignore
EuiHeaderLogo,
// @ts-ignore
EuiHeaderSection,
// @ts-ignore
EuiHeaderSectionItem,
// @ts-ignore
EuiHeaderSectionItemButton,
// @ts-ignore
EuiHideFor,
EuiHorizontalRule,
EuiIcon,
// @ts-ignore
EuiImage,
// @ts-ignore
EuiNavDrawer,
Expand Down
Loading

0 comments on commit eeee828

Please sign in to comment.