() => {`` warnLegacyBrowsers: boolean;`` }
| |
| [getInjectedVar](./kibana-plugin-public.injectedmetadatasetup.getinjectedvar.md) | (name: string, defaultValue?: any) => unknown
| |
| [getInjectedVars](./kibana-plugin-public.injectedmetadatasetup.getinjectedvars.md) | () => {`` [key: string]: unknown;`` }
| |
+| [getKibanaBuildNumber](./kibana-plugin-public.injectedmetadatasetup.getkibanabuildnumber.md) | () => number
| |
| [getKibanaVersion](./kibana-plugin-public.injectedmetadatasetup.getkibanaversion.md) | () => string
| |
| [getLegacyMetadata](./kibana-plugin-public.injectedmetadatasetup.getlegacymetadata.md) | () => {`` app: unknown;`` translations: unknown;`` bundleId: string;`` nav: LegacyNavLink[];`` version: string;`` branch: string;`` buildNum: number;`` buildSha: string;`` basePath: string;`` serverName: string;`` devMode: boolean;`` uiSettings: {`` defaults: UiSettingsState;`` user?: UiSettingsState | undefined;`` };`` }
| |
| [getPlugins](./kibana-plugin-public.injectedmetadatasetup.getplugins.md) | () => Array<{`` id: string;`` plugin: DiscoveredPlugin;`` }>
| An array of frontend plugins in topological order. |
diff --git a/docs/development/core/server/kibana-plugin-server.kibanarequest.md b/docs/development/core/server/kibana-plugin-server.kibanarequest.md
index d423cfb5f4dea..f7f7707b5657e 100644
--- a/docs/development/core/server/kibana-plugin-server.kibanarequest.md
+++ b/docs/development/core/server/kibana-plugin-server.kibanarequest.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export declare class KibanaRequeststatic
| Factory for creating requests. Validates the request before creating an instance of a KibanaRequest. |
| [getFilteredHeaders(headersToKeep)](./kibana-plugin-server.kibanarequest.getfilteredheaders.md) | | |
+| [unstable\_getIncomingMessage()](./kibana-plugin-server.kibanarequest.unstable_getincomingmessage.md) | | |
diff --git a/docs/development/core/server/kibana-plugin-server.kibanarequest.unstable_getincomingmessage.md b/docs/development/core/server/kibana-plugin-server.kibanarequest.unstable_getincomingmessage.md
new file mode 100644
index 0000000000000..d4f3c1b54a6cd
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.kibanarequest.unstable_getincomingmessage.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [KibanaRequest](./kibana-plugin-server.kibanarequest.md) > [unstable\_getIncomingMessage](./kibana-plugin-server.kibanarequest.unstable_getincomingmessage.md)
+
+## KibanaRequest.unstable\_getIncomingMessage() method
+
+Signature:
+
+```typescript
+unstable_getIncomingMessage(): import("http").IncomingMessage;
+```
+Returns:
+
+`import("http").IncomingMessage`
+
diff --git a/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.md b/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.md
index cd88ef8fc5dda..e6a79a13dd436 100644
--- a/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.md
+++ b/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.md
@@ -19,4 +19,5 @@ export interface OnRequestToolkit
| [next](./kibana-plugin-server.onrequesttoolkit.next.md) | () => OnRequestResult
| To pass request to the next handler |
| [redirected](./kibana-plugin-server.onrequesttoolkit.redirected.md) | (url: string) => OnRequestResult
| To interrupt request handling and redirect to a configured url |
| [rejected](./kibana-plugin-server.onrequesttoolkit.rejected.md) | (error: Error, options?: {`` statusCode?: number;`` }) => OnRequestResult
| Fail the request with specified error. |
+| [setUrl](./kibana-plugin-server.onrequesttoolkit.seturl.md) | (newUrl: string | Url) => void
| Change url for an incoming request. |
diff --git a/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.seturl.md b/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.seturl.md
new file mode 100644
index 0000000000000..0f20cbdb18d96
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.onrequesttoolkit.seturl.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [OnRequestToolkit](./kibana-plugin-server.onrequesttoolkit.md) > [setUrl](./kibana-plugin-server.onrequesttoolkit.seturl.md)
+
+## OnRequestToolkit.setUrl property
+
+Change url for an incoming request.
+
+Signature:
+
+```typescript
+setUrl: (newUrl: string | Url) => void;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.http.md b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.http.md
index 65acef7b54774..0ca7fa2a88294 100644
--- a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.http.md
+++ b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.http.md
@@ -10,5 +10,7 @@
http: {
registerAuth: HttpServiceSetup['registerAuth'];
registerOnRequest: HttpServiceSetup['registerOnRequest'];
+ getBasePathFor: HttpServiceSetup['getBasePathFor'];
+ setBasePathFor: HttpServiceSetup['setBasePathFor'];
};
```
diff --git a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md
index 4aa13c2cda9f1..8878edb18230f 100644
--- a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md
+++ b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md
@@ -17,5 +17,5 @@ export interface PluginSetupContext
| Property | Type | Description |
| --- | --- | --- |
| [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md) | {`` adminClient$: Observable<ClusterClient>;`` dataClient$: Observable<ClusterClient>;`` }
| |
-| [http](./kibana-plugin-server.pluginsetupcontext.http.md) | {`` registerAuth: HttpServiceSetup['registerAuth'];`` registerOnRequest: HttpServiceSetup['registerOnRequest'];`` }
| |
+| [http](./kibana-plugin-server.pluginsetupcontext.http.md) | {`` registerAuth: HttpServiceSetup['registerAuth'];`` registerOnRequest: HttpServiceSetup['registerOnRequest'];`` getBasePathFor: HttpServiceSetup['getBasePathFor'];`` setBasePathFor: HttpServiceSetup['setBasePathFor'];`` }
| |
diff --git a/package.json b/package.json
index f92c6a0af54e1..7fffad48ce437 100644
--- a/package.json
+++ b/package.json
@@ -103,6 +103,7 @@
"@babel/core": "^7.3.4",
"@babel/polyfill": "^7.2.5",
"@babel/register": "^7.0.0",
+ "@elastic/charts": "^3.11.2",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "10.4.0",
"@elastic/filesaver": "1.1.2",
@@ -124,7 +125,7 @@
"@types/recompose": "^0.30.5",
"JSONStream": "1.1.1",
"abortcontroller-polyfill": "^1.1.9",
- "angular": "npm:@elastic/angular@1.6.9-kibana.0",
+ "angular": "1.6.9",
"angular-aria": "1.6.6",
"angular-elastic": "2.5.0",
"angular-recursion": "^1.0.5",
diff --git a/src/core/public/core_system.test.ts b/src/core/public/core_system.test.ts
index 8db9a83081c17..b0d37f0103df0 100644
--- a/src/core/public/core_system.test.ts
+++ b/src/core/public/core_system.test.ts
@@ -131,13 +131,12 @@ describe('constructor', () => {
expect(FatalErrorsServiceConstructor).toHaveBeenCalledTimes(1);
- expect(FatalErrorsServiceConstructor).toHaveBeenLastCalledWith({
+ expect(FatalErrorsServiceConstructor).toHaveBeenLastCalledWith(
rootDomElement,
- injectedMetadata: MockInjectedMetadataService,
- stopCoreSystem: expect.any(Function),
- });
+ expect.any(Function)
+ );
- const [{ stopCoreSystem }] = FatalErrorsServiceConstructor.mock.calls[0];
+ const [, stopCoreSystem] = FatalErrorsServiceConstructor.mock.calls[0];
expect(coreSystem.stop).not.toHaveBeenCalled();
stopCoreSystem();
diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts
index 6ec62a4a14ff4..ccec571493b08 100644
--- a/src/core/public/core_system.ts
+++ b/src/core/public/core_system.ts
@@ -22,7 +22,7 @@ import './core.css';
import { CoreSetup, CoreStart } from '.';
import { BasePathService } from './base_path';
import { ChromeService } from './chrome';
-import { FatalErrorsService } from './fatal_errors';
+import { FatalErrorsService, FatalErrorsSetup } from './fatal_errors';
import { HttpService } from './http';
import { I18nService } from './i18n';
import { InjectedMetadataParams, InjectedMetadataService } from './injected_metadata';
@@ -69,6 +69,7 @@ export class CoreSystem {
private readonly rootDomElement: HTMLElement;
private readonly overlayTargetDomElement: HTMLDivElement;
+ private fatalErrorsSetup: FatalErrorsSetup | null = null;
constructor(params: Params) {
const {
@@ -87,12 +88,9 @@ export class CoreSystem {
injectedMetadata,
});
- this.fatalErrors = new FatalErrorsService({
- rootDomElement,
- injectedMetadata: this.injectedMetadata,
- stopCoreSystem: () => {
- this.stop();
- },
+ this.fatalErrors = new FatalErrorsService(rootDomElement, () => {
+ // Stop Core before rendering any fatal errors into the DOM
+ this.stop();
});
this.notifications = new NotificationsService();
@@ -115,11 +113,17 @@ export class CoreSystem {
public async setup() {
try {
+ // Setup FatalErrorsService and it's dependencies first so that we're
+ // able to render any errors.
const i18n = this.i18n.setup();
const injectedMetadata = this.injectedMetadata.setup();
- const fatalErrors = this.fatalErrors.setup({ i18n });
- const http = this.http.setup({ fatalErrors });
+ this.fatalErrorsSetup = this.fatalErrors.setup({ injectedMetadata, i18n });
const basePath = this.basePath.setup({ injectedMetadata });
+ const http = this.http.setup({
+ basePath,
+ injectedMetadata,
+ fatalErrors: this.fatalErrorsSetup,
+ });
const uiSettings = this.uiSettings.setup({
http,
injectedMetadata,
@@ -136,7 +140,7 @@ export class CoreSystem {
application,
basePath,
chrome,
- fatalErrors,
+ fatalErrors: this.fatalErrorsSetup,
http,
i18n,
injectedMetadata,
@@ -148,9 +152,15 @@ export class CoreSystem {
await this.plugins.setup(core);
await this.legacyPlatform.setup({ core });
- return { fatalErrors };
+ return { fatalErrors: this.fatalErrorsSetup };
} catch (error) {
- this.fatalErrors.add(error);
+ if (this.fatalErrorsSetup) {
+ this.fatalErrorsSetup.add(error);
+ } else {
+ // If the FatalErrorsService has not yet been setup, log error to console
+ // eslint-disable-next-line no-console
+ console.log(error);
+ }
}
}
@@ -191,7 +201,13 @@ export class CoreSystem {
await this.plugins.start(core);
await this.legacyPlatform.start({ core, targetDomElement: legacyPlatformTargetDomElement });
} catch (error) {
- this.fatalErrors.add(error);
+ if (this.fatalErrorsSetup) {
+ this.fatalErrorsSetup.add(error);
+ } else {
+ // If the FatalErrorsService has not yet been setup, log error to console
+ // eslint-disable-next-line no-console
+ console.error(error);
+ }
}
}
diff --git a/src/core/public/fatal_errors/__snapshots__/fatal_errors_service.test.ts.snap b/src/core/public/fatal_errors/__snapshots__/fatal_errors_service.test.ts.snap
index 59f3de3e2b907..df60b228972fc 100644
--- a/src/core/public/fatal_errors/__snapshots__/fatal_errors_service.test.ts.snap
+++ b/src/core/public/fatal_errors/__snapshots__/fatal_errors_service.test.ts.snap
@@ -1,32 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`#add() deletes all children of rootDomElement and renders = (
req: KibanaRequest
+ Take a screenshot of your element and upload it here. This can also be done after saving.
+
+ best element ever
+
+ Take a screenshot of your element and upload it here. This can also be done after saving.
+
+
+
+ Take a screenshot of your element and upload it here. This can also be done after saving.
+
+
+
+ Take a screenshot of your element and upload it here. This can also be done after saving.
+
+
+
+ Take a screenshot of your element and upload it here. This can also be done after
+ saving.
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lobortis aliquet arcu ut turpis duis.
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lobortis aliquet arcu ut turpis duis.
+
+ Ungroup (U) to edit individual element settings.
+
+ Save this group as a new element to re-use it throughout your workpad.
+
+ Multiple elements are currently selected.
+
+ Deselect these elements to edit their individual settings, press (G) to group them, or save this selection as a new element to re-use it throughout your workpad.
+ Ungroup (U) to edit individual element settings. Save this group as a new element to re-use it throughout your workpad. Ungroup (U) to edit individual element settings. Save this group as a new element to re-use it throughout your workpad. Multiple elements are currently selected.
- Deselect these elements to edit their individual settings, press (G) to group them, or save
- this selection as a new element to re-use it throughout your workpad.
- Multiple elements are currently selected.
+ Deselect these elements to edit their individual settings, press (G) to group them, or save
+ this selection as a new element to re-use it throughout your workpad.
+
- Take a screenshot of your element and upload it here. This can also be done
- after saving.
-
+
+
+ If you’d like to continuing using security, machine learning, and our other awesome Platinum features, request an extension now. If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now. If you’d like to continuing using security, machine learning, and our other awesome Platinum features, request an extension now. If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now. If you’d like to continuing using security, machine learning, and our other awesome Platinum features, request an extension now. If you’d like to continue using machine learning, advanced security, and our other awesome Platinum features, request an extension now. You’ll revert to our free features and lose access to security, machine learning and other Platinum features. You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features. You’ll revert to our free features and lose access to security, machine learning and other Platinum features. You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features. You’ll revert to our free features and lose access to security, machine learning and other Platinum features. You’ll revert to our free features and lose access to machine learning, advanced security, and other Platinum features. Experience what security, machine learning, and all our other Platinum features have to offer. Experience what machine learning, advanced security, and all our other Platinum features have to offer. Experience what security, machine learning, and all our other Platinum features have to offer. Experience what machine learning, advanced security, and all our other Platinum features have to offer. Experience what security, machine learning, and all our other Platinum features have to offer. Experience what machine learning, advanced security, and all our other Platinum features have to offer.
@@ -88,6 +80,41 @@ class ConfirmDeleteUI extends Component {
);
}
+
+ private deleteUsers = () => {
+ const { usersToDelete, callback, apiClient } = this.props;
+ const errors: string[] = [];
+ usersToDelete.forEach(async username => {
+ try {
+ await apiClient.deleteUser(username);
+ toastNotifications.addSuccess(
+ this.props.intl.formatMessage(
+ {
+ id:
+ 'xpack.security.management.users.confirmDelete.userSuccessfullyDeletedNotificationMessage',
+ defaultMessage: 'Deleted user {username}',
+ },
+ { username }
+ )
+ );
+ } catch (e) {
+ errors.push(username);
+ toastNotifications.addDanger(
+ this.props.intl.formatMessage(
+ {
+ id:
+ 'xpack.security.management.users.confirmDelete.userDeletingErrorNotificationMessage',
+ defaultMessage: 'Error deleting user {username}',
+ },
+ { username }
+ )
+ );
+ }
+ if (callback) {
+ callback(usersToDelete, errors);
+ }
+ });
+ };
}
-export const ConfirmDelete = injectI18n(ConfirmDeleteUI);
+export const ConfirmDeleteUsers = injectI18n(ConfirmDeleteUI);
diff --git a/x-pack/plugins/security/public/components/management/users/index.js b/x-pack/plugins/security/public/components/management/users/index.js
deleted file mode 100644
index 4374ff1b9d097..0000000000000
--- a/x-pack/plugins/security/public/components/management/users/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * 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.
- */
-
-/*! 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. */
-
-export { Users } from './users';
-export { EditUser } from './edit_user';
diff --git a/x-pack/plugins/siem/public/components/timeline/body/renderers/system/index.ts b/x-pack/plugins/security/public/components/management/users/index.ts
similarity index 58%
rename from x-pack/plugins/siem/public/components/timeline/body/renderers/system/index.ts
rename to x-pack/plugins/security/public/components/management/users/index.ts
index b3ce86f749446..813e671c05ccf 100644
--- a/x-pack/plugins/siem/public/components/timeline/body/renderers/system/index.ts
+++ b/x-pack/plugins/security/public/components/management/users/index.ts
@@ -4,8 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-export * from './auth_ssh';
-export * from './generic_details';
-export * from './generic_file_details';
-export * from './generic_row_renderer';
-export * from './package';
+export { ConfirmDeleteUsers } from './confirm_delete';
diff --git a/x-pack/plugins/security/public/lib/api.ts b/x-pack/plugins/security/public/lib/api.ts
index 48ebd5f6dea05..e6e42ed5bd4da 100644
--- a/x-pack/plugins/security/public/lib/api.ts
+++ b/x-pack/plugins/security/public/lib/api.ts
@@ -5,45 +5,46 @@
*/
import { kfetch } from 'ui/kfetch';
-import { AuthenticatedUser, Role, User } from '../../common/model';
+import { AuthenticatedUser, Role, User, EditUser } from '../../common/model';
const usersUrl = '/api/security/v1/users';
const rolesUrl = '/api/security/role';
export class UserAPIClient {
- public static async getCurrentUser(): Promise, TypeOf>,
createResponse: ResponseFactory
-) => Promise
+ Edit custom element
+
+
+ Element preview
+
+
+
+ Edit custom element
+
+
+ Element preview
+
+
+
+ Edit custom element
+
+
+ Element preview
+
+
+
+ Create new element
+
+
+ Element preview
+
+
+ {title}
+ Element preview
+ {title}
- Element preview
- {section.label}
+
+
+ foo
+
+ {usersToDelete.map(username =>
+
+ {usersToDelete.map(username => (
+
- {isNewUser ?
+ {isNewUser ? (