Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elastic/kibana into getting…
Browse files Browse the repository at this point in the history
…-started-enablement
  • Loading branch information
shahzad31 committed Jun 23, 2023
2 parents cbf85c2 + 5e72c03 commit a684863
Show file tree
Hide file tree
Showing 362 changed files with 2,865 additions and 1,157 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -302,6 +302,7 @@ x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation
src/plugins/dashboard @elastic/kibana-presentation
src/plugins/data @elastic/kibana-visualizations @elastic/kibana-data-discovery
test/plugin_functional/plugins/data_search @elastic/kibana-app-services
packages/kbn-data-service @elastic/kibana-visualizations @elastic/kibana-data-discovery
src/plugins/data_view_editor @elastic/kibana-data-discovery
examples/data_view_field_editor_example @elastic/kibana-app-services
src/plugins/data_view_field_editor @elastic/kibana-data-discovery
Expand Down Expand Up @@ -719,8 +720,8 @@ test/plugin_functional/plugins/ui_settings_plugin @elastic/kibana-core
packages/kbn-ui-shared-deps-npm @elastic/kibana-operations
packages/kbn-ui-shared-deps-src @elastic/kibana-operations
packages/kbn-ui-theme @elastic/kibana-operations
packages/kbn-unified-field-list @elastic/kibana-data-discovery
examples/unified_field_list_examples @elastic/kibana-data-discovery
src/plugins/unified_field_list @elastic/kibana-data-discovery
src/plugins/unified_histogram @elastic/kibana-data-discovery
src/plugins/unified_search @elastic/kibana-visualizations
x-pack/plugins/upgrade_assistant @elastic/platform-deployment-management
Expand Down
4 changes: 2 additions & 2 deletions .i18nrc.json
Expand Up @@ -93,7 +93,7 @@
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
"timelion": ["src/plugins/vis_types/timelion"],
"uiActions": "src/plugins/ui_actions",
"uiActions": ["src/plugins/ui_actions", "packages/kbn-ui-actions-browser"],
"uiActionsEnhanced": "src/plugins/ui_actions_enhanced",
"uiActionsExamples": "examples/ui_action_examples",
"usageCollection": "src/plugins/usage_collection",
Expand All @@ -114,7 +114,7 @@
"visualizations": "src/plugins/visualizations",
"visualizationUiComponents": "src/plugins/visualization_ui_components",
"unifiedSearch": "src/plugins/unified_search",
"unifiedFieldList": "src/plugins/unified_field_list",
"unifiedFieldList": "packages/kbn-unified-field-list",
"unifiedHistogram": "src/plugins/unified_histogram"
},
"translations": []
Expand Down
4 changes: 0 additions & 4 deletions docs/developer/plugin-list.asciidoc
Expand Up @@ -332,10 +332,6 @@ In general this plugin provides:
|Registers commercially licensed generic actions like per panel time range and contains some code that supports drilldown work.
|{kib-repo}blob/{branch}/src/plugins/unified_field_list/README.md[unifiedFieldList]
|This Kibana plugin contains components and services for field list UI (as in fields sidebar on Discover and Lens pages).
|{kib-repo}blob/{branch}/src/plugins/unified_histogram/README.md[unifiedHistogram]
|Unified Histogram is a UX Building Block including a layout with a resizable histogram and a main display.
It manages its own state and data fetching, and can easily be dropped into pages with minimal setup.
Expand Down
8 changes: 8 additions & 0 deletions docs/user/security/audit-logging.asciidoc
Expand Up @@ -392,6 +392,10 @@ Refer to the corresponding {es} logs for potential write errors.
| `success` | User has accessed a case comment as part of a search operation.
| `failure` | User is not authorized to search for case comments.

.2+| `case_categories_get`
| `success` | User has accessed a case.
| `failure` | User is not authorized to access a case.

.2+| `case_tags_get`
| `success` | User has accessed a case.
| `failure` | User is not authorized to access a case.
Expand All @@ -416,6 +420,10 @@ Refer to the corresponding {es} logs for potential write errors.
| `success` | User has accessed metrics for the user activity of a case.
| `failure` | User is not authorized to access metrics for the user activity of a case.

.2+| `case_user_action_get_users`
| `success` | User has accessed the users associated with a case.
| `failure` | User is not authorized to access the users associated with a case.

.2+| `case_connectors_get`
| `success` | User has accessed the connectors of a case.
| `failure` | User is not authorized to access the connectors of a case.
Expand Down
1 change: 0 additions & 1 deletion examples/unified_field_list_examples/kibana.jsonc
Expand Up @@ -13,7 +13,6 @@
"inspector",
"kibanaUtils",
"unifiedSearch",
"unifiedFieldList",
"data",
"dataViews",
"dataViewFieldEditor",
Expand Down
Expand Up @@ -28,7 +28,7 @@ import {
hasQuerySubscriberData,
RenderFieldItemParams,
useQuerySubscriber,
} from '@kbn/unified-field-list-plugin/public';
} from '@kbn/unified-field-list';
import { generateFilters } from '@kbn/data-plugin/public';
import type { CoreStart } from '@kbn/core-lifecycle-browser';
import type { AppPluginStartDependencies } from './types';
Expand Down
Expand Up @@ -26,7 +26,7 @@ import {
useExistingFieldsFetcher,
useGroupedFields,
useQuerySubscriber,
} from '@kbn/unified-field-list-plugin/public';
} from '@kbn/unified-field-list';
import { FieldListItem, FieldListItemProps } from './field_list_item';

export interface FieldListSidebarProps {
Expand Down
2 changes: 1 addition & 1 deletion examples/unified_field_list_examples/public/plugin.ts
Expand Up @@ -58,7 +58,7 @@ export class UnifiedFieldListExamplesPlugin
links: [
{
label: 'README',
href: 'https://github.com/elastic/kibana/tree/main/src/plugins/unified_field_list/README.md',
href: 'https://github.com/elastic/kibana/tree/main/packages/kbn-unified-field-list/README.md',
iconType: 'logoGithub',
target: '_blank',
size: 's',
Expand Down
2 changes: 1 addition & 1 deletion examples/unified_field_list_examples/tsconfig.json
Expand Up @@ -23,10 +23,10 @@
"@kbn/i18n-react",
"@kbn/i18n",
"@kbn/dom-drag-drop",
"@kbn/unified-field-list-plugin",
"@kbn/core-lifecycle-browser",
"@kbn/charts-plugin",
"@kbn/field-formats-plugin",
"@kbn/data-view-field-editor-plugin",
"@kbn/unified-field-list",
]
}
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -348,6 +348,7 @@
"@kbn/dashboard-plugin": "link:src/plugins/dashboard",
"@kbn/data-plugin": "link:src/plugins/data",
"@kbn/data-search-plugin": "link:test/plugin_functional/plugins/data_search",
"@kbn/data-service": "link:packages/kbn-data-service",
"@kbn/data-view-editor-plugin": "link:src/plugins/data_view_editor",
"@kbn/data-view-field-editor-example-plugin": "link:examples/data_view_field_editor_example",
"@kbn/data-view-field-editor-plugin": "link:src/plugins/data_view_field_editor",
Expand Down Expand Up @@ -709,8 +710,8 @@
"@kbn/ui-shared-deps-npm": "link:packages/kbn-ui-shared-deps-npm",
"@kbn/ui-shared-deps-src": "link:packages/kbn-ui-shared-deps-src",
"@kbn/ui-theme": "link:packages/kbn-ui-theme",
"@kbn/unified-field-list": "link:packages/kbn-unified-field-list",
"@kbn/unified-field-list-examples-plugin": "link:examples/unified_field_list_examples",
"@kbn/unified-field-list-plugin": "link:src/plugins/unified_field_list",
"@kbn/unified-histogram-plugin": "link:src/plugins/unified_histogram",
"@kbn/unified-search-plugin": "link:src/plugins/unified_search",
"@kbn/upgrade-assistant-plugin": "link:x-pack/plugins/upgrade_assistant",
Expand Down Expand Up @@ -816,7 +817,7 @@
"deepmerge": "^4.2.2",
"del": "^6.1.0",
"elastic-apm-http-client": "^11.0.1",
"elastic-apm-node": "^3.46.0",
"elastic-apm-node": "^3.47.0",
"email-addresses": "^5.0.0",
"execa": "^4.0.2",
"expiry-js": "0.1.7",
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-data-service/README.md
@@ -0,0 +1,3 @@
# @kbn/data-service

A package version of `data` plugin.
12 changes: 12 additions & 0 deletions packages/kbn-data-service/index.ts
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export type { GetConfigFn } from './src/types';
export { UI_SETTINGS } from './src/constants';
export { getEsQueryConfig } from './src/es_query';
export { tabifyDocs, flattenHit } from './src/search/tabify';
Expand Up @@ -8,9 +8,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/src/plugins/unified_field_list'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/unified_field_list',
coverageReporters: ['text', 'html'],
collectCoverageFrom: ['<rootDir>/src/plugins/unified_field_list/public/**/*.{ts,tsx}'],
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-data-service'],
};
8 changes: 8 additions & 0 deletions packages/kbn-data-service/kibana.jsonc
@@ -0,0 +1,8 @@
{
"type": "shared-common",
"id": "@kbn/data-service",
"owner": [
"@elastic/kibana-visualizations",
"@elastic/kibana-data-discovery"
]
}
7 changes: 7 additions & 0 deletions packages/kbn-data-service/package.json
@@ -0,0 +1,7 @@
{
"name": "@kbn/data-service",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"sideEffects": false
}
34 changes: 34 additions & 0 deletions packages/kbn-data-service/src/constants.ts
@@ -0,0 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export const UI_SETTINGS = {
META_FIELDS: 'metaFields',
DOC_HIGHLIGHT: 'doc_table:highlight',
QUERY_STRING_OPTIONS: 'query:queryString:options',
QUERY_ALLOW_LEADING_WILDCARDS: 'query:allowLeadingWildcards',
SEARCH_QUERY_LANGUAGE: 'search:queryLanguage',
SORT_OPTIONS: 'sort:options',
COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX: 'courier:ignoreFilterIfFieldNotInIndex',
COURIER_SET_REQUEST_PREFERENCE: 'courier:setRequestPreference',
COURIER_CUSTOM_REQUEST_PREFERENCE: 'courier:customRequestPreference',
COURIER_MAX_CONCURRENT_SHARD_REQUESTS: 'courier:maxConcurrentShardRequests',
SEARCH_INCLUDE_FROZEN: 'search:includeFrozen',
SEARCH_TIMEOUT: 'search:timeout',
HISTOGRAM_BAR_TARGET: 'histogram:barTarget',
HISTOGRAM_MAX_BARS: 'histogram:maxBars',
HISTORY_LIMIT: 'history:limit',
TIMEPICKER_REFRESH_INTERVAL_DEFAULTS: 'timepicker:refreshIntervalDefaults',
TIMEPICKER_QUICK_RANGES: 'timepicker:quickRanges',
TIMEPICKER_TIME_DEFAULTS: 'timepicker:timeDefaults',
FILTERS_PINNED_BY_DEFAULT: 'filters:pinnedByDefault',
FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues',
AUTOCOMPLETE_USE_TIMERANGE: 'autocomplete:useTimeRange',
AUTOCOMPLETE_VALUE_SUGGESTION_METHOD: 'autocomplete:valueSuggestionMethod',
DATE_FORMAT: 'dateFormat',
DATEFORMAT_TZ: 'dateFormat:tz',
} as const;
Expand Up @@ -9,7 +9,7 @@
import { get } from 'lodash';
import { getEsQueryConfig } from './get_es_query_config';
import { IUiSettingsClient } from '@kbn/core/public';
import { UI_SETTINGS } from '..';
import { UI_SETTINGS } from '../constants';

const config = {
get(item: string) {
Expand Down
Expand Up @@ -7,7 +7,8 @@
*/

import { EsQueryConfig } from '@kbn/es-query';
import { GetConfigFn, UI_SETTINGS } from '..';
import { GetConfigFn } from '../types';
import { UI_SETTINGS } from '../constants';

interface KibanaConfig {
get: GetConfigFn;
Expand Down
Expand Up @@ -6,4 +6,4 @@
* Side Public License, v 1.
*/

export type { FieldStatsResponse, BucketedAggregation, NumberSummary } from './stats';
export { getEsQueryConfig } from './get_es_query_config';
Expand Up @@ -6,4 +6,4 @@
* Side Public License, v 1.
*/

export const PLUGIN_ID = 'unifiedFieldList';
export { tabifyDocs, flattenHit } from './tabify_docs';
19 changes: 19 additions & 0 deletions packages/kbn-data-service/src/types.ts
@@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

/**
* If a service is being shared on both the client and the server, and
* the client code requires synchronous access to uiSettings, both client
* and server should wrap the core uiSettings services in a function
* matching this signature.
*
* This matches the signature of the public `core.uiSettings.get`, and
* should only be used in scenarios where async access to uiSettings is
* not possible.
*/
export type GetConfigFn = <T = any>(key: string, defaultOverride?: T) => T;
15 changes: 15 additions & 0 deletions packages/kbn-data-service/tsconfig.json
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types"
},
"include": ["*.ts", "src/**/*"],
"kbn_references": [
"@kbn/core",
"@kbn/es-query",
"@kbn/data-views-plugin",
"@kbn/field-formats-plugin",
"@kbn/expressions-plugin",
],
"exclude": ["target/**/*"]
}
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Expand Up @@ -178,6 +178,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
supportedNlpModels: `${MACHINE_LEARNING_DOCS}ml-nlp-model-ref.html`,
syncRules: `${ENTERPRISE_SEARCH_DOCS}sync-rules.html`,
trainedModels: `${MACHINE_LEARNING_DOCS}ml-trained-models.html`,
textEmbedding: `${MACHINE_LEARNING_DOCS}ml-nlp-model-ref.html#ml-nlp-model-ref-text-embedding`,
troubleshootSetup: `${ENTERPRISE_SEARCH_DOCS}troubleshoot-setup.html`,
usersAccess: `${ENTERPRISE_SEARCH_DOCS}users-access.html`,
},
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Expand Up @@ -162,6 +162,7 @@ export interface DocLinks {
readonly supportedNlpModels: string;
readonly syncRules: string;
readonly trainedModels: string;
readonly textEmbedding: string;
readonly troubleshootSetup: string;
readonly usersAccess: string;
};
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-optimizer/limits.yml
Expand Up @@ -137,7 +137,6 @@ pageLoadAssetSize:
triggersActionsUi: 135613
uiActions: 35121
uiActionsEnhanced: 38494
unifiedFieldList: 65500
unifiedHistogram: 19928
unifiedSearch: 71059
upgradeAssistant: 81241
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-test/src/jest/mocks/apm_agent_mock.ts
Expand Up @@ -33,6 +33,7 @@ const agent: jest.Mocked<Agent> = {
startSpan: jest.fn(),
currentSpan: null,
setLabel: jest.fn().mockReturnValue(false),
setGlobalLabel: jest.fn(),
addLabels: jest.fn().mockReturnValue(false),
setUserContext: jest.fn(),
setCustomContext: jest.fn(),
Expand Down
14 changes: 13 additions & 1 deletion packages/kbn-ui-actions-browser/index.ts
Expand Up @@ -6,4 +6,16 @@
* Side Public License, v 1.
*/

export * from './src';
export * from './src/types';
export type { Trigger, RowClickContext } from './src/triggers';
export {
VISUALIZE_FIELD_TRIGGER,
visualizeFieldTrigger,
VISUALIZE_GEO_FIELD_TRIGGER,
visualizeGeoFieldTrigger,
ROW_CLICK_TRIGGER,
rowClickTrigger,
CATEGORIZE_FIELD_TRIGGER,
categorizeFieldTrigger,
defaultTrigger,
} from './src/triggers';
1 change: 1 addition & 0 deletions packages/kbn-ui-actions-browser/src/index.ts
Expand Up @@ -7,3 +7,4 @@
*/

export * from './types';
export * from './triggers';
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Trigger } from '.';
import { Trigger } from './trigger';

export const CATEGORIZE_FIELD_TRIGGER = 'CATEGORIZE_FIELD_TRIGGER';
export const categorizeFieldTrigger: Trigger = {
Expand Down
14 changes: 14 additions & 0 deletions packages/kbn-ui-actions-browser/src/triggers/index.ts
@@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export * from './trigger';
export * from './row_click_trigger';
export * from './default_trigger';
export * from './visualize_field_trigger';
export * from './visualize_geo_field_trigger';
export * from './categorize_field_trigger';
5 changes: 4 additions & 1 deletion packages/kbn-ui-actions-browser/tsconfig.json
Expand Up @@ -15,5 +15,8 @@
"exclude": [
"target/**/*"
],
"kbn_references": []
"kbn_references": [
"@kbn/i18n",
"@kbn/expressions-plugin",
]
}
@@ -1,6 +1,6 @@
# unifiedFieldList
# @kbn/unified-field-list

This Kibana plugin contains components and services for field list UI (as in fields sidebar on Discover and Lens pages).
This Kibana package contains components and services for field list UI (as in fields sidebar on Discover and Lens pages).

---

Expand Down

0 comments on commit a684863

Please sign in to comment.