Kibana developer examples landing page (#67049)

* Kibana developer examples

* Batch explorer tests should be run in examples config

* Fix tests

* add codeowner for new developer examples plugin & readme cleanup

* Try to frame embeddable wording based on what a developer's goals are.

* Add noopener noreferer, fix bad merge

* Remove bfetch.png

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Stacey Gammon 2020-06-08 09:47:51 -04:00 committed by GitHub
parent c29fcbb46b
commit f89e911f64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 510 additions and 109 deletions

View file

@ -4,6 +4,6 @@
"kibanaVersion": "kibana",
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "uiActionsExamples"],
"requiredPlugins": ["uiActions", "uiActionsExamples", "developerExamples"],
"optionalPlugins": []
}

View file

@ -17,8 +17,8 @@
* under the License.
*/
import { Plugin, CoreSetup, AppMountParameters } from 'kibana/public';
import { UiActionsStart, UiActionsSetup } from 'src/plugins/ui_actions/public';
import { UiActionsStart, UiActionsSetup } from '../../../src/plugins/ui_actions/public';
import { Plugin, CoreSetup, AppMountParameters, AppNavLinkStatus } from '../../../src/core/public';
import {
PHONE_TRIGGER,
USER_TRIGGER,
@ -39,6 +39,8 @@ import {
ACTION_VIEW_IN_MAPS,
ACTION_PHONE_USER,
} from './actions/actions';
import { DeveloperExamplesSetup } from '../../developer_examples/public';
import image from './ui_actions.png';
interface StartDeps {
uiActions: UiActionsStart;
@ -46,6 +48,7 @@ interface StartDeps {
interface SetupDeps {
uiActions: UiActionsSetup;
developerExamples: DeveloperExamplesSetup;
}
declare module '../../../src/plugins/ui_actions/public' {
@ -66,7 +69,7 @@ declare module '../../../src/plugins/ui_actions/public' {
}
export class UiActionsExplorerPlugin implements Plugin<void, void, {}, StartDeps> {
public setup(core: CoreSetup<{ uiActions: UiActionsStart }>, deps: SetupDeps) {
public setup(core: CoreSetup<StartDeps>, deps: SetupDeps) {
deps.uiActions.registerTrigger({
id: COUNTRY_TRIGGER,
});
@ -98,6 +101,7 @@ export class UiActionsExplorerPlugin implements Plugin<void, void, {}, StartDeps
core.application.register({
id: 'uiActionsExplorer',
title: 'Ui Actions Explorer',
navLinkStatus: AppNavLinkStatus.hidden,
async mount(params: AppMountParameters) {
const [coreStart, depsStart] = await core.getStartServices();
const { renderApp } = await import('./app');
@ -107,6 +111,24 @@ export class UiActionsExplorerPlugin implements Plugin<void, void, {}, StartDeps
);
},
});
deps.developerExamples.register({
appId: 'uiActionsExplorer',
title: 'Ui Actions & Triggers',
description: `Ui Actions can be used to make any part of your UI extensible. It has built in support for
context menus, but you can also render all actions attached to a given trigger however you like, just how
panel badges and panel notifications does.`,
image,
links: [
{
label: 'README',
href: 'https://github.com/elastic/kibana/blob/master/src/plugins/ui_actions/README.md',
iconType: 'logoGithub',
size: 's',
target: '_blank',
},
],
});
}
public start() {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB