Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yctercero/kibana into all-exc-view
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Jun 4, 2020
2 parents c24c1ff + 1346b15 commit 8b91e10
Show file tree
Hide file tree
Showing 3,445 changed files with 16,258 additions and 12,542 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def handleIngestion(timestamp) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaCoverage.prokLinks("### Process HTML Links")
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.generateReports("### Merge coverage reports")
kibanaCoverage.uploadCombinedReports()
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo "Creating bootstrap_cache archive"
# archive cacheable directories
mkdir -p "$HOME/.kibana/bootstrap_cache"
tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
x-pack/legacy/plugins/reporting/.chromium \
x-pack/plugins/reporting/.chromium \
.es \
.chromedriver \
.geckodriver;
Expand Down
10 changes: 5 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,11 @@ module.exports = {
},

/**
* SIEM overrides
* Security Solution overrides
*/
{
// front end typescript and javascript files only
files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'],
files: ['x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}'],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
Expand All @@ -605,7 +605,7 @@ module.exports = {
},
{
// typescript only for front and back end
files: ['x-pack/{,legacy/}plugins/siem/**/*.{ts,tsx}'],
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'],
rules: {
// This will be turned on after bug fixes are complete
// '@typescript-eslint/explicit-member-accessibility': 'warn',
Expand Down Expand Up @@ -640,7 +640,7 @@ module.exports = {
// {
// // will introduced after the other warns are fixed
// // typescript and javascript for front end react performance
// files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,ts,tsx}'],
// plugins: ['react-perf'],
// rules: {
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
Expand All @@ -651,7 +651,7 @@ module.exports = {
// },
{
// typescript and javascript for front and back end
files: ['x-pack/{,legacy/}plugins/siem/**/*.{js,ts,tsx}'],
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,ts,tsx}'],
plugins: ['eslint-plugin-node', 'react'],
env: {
mocha: true,
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem

# SIEM
/x-pack/plugins/siem/ @elastic/siem @elastic/endpoint-app-team
# Security Solution
/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/siem @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team

# Security Intelligence And Analytics
/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true) {
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'),
'xpack-siemCypress': { processNumber ->
whenChanged(['x-pack/plugins/siem/', 'x-pack/test/siem_cypress/']) {
kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber)
'xpack-securitySolutionCypress': { processNumber ->
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) {
kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
}
},

Expand Down
39 changes: 33 additions & 6 deletions docs/apm/deployment-annotations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,40 @@
++++

For enhanced visibility into your deployments, we offer deployment annotations on all transaction charts.
This feature automatically tags new deployments, so you can easily see if your deploy has increased response times
for an end-user, or if the memory/CPU footprint of your application has changed.
Being able to identify bad deployments quickly enables you to rollback and fix issues without causing costly outages.
This feature enables you to easily determine if your deployment has increased response times for an end-user,
or if the memory/CPU footprint of your application has changed.
Being able to quickly identify bad deployments enables you to rollback and fix issues without causing costly outages.

By default, automatic deployment annotations are enabled.
This means the APM app will create an annotation on your data when the `service.version` of your application changes.

Alternatively, you can explicitly create deployment annotations with our annotation API.
The API can integrate into your CI/CD pipeline,
so that each time you deploy, a POST request is sent to the annotation API endpoint:

[source,console]
----
curl -X POST \
http://localhost:5601/api/apm/services/${SERVICE_NAME}/annotation \ <1>
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-H 'Authorization: Basic ${API_KEY}' \ <2>
-d '{
"@timestamp": "${DEPLOY_TIME}", <3>
"service": {
"version": "${SERVICE_VERSION}" <4>
},
"message": "${MESSAGE}" <5>
}'
----
<1> The `service.name` of your application
<2> An APM app API key with sufficient privileges
<3> The time of the deployment
<4> The `service.version` to be displayed in the annotation
<5> A custom message to be displayed in the annotation

See the <<apm-annotation-api,annotation API>> reference for more information.

Deployment annotations are enabled by default, and can be created with the <<apm-annotation-api,annotation API>>.
If there are no created annotations for the selected time period,
the APM app will automatically annotate your data if the `service.version` of your application changes.

NOTE: If custom annotations have been created for the selected time period, any derived annotations, i.e., those created automatically when `service.version` changes, will not be shown.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Constructs a new instance of the `DataPublicPlugin` class
<b>Signature:</b>

```typescript
constructor(initializerContext: PluginInitializerContext);
constructor(initializerContext: PluginInitializerContext<ConfigSchema>);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| initializerContext | <code>PluginInitializerContext</code> | |
| initializerContext | <code>PluginInitializerContext&lt;ConfigSchema&gt;</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<b>Signature:</b>

```typescript
export declare function plugin(initializerContext: PluginInitializerContext): DataPublicPlugin;
export declare function plugin(initializerContext: PluginInitializerContext<ConfigSchema>): DataPublicPlugin;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| initializerContext | <code>PluginInitializerContext</code> | |
| initializerContext | <code>PluginInitializerContext&lt;ConfigSchema&gt;</code> | |

<b>Returns:</b>

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

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [config](./kibana-plugin-plugins-data-server.config.md)

## config variable

<b>Signature:</b>

```typescript
config: PluginConfigDescriptor<ConfigSchema>
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
| Variable | Description |
| --- | --- |
| [castEsToKbnFieldTypeName](./kibana-plugin-plugins-data-server.castestokbnfieldtypename.md) | Get the KbnFieldType name for an esType string |
| [config](./kibana-plugin-plugins-data-server.config.md) | |
| [esFilters](./kibana-plugin-plugins-data-server.esfilters.md) | |
| [esKuery](./kibana-plugin-plugins-data-server.eskuery.md) | |
| [esQuery](./kibana-plugin-plugins-data-server.esquery.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Constructs a new instance of the `DataServerPlugin` class
<b>Signature:</b>

```typescript
constructor(initializerContext: PluginInitializerContext);
constructor(initializerContext: PluginInitializerContext<ConfigSchema>);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| initializerContext | <code>PluginInitializerContext</code> | |
| initializerContext | <code>PluginInitializerContext&lt;ConfigSchema&gt;</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Static code to be shared externally
<b>Signature:</b>

```typescript
export declare function plugin(initializerContext: PluginInitializerContext): DataServerPlugin;
export declare function plugin(initializerContext: PluginInitializerContext<ConfigSchema>): DataServerPlugin;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| initializerContext | <code>PluginInitializerContext</code> | |
| initializerContext | <code>PluginInitializerContext&lt;ConfigSchema&gt;</code> | |

<b>Returns:</b>

Expand Down
9 changes: 9 additions & 0 deletions packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ module.exports = {
from: 'react-router',
to: 'react-router-dom',
},
{
from: '@kbn/ui-shared-deps/monaco',
to: '@kbn/monaco',
},
{
from: 'monaco-editor',
to: false,
disallowedMessage: `Don't import monaco directly, use or add exports to @kbn/monaco`
},
],
],
},
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-monaco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @kbn/monaco

A customized version of monaco that is automatically configured the way we want it to be when imported as `@kbn/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@kbn/ui-shared-deps`.

Includes custom xjson language support. The `es_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless.
27 changes: 27 additions & 0 deletions packages/kbn-monaco/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@kbn/monaco",
"version": "1.0.0",
"private": true,
"main": "./target/index.js",
"license": "Apache-2.0",
"scripts": {
"build": "node ./scripts/build.js",
"kbn:bootstrap": "yarn build --dev"
},
"dependencies": {
"regenerator-runtime": "^0.13.3",
"monaco-editor": "~0.17.0"
},
"devDependencies": {
"@kbn/babel-preset": "1.0.0",
"@kbn/dev-utils": "1.0.0",
"babel-loader": "^8.0.6",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"raw-loader": "3.1.0",
"supports-color": "^7.0.0",
"typescript": "3.7.2",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
}
}
64 changes: 64 additions & 0 deletions packages/kbn-monaco/scripts/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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.
*/

const path = require('path');
const del = require('del');
const supportsColor = require('supports-color');
const { run } = require('@kbn/dev-utils');

const TARGET_BUILD_DIR = path.resolve(__dirname, '../target');
const ROOT_DIR = path.resolve(__dirname, '../');
const WEBPACK_CONFIG_PATH = path.resolve(ROOT_DIR, 'webpack.config.js');

run(
async ({ procRunner, log, flags }) => {
log.info('Deleting old output');

await del(TARGET_BUILD_DIR);

const cwd = ROOT_DIR;
const env = { ...process.env };
if (supportsColor.stdout) {
env.FORCE_COLOR = 'true';
}

await procRunner.run('worker', {
cmd: 'webpack',
args: ['--config', WEBPACK_CONFIG_PATH, flags.dev ? '--env.dev' : '--env.prod'],
wait: true,
env,
cwd,
});

await procRunner.run('tsc ', {
cmd: 'tsc',
args: [],
wait: true,
env,
cwd,
});

log.success('Complete');
},
{
flags: {
boolean: ['dev'],
},
}
);
25 changes: 25 additions & 0 deletions packages/kbn-monaco/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* 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.
*/

export { monaco } from './monaco';
export { XJsonLang } from './xjson';

/* eslint-disable-next-line @kbn/eslint/module_migration */
import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api';
export { BarePluginApi };
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

/* eslint-disable @kbn/eslint/module_migration */

import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';

import 'monaco-editor/esm/vs/base/common/worker/simpleWorker';
Expand Down
28 changes: 28 additions & 0 deletions packages/kbn-monaco/src/xjson/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# README

This folder contains the language definitions for XJSON used by the Monaco editor.

## Summary of contents

Note: All source code.

### ./worker

The worker proxy and worker instantiation code used in both the main thread and the worker thread.

### ./lexer_rules

Contains the Monarch-specific language tokenization rules for XJSON. Each set of rules registers itself against monaco.

### ./constants.ts

Contains the unique language ID.

### ./language

Takes care of global setup steps for the language (like registering it against Monaco) and exports a way to load up
the grammar parser.

### ./worker_proxy_service

A stateful mechanism for holding a reference to the Monaco-provided proxy getter.
Loading

0 comments on commit 8b91e10

Please sign in to comment.