-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] Elastic Entity Model enablement #187593
Changes from all commits
a4379ef
0cbef3c
539b8c1
d307334
4564a4f
9b133db
40b74bf
143460f
89fc6db
42c8e7c
2f1f1a3
789442b
4d0f59a
06f8c3e
55c44d7
244da1a
0cbb85f
7d7a82c
829cfb1
49427b5
664e785
3fc0fd5
ec86fb0
e305811
76916e9
2f60139
884db4d
c9019f1
5f8ca54
65ca981
083f5cd
3b1a7be
808a64e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ import { ServiceGroupsButtonGroup } from '../../app/service_groups/service_group | |
import { ApmEnvironmentFilter } from '../../shared/environment_filter'; | ||
import { getNoDataConfig } from './no_data_config'; | ||
import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; | ||
import { EntityEnablement } from '../../shared/entity_enablement'; | ||
|
||
// Paths that must skip the no data screen | ||
const bypassNoDataScreenPaths = ['/settings', '/diagnostics']; | ||
|
@@ -45,6 +46,7 @@ export function ApmMainTemplate({ | |
environmentFilter = true, | ||
showServiceGroupSaveButton = false, | ||
showServiceGroupsNav = false, | ||
showEnablementCallout = false, | ||
environmentFilterInTemplate = true, | ||
selectedNavButton, | ||
...pageTemplateProps | ||
|
@@ -55,6 +57,7 @@ export function ApmMainTemplate({ | |
environmentFilter?: boolean; | ||
showServiceGroupSaveButton?: boolean; | ||
showServiceGroupsNav?: boolean; | ||
showEnablementCallout?: boolean; | ||
selectedNavButton?: 'serviceGroups' | 'allServices'; | ||
} & KibanaPageTemplateProps & | ||
Pick<ObservabilityPageTemplateProps, 'pageSectionProps'>) { | ||
|
@@ -126,6 +129,7 @@ export function ApmMainTemplate({ | |
const pageHeaderTitle = ( | ||
<EuiFlexGroup justifyContent="spaceBetween" wrap={true}> | ||
{pageHeader?.pageTitle ?? pageTitle} | ||
<EuiFlexItem grow={false} /> | ||
<EuiFlexItem grow={false}> | ||
<EuiFlexGroup justifyContent="center"> | ||
<EuiFlexItem grow={false}> | ||
|
@@ -152,10 +156,14 @@ export function ApmMainTemplate({ | |
rightSideItems, | ||
...pageHeader, | ||
pageTitle: pageHeaderTitle, | ||
children: | ||
showServiceGroupsNav && selectedNavButton ? ( | ||
<ServiceGroupsButtonGroup selectedNavButton={selectedNavButton} /> | ||
) : null, | ||
children: ( | ||
<EuiFlexGroup direction="column"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if this will actually happen but if none of the conditions below are met, there will be an empty div in the DOM. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean the component we pass as children? That won't happen unless we change the template params we pass. We pass showServiceGroupsNav in ServiceGroupTemplate which is used for the services |
||
{showEnablementCallout && selectedNavButton === 'allServices' && <EntityEnablement />} | ||
{showServiceGroupsNav && selectedNavButton && ( | ||
<ServiceGroupsButtonGroup selectedNavButton={selectedNavButton} /> | ||
)} | ||
</EuiFlexGroup> | ||
), | ||
}} | ||
{...pageTemplateProps} | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { useContext } from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { | ||
useEuiTheme, | ||
EuiButtonEmpty, | ||
EuiConfirmModal, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiIcon, | ||
EuiPanel, | ||
EuiText, | ||
EuiTitle, | ||
} from '@elastic/eui'; | ||
import { getSurveyFeedbackURL } from '@kbn/observability-shared-plugin/public'; | ||
import { KibanaEnvironmentContext } from '../../../context/kibana_environment_context/kibana_environment_context'; | ||
import { getPathForFeedback } from '../../../utils/get_path_for_feedback'; | ||
|
||
export function FeedbackModal({ | ||
isFeedbackModalVisible = false, | ||
onClose, | ||
}: { | ||
isFeedbackModalVisible?: boolean; | ||
onClose: () => void; | ||
}) { | ||
const kibanaEnvironment = useContext(KibanaEnvironmentContext); | ||
const { kibanaVersion, isCloudEnv, isServerlessEnv } = kibanaEnvironment; | ||
const sanitizedPath = getPathForFeedback(window.location.pathname); | ||
const { euiTheme } = useEuiTheme(); | ||
|
||
return ( | ||
<> | ||
{isFeedbackModalVisible && ( | ||
<EuiConfirmModal | ||
style={{ | ||
width: '600px', | ||
}} | ||
onCancel={onClose} | ||
onConfirm={onClose} | ||
confirmButtonText={ | ||
<EuiButtonEmpty | ||
css={{ | ||
color: euiTheme.colors.emptyShade, | ||
}} | ||
data-test-subj="xpack.apm.eemFeedback.button.open" | ||
iconType="discuss" | ||
target="_blank" | ||
size="s" | ||
href={getSurveyFeedbackURL({ | ||
formUrl: 'https://ela.st/new-o11y-experience', | ||
kibanaVersion, | ||
isCloudEnv, | ||
isServerlessEnv, | ||
sanitizedPath, | ||
})} | ||
> | ||
{i18n.translate('xpack.apm.eemFeedback.button.openSurvey', { | ||
defaultMessage: 'Tell us what you think!', | ||
})} | ||
</EuiButtonEmpty> | ||
} | ||
defaultFocusedButton="confirm" | ||
> | ||
<EuiPanel hasShadow={false}> | ||
<EuiFlexGroup | ||
direction="column" | ||
justifyContent="center" | ||
alignItems="center" | ||
gutterSize="s" | ||
> | ||
<EuiFlexItem> | ||
<EuiIcon type="heart" size="l" /> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<EuiTitle> | ||
<h2> | ||
{i18n.translate('xpack.apm.eemFeedback.title', { | ||
defaultMessage: 'Let us know what you think!', | ||
})} | ||
</h2> | ||
</EuiTitle> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiPanel> | ||
|
||
<EuiPanel hasShadow={false} paddingSize="s"> | ||
<EuiText grow={false} size="s"> | ||
<p> | ||
{i18n.translate('xpack.apm.feedbackModal.body.thanks', { | ||
defaultMessage: | ||
"Thank you for trying our new experience. We'll be continuing to improve on this so please come back often.", | ||
})} | ||
</p> | ||
</EuiText> | ||
</EuiPanel> | ||
</EuiConfirmModal> | ||
)} | ||
</> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Why is this item needed?