Skip to content

Commit

Permalink
Merge branch 'feature/exploratory-view-chart-creation-context' of htt…
Browse files Browse the repository at this point in the history
…ps://github.com/dominiqueclarke/kibana into feature/exploratory-view-chart-creation-context
  • Loading branch information
dominiqueclarke committed Oct 19, 2021
2 parents db95dc3 + c0e1e64 commit bc7537a
Show file tree
Hide file tree
Showing 300 changed files with 7,066 additions and 3,604 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ readonly links: {
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
installElasticAgent: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
Expand Down

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/management/action-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ a| <<servicenow-sir-action-type, ServiceNow SecOps>>

| Create a security incident in ServiceNow.

a| <<servicenow-itom-action-type, ServiceNow ITOM>>

| Create an event in ServiceNow.

a| <<slack-action-type, Slack>>

| Send a message to a Slack channel or user.
Expand Down
90 changes: 90 additions & 0 deletions docs/management/connectors/action-types/servicenow-itom.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[role="xpack"]
[[servicenow-itom-action-type]]
=== ServiceNow connector and action
++++
<titleabbrev>ServiceNow ITOM</titleabbrev>
++++

The ServiceNow ITOM connector uses the https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[Event API] to create ServiceNow events.

[float]
[[servicenow-itom-connector-configuration]]
==== Connector configuration

ServiceNow ITOM connectors have the following configuration properties.

Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action.
URL:: ServiceNow instance URL.
Username:: Username for HTTP Basic authentication.
Password:: Password for HTTP Basic authentication.

The ServiceNow user requires at minimum read, create, and update access to the Event table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render.

[float]
[[servicenow-itom-connector-networking-configuration]]
==== Connector networking configuration

Use the <<action-settings, Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.

[float]
[[Preconfigured-servicenow-itom-configuration]]
==== Preconfigured connector type

[source,text]
--
my-servicenow-itom:
name: preconfigured-servicenow-connector-type
actionTypeId: .servicenow-itom
config:
apiUrl: https://example.service-now.com/
secrets:
username: testuser
password: passwordkeystorevalue
--

Config defines information for the connector type.

`apiUrl`:: An address that corresponds to *URL*.

Secrets defines sensitive information for the connector type.

`username`:: A string that corresponds to *Username*.
`password`:: A string that corresponds to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>.

[float]
[[define-servicenow-itom-ui]]
==== Define connector in Stack Management

Define ServiceNow ITOM connector properties.

[role="screenshot"]
image::management/connectors/images/servicenow-itom-connector.png[ServiceNow ITOM connector]

Test ServiceNow ITOM action parameters.

[role="screenshot"]
image::management/connectors/images/servicenow-itom-params-test.png[ServiceNow ITOM params test]

[float]
[[servicenow-itom-action-configuration]]
==== Action configuration

ServiceNow ITOM actions have the following configuration properties.

Source:: The name of the event source type.
Node:: The Host that the event was triggered for.
Type:: The type of event.
Resource:: The name of the resource.
Metric name:: Name of the metric.
Source instance (event_class):: Specific instance of the source.
Message key:: All actions sharing this key will be associated with the same ServiceNow alert. Default value: `<rule ID>:<alert instance ID>`.
Severity:: The severity of the event.
Description:: The details about the event.

Refer to https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[ServiceNow documentation] for more information about the properties.

[float]
[[configuring-servicenow-itom]]
==== Configure ServiceNow ITOM

ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use the <<action-settings, Action configuration settings>> to customize connecto
name: preconfigured-servicenow-connector-type
actionTypeId: .servicenow-sir
config:
apiUrl: https://dev94428.service-now.com/
apiUrl: https://example.service-now.com/
secrets:
username: testuser
password: passwordkeystorevalue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use the <<action-settings, Action configuration settings>> to customize connecto
name: preconfigured-servicenow-connector-type
actionTypeId: .servicenow
config:
apiUrl: https://dev94428.service-now.com/
apiUrl: https://example.service-now.com/
secrets:
username: testuser
password: passwordkeystorevalue
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/management/connectors/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include::action-types/pagerduty.asciidoc[]
include::action-types/server-log.asciidoc[]
include::action-types/servicenow.asciidoc[]
include::action-types/servicenow-sir.asciidoc[]
include::action-types/servicenow-itom.asciidoc[]
include::action-types/swimlane.asciidoc[]
include::action-types/slack.asciidoc[]
include::action-types/webhook.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/security-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ You can configure the following settings in the `kibana.yml` file.

|[[xpack-session-idleTimeout]] `xpack.security.session.idleTimeout` {ess-icon}
| Ensures that user sessions will expire after a period of inactivity. This and <<xpack-session-lifespan,`xpack.security.session.lifespan`>> are both
highly recommended. You can also specify this setting for <<xpack-security-provider-session-idleTimeout, every provider separately>>. If this is set to `0`, then sessions will never expire due to inactivity. By default, this value is 1 hour.
highly recommended. You can also specify this setting for <<xpack-security-provider-session-idleTimeout, every provider separately>>. If this is set to `0`, then sessions will never expire due to inactivity. By default, this value is 8 hours.

2+a|
[TIP]
Expand Down
2 changes: 1 addition & 1 deletion docs/user/security/session-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To manage user sessions programmatically, {kib} exposes <<session-management-api
==== Session idle timeout

You can use `xpack.security.session.idleTimeout` to expire sessions after a period of inactivity. This and `xpack.security.session.lifespan` are both highly recommended.
By default, sessions expire after 1 hour of inactivity. To define another value for a sliding session expiration, set the property in the `kibana.yml` configuration file. The idle timeout is formatted as a duration of `<count>[ms|s|m|h|d|w|M|Y]` (e.g. '20m', '24h', '7d', '1w'). For example, set the idle timeout to expire sessions after 30 minutes of inactivity:
By default, sessions expire after 8 hours of inactivity. To define another value for a sliding session expiration, set the property in the `kibana.yml` configuration file. The idle timeout is formatted as a duration of `<count>[ms|s|m|h|d|w|M|Y]` (e.g. '20m', '24h', '7d', '1w'). For example, set the idle timeout to expire sessions after 30 minutes of inactivity:

--
[source,yaml]
Expand Down
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.21",
"@elastic/ems-client": "7.16.0",
"@elastic/eui": "39.0.0",
"@elastic/eui": "39.1.1",
"@elastic/filesaver": "1.1.2",
"@elastic/maki": "6.3.0",
"@elastic/node-crypto": "1.2.1",
Expand Down Expand Up @@ -184,11 +184,6 @@
"JSONStream": "1.3.5",
"abort-controller": "^3.0.0",
"abortcontroller-polyfill": "^1.7.3",
"angular": "^1.8.0",
"angular-aria": "^1.8.0",
"angular-recursion": "^1.0.5",
"angular-route": "^1.8.0",
"angular-sanitize": "^1.8.0",
"antlr4ts": "^0.5.0-alpha.3",
"archiver": "^5.2.0",
"axios": "^0.21.1",
Expand Down Expand Up @@ -488,7 +483,6 @@
"@testing-library/react": "^11.2.6",
"@testing-library/react-hooks": "^5.1.1",
"@testing-library/user-event": "^13.1.1",
"@types/angular": "^1.6.56",
"@types/apidoc": "^0.22.3",
"@types/archiver": "^5.1.0",
"@types/babel__core": "^7.1.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
terserOptions: {
compress: true,
keep_classnames: true,
mangle: !['kibanaLegacy', 'monitoring'].includes(bundle.id),
mangle: true,
},
}),
],
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-ui-shared-deps-npm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ RUNTIME_DEPS = [
"@npm//@elastic/numeral",
"@npm//@emotion/react",
"@npm//abortcontroller-polyfill",
"@npm//angular",
"@npm//babel-loader",
"@npm//babel-plugin-transform-react-remove-prop-types",
"@npm//core-js",
Expand Down Expand Up @@ -76,7 +75,6 @@ TYPES_DEPS = [
"@npm//@elastic/numeral",
"@npm//@emotion/react",
"@npm//abortcontroller-polyfill",
"@npm//angular",
"@npm//babel-loader",
"@npm//core-js",
"@npm//css-loader",
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-ui-shared-deps-npm/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ module.exports = (_, argv) => {
'@elastic/eui/dist/eui_theme_amsterdam_dark.json',
'@elastic/numeral',
'@emotion/react',
'angular',
'classnames',
'fflate',
'history',
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-ui-shared-deps-src/src/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ require('./flot_charts');
// stateful deps
export const KbnI18n = require('@kbn/i18n');
export const KbnI18nReact = require('@kbn/i18n/react');
export const Angular = require('angular');
export const EmotionReact = require('@emotion/react');
export const Moment = require('moment');
export const MomentTimezone = require('moment-timezone/moment-timezone');
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-ui-shared-deps-src/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ exports.externals = {
/**
* stateful deps
*/
angular: '__kbnSharedDeps__.Angular',
'@kbn/i18n': '__kbnSharedDeps__.KbnI18n',
'@kbn/i18n/react': '__kbnSharedDeps__.KbnI18nReact',
'@emotion/react': '__kbnSharedDeps__.EmotionReact',
Expand Down
4 changes: 3 additions & 1 deletion src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,10 @@ export class DocLinksService {
settings: `${FLEET_DOCS}fleet-settings.html#fleet-server-hosts-setting`,
settingsFleetServerHostSettings: `${FLEET_DOCS}fleet-settings.html#fleet-server-hosts-setting`,
troubleshooting: `${FLEET_DOCS}fleet-troubleshooting.html`,
elasticAgent: `${FLEET_DOCS}elastic-agent-installation-configuration.html`,
elasticAgent: `${FLEET_DOCS}elastic-agent-installation.html`,
datastreams: `${FLEET_DOCS}data-streams.html`,
datastreamsNamingScheme: `${FLEET_DOCS}data-streams.html#data-streams-naming-scheme`,
installElasticAgent: `${FLEET_DOCS}install-fleet-managed-elastic-agent.html`,
upgradeElasticAgent: `${FLEET_DOCS}upgrade-elastic-agent.html`,
upgradeElasticAgent712lower: `${FLEET_DOCS}upgrade-elastic-agent.html#upgrade-7.12-lower`,
learnMoreBlog: `${ELASTIC_WEBSITE_URL}blog/elastic-agent-and-fleet-make-it-easier-to-integrate-your-systems-with-elastic`,
Expand Down Expand Up @@ -740,6 +741,7 @@ export interface DocLinksStart {
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
installElasticAgent: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const getEuiContextMapping = (): EuiTokensObject => {
}),
'euiBasicTable.tablePagination': ({ tableCaption }: EuiValues) =>
i18n.translate('core.euiBasicTable.tablePagination', {
defaultMessage: 'Pagination for preceding table: {tableCaption}',
defaultMessage: 'Pagination for table: {tableCaption}',
values: { tableCaption },
description: 'Screen reader text to describe the pagination controls',
}),
Expand Down Expand Up @@ -861,6 +861,9 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiRelativeTab.numberInputLabel': i18n.translate('core.euiRelativeTab.numberInputLabel', {
defaultMessage: 'Time span amount',
}),
'euiRelativeTab.dateInputError': i18n.translate('core.euiRelativeTab.dateInputError', {
defaultMessage: 'Must be a valid range',
}),
'euiResizableButton.horizontalResizerAriaLabel': i18n.translate(
'core.euiResizableButton.horizontalResizerAriaLabel',
{
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ export interface DocLinksStart {
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
installElasticAgent: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/server/saved_objects/object_types/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const legacyUrlAliasType: SavedObjectsType = {
properties: {
sourceId: { type: 'keyword' },
targetType: { type: 'keyword' },
targetNamespace: { type: 'keyword' },
resolveCounter: { type: 'long' },
disabled: { type: 'boolean' },
// other properties exist, but we aren't querying or aggregating on those, so we don't need to specify them (because we use `dynamic: false` above)
Expand Down
7 changes: 6 additions & 1 deletion src/core/server/saved_objects/service/lib/repository.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { encodeHitVersion } from '../../version';
import { SavedObjectTypeRegistry } from '../../saved_objects_type_registry';
import { DocumentMigrator } from '../../migrations/core/document_migrator';
import { mockKibanaMigrator } from '../../migrations/kibana/kibana_migrator.mock';
import { LEGACY_URL_ALIAS_TYPE } from '../../object_types';
import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks';
import * as esKuery from '@kbn/es-query';
import { errors as EsErrors } from '@elastic/elasticsearch';
Expand Down Expand Up @@ -2714,7 +2715,11 @@ describe('SavedObjectsRepository', () => {
const allTypes = registry.getAllTypes().map((type) => type.name);
expect(getSearchDslNS.getSearchDsl).toHaveBeenCalledWith(mappings, registry, {
namespaces: [namespace],
type: allTypes.filter((type) => !registry.isNamespaceAgnostic(type)),
type: [
...allTypes.filter((type) => !registry.isNamespaceAgnostic(type)),
LEGACY_URL_ALIAS_TYPE,
],
kueryNode: expect.anything(),
});
});
});
Expand Down
16 changes: 14 additions & 2 deletions src/core/server/saved_objects/service/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import { omit, isObject } from 'lodash';
import type { estypes } from '@elastic/elasticsearch';
import * as esKuery from '@kbn/es-query';
import type { ElasticsearchClient } from '../../../elasticsearch/';
import { isSupportedEsServer, isNotFoundFromUnsupportedServer } from '../../../elasticsearch';
import type { Logger } from '../../../logging';
Expand Down Expand Up @@ -55,6 +56,7 @@ import {
SavedObjectsBulkResolveObject,
SavedObjectsBulkResolveResponse,
} from '../saved_objects_client';
import { LEGACY_URL_ALIAS_TYPE } from '../../object_types';
import {
SavedObject,
SavedObjectsBaseOptions,
Expand Down Expand Up @@ -780,7 +782,16 @@ export class SavedObjectsRepository {
}

const allTypes = Object.keys(getRootPropertiesObjects(this._mappings));
const typesToUpdate = allTypes.filter((type) => !this._registry.isNamespaceAgnostic(type));
const typesToUpdate = [
...allTypes.filter((type) => !this._registry.isNamespaceAgnostic(type)),
LEGACY_URL_ALIAS_TYPE,
];

// Construct kueryNode to filter legacy URL aliases (these space-agnostic objects do not use root-level "namespace/s" fields)
const { buildNode } = esKuery.nodeTypes.function;
const match1 = buildNode('is', `${LEGACY_URL_ALIAS_TYPE}.targetNamespace`, namespace);
const match2 = buildNode('not', buildNode('is', 'type', LEGACY_URL_ALIAS_TYPE));
const kueryNode = buildNode('or', [match1, match2]);

const { body, statusCode, headers } = await this.client.updateByQuery(
{
Expand All @@ -803,8 +814,9 @@ export class SavedObjectsRepository {
},
conflicts: 'proceed',
...getSearchDsl(this._mappings, this._registry, {
namespaces: namespace ? [namespace] : undefined,
namespaces: [namespace],
type: typesToUpdate,
kueryNode,
}),
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/* eslint-disable */

// Angular service
i18n('plugin_1.id_1', { defaultMessage: 'Message 1' });

// @kbn/i18n
i18n.translate('plugin_1.id_2', {
defaultMessage: 'Message 2',
i18n.translate('plugin_1.id_1', {
defaultMessage: 'Message 1',
description: 'Message description',
});

Expand All @@ -15,10 +12,10 @@ class Component extends PureComponent {
return (
<div>
<FormattedMessage
id="plugin_1.id_3"
defaultMessage="Message 3"
id="plugin_1.id_2"
defaultMessage="Message 2"
/>
{intl.formatMessage({ id: 'plugin_1.id_4', defaultMessage: 'Message 4' })}
{intl.formatMessage({ id: 'plugin_1.id_3', defaultMessage: 'Message 3' })}
</div>
);
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit bc7537a

Please sign in to comment.