mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[APM] remove legacy data toast (#126352)
* [APM] remove legacy data toast * remove useUpgradeAssistantHref
This commit is contained in:
parent
b00831cedd
commit
2597dfc2df
4 changed files with 2 additions and 57 deletions
|
@ -5,24 +5,16 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
EuiLink,
|
||||
EuiEmptyPrompt,
|
||||
} from '@elastic/eui';
|
||||
import { EuiFlexGroup, EuiFlexItem, EuiEmptyPrompt } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React, { useEffect } from 'react';
|
||||
import React from 'react';
|
||||
import uuid from 'uuid';
|
||||
import { toMountPoint } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
import { useAnomalyDetectionJobsContext } from '../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context';
|
||||
import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context';
|
||||
import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params';
|
||||
import { useLocalStorage } from '../../../hooks/use_local_storage';
|
||||
import { useAnyOfApmParams } from '../../../hooks/use_apm_params';
|
||||
import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher';
|
||||
import { useTimeRange } from '../../../hooks/use_time_range';
|
||||
import { useUpgradeAssistantHref } from '../../shared/links/kibana';
|
||||
import { SearchBar } from '../../shared/search_bar';
|
||||
import { getTimeRangeComparison } from '../../shared/time_comparison/get_time_range_comparison';
|
||||
import { ServiceList } from './service_list';
|
||||
|
@ -37,8 +29,6 @@ const initialData = {
|
|||
},
|
||||
};
|
||||
|
||||
let hasDisplayedToast = false;
|
||||
|
||||
function useServicesFetcher() {
|
||||
const {
|
||||
urlParams: { comparisonEnabled, comparisonType },
|
||||
|
@ -50,9 +40,6 @@ function useServicesFetcher() {
|
|||
|
||||
const { start, end } = useTimeRange({ rangeFrom, rangeTo });
|
||||
|
||||
const { core } = useApmPluginContext();
|
||||
const upgradeAssistantHref = useUpgradeAssistantHref();
|
||||
|
||||
const { offset } = getTimeRangeComparison({
|
||||
start,
|
||||
end,
|
||||
|
@ -113,36 +100,6 @@ function useServicesFetcher() {
|
|||
{ preservePreviousData: false }
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasDisplayedToast) {
|
||||
hasDisplayedToast = true;
|
||||
|
||||
core.notifications.toasts.addWarning({
|
||||
title: i18n.translate('xpack.apm.serviceInventory.toastTitle', {
|
||||
defaultMessage:
|
||||
'Legacy data was detected within the selected time range',
|
||||
}),
|
||||
text: toMountPoint(
|
||||
<p>
|
||||
{i18n.translate('xpack.apm.serviceInventory.toastText', {
|
||||
defaultMessage:
|
||||
"You're running Elastic Stack 7.0+ and we've detected incompatible data from a previous 6.x version. If you want to view this data in APM, you should migrate it. See more in ",
|
||||
})}
|
||||
|
||||
<EuiLink href={upgradeAssistantHref}>
|
||||
{i18n.translate(
|
||||
'xpack.apm.serviceInventory.upgradeAssistantLinkText',
|
||||
{
|
||||
defaultMessage: 'the upgrade assistant',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
</p>
|
||||
),
|
||||
});
|
||||
}
|
||||
}, [upgradeAssistantHref, core.notifications.toasts]);
|
||||
|
||||
return {
|
||||
mainStatisticsData,
|
||||
mainStatisticsStatus,
|
||||
|
|
|
@ -12,12 +12,6 @@ export function getUpgradeAssistantHref(basePath: IBasePath) {
|
|||
return basePath.prepend('/app/management/stack/upgrade_assistant');
|
||||
}
|
||||
|
||||
export function useUpgradeAssistantHref() {
|
||||
const { core } = useApmPluginContext();
|
||||
|
||||
return getUpgradeAssistantHref(core.http.basePath);
|
||||
}
|
||||
|
||||
export function useFleetCloudAgentPolicyHref() {
|
||||
const {
|
||||
core: {
|
||||
|
|
|
@ -7315,9 +7315,6 @@
|
|||
"xpack.apm.serviceIcons.serviceDetails.service.frameworkLabel": "フレームワーク名",
|
||||
"xpack.apm.serviceIcons.serviceDetails.service.runtimeLabel": "ランタイム名・バージョン",
|
||||
"xpack.apm.serviceIcons.serviceDetails.service.versionLabel": "サービスバージョン",
|
||||
"xpack.apm.serviceInventory.toastText": "現在 Elastic Stack 7.0+ を実行中で、以前のバージョン 6.x からの互換性のないデータを検知しました。このデータを APM で表示するには、移行が必要です。詳細 ",
|
||||
"xpack.apm.serviceInventory.toastTitle": "選択された時間範囲内にレガシーデータが検知されました。",
|
||||
"xpack.apm.serviceInventory.upgradeAssistantLinkText": "アップグレードアシスタント",
|
||||
"xpack.apm.serviceLogs.noInfrastructureMessage": "表示するログメッセージがありません。",
|
||||
"xpack.apm.serviceMap.anomalyDetectionPopoverDisabled": "APM 設定で異常検知を有効にすると、サービス正常性インジケーターが表示されます。",
|
||||
"xpack.apm.serviceMap.anomalyDetectionPopoverLink": "異常を表示",
|
||||
|
|
|
@ -7332,9 +7332,6 @@
|
|||
"xpack.apm.serviceIcons.serviceDetails.service.frameworkLabel": "框架名称",
|
||||
"xpack.apm.serviceIcons.serviceDetails.service.runtimeLabel": "运行时名称和版本",
|
||||
"xpack.apm.serviceIcons.serviceDetails.service.versionLabel": "服务版本",
|
||||
"xpack.apm.serviceInventory.toastText": "您正在运行 Elastic Stack 7.0+,我们检测到来自以前 6.x 版本的数据不兼容。如果想在 APM 中查看此数据,您应迁移数据。在以下位置查看更多内容: ",
|
||||
"xpack.apm.serviceInventory.toastTitle": "在选定时间范围中检测到旧数据",
|
||||
"xpack.apm.serviceInventory.upgradeAssistantLinkText": "升级助手",
|
||||
"xpack.apm.serviceLogs.noInfrastructureMessage": "没有可显示的日志消息。",
|
||||
"xpack.apm.serviceMap.anomalyDetectionPopoverDisabled": "通过在 APM 设置中启用异常检测来显示服务运行状况指标。",
|
||||
"xpack.apm.serviceMap.anomalyDetectionPopoverLink": "查看异常",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue