Skip to content

Commit

Permalink
Merge branch 'master' into alerting/instance-pagination
Browse files Browse the repository at this point in the history
* master:
  add `absolute` option to `getUrlForApp` (elastic#57193)
  [Telemetry] Migrate public to NP (elastic#56285)
  address flaky test where instances might have different start… (elastic#57506)
  fix(NA): support legacy plugins path in plugins (elastic#57472)
  build immutable bundles for new platform plugins (elastic#53976)
  [SIEM] [Detection Engine] Reject if duplicate rule_id in request payload (elastic#57057)
  Add autocomplete="off" for input type="password" to appease the scanners (elastic#56922)
  Use default spaces suffix for signals index if spaces disabled (elastic#57244)
  [Alerting] Create alert design cleanup (elastic#56929)
  • Loading branch information
gmmorris committed Feb 13, 2020
2 parents 6ca3826 + 26ad756 commit ddeb7a3
Show file tree
Hide file tree
Showing 306 changed files with 13,576 additions and 5,794 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[production]
last 2 versions
> 5%
Safari 7 # for PhantomJS support: https://github.com/elastic/kibana/issues/27136

[dev]
last 1 chrome versions
last 1 firefox versions
last 1 safari versions
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
/packages/*babel*/ @elastic/kibana-operations
/packages/kbn-dev-utils*/ @elastic/kibana-operations
/packages/kbn-es/ @elastic/kibana-operations
/packages/kbn-optimizer/ @elastic/kibana-operations
/packages/kbn-pm/ @elastic/kibana-operations
/packages/kbn-test/ @elastic/kibana-operations
/packages/kbn-ui-shared-deps/ @elastic/kibana-operations
Expand Down
5 changes: 4 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"savedObjects": "src/plugins/saved_objects",
"server": "src/legacy/server",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": "src/legacy/core_plugins/telemetry",
"telemetry": [
"src/legacy/core_plugins/telemetry",
"src/plugins/telemetry"
],
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion", "src/plugins/timelion"],
"uiActions": "src/plugins/ui_actions",
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; [ApplicationStart](./kibana-plugin-public.applicationstart.md) &gt; [currentAppId$](./kibana-plugin-public.applicationstart.currentappid_.md)

## ApplicationStart.currentAppId$ property

An observable that emits the current application id and each subsequent id update.

<b>Signature:</b>

```typescript
currentAppId$: Observable<string | undefined>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

## ApplicationStart.getUrlForApp() method

Returns a relative URL to a given app, including the global base path.
Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the `absolute` option to generate an absolute url (http://host:port/basePath/app/my-app)

Note that when generating absolute urls, the protocol, host and port are determined from the browser location.

<b>Signature:</b>

```typescript
getUrlForApp(appId: string, options?: {
path?: string;
absolute?: boolean;
}): string;
```

Expand All @@ -19,7 +22,7 @@ getUrlForApp(appId: string, options?: {
| Parameter | Type | Description |
| --- | --- | --- |
| appId | <code>string</code> | |
| options | <code>{</code><br/><code> path?: string;</code><br/><code> }</code> | |
| options | <code>{</code><br/><code> path?: string;</code><br/><code> absolute?: boolean;</code><br/><code> }</code> | |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ export interface ApplicationStart
| Property | Type | Description |
| --- | --- | --- |
| [capabilities](./kibana-plugin-public.applicationstart.capabilities.md) | <code>RecursiveReadonly&lt;Capabilities&gt;</code> | Gets the read-only capabilities. |
| [currentAppId$](./kibana-plugin-public.applicationstart.currentappid_.md) | <code>Observable&lt;string &#124; undefined&gt;</code> | An observable that emits the current application id and each subsequent id update. |

## Methods

| Method | Description |
| --- | --- |
| [getUrlForApp(appId, options)](./kibana-plugin-public.applicationstart.geturlforapp.md) | Returns a relative URL to a given app, including the global base path. |
| [getUrlForApp(appId, options)](./kibana-plugin-public.applicationstart.geturlforapp.md) | Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the <code>absolute</code> option to generate an absolute url (http://host:port/basePath/app/my-app)<!-- -->Note that when generating absolute urls, the protocol, host and port are determined from the browser location. |
| [navigateToApp(appId, options)](./kibana-plugin-public.applicationstart.navigatetoapp.md) | Navigate to a given app |
| [registerMountContext(contextName, provider)](./kibana-plugin-public.applicationstart.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices()](./kibana-plugin-public.coresetup.getstartservices.md)<!-- -->. |

27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@
"@kbn/test-subj-selector": "0.2.1",
"@kbn/ui-framework": "1.0.0",
"@kbn/ui-shared-deps": "1.0.0",
"@types/flot": "^0.0.31",
"@types/json-stable-stringify": "^1.0.32",
"@types/lodash.clonedeep": "^4.5.4",
"@types/node-forge": "^0.9.0",
"@types/react-grid-layout": "^0.16.7",
"@types/recompose": "^0.30.5",
"JSONStream": "1.3.5",
"abort-controller": "^3.0.0",
"angular": "^1.7.9",
Expand All @@ -152,11 +146,12 @@
"angular-route": "^1.7.9",
"angular-sanitize": "^1.7.9",
"angular-sortable-view": "^0.0.17",
"autoprefixer": "9.6.1",
"autoprefixer": "^9.7.4",
"babel-loader": "^8.0.6",
"bluebird": "3.5.5",
"boom": "^7.2.0",
"brace": "0.11.1",
"browserslist-useragent": "^3.0.2",
"cache-loader": "^4.1.0",
"chalk": "^2.4.2",
"check-disk-space": "^2.1.0",
Expand All @@ -165,7 +160,7 @@
"commander": "3.0.2",
"compare-versions": "3.5.1",
"core-js": "^3.2.1",
"css-loader": "2.1.1",
"css-loader": "^3.4.2",
"d3": "3.5.17",
"d3-cloud": "1.2.5",
"deep-freeze-strict": "^1.1.1",
Expand Down Expand Up @@ -226,7 +221,7 @@
"opn": "^5.5.0",
"oppsy": "^2.0.0",
"pegjs": "0.10.0",
"postcss-loader": "3.0.0",
"postcss-loader": "^3.0.0",
"prop-types": "15.6.0",
"proxy-from-env": "1.0.0",
"pug": "^2.0.4",
Expand Down Expand Up @@ -259,7 +254,7 @@
"seedrandom": "^3.0.5",
"semver": "^5.5.0",
"style-it": "^2.1.3",
"style-loader": "0.23.1",
"style-loader": "^1.1.3",
"symbol-observable": "^1.2.0",
"tar": "4.4.13",
"terser-webpack-plugin": "^2.3.4",
Expand All @@ -279,7 +274,7 @@
"vega-schema-url-parser": "1.0.0",
"vega-tooltip": "^0.12.0",
"vision": "^5.3.3",
"webpack": "4.41.0",
"webpack": "^4.41.5",
"webpack-merge": "4.2.2",
"whatwg-fetch": "^3.0.0",
"wrapper-webpack-plugin": "^2.1.0",
Expand All @@ -300,6 +295,7 @@
"@kbn/eslint-plugin-eslint": "1.0.0",
"@kbn/expect": "1.0.0",
"@kbn/plugin-generator": "1.0.0",
"@kbn/optimizer": "1.0.0",
"@kbn/test": "1.0.0",
"@kbn/utility-types": "1.0.0",
"@microsoft/api-documenter": "7.7.2",
Expand All @@ -312,6 +308,7 @@
"@types/babel__core": "^7.1.2",
"@types/bluebird": "^3.1.1",
"@types/boom": "^7.2.0",
"@types/browserslist-useragent": "^3.0.0",
"@types/chance": "^1.0.0",
"@types/cheerio": "^0.22.10",
"@types/chromedriver": "^2.38.0",
Expand All @@ -324,6 +321,7 @@
"@types/enzyme": "^3.9.0",
"@types/eslint": "^6.1.3",
"@types/fetch-mock": "^7.3.1",
"@types/flot": "^0.0.31",
"@types/getopts": "^2.0.1",
"@types/glob": "^7.1.1",
"@types/globby": "^8.0.0",
Expand All @@ -337,17 +335,20 @@
"@types/joi": "^13.4.2",
"@types/jquery": "^3.3.31",
"@types/js-yaml": "^3.11.1",
"@types/json-stable-stringify": "^1.0.32",
"@types/json5": "^0.0.30",
"@types/license-checker": "15.0.0",
"@types/listr": "^0.14.0",
"@types/lodash": "^3.10.1",
"@types/lodash.clonedeep": "^4.5.4",
"@types/lru-cache": "^5.1.0",
"@types/markdown-it": "^0.0.7",
"@types/minimatch": "^2.0.29",
"@types/mocha": "^5.2.7",
"@types/moment-timezone": "^0.5.12",
"@types/mustache": "^0.8.31",
"@types/node": "^10.12.27",
"@types/node-forge": "^0.9.0",
"@types/numeral": "^0.0.26",
"@types/opn": "^5.1.0",
"@types/pegjs": "^0.10.1",
Expand All @@ -357,11 +358,13 @@
"@types/reach__router": "^1.2.6",
"@types/react": "^16.9.11",
"@types/react-dom": "^16.9.4",
"@types/react-grid-layout": "^0.16.7",
"@types/react-redux": "^6.0.6",
"@types/react-resize-detector": "^4.0.1",
"@types/react-router": "^5.1.3",
"@types/react-router-dom": "^5.1.3",
"@types/react-virtualized": "^9.18.7",
"@types/recompose": "^0.30.6",
"@types/redux": "^3.6.31",
"@types/redux-actions": "^2.6.1",
"@types/request": "^2.48.2",
Expand Down Expand Up @@ -461,7 +464,7 @@
"pixelmatch": "^5.1.0",
"pkg-up": "^2.0.0",
"pngjs": "^3.4.0",
"postcss": "^7.0.5",
"postcss": "^7.0.26",
"postcss-url": "^8.0.0",
"prettier": "^1.19.1",
"proxyquire": "1.8.0",
Expand Down
7 changes: 1 addition & 6 deletions packages/kbn-dev-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
*/

export { withProcRunner, ProcRunner } from './proc_runner';
export {
ToolingLog,
ToolingLogTextWriter,
pickLevelFromFlags,
ToolingLogCollectingWriter,
} from './tooling_log';
export * from './tooling_log';
export { createAbsolutePathSerializer } from './serializers';
export {
CA_CERT_PATH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
* under the License.
*/

export function createAbsolutePathSerializer(rootPath: string) {
import { REPO_ROOT } from '../repo_root';

export function createAbsolutePathSerializer(rootPath: string = REPO_ROOT) {
return {
print: (value: string) => value.replace(rootPath, '<absolute path>').replace(/\\/g, '/'),
test: (value: any) => typeof value === 'string' && value.startsWith(rootPath),
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-dev-utils/src/tooling_log/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

export { ToolingLog } from './tooling_log';
export { ToolingLogTextWriter, ToolingLogTextWriterConfig } from './tooling_log_text_writer';
export { pickLevelFromFlags, LogLevel } from './log_levels';
export { pickLevelFromFlags, parseLogLevel, LogLevel } from './log_levels';
export { ToolingLogCollectingWriter } from './tooling_log_collecting_writer';
24 changes: 15 additions & 9 deletions packages/kbn-dev-utils/src/tooling_log/tooling_log_text_writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,28 @@ export class ToolingLogTextWriter implements Writer {
}
}

write({ type, indent, args }: Message) {
if (!shouldWriteType(this.level, type)) {
write(msg: Message) {
if (!shouldWriteType(this.level, msg.type)) {
return false;
}

const txt = type === 'error' ? stringifyError(args[0]) : format(args[0], ...args.slice(1));
const prefix = has(MSG_PREFIXES, type) ? MSG_PREFIXES[type] : '';
const prefix = has(MSG_PREFIXES, msg.type) ? MSG_PREFIXES[msg.type] : '';
ToolingLogTextWriter.write(this.writeTo, prefix, msg);
return true;
}

static write(writeTo: ToolingLogTextWriter['writeTo'], prefix: string, msg: Message) {
const txt =
msg.type === 'error'
? stringifyError(msg.args[0])
: format(msg.args[0], ...msg.args.slice(1));

(prefix + txt).split('\n').forEach((line, i) => {
let lineIndent = '';

if (indent > 0) {
if (msg.indent > 0) {
// if we are indenting write some spaces followed by a symbol
lineIndent += ' '.repeat(indent - 1);
lineIndent += ' '.repeat(msg.indent - 1);
lineIndent += line.startsWith('-') ? '└' : '│';
}

Expand All @@ -105,9 +113,7 @@ export class ToolingLogTextWriter implements Writer {
lineIndent += PREFIX_INDENT;
}

this.writeTo.write(`${lineIndent}${line}\n`);
writeTo.write(`${lineIndent}${line}\n`);
});

return true;
}
}
2 changes: 1 addition & 1 deletion packages/kbn-eslint-import-resolver-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"glob-all": "^3.1.0",
"lru-cache": "^4.1.5",
"resolve": "^1.7.1",
"webpack": "^4.41.0"
"webpack": "^4.41.5"
}
}
10 changes: 5 additions & 5 deletions packages/kbn-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
"@kbn/dev-utils": "1.0.0",
"babel-loader": "^8.0.6",
"copy-webpack-plugin": "^5.0.4",
"css-loader": "2.1.1",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"getopts": "^2.2.4",
"pegjs": "0.10.0",
"sass-loader": "^7.3.1",
"style-loader": "0.23.1",
"sass-loader": "^8.0.2",
"style-loader": "^1.1.3",
"supports-color": "^7.0.0",
"url-loader": "2.2.0",
"webpack": "4.41.0",
"webpack-cli": "^3.3.9"
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
}
}
Loading

0 comments on commit ddeb7a3

Please sign in to comment.