mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ObsUx][APM] Update survey forms for new experience (#188203)
Closed #188193 ## Summary This PR changes the survey URL for all service pages when the new experience is enabled (from `https://ela.st/services-feedback` to `https://ela.st/entity-services-feedback`) |Services form | Entity Services form | |--------------|----------------------| |  |  | Testing: - When the new experience is enabled all service pages should have the new link (without traces and dependencies) <img width="1917" alt="Screenshot 2024-07-12 at 12 49 54" src="https://github.com/user-attachments/assets/7ec42151-060d-4bcc-bb80-ad79820a2f8b"> <img width="1889" alt="Screenshot 2024-07-12 at 12 48 32" src="https://github.com/user-attachments/assets/4db632c7-8226-4251-b319-75f7d60f8453"> <img width="1900" alt="Screenshot 2024-07-12 at 12 50 56" src="https://github.com/user-attachments/assets/4155905f-d56f-429c-8a72-732306310997"> - When the classic view is selected the form links should not show  - The form prefilling should work the same way as before: https://github.com/user-attachments/assets/6c024dcf-46e1-489e-8e7c-888a69881ad6
This commit is contained in:
parent
aca82181a8
commit
9440ea5071
3 changed files with 17 additions and 12 deletions
|
@ -12,6 +12,7 @@ import type { KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-templat
|
|||
import React, { useContext } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { FeatureFeedbackButton } from '@kbn/observability-shared-plugin/public';
|
||||
import { useEntityManagerEnablementContext } from '../../../context/entity_manager_context/use_entity_manager_enablement_context';
|
||||
import { useDefaultAiAssistantStarterPromptsForAPM } from '../../../hooks/use_default_ai_assistant_starter_prompts_for_apm';
|
||||
import { KibanaEnvironmentContext } from '../../../context/kibana_environment_context/kibana_environment_context';
|
||||
import { getPathForFeedback } from '../../../utils/get_path_for_feedback';
|
||||
|
@ -28,6 +29,7 @@ import { EntityEnablement } from '../../shared/entity_enablement';
|
|||
// Paths that must skip the no data screen
|
||||
const bypassNoDataScreenPaths = ['/settings', '/diagnostics'];
|
||||
const APM_FEEDBACK_LINK = 'https://ela.st/services-feedback';
|
||||
const APM_NEW_EXPERIENCE_FEEDBACK_LINK = 'https://ela.st/entity-services-feedback';
|
||||
|
||||
/*
|
||||
* This template contains:
|
||||
|
@ -69,6 +71,7 @@ export function ApmMainTemplate({
|
|||
const { kibanaVersion, isCloudEnv, isServerlessEnv } = kibanaEnvironment;
|
||||
const basePath = http?.basePath.get();
|
||||
const { config } = useApmPluginContext();
|
||||
const { isEntityManagerEnabled } = useEntityManagerEnablementContext();
|
||||
|
||||
const ObservabilityPageTemplate = observabilityShared.navigation.PageTemplate;
|
||||
|
||||
|
@ -135,7 +138,11 @@ export function ApmMainTemplate({
|
|||
<EuiFlexItem grow={false}>
|
||||
<FeatureFeedbackButton
|
||||
data-test-subj="infraApmFeedbackLink"
|
||||
formUrl={APM_FEEDBACK_LINK}
|
||||
formUrl={
|
||||
isEntityManagerEnabled && sanitizedPath.includes('service')
|
||||
? APM_NEW_EXPERIENCE_FEEDBACK_LINK
|
||||
: APM_FEEDBACK_LINK
|
||||
}
|
||||
kibanaVersion={kibanaVersion}
|
||||
isCloudEnv={isCloudEnv}
|
||||
isServerlessEnv={isServerlessEnv}
|
||||
|
@ -172,6 +179,4 @@ export function ApmMainTemplate({
|
|||
);
|
||||
|
||||
return <EnvironmentsContextProvider>{pageTemplate}</EnvironmentsContextProvider>;
|
||||
|
||||
return pageTemplate;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import { TechnicalPreviewBadge } from '../technical_preview_badge';
|
|||
import { ApmPluginStartDeps } from '../../../plugin';
|
||||
import { useEntityManagerEnablementContext } from '../../../context/entity_manager_context/use_entity_manager_enablement_context';
|
||||
import { FeedbackModal } from './feedback_modal';
|
||||
import { UnauthorisedModal } from './unauthorized_modal';
|
||||
import { Unauthorized } from './unauthorized_modal';
|
||||
|
||||
export function EntityEnablement() {
|
||||
const [isFeedbackModalVisible, setsIsFeedbackModalVisible] = useState(false);
|
||||
|
@ -56,7 +56,7 @@ export function EntityEnablement() {
|
|||
}
|
||||
};
|
||||
|
||||
const handleEnableblement = async () => {
|
||||
const handleEnablement = async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const response = await entityManager.entityClient.enableManagedEntityDiscovery();
|
||||
|
@ -75,7 +75,7 @@ export function EntityEnablement() {
|
|||
}
|
||||
};
|
||||
|
||||
const handdleOnCloseFeedback = () => {
|
||||
const handleOnCloseFeedback = () => {
|
||||
setsIsFeedbackModalVisible(false);
|
||||
refetch();
|
||||
};
|
||||
|
@ -93,7 +93,7 @@ export function EntityEnablement() {
|
|||
<EuiLink
|
||||
disabled={isEntityManagerEnabled}
|
||||
data-test-subj="tryOutEEMLink"
|
||||
onClick={handleEnableblement}
|
||||
onClick={handleEnablement}
|
||||
>
|
||||
{isEntityManagerEnabled
|
||||
? i18n.translate('xpack.apm.eemEnablement.enabled.', {
|
||||
|
@ -149,8 +149,8 @@ export function EntityEnablement() {
|
|||
</EuiFlexItem>
|
||||
{isEntityManagerEnabled && (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiLink data-test-subj="restoreClassiView" onClick={handleRestoreView}>
|
||||
{i18n.translate('xpack.apm.eemEnablement.restoveClassicView.', {
|
||||
<EuiLink data-test-subj="restoreClassicView" onClick={handleRestoreView}>
|
||||
{i18n.translate('xpack.apm.eemEnablement.restoreClassicView.', {
|
||||
defaultMessage: 'Restore classic view',
|
||||
})}
|
||||
</EuiLink>
|
||||
|
@ -158,9 +158,9 @@ export function EntityEnablement() {
|
|||
)}
|
||||
<FeedbackModal
|
||||
isFeedbackModalVisible={isFeedbackModalVisible}
|
||||
onClose={handdleOnCloseFeedback}
|
||||
onClose={handleOnCloseFeedback}
|
||||
/>
|
||||
<UnauthorisedModal
|
||||
<Unauthorized
|
||||
isUnauthorizedModalVisible={isUnauthorizedModalVisible}
|
||||
onClose={() => setsIsUnauthorizedModalVisible(false)}
|
||||
/>
|
||||
|
|
|
@ -29,7 +29,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { useKibanaUrl } from '../../../hooks/use_kibana_url';
|
||||
|
||||
export function UnauthorisedModal({
|
||||
export function Unauthorized({
|
||||
isUnauthorizedModalVisible = false,
|
||||
onClose,
|
||||
}: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue