Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into np/fix-maybe-object
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Feb 11, 2020
2 parents 30eb505 + e7773f2 commit e4acae9
Show file tree
Hide file tree
Showing 619 changed files with 16,782 additions and 12,323 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@
# Canvas
/x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas

# Logs & Metrics UI
# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/legacy/plugins/integrations_manager/ @elastic/epm
/x-pack/plugins/observability/ @elastic/logs-metrics-ui @elastic/apm-ui @elastic/uptime @elastic/ingest

# Machine Learning
/x-pack/legacy/plugins/ml/ @elastic/ml-ui
Expand Down
10 changes: 3 additions & 7 deletions docs/developer/plugin/development-plugin-resources.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

Here are some resources that are helpful for getting started with plugin development.

[float]
==== Our IRC channel
Many Kibana developers hang out on `irc.freenode.net` in the `#kibana` channel. We *want* to help you with plugin development. Even more than that, we *want your help* in understanding your plugin goals, so we can build a great plugin system for you! If you've never used IRC, welcome to the fun. You can get started with the http://webchat.freenode.net/?channels=kibana[Freenode Web Client].

[float]
==== Some light reading
Our {repo}blob/master/CONTRIBUTING.md[contributing guide] can help you get a development environment going.
Expand Down Expand Up @@ -50,7 +46,7 @@ You're welcome to use these components, but be aware that they are rapidly evolv

[float]
==== TypeScript Support
Plugin code can be written in http://www.typescriptlang.org/[TypeScript] if desired.
Plugin code can be written in http://www.typescriptlang.org/[TypeScript] if desired.
To enable TypeScript support, create a `tsconfig.json` file at the root of your plugin that looks something like this:

["source","js"]
Expand All @@ -67,6 +63,6 @@ To enable TypeScript support, create a `tsconfig.json` file at the root of your
}
-----------

TypeScript code is automatically converted into JavaScript during development,
but not in the distributable version of Kibana. If you use the
TypeScript code is automatically converted into JavaScript during development,
but not in the distributable version of Kibana. If you use the
{repo}blob/{branch}/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin, then your `.ts` and `.tsx` files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of Kibana.
6 changes: 4 additions & 2 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ might increase the search time. This setting is off by default. Users must opt-i
[horizontal]
`siem:defaultAnomalyScore`:: The threshold above which Machine Learning job anomalies are displayed in the SIEM app.
`siem:defaultIndex`:: A comma-delimited list of Elasticsearch indices from which the SIEM app collects events.
`siem:enableNewsFeed`:: Enables the News feed
`siem:newsFeedUrl`:: News feed content will be retrieved from this URL
`siem:enableNewsFeed`:: Enables the security news feed on the SIEM *Overview*
page.
`siem:newsFeedUrl`:: The URL from which the security news feed content is
retrieved.
`siem:refreshIntervalDefaults`:: The default refresh interval for the SIEM time filter, in milliseconds.
`siem:timeDefaults`:: The default period of time in the SIEM time filter.

Expand Down
3 changes: 2 additions & 1 deletion docs/siem/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ https://www.elastic.co/products/beats/packetbeat[{packetbeat}]
send security events and other data to Elasticsearch.

The default index patterns for SIEM events are `auditbeat-*`, `winlogbeat-*`,
`filebeat-*`, `endgame-*`, and `packetbeat-*``. You can change the default index patterns in
`filebeat-*`, `packetbeat-*`, `endgame-*`, and `apm-*-transaction*`. You can
change the default index patterns in
*Kibana > Management > Advanced Settings > siem:defaultIndex*.

[float]
Expand Down
8 changes: 8 additions & 0 deletions examples/ui_action_examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Ui actions examples

These ui actions examples shows how to:
- Register new actions
- Register custom triggers
- Attach an action to a trigger

To run this example, use the command `yarn start --run-examples`.
10 changes: 10 additions & 0 deletions examples/ui_action_examples/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "uiActionsExamples",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_examples"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions"],
"optionalPlugins": []
}
17 changes: 17 additions & 0 deletions examples/ui_action_examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "ui_actions_examples",
"version": "1.0.0",
"main": "target/examples/ui_actions_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.5.3"
}
}
43 changes: 43 additions & 0 deletions examples/ui_action_examples/public/hello_world_action.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { EuiText, EuiModalBody, EuiButton } from '@elastic/eui';
import { OverlayStart } from '../../../src/core/public';
import { createAction } from '../../../src/plugins/ui_actions/public';
import { toMountPoint } from '../../../src/plugins/kibana_react/public';

export const HELLO_WORLD_ACTION_TYPE = 'HELLO_WORLD_ACTION_TYPE';

export const createHelloWorldAction = (openModal: OverlayStart['openModal']) =>
createAction<{}>({
type: HELLO_WORLD_ACTION_TYPE,
getDisplayName: () => 'Hello World!',
execute: async () => {
const overlay = openModal(
toMountPoint(
<EuiModalBody>
<EuiText data-test-subj="helloWorldActionText">Hello world!</EuiText>
<EuiButton data-test-subj="closeModal" onClick={() => overlay.close()}>
Close
</EuiButton>
</EuiModalBody>
)
);
},
});
28 changes: 28 additions & 0 deletions examples/ui_action_examples/public/hello_world_trigger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { Trigger } from '../../../src/plugins/ui_actions/public';
import { HELLO_WORLD_ACTION_TYPE } from './hello_world_action';

export const HELLO_WORLD_TRIGGER_ID = 'HELLO_WORLD_TRIGGER_ID';

export const helloWorldTrigger: Trigger = {
id: HELLO_WORLD_TRIGGER_ID,
actionIds: [HELLO_WORLD_ACTION_TYPE],
};
26 changes: 26 additions & 0 deletions examples/ui_action_examples/public/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { UiActionExamplesPlugin } from './plugin';
import { PluginInitializer } from '../../../src/core/public';

export const plugin: PluginInitializer<void, void> = () => new UiActionExamplesPlugin();

export { HELLO_WORLD_TRIGGER_ID } from './hello_world_trigger';
export { HELLO_WORLD_ACTION_TYPE } from './hello_world_action';
45 changes: 45 additions & 0 deletions examples/ui_action_examples/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public';
import { UiActionsSetup, UiActionsStart } from '../../../src/plugins/ui_actions/public';
import { createHelloWorldAction } from './hello_world_action';
import { helloWorldTrigger } from './hello_world_trigger';

interface UiActionExamplesSetupDependencies {
uiActions: UiActionsSetup;
}

interface UiActionExamplesStartDependencies {
uiActions: UiActionsStart;
}

export class UiActionExamplesPlugin
implements
Plugin<void, void, UiActionExamplesSetupDependencies, UiActionExamplesStartDependencies> {
public setup(core: CoreSetup, deps: UiActionExamplesSetupDependencies) {
deps.uiActions.registerTrigger(helloWorldTrigger);
}

public start(coreStart: CoreStart, deps: UiActionExamplesStartDependencies) {
deps.uiActions.registerAction(createHelloWorldAction(coreStart.overlays.openModal));
}

public stop() {}
}
15 changes: 15 additions & 0 deletions examples/ui_action_examples/tsconfig.json
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": []
}
8 changes: 8 additions & 0 deletions examples/ui_actions_explorer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Ui actions explorer

This example ui actions explorer app shows how to:
- Add custom ui actions to existing triggers
- Add custom triggers


To run this example, use the command `yarn start --run-examples`.
10 changes: 10 additions & 0 deletions examples/ui_actions_explorer/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "uiActionsExplorer",
"version": "0.0.1",
"kibanaVersion": "kibana",
"configPath": ["ui_actions_explorer"],
"server": false,
"ui": true,
"requiredPlugins": ["uiActions", "uiActionsExamples"],
"optionalPlugins": []
}
17 changes: 17 additions & 0 deletions examples/ui_actions_explorer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "ui_actions_explorer",
"version": "1.0.0",
"main": "target/examples/ui_actions_explorer",
"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.5.3"
}
}
Loading

0 comments on commit e4acae9

Please sign in to comment.