Skip to content

Commit d67a421

Browse files
Constancescottybollinger
andauthored
[Enterprise Search] Add Overview landing page/plugin (#76734)
* [public] Register Enterprise search plugin + move new Home strings to constants * [server] Register plugin access/visibility * Set up Enterprise Search Kibana Chrome - Add SetEnterpriseSearchChrome - Update Enterprise Search breadcrumbs to link to new overview plugin (+ update overview plugin URL per team discussion) - Add ability to break out of React Router basename by not using history.createhref - Update createHref mock to more closely match Kibana urls (adding /app prefix) - Minor documentation fix * Set up Enterprise Search plugin telemetry - client-side: SendEnterpriseSearchTelemetry - server-side: register saved objects, usage collector, etc. * Enterprise search overview views (#23) * Add formatTestSubj util This allows us to correctly format strings into our casing for data-test-subj attrs * Add images and stylesheet * Add product card component * Add index component * Remove unused styles * Fix inter-plugin links - by add shouldNotCreateHref prop to RR helpers - similiar to breadcrumb change * Fix/clean up CSS - Prefer EUI components over bespoke CSS (e.g. EuiCard) - Remove unused or unspecific CSS - Pull out product card CSS to its component - Fix kebab-cased CSS classes to camelCased * Clean up ProductCard props - Prefer passing in our plugin consts instead of separate props - Move productCardDescription to constants - Update tests * Add telemetry clicked actions to product buttons + revert data-test-subj strings to previous implementation + prune format_test_subj helper by using lodash util directly * [PR feedback] Add new plugin to applicationUsageSchema per telemetry team request * Fix failing functional navLinks test * Fix telemetry schema test * [Perf] Optimize assets size by switching from 300kb SVG to 25kb PNG * Only show product cards if the user has access to that product - adds access checks - fixes flex/CSS to show one card at a time Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
1 parent 87ca6ff commit d67a421

File tree

35 files changed

+868
-61
lines changed

35 files changed

+868
-61
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export const applicationUsageSchema = {
6666
csm: commonSchema,
6767
canvas: commonSchema,
6868
dashboard_mode: commonSchema, // It's a forward app so we'll likely never report it
69+
enterpriseSearch: commonSchema,
6970
appSearch: commonSchema,
7071
workplaceSearch: commonSchema,
7172
graph: commonSchema,

src/plugins/telemetry/schema/oss_plugins.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,34 @@
414414
}
415415
}
416416
},
417+
"enterpriseSearch": {
418+
"properties": {
419+
"clicks_total": {
420+
"type": "long"
421+
},
422+
"clicks_7_days": {
423+
"type": "long"
424+
},
425+
"clicks_30_days": {
426+
"type": "long"
427+
},
428+
"clicks_90_days": {
429+
"type": "long"
430+
},
431+
"minutes_on_screen_total": {
432+
"type": "float"
433+
},
434+
"minutes_on_screen_7_days": {
435+
"type": "float"
436+
},
437+
"minutes_on_screen_30_days": {
438+
"type": "float"
439+
},
440+
"minutes_on_screen_90_days": {
441+
"type": "float"
442+
}
443+
}
444+
},
417445
"appSearch": {
418446
"properties": {
419447
"clicks_total": {

x-pack/plugins/enterprise_search/common/constants.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,24 @@ export const ENTERPRISE_SEARCH_PLUGIN = {
1111
NAME: i18n.translate('xpack.enterpriseSearch.productName', {
1212
defaultMessage: 'Enterprise Search',
1313
}),
14-
URL: '/app/enterprise_search',
14+
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.navTitle', {
15+
defaultMessage: 'Overview',
16+
}),
17+
SUBTITLE: i18n.translate('xpack.enterpriseSearch.featureCatalogue.subtitle', {
18+
defaultMessage: 'Search everything',
19+
}),
20+
DESCRIPTIONS: [
21+
i18n.translate('xpack.enterpriseSearch.featureCatalogueDescription1', {
22+
defaultMessage: 'Build a powerful search experience.',
23+
}),
24+
i18n.translate('xpack.enterpriseSearch.featureCatalogueDescription2', {
25+
defaultMessage: 'Connect your users to relevant data.',
26+
}),
27+
i18n.translate('xpack.enterpriseSearch.featureCatalogueDescription3', {
28+
defaultMessage: 'Unify your team content.',
29+
}),
30+
],
31+
URL: '/app/enterprise_search/overview',
1532
};
1633

1734
export const APP_SEARCH_PLUGIN = {
@@ -23,6 +40,10 @@ export const APP_SEARCH_PLUGIN = {
2340
defaultMessage:
2441
'Leverage dashboards, analytics, and APIs for advanced application search made simple.',
2542
}),
43+
CARD_DESCRIPTION: i18n.translate('xpack.enterpriseSearch.appSearch.productCardDescription', {
44+
defaultMessage:
45+
'Elastic App Search provides user-friendly tools to design and deploy a powerful search to your websites or web/mobile applications.',
46+
}),
2647
URL: '/app/enterprise_search/app_search',
2748
SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/app-search/',
2849
};
@@ -36,6 +57,13 @@ export const WORKPLACE_SEARCH_PLUGIN = {
3657
defaultMessage:
3758
'Search all documents, files, and sources available across your virtual workplace.',
3859
}),
60+
CARD_DESCRIPTION: i18n.translate(
61+
'xpack.enterpriseSearch.workplaceSearch.productCardDescription',
62+
{
63+
defaultMessage:
64+
"Unify all your team's content in one place, with instant connectivity to popular productivity and collaboration tools.",
65+
}
66+
),
3967
URL: '/app/enterprise_search/workplace_search',
4068
SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/workplace-search/',
4169
};

x-pack/plugins/enterprise_search/common/types/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export interface IInitialAppData {
1818
ilmEnabled?: boolean;
1919
isFederatedAuth?: boolean;
2020
configuredLimits?: IConfiguredLimits;
21+
access?: {
22+
hasAppSearchAccess: boolean;
23+
hasWorkplaceSearchAccess: boolean;
24+
};
2125
appSearch?: IAppSearchAccount;
2226
workplaceSearch?: IWorkplaceSearchInitialData;
2327
}

x-pack/plugins/enterprise_search/public/applications/__mocks__/react_router_history.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Jest to accept its use within a jest.mock()
1010
*/
1111
export const mockHistory = {
12-
createHref: jest.fn(({ pathname }) => `/enterprise_search${pathname}`),
12+
createHref: jest.fn(({ pathname }) => `/app/enterprise_search${pathname}`),
1313
push: jest.fn(),
1414
location: {
1515
pathname: '/current-path',
25 KB
Loading
24.2 KB
Loading
29.8 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export { ProductCard } from './product_card';
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
.productCard {
8+
margin: $euiSizeS;
9+
10+
&__imageContainer {
11+
max-height: 115px;
12+
overflow: hidden;
13+
background-color: #0076cc;
14+
15+
@include euiBreakpoint('s', 'm', 'l', 'xl') {
16+
max-height: none;
17+
}
18+
}
19+
20+
&__image {
21+
width: 100%;
22+
height: auto;
23+
}
24+
25+
.euiCard__content {
26+
max-width: 350px;
27+
margin-top: $euiSizeL;
28+
29+
@include euiBreakpoint('s', 'm', 'l', 'xl') {
30+
margin-top: $euiSizeXL;
31+
}
32+
}
33+
34+
.euiCard__title {
35+
margin-bottom: $euiSizeM;
36+
font-weight: $euiFontWeightBold;
37+
38+
@include euiBreakpoint('s', 'm', 'l', 'xl') {
39+
margin-bottom: $euiSizeL;
40+
font-size: $euiSizeL;
41+
}
42+
}
43+
44+
.euiCard__description {
45+
font-weight: $euiFontWeightMedium;
46+
color: $euiColorMediumShade;
47+
margin-bottom: $euiSize;
48+
}
49+
50+
.euiCard__footer {
51+
margin-bottom: $euiSizeS;
52+
53+
@include euiBreakpoint('s', 'm', 'l', 'xl') {
54+
margin-bottom: $euiSizeM;
55+
font-size: $euiSizeL;
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)