Skip to content

Commit

Permalink
Merge branch 'main' into 146162d-fix-group-mini-histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Dec 15, 2022
2 parents 8a6dc4c + e337638 commit 499fd5c
Show file tree
Hide file tree
Showing 12 changed files with 312 additions and 104 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ENTERPRISE_SEARCH_CONTENT_PLUGIN = {
export const ANALYTICS_PLUGIN = {
ID: 'enterpriseSearchAnalytics',
NAME: i18n.translate('xpack.enterpriseSearch.analytics.productName', {
defaultMessage: 'Analytics',
defaultMessage: 'Behavorial Analytics',
}),
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.analytics.productDescription', {
defaultMessage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ trackEvent,
</p>
<EuiCodeBlock language="javascript" isCopyable>
{`createTracker({
dsn: "${analyticsDNSUrl}",
dsn: "${analyticsDNSUrl}",
});`}
</EuiCodeBlock>
</EuiText>
Expand Down Expand Up @@ -136,16 +136,15 @@ dsn: "${analyticsDNSUrl}",
{`// track a page view in React
const SearchPage = (props) => {
useEffect(() => {
trackPageView();
}, []);
useEffect(() => {
trackPageView();
}, []);
return (
<div>
<h1>Search Page</h1>
<
</div>
);
return (
<div>
<h1>Search Page</h1>
</div>
);
};`}
</EuiCodeBlock>
<EuiSpacer size="m" />
Expand All @@ -164,20 +163,21 @@ import { trackEvent } from '@elastic/behavioural-analytics-javascript-tracker';
const ProductDetailPage = (props) => {
return (
<div>
<h1>Product detail page</h1>
<input type="button" onClick={() => {
trackEvent("click", {
category: "product",
action: "add_to_cart",
label: "product_id",
value: "123"
})
}} />
}}>Add to Basket</input>
</div>
)
return (
<div>
<h1>Product detail page</h1>
<input type="button" onClick={() => {
trackEvent("click", {
category: "product",
action: "add_to_cart",
label: "product_id",
value: "123"
})
}} />
}}>Add to Basket</input>
</div>
)
}
}`}
</EuiCodeBlock>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('useEnterpriseSearchContentNav', () => {
name: 'Collections',
},
],
name: 'Analytics',
name: 'Behavorial Analytics',
},
{
id: 'search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const useEnterpriseSearchNav = () => {
},
],
name: i18n.translate('xpack.enterpriseSearch.nav.analyticsTitle', {
defaultMessage: 'Analytics',
defaultMessage: 'Behavorial Analytics',
}),
},
{
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,14 @@ export const LensTopNavMenu = ({
if (!activeDatasourceId || !discoverLocator) {
return;
}
if (visualization.activeId == null) {
return;
}
return getLayerMetaInfo(
datasourceMap[activeDatasourceId],
datasourceStates[activeDatasourceId].state,
visualizationMap[visualization.activeId],
visualization.state,
activeData,
dataViews.indexPatterns,
data.query.timefilter.timefilter.getTime(),
Expand All @@ -490,8 +495,10 @@ export const LensTopNavMenu = ({
}, [
activeDatasourceId,
discoverLocator,
visualization,
datasourceMap,
datasourceStates,
visualizationMap,
activeData,
dataViews.indexPatterns,
data.query.timefilter.timefilter,
Expand Down
Loading

0 comments on commit 499fd5c

Please sign in to comment.