Skip to content

Commit 97f5748

Browse files
authored
Merge branch 'main' into renovate/main-@elasticcharts
2 parents 5ae5821 + 8705a6a commit 97f5748

File tree

58 files changed

+1188
-278
lines changed

Some content is hidden

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

58 files changed

+1188
-278
lines changed

examples/guided_onboarding_example/public/components/main.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
EuiText,
2626
EuiTitle,
2727
EuiSelectOption,
28+
EuiFlexGrid,
2829
} from '@elastic/eui';
2930
import type { GuideState, GuideStepIds, GuideId, GuideStep } from '@kbn/guided-onboarding';
3031
import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public';
@@ -34,7 +35,14 @@ interface MainProps {
3435
notifications: CoreStart['notifications'];
3536
}
3637

37-
const exampleGuideIds: GuideId[] = ['search', 'siem', 'kubernetes', 'testGuide'];
38+
const exampleGuideIds: GuideId[] = [
39+
'appSearch',
40+
'websiteSearch',
41+
'databaseSearch',
42+
'siem',
43+
'kubernetes',
44+
'testGuide',
45+
];
3846
const selectOptions: EuiSelectOption[] = exampleGuideIds.map((guideId) => ({
3947
value: guideId,
4048
text: guideId,
@@ -211,7 +219,7 @@ export const Main = (props: MainProps) => {
211219
</h3>
212220
</EuiText>
213221
<EuiSpacer />
214-
<EuiFlexGroup>
222+
<EuiFlexGrid columns={3}>
215223
{exampleGuideIds.map((guideId) => {
216224
const guideState = guidesState?.find((guide) => guide.guideId === guideId);
217225
return (
@@ -255,7 +263,7 @@ export const Main = (props: MainProps) => {
255263
</EuiFlexItem>
256264
);
257265
})}
258-
</EuiFlexGroup>
266+
</EuiFlexGrid>
259267
<EuiSpacer />
260268
<EuiHorizontalRule />
261269
<EuiText>

packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/migrations.test.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,38 @@ describe('ui_settings 8.5.0 migrations', () => {
345345
});
346346
});
347347
});
348+
349+
describe('ui_settings 8.7.0 migrations', () => {
350+
const migration = migrations['8.7.0'];
351+
352+
test('returns doc on empty object', () => {
353+
expect(migration({} as SavedObjectUnsanitizedDoc)).toEqual({
354+
references: [],
355+
});
356+
});
357+
358+
test('removes "observability:enableNewSyntheticsView" setting', () => {
359+
const doc = {
360+
type: 'config',
361+
id: '8.7.0',
362+
attributes: {
363+
buildNum: 9007199254740991,
364+
'observability:enableNewSyntheticsView': true,
365+
},
366+
references: [],
367+
updated_at: '2020-06-09T20:18:20.349Z',
368+
migrationVersion: {},
369+
};
370+
371+
expect(migration(doc)).toEqual({
372+
type: 'config',
373+
id: '8.7.0',
374+
attributes: {
375+
buildNum: 9007199254740991,
376+
},
377+
references: [],
378+
updated_at: '2020-06-09T20:18:20.349Z',
379+
migrationVersion: {},
380+
});
381+
});
382+
});

packages/core/ui-settings/core-ui-settings-server-internal/src/saved_objects/migrations.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,25 @@ export const migrations = {
162162
}),
163163
references: doc.references || [],
164164
}),
165+
'8.7.0': (doc: SavedObjectUnsanitizedDoc<any>): SavedObjectSanitizedDoc<any> => ({
166+
...doc,
167+
...(doc.attributes && {
168+
attributes: Object.keys(doc.attributes).reduce(
169+
(acc, key) =>
170+
[
171+
// owner: Team:Uptime
172+
'observability:enableNewSyntheticsView',
173+
].includes(key)
174+
? {
175+
...acc,
176+
}
177+
: {
178+
...acc,
179+
[key]: doc.attributes[key],
180+
},
181+
{}
182+
),
183+
}),
184+
references: doc.references || [],
185+
}),
165186
};

packages/kbn-es-query/src/kuery/node_types/wildcard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function escapeRegExp(str: string) {
2323

2424
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters
2525
function escapeQueryString(str: string) {
26-
return str.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g, '\\$&'); // $& means the whole matched string
26+
return str.replace(/[+\-=&|><!(){}[\]^"~*?:\\/]/g, '\\$&'); // $& means the whole matched string
2727
}
2828

2929
export function isNode(node: KueryNode): node is KqlWildcardNode {

packages/kbn-guided-onboarding/src/components/landing_page/__snapshots__/guide_cards.test.tsx.snap

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/kbn-guided-onboarding/src/components/landing_page/guide_card.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export const GuideCard = ({
7777
const progress = getProgressLabel(guideState);
7878
return (
7979
<EuiCard
80+
// data-test-subj used for FS tracking
81+
data-test-subj={card.telemetryId}
8082
isDisabled={isLoading}
8183
onClick={onClick}
8284
css={cardCss}

packages/kbn-guided-onboarding/src/components/landing_page/guide_cards.constants.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@ export const guideCards: GuideCardConstants[] = [
3333
title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.appSearch.title', {
3434
defaultMessage: 'Build an application on top of Elasticsearch',
3535
}),
36-
guideId: 'search',
37-
telemetryId: 'guided-onboarding--search--application',
36+
guideId: 'appSearch',
37+
telemetryId: 'onboarding--search--application',
3838
order: 1,
3939
},
4040
{
4141
solution: 'search',
4242
title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.websiteSearch.title', {
4343
defaultMessage: 'Add search to my website',
4444
}),
45-
guideId: 'search',
46-
telemetryId: 'guided-onboarding--search--website',
45+
guideId: 'websiteSearch',
46+
telemetryId: 'onboarding--search--website',
4747
order: 4,
4848
},
4949
{
5050
solution: 'search',
5151
title: i18n.translate('guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title', {
5252
defaultMessage: 'Search across databases and business systems',
5353
}),
54-
guideId: 'search',
55-
telemetryId: 'guided-onboarding--search--database',
54+
guideId: 'databaseSearch',
55+
telemetryId: 'onboarding--search--database',
5656
order: 7,
5757
},
5858
{
@@ -64,7 +64,7 @@ export const guideCards: GuideCardConstants[] = [
6464
appId: 'integrations',
6565
path: '/browse?q=log',
6666
},
67-
telemetryId: 'guided-onboarding--observability--logs',
67+
telemetryId: 'onboarding--observability--logs',
6868
order: 2,
6969
},
7070
{
@@ -76,7 +76,7 @@ export const guideCards: GuideCardConstants[] = [
7676
appId: 'home',
7777
path: '#/tutorial/apm',
7878
},
79-
telemetryId: 'guided-onboarding--observability--apm',
79+
telemetryId: 'onboarding--observability--apm',
8080
order: 5,
8181
},
8282
{
@@ -88,7 +88,7 @@ export const guideCards: GuideCardConstants[] = [
8888
appId: 'integrations',
8989
path: '/browse/os_system',
9090
},
91-
telemetryId: 'guided-onboarding--observability--hosts',
91+
telemetryId: 'onboarding--observability--hosts',
9292
order: 8,
9393
},
9494
{
@@ -100,7 +100,7 @@ export const guideCards: GuideCardConstants[] = [
100100
}
101101
),
102102
guideId: 'kubernetes',
103-
telemetryId: 'guided-onboarding--observability--kubernetes',
103+
telemetryId: 'onboarding--observability--kubernetes',
104104
order: 11,
105105
},
106106
{
@@ -109,7 +109,7 @@ export const guideCards: GuideCardConstants[] = [
109109
defaultMessage: 'Detect threats in my data with SIEM',
110110
}),
111111
guideId: 'siem',
112-
telemetryId: 'guided-onboarding--security--siem',
112+
telemetryId: 'onboarding--security--siem',
113113
order: 3,
114114
},
115115
{
@@ -121,7 +121,7 @@ export const guideCards: GuideCardConstants[] = [
121121
appId: 'integrations',
122122
path: '/detail/endpoint/overview',
123123
},
124-
telemetryId: 'guided-onboarding--security--hosts',
124+
telemetryId: 'onboarding--security--hosts',
125125
order: 6,
126126
},
127127
{
@@ -133,7 +133,7 @@ export const guideCards: GuideCardConstants[] = [
133133
appId: 'integrations',
134134
path: '/detail/cloud_security_posture/overview',
135135
},
136-
telemetryId: 'guided-onboarding--security--cloud',
136+
telemetryId: 'onboarding--security--cloud',
137137
order: 9,
138138
},
139139
].sort((cardA, cardB) => cardA.order - cardB.order) as GuideCardConstants[];

packages/kbn-guided-onboarding/src/types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
* Side Public License, v 1.
77
*/
88

9-
export type GuideId = 'kubernetes' | 'siem' | 'search' | 'testGuide';
9+
export type GuideId =
10+
| 'kubernetes'
11+
| 'siem'
12+
| 'appSearch'
13+
| 'websiteSearch'
14+
| 'databaseSearch'
15+
| 'testGuide';
1016

1117
type KubernetesStepIds = 'add_data' | 'view_dashboard' | 'tour_observability';
1218
type SiemStepIds = 'add_data' | 'rules' | 'alertsCases';

src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
7575
"cases-connector-mappings": "4b16d440af966e5d6e0fa33368bfa15d987a4b69",
7676
"cases-telemetry": "16e261e7378a72acd0806f18df92525dd1da4f37",
7777
"cases-user-actions": "f1b0dcfeb58a65e68b35c5e99ddee70e746a06c7",
78-
"config": "e3f0408976dbdd453641f5699927b28b188f6b8c",
78+
"config": "95d8ecc452186201a691e72ec154ba65dfc5cb98",
7979
"config-global": "b8f559884931609a349e129c717af73d23e7bc76",
8080
"connector_token": "fa5301aa5a2914795d3b1b82d0a49939444009da",
8181
"core-usage-stats": "f40a213da2c597b0de94e364a4326a5a1baa4ca9",

src/plugins/kibana_usage_collection/server/collectors/management/schema.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
418418
type: 'boolean',
419419
_meta: { description: 'Non-default value of setting.' },
420420
},
421-
'observability:enableNewSyntheticsView': {
422-
type: 'boolean',
423-
_meta: { description: 'Non-default value of setting.' },
424-
},
425421
'observability:maxSuggestions': {
426422
type: 'integer',
427423
_meta: { description: 'Non-default value of setting.' },

0 commit comments

Comments
 (0)