-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: πΈ add example plugin ability to X-Pack * style: π spread array items from one array * chore: π€ add x-pack/examples tsconfigs to global list * fix: π don't import non-existing plugin * fix: π fix TypeScript error * test: π update Jest snapshot
- Loading branch information
Showing
12 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Example plugins | ||
|
||
This folder contains X-Pack example plugins. To run the plugins in this folder, use the `--run-examples` flag, via | ||
|
||
``` | ||
yarn start --run-examples | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Ui actions enhanced examples | ||
|
||
To run this example, use the command `yarn start --run-examples`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "uiActionsEnhancedExamples", | ||
"version": "0.0.1", | ||
"kibanaVersion": "kibana", | ||
"configPath": ["ui_actions_enhanced_examples"], | ||
"server": false, | ||
"ui": true, | ||
"requiredPlugins": ["uiActions", "data"], | ||
"optionalPlugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "ui_actions_enhanced_examples", | ||
"version": "1.0.0", | ||
"main": "target/examples/ui_actions_enhanced_examples", | ||
"kibana": { | ||
"version": "kibana", | ||
"templateVersion": "1.0.0" | ||
}, | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"kbn": "node ../../scripts/kbn.js", | ||
"build": "rm -rf './target' && tsc" | ||
}, | ||
"devDependencies": { | ||
"typescript": "3.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { UiActionsEnhancedExamplesPlugin } from './plugin'; | ||
|
||
export const plugin = () => new UiActionsEnhancedExamplesPlugin(); |
31 changes: 31 additions & 0 deletions
31
x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { Plugin, CoreSetup, CoreStart } from '../../../../src/core/public'; | ||
import { UiActionsSetup, UiActionsStart } from '../../../../src/plugins/ui_actions/public'; | ||
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../../src/plugins/data/public'; | ||
|
||
export interface SetupDependencies { | ||
data: DataPublicPluginSetup; | ||
uiActions: UiActionsSetup; | ||
} | ||
|
||
export interface StartDependencies { | ||
data: DataPublicPluginStart; | ||
uiActions: UiActionsStart; | ||
} | ||
|
||
export class UiActionsEnhancedExamplesPlugin | ||
implements Plugin<void, void, SetupDependencies, StartDependencies> { | ||
public setup(core: CoreSetup<StartDependencies>, plugins: SetupDependencies) { | ||
// eslint-disable-next-line | ||
console.log('ui_actions_enhanced_examples'); | ||
} | ||
|
||
public start(core: CoreStart, plugins: StartDependencies) {} | ||
|
||
public stop() {} | ||
} |
15 changes: 15 additions & 0 deletions
15
x-pack/examples/ui_actions_enhanced_examples/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./target", | ||
"skipLibCheck": true | ||
}, | ||
"include": [ | ||
"index.ts", | ||
"public/**/*.ts", | ||
"public/**/*.tsx", | ||
"server/**/*.ts", | ||
"../../typings/**/*", | ||
], | ||
"exclude": [] | ||
} |