Skip to content

Commit c2ed445

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fields-marked-as-modified-fix
2 parents adab757 + 598076e commit c2ed445

78 files changed

Lines changed: 1824 additions & 1217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,23 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
13681368
### END Observability Plugins
13691369

13701370
# Presentation
1371-
/x-pack/test/disable_ems @elastic/kibana-presentation
1371+
/test/interpreter_functional/snapshots @elastic/kibana-presentation # Assigned per https://github.com/elastic/kibana/pull/54342
1372+
/test/functional/services/inspector.ts @elastic/kibana-presentation
1373+
/x-pack/test/functional/services/canvas_element.ts @elastic/kibana-presentation
1374+
/x-pack/test/functional/page_objects/canvas_page.ts @elastic/kibana-presentation
1375+
/x-pack/test/accessibility/apps/group3/canvas.ts @elastic/kibana-presentation
1376+
/x-pack/test/upgrade/apps/canvas @elastic/kibana-presentation
1377+
/x-pack/test/upgrade/apps/dashboard @elastic/kibana-presentation
1378+
/test/functional/screenshots/baseline/tsvb_dashboard.png @elastic/kibana-presentation
1379+
/test/functional/screenshots/baseline/dashboard_*.png @elastic/kibana-presentation
1380+
/test/functional/screenshots/baseline/area_chart.png @elastic/kibana-presentation
1381+
/x-pack/test/disable_ems @elastic/kibana-presentation # Assigned per https://github.com/elastic/kibana/pull/165986
1382+
/x-pack/test/functional/fixtures/kbn_archiver/dashboard* @elastic/kibana-presentation
1383+
/test/functional/page_objects/dashboard_page* @elastic/kibana-presentation
1384+
/test/functional/firefox/dashboard.config.ts @elastic/kibana-presentation # Assigned per: https://github.com/elastic/kibana/issues/15023
1385+
/test/functional/fixtures/es_archiver/dashboard @elastic/kibana-presentation # Assigned per: https://github.com/elastic/kibana/issues/15023
1386+
/test/accessibility/apps/dashboard.ts @elastic/kibana-presentation
1387+
/test/accessibility/apps/filter_panel.ts @elastic/kibana-presentation
13721388
/x-pack/test/functional/apps/dashboard @elastic/kibana-presentation
13731389
/x-pack/test/accessibility/apps/group3/maps.ts @elastic/kibana-presentation
13741390
/x-pack/test/accessibility/apps/group1/dashboard_panel_options.ts @elastic/kibana-presentation
@@ -1382,6 +1398,17 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
13821398
/test/plugin_functional/test_suites/panel_actions @elastic/kibana-presentation
13831399
/x-pack/test/functional/es_archives/canvas/logstash_lens @elastic/kibana-presentation
13841400
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-presentation
1401+
/x-pack/test/upgrade/services/maps_upgrade_services.ts @elastic/kibana-presentation
1402+
/x-pack/test/stack_functional_integration/apps/maps @elastic/kibana-presentation
1403+
/x-pack/test/functional/page_objects/geo_file_upload.ts @elastic/kibana-presentation
1404+
/x-pack/test/functional/page_objects/gis_page.ts @elastic/kibana-presentation
1405+
/x-pack/test/upgrade/apps/maps @elastic/kibana-presentation
1406+
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-presentation
1407+
/x-pack/test/functional/apps/maps/ @elastic/kibana-presentation
1408+
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-presentation
1409+
/x-pack/plugins/stack_alerts/server/rule_types/geo_containment @elastic/kibana-presentation
1410+
/x-pack/plugins/stack_alerts/public/rule_types/geo_containment @elastic/kibana-presentation
1411+
13851412

13861413
# Machine Learning
13871414
/x-pack/test/stack_functional_integration/apps/ml @elastic/ml-ui
@@ -1421,15 +1448,6 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
14211448
/x-pack/test/functional/services/aiops @elastic/ml-ui
14221449
/x-pack/test/functional_basic/apps/transform/ @elastic/ml-ui
14231450

1424-
# Maps
1425-
#CC# /x-pack/plugins/maps/ @elastic/kibana-gis
1426-
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
1427-
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
1428-
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
1429-
/x-pack/plugins/stack_alerts/server/rule_types/geo_containment @elastic/kibana-gis
1430-
/x-pack/plugins/stack_alerts/public/rule_types/geo_containment @elastic/kibana-gis
1431-
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
1432-
14331451
# Operations
14341452
/test/package @elastic/kibana-operations
14351453
/test/package/roles @elastic/kibana-operations
@@ -1584,6 +1602,8 @@ x-pack/test/api_integration/deployment_agnostic/services/ @elastic/appex-qa
15841602
x-pack/test/**/deployment_agnostic/ @elastic/appex-qa #temporarily to monitor tests migration
15851603

15861604
# Core
1605+
/test/api_integration/apis/general/*.js @elastic/kibana-core # Assigned per https://github.com/elastic/kibana/pull/199795/files/894a8ede3f9d0398c5af56bf5a82654a9bc0610b#r1846691639
1606+
/x-pack/test/plugin_api_integration/plugins/feature_usage_test @elastic/kibana-core
15871607
/test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core
15881608
/test/plugin_functional/plugins/session_notifications @elastic/kibana-core
15891609
/x-pack/test/cloud_integration/plugins/saml_provider @elastic/kibana-core
@@ -1640,6 +1660,28 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
16401660
#CC# /x-pack/plugins/translations/ @elastic/kibana-localization @elastic/kibana-core
16411661

16421662
# Kibana Platform Security
1663+
# security
1664+
/x-pack/test_serverless/functional/test_suites/observability/role_management @elastic/kibana-security
1665+
/x-pack/test/functional/config_security_basic.ts @elastic/kibana-security
1666+
/x-pack/test/functional/page_objects/user_profile_page.ts @elastic/kibana-security
1667+
/x-pack/test/functional/page_objects/space_selector_page.ts @elastic/kibana-security
1668+
/x-pack/test/functional/page_objects/security_page.ts @elastic/kibana-security
1669+
/x-pack/test/functional/page_objects/role_mappings_page.ts @elastic/kibana-security
1670+
/x-pack/test/functional/page_objects/copy_saved_objects_to_space_page.ts @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/39002
1671+
/x-pack/test/functional/page_objects/api_keys_page.ts @elastic/kibana-security
1672+
/x-pack/test/functional/page_objects/account_settings_page.ts @elastic/kibana-security
1673+
/x-pack/test/functional/apps/user_profiles @elastic/kibana-security
1674+
/x-pack/test/common/services/spaces.ts @elastic/kibana-security
1675+
/x-pack/test/api_integration/config_security_*.ts @elastic/kibana-security
1676+
/x-pack/test/functional/apps/api_keys @elastic/kibana-security
1677+
/x-pack/test/ftr_apis/security_and_spaces @elastic/kibana-security
1678+
/test/server_integration/services/supertest.js @elastic/kibana-security @elastic/kibana-core
1679+
/test/server_integration/http/ssl @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/53810
1680+
/test/server_integration/http/ssl_with_p12 @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/199795#discussion_r1846522206
1681+
/test/server_integration/http/ssl_with_p12_intermediate @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/199795#discussion_r1846522206
1682+
1683+
/test/server_integration/config.base.js @elastic/kibana-security @elastic/kibana-core # Assigned per https://github.com/elastic/kibana/pull/199795#discussion_r1846510782
1684+
/test/server_integration/__fixtures__ @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/53810
16431685
/.github/codeql @elastic/kibana-security
16441686
/.github/workflows/codeql.yml @elastic/kibana-security
16451687
/.github/workflows/codeql-stats.yml @elastic/kibana-security

packages/kbn-esql-editor/src/esql_editor.test.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,20 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
1616
import { ESQLEditor } from './esql_editor';
1717
import type { ESQLEditorProps } from './types';
1818
import { ReactWrapper } from 'enzyme';
19-
import { of } from 'rxjs';
19+
import { coreMock } from '@kbn/core/server/mocks';
2020

2121
describe('ESQLEditor', () => {
2222
const uiConfig: Record<string, any> = {};
2323
const uiSettings = {
2424
get: (key: string) => uiConfig[key],
2525
} as IUiSettingsClient;
26-
const theme = {
27-
theme$: of({ darkMode: false }),
28-
};
2926

3027
const services = {
3128
uiSettings,
3229
settings: {
3330
client: uiSettings,
3431
},
35-
theme,
32+
core: coreMock.createStart(),
3633
};
3734

3835
function renderESQLEditorComponent(testProps: ESQLEditorProps) {

packages/kbn-esql-editor/src/esql_editor.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
2525
import type { AggregateQuery } from '@kbn/es-query';
2626
import type { ExpressionsStart } from '@kbn/expressions-plugin/public';
2727
import { useKibana } from '@kbn/kibana-react-plugin/public';
28-
import { ESQLLang, ESQL_LANG_ID, ESQL_THEME_ID, monaco, type ESQLCallbacks } from '@kbn/monaco';
28+
import {
29+
ESQLLang,
30+
ESQL_LANG_ID,
31+
ESQL_DARK_THEME_ID,
32+
ESQL_LIGHT_THEME_ID,
33+
monaco,
34+
type ESQLCallbacks,
35+
} from '@kbn/monaco';
2936
import memoize from 'lodash/memoize';
3037
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
3138
import { createPortal } from 'react-dom';
@@ -91,7 +98,8 @@ export const ESQLEditor = memo(function ESQLEditor({
9198
fieldsMetadata,
9299
uiSettings,
93100
} = kibana.services;
94-
const timeZone = core?.uiSettings?.get('dateFormat:tz');
101+
const darkMode = core.theme?.getTheme().darkMode;
102+
const timeZone = uiSettings?.get('dateFormat:tz');
95103
const histogramBarTarget = uiSettings?.get('histogram:barTarget') ?? 50;
96104
const [code, setCode] = useState<string>(query.esql ?? '');
97105
// To make server side errors less "sticky", register the state of the code when submitting
@@ -597,7 +605,7 @@ export const ESQLEditor = memo(function ESQLEditor({
597605
vertical: 'auto',
598606
},
599607
scrollBeyondLastLine: false,
600-
theme: ESQL_THEME_ID,
608+
theme: darkMode ? ESQL_DARK_THEME_ID : ESQL_LIGHT_THEME_ID,
601609
wordWrap: 'on',
602610
wrappingIndent: 'none',
603611
};

packages/kbn-monaco/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export {
2020
} from './src/monaco_imports';
2121
export { XJsonLang } from './src/xjson';
2222
export { SQLLang } from './src/sql';
23-
export { ESQL_LANG_ID, ESQL_THEME_ID, ESQLLang } from './src/esql';
23+
export { ESQL_LANG_ID, ESQL_DARK_THEME_ID, ESQL_LIGHT_THEME_ID, ESQLLang } from './src/esql';
2424
export type { ESQLCallbacks } from '@kbn/esql-validation-autocomplete';
2525

2626
export * from './src/painless';

packages/kbn-monaco/src/esql/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
export { ESQL_LANG_ID, ESQL_THEME_ID } from './lib/constants';
10+
export { ESQL_LANG_ID, ESQL_DARK_THEME_ID, ESQL_LIGHT_THEME_ID } from './lib/constants';
1111
export { ESQLLang } from './language';
12-
export { buildESQlTheme } from './lib/esql_theme';
12+
export { buildESQLTheme } from './lib/esql_theme';

packages/kbn-monaco/src/esql/lib/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
export const ESQL_LANG_ID = 'esql';
11-
export const ESQL_THEME_ID = 'esqlTheme';
11+
export const ESQL_LIGHT_THEME_ID = 'esqlThemeLight';
12+
export const ESQL_DARK_THEME_ID = 'esqlThemeDark';
1213

1314
export const ESQL_TOKEN_POSTFIX = '.esql';

packages/kbn-monaco/src/esql/lib/esql_theme.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
import { ESQLErrorListener, getLexer as _getLexer } from '@kbn/esql-ast';
1111
import { ESQL_TOKEN_POSTFIX } from './constants';
12-
import { buildESQlTheme } from './esql_theme';
12+
import { buildESQLTheme } from './esql_theme';
1313
import { CharStreams } from 'antlr4';
1414

1515
describe('ESQL Theme', () => {
1616
it('should not have multiple rules for a single token', () => {
17-
const theme = buildESQlTheme();
17+
const theme = buildESQLTheme({ darkMode: false });
1818

1919
const seen = new Set<string>();
2020
const duplicates: string[] = [];
@@ -40,7 +40,7 @@ describe('ESQL Theme', () => {
4040
.map((name) => name!.toLowerCase());
4141

4242
it('every rule should apply to a valid lexical name', () => {
43-
const theme = buildESQlTheme();
43+
const theme = buildESQLTheme({ darkMode: false });
4444

4545
// These names aren't from the lexer... they are added on our side
4646
// see packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts
@@ -62,7 +62,7 @@ describe('ESQL Theme', () => {
6262
});
6363

6464
it('every valid lexical name should have a corresponding rule', () => {
65-
const theme = buildESQlTheme();
65+
const theme = buildESQLTheme({ darkMode: false });
6666
const tokenIDs = theme.rules.map((rule) => rule.token.replace(ESQL_TOKEN_POSTFIX, ''));
6767

6868
const validExceptions = [

0 commit comments

Comments
 (0)