Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7675,7 +7675,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.checkAllErrorCheckingIndexMessage": "Une erreur s'est produite lors de la vérification de l'index {indexName}",
"securitySolutionPackages.ecsDataQualityDashboard.checkingLabel": "Vérification de {index}",
"securitySolutionPackages.ecsDataQualityDashboard.checkNow": "Vérifier maintenant",
"securitySolutionPackages.ecsDataQualityDashboard.close": "Fermer",
"securitySolutionPackages.ecsDataQualityDashboard.coldDescription": "L'index n'est plus mis à jour et il est interrogé peu fréquemment. Les informations doivent toujours être interrogeables, mais il est acceptable que ces requêtes soient plus lentes.",
"securitySolutionPackages.ecsDataQualityDashboard.coldPatternTooltip": "{indices} {indices, plural, =1 {L'index correspondant} other {Les index correspondants}} au modèle {pattern} {indices, plural, =1 {est} other {sont}} \"cold\". Les index \"cold\" ne sont plus mis à jour et ne sont pas interrogés fréquemment. Les informations doivent toujours être interrogeables, mais il est acceptable que ces requêtes soient plus lentes.",
"securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.searchFieldsPlaceholder": "Rechercher dans les champs",
Expand Down Expand Up @@ -7803,7 +7802,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.indexSizeTooltip": "Taille de l'index (sans les répliques)",
"securitySolutionPackages.ecsDataQualityDashboard.indices": "Index",
"securitySolutionPackages.ecsDataQualityDashboard.indicesChecked": "Index vérifiés",
"securitySolutionPackages.ecsDataQualityDashboard.introducingDataQualityHistory": "Présentation de l'historique de la qualité des données",
"securitySolutionPackages.ecsDataQualityDashboard.lastCheckedLabel": "Dernière vérification",
"securitySolutionPackages.ecsDataQualityDashboard.loadingHistoricalResults": "Chargement des résultats antérieurs",
"securitySolutionPackages.ecsDataQualityDashboard.mappingThatConflictWithEcsMessage": "❌ Les mappings ou valeurs de champs qui ne sont pas conformes à ECS ne sont pas pris en charge",
Expand Down Expand Up @@ -7862,11 +7860,9 @@
"securitySolutionPackages.ecsDataQualityDashboard.toasts.copiedResultsToastTitle": "Résultats copiés dans le presse-papiers",
"securitySolutionPackages.ecsDataQualityDashboard.toggleHistoricalResultCheckedAt": "Bascule de résultat historique vérifié à {checkedAt}",
"securitySolutionPackages.ecsDataQualityDashboard.totalChecks": "{formattedCount} {count, plural, one {vérification} other {vérifications}}",
"securitySolutionPackages.ecsDataQualityDashboard.tryIt": "Essayer",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedDescription": "L'index n'est pas géré par la Gestion du cycle de vie des index (ILM)",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedPatternTooltip": "{indices} {indices, plural, =1 {L'index correspondant} other {Les index correspondants}} au modèle {pattern} {indices, plural, =1 {n'est pas géré} other {ne sont pas gérés}} par la gestion du cycle de vie des index (ILM)",
"securitySolutionPackages.ecsDataQualityDashboard.viewHistory": "Afficher l'historique",
"securitySolutionPackages.ecsDataQualityDashboard.viewPastResults": "Voir les résultats antérieurs",
"securitySolutionPackages.ecsDataQualityDashboard.warmDescription": "L'index n'est plus mis à jour mais il est toujours interrogé",
"securitySolutionPackages.ecsDataQualityDashboard.warmPatternTooltip": "{indices} {indices, plural, =1 {L'index correspondant} other {Les index correspondants}} au modèle {pattern} {indices, plural, =1 {est} other {sont}} \"warm\". Les index \"warm\" ne sont plus mis à jour, mais ils sont toujours interrogés.",
"securitySolutionPackages.entityAnalytics.navigation": "Analyse des entités",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7669,7 +7669,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.checkAllErrorCheckingIndexMessage": "インデックス{indexName}の確認中にエラーが発生しました",
"securitySolutionPackages.ecsDataQualityDashboard.checkingLabel": "{index}を確認中",
"securitySolutionPackages.ecsDataQualityDashboard.checkNow": "今すぐ確認",
"securitySolutionPackages.ecsDataQualityDashboard.close": "閉じる",
"securitySolutionPackages.ecsDataQualityDashboard.coldDescription": "インデックスは更新されず、頻繁に照会されません。情報はまだ検索可能でなければなりませんが、クエリーが低速でも問題ありません。",
"securitySolutionPackages.ecsDataQualityDashboard.coldPatternTooltip": "{pattern}パターンと一致する{indices} {indices, plural, other {インデックス}}{indices, plural, other {は}}コールドです。コールドインデックスは更新されず、ほとんど照会されません。情報はまだ検索可能でなければなりませんが、クエリーが低速でも問題ありません。",
"securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.searchFieldsPlaceholder": "検索フィールド",
Expand Down Expand Up @@ -7797,7 +7796,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.indexSizeTooltip": "インデックスのサイズ(レプリカを除く)",
"securitySolutionPackages.ecsDataQualityDashboard.indices": "インデックス",
"securitySolutionPackages.ecsDataQualityDashboard.indicesChecked": "確認されたインデックス",
"securitySolutionPackages.ecsDataQualityDashboard.introducingDataQualityHistory": "データ品質履歴の概要",
"securitySolutionPackages.ecsDataQualityDashboard.lastCheckedLabel": "前回確認日時",
"securitySolutionPackages.ecsDataQualityDashboard.loadingHistoricalResults": "履歴結果を読み込み中",
"securitySolutionPackages.ecsDataQualityDashboard.mappingThatConflictWithEcsMessage": "❌ ECSと互換性がないマッピングまたはフィールド値はサポートされません",
Expand Down Expand Up @@ -7856,11 +7854,9 @@
"securitySolutionPackages.ecsDataQualityDashboard.toasts.copiedResultsToastTitle": "結果をクリップボードにコピーしました",
"securitySolutionPackages.ecsDataQualityDashboard.toggleHistoricalResultCheckedAt": "{checkedAt}に確認された履歴結果を切り替える",
"securitySolutionPackages.ecsDataQualityDashboard.totalChecks": "{formattedCount} {count, plural, other {確認}}",
"securitySolutionPackages.ecsDataQualityDashboard.tryIt": "お試しください",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedDescription": "インデックスはインデックスライフサイクル管理(ILM)で管理されていません",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedPatternTooltip": "{pattern}パターンと一致する{indices} {indices, plural, other {インデックス}}{indices, plural, other {は}}インデックスライフサイクル管理(ILM)によって管理されていません",
"securitySolutionPackages.ecsDataQualityDashboard.viewHistory": "履歴を表示",
"securitySolutionPackages.ecsDataQualityDashboard.viewPastResults": "過去の結果を表示",
"securitySolutionPackages.ecsDataQualityDashboard.warmDescription": "インデックスは更新されませんが、まだ照会されています",
"securitySolutionPackages.ecsDataQualityDashboard.warmPatternTooltip": "{pattern}パターンと一致する{indices} {indices, plural, other {インデックス}}{indices, plural, other {は}}ウォームです。ウォームインデックスは更新されませんが、まだ照会されています。",
"securitySolutionPackages.entityAnalytics.navigation": "エンティティ分析",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7681,7 +7681,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.checkAllErrorCheckingIndexMessage": "检查索引 {indexName} 时发生错误",
"securitySolutionPackages.ecsDataQualityDashboard.checkingLabel": "正在检查 {index}",
"securitySolutionPackages.ecsDataQualityDashboard.checkNow": "立即检查",
"securitySolutionPackages.ecsDataQualityDashboard.close": "关闭",
"securitySolutionPackages.ecsDataQualityDashboard.coldDescription": "该索引不再进行更新,且不被经常查询。这些信息仍需能够搜索,但查询速度快慢并不重要。",
"securitySolutionPackages.ecsDataQualityDashboard.coldPatternTooltip": "{indices} 个匹配 {pattern} 模式的{indices, plural, other {索引}}{indices, plural, other {为}}冷索引。冷索引不再进行更新,且不被经常查询。这些信息仍需能够搜索,但查询速度快慢并不重要。",
"securitySolutionPackages.ecsDataQualityDashboard.compareFieldsTable.searchFieldsPlaceholder": "搜索字段",
Expand Down Expand Up @@ -7809,7 +7808,6 @@
"securitySolutionPackages.ecsDataQualityDashboard.indexSizeTooltip": "索引的大小(不包括副本分片)",
"securitySolutionPackages.ecsDataQualityDashboard.indices": "索引",
"securitySolutionPackages.ecsDataQualityDashboard.indicesChecked": "已检查索引",
"securitySolutionPackages.ecsDataQualityDashboard.introducingDataQualityHistory": "正在引入数据质量历史记录",
"securitySolutionPackages.ecsDataQualityDashboard.lastCheckedLabel": "上次检查时间",
"securitySolutionPackages.ecsDataQualityDashboard.loadingHistoricalResults": "正在加载历史结果",
"securitySolutionPackages.ecsDataQualityDashboard.mappingThatConflictWithEcsMessage": "❌ 不支持不符合 ECS 规范的映射或字段值",
Expand Down Expand Up @@ -7868,11 +7866,9 @@
"securitySolutionPackages.ecsDataQualityDashboard.toasts.copiedResultsToastTitle": "已将结果复制到剪贴板",
"securitySolutionPackages.ecsDataQualityDashboard.toggleHistoricalResultCheckedAt": "切换已于 {checkedAt} 检查的历史结果",
"securitySolutionPackages.ecsDataQualityDashboard.totalChecks": "{formattedCount} 个{count, plural, other {检查}}",
"securitySolutionPackages.ecsDataQualityDashboard.tryIt": "试用",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedDescription": "此索引不由索引生命周期管理 (ILM) 进行管理",
"securitySolutionPackages.ecsDataQualityDashboard.unmanagedPatternTooltip": "与 {pattern} 模式匹配的 {indices} 个{indices, plural, other {索引}}{indices, plural, other {}}不通过索引生命周期管理 (ILM) 进行管理",
"securitySolutionPackages.ecsDataQualityDashboard.viewHistory": "查看历史记录",
"securitySolutionPackages.ecsDataQualityDashboard.viewPastResults": "查看过去的结果",
"securitySolutionPackages.ecsDataQualityDashboard.warmDescription": "不再更新但仍会查询此索引",
"securitySolutionPackages.ecsDataQualityDashboard.warmPatternTooltip": "{indices} 个匹配 {pattern} 模式的{indices, plural, other {索引}}{indices, plural, other {为}}温索引。不再更新但仍会查询温索引。",
"securitySolutionPackages.entityAnalytics.navigation": "实体分析",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import numeral from '@elastic/numeral';
import { render, screen, waitFor, within } from '@testing-library/react';
import { render, screen, waitFor } from '@testing-library/react';
import React from 'react';

import { EMPTY_STAT } from '../../constants';
Expand All @@ -22,8 +22,6 @@ import {
} from '../../mock/test_providers/test_providers';
import { PatternRollup } from '../../types';
import { Props, IndicesDetails } from '.';
import userEvent from '@testing-library/user-event';
import { HISTORICAL_RESULTS_TOUR_IS_DISMISSED_STORAGE_KEY } from './constants';

const defaultBytesFormat = '0,0.[0]b';
const formatBytes = (value: number | undefined) =>
Expand Down Expand Up @@ -70,7 +68,6 @@ const defaultProps: Props = {
describe('IndicesDetails', () => {
beforeEach(async () => {
jest.clearAllMocks();
localStorage.removeItem(HISTORICAL_RESULTS_TOUR_IS_DISMISSED_STORAGE_KEY);

render(
<TestExternalProviders>
Expand All @@ -91,55 +88,4 @@ describe('IndicesDetails', () => {
expect(screen.getByTestId(`${pattern}PatternPanel`)).toBeInTheDocument();
});
});

describe('tour', () => {
test('it renders the tour wrapping view history button of first row of first non-empty pattern', async () => {
const wrapper = await screen.findByTestId('historicalResultsTour');
const button = within(wrapper).getByTestId(
'viewHistoryAction-.internal.alerts-security.alerts-default-000001'
);
expect(button).toHaveAttribute('data-tour-element', patterns[1]);

expect(screen.getByTestId('historicalResultsTourPanel')).toHaveTextContent(
'Introducing data quality history'
);
});

describe('when the tour is dismissed', () => {
test('it hides the tour and persists in localStorage', async () => {
const wrapper = screen.getByTestId('historicalResultsTourPanel');
const button = within(wrapper).getByText('Close');
await userEvent.click(button);

await waitFor(() => expect(screen.queryByTestId('historicalResultsTour')).toBeNull());

expect(localStorage.getItem(HISTORICAL_RESULTS_TOUR_IS_DISMISSED_STORAGE_KEY)).toEqual(
'true'
);
});
});

describe('when the first pattern is toggled', () => {
test('it renders the tour wrapping view history button of first row of second non-empty pattern', async () => {
const firstNonEmptyPatternAccordionWrapper = await screen.findByTestId(
`${patterns[1]}PatternPanel`
);
const accordionToggle = within(firstNonEmptyPatternAccordionWrapper).getByTestId(
'indexResultBadge'
);
await userEvent.click(accordionToggle);

const secondPatternAccordionWrapper = screen.getByTestId(`${patterns[2]}PatternPanel`);
const historicalResultsWrapper = await within(secondPatternAccordionWrapper).findByTestId(
'historicalResultsTour'
);
const button = within(historicalResultsWrapper).getByTestId(
`viewHistoryAction-${patternIndexNames[patterns[2]][0]}`
);
expect(button).toHaveAttribute('data-tour-element', patterns[2]);

expect(screen.getByTestId('historicalResultsTourPanel')).toBeInTheDocument();
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
*/

import { EuiFlexItem, useEuiTheme } from '@elastic/eui';
import React, { useState, useCallback, useEffect } from 'react';
import React from 'react';
import { css } from '@emotion/react';

import { useResultsRollupContext } from '../../contexts/results_rollup_context';
import { Pattern } from './pattern';
import { SelectedIndex } from '../../types';
import { useDataQualityContext } from '../../data_quality_context';
import { useIsHistoricalResultsTourActive } from './hooks/use_is_historical_results_tour_active';

const useStyles = () => {
const { euiTheme } = useEuiTheme();
Expand Down Expand Up @@ -41,41 +40,6 @@ const IndicesDetailsComponent: React.FC<Props> = ({
const { patternRollups, patternIndexNames } = useResultsRollupContext();
const { patterns } = useDataQualityContext();

const [isTourActive, setIsTourActive] = useIsHistoricalResultsTourActive();

const handleDismissTour = useCallback(() => {
setIsTourActive(false);
}, [setIsTourActive]);

const [openPatterns, setOpenPatterns] = useState<
Array<{ name: string; isOpen: boolean; isEmpty: boolean }>
>(() => {
return patterns.map((pattern) => ({ name: pattern, isOpen: true, isEmpty: false }));
});

const handleAccordionToggle = useCallback(
(patternName: string, isOpen: boolean, isEmpty: boolean) => {
setOpenPatterns((prevOpenPatterns) => {
return prevOpenPatterns.map((p) =>
p.name === patternName ? { ...p, isOpen, isEmpty } : p
);
});
},
[]
);

const firstOpenNonEmptyPattern = openPatterns.find((pattern) => {
return pattern.isOpen && !pattern.isEmpty;
})?.name;

const [openPatternsUpdatedAt, setOpenPatternsUpdatedAt] = useState<number>(Date.now());

useEffect(() => {
if (firstOpenNonEmptyPattern) {
setOpenPatternsUpdatedAt(Date.now());
}
}, [openPatterns, firstOpenNonEmptyPattern]);

return (
<div data-test-subj="indicesDetails">
{patterns.map((pattern) => (
Expand All @@ -86,16 +50,6 @@ const IndicesDetailsComponent: React.FC<Props> = ({
patternRollup={patternRollups[pattern]}
chartSelectedIndex={chartSelectedIndex}
setChartSelectedIndex={setChartSelectedIndex}
isTourActive={isTourActive}
isFirstOpenNonEmptyPattern={pattern === firstOpenNonEmptyPattern}
onAccordionToggle={handleAccordionToggle}
onDismissTour={handleDismissTour}
// TODO: remove this hack when EUI popover is fixed
// https://github.com/elastic/eui/issues/5226
//
// this information is used to force the tour guide popover to reposition
// when surrounding accordions get toggled and affect the layout
{...(pattern === firstOpenNonEmptyPattern && { openPatternsUpdatedAt })}
/>
</EuiFlexItem>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ export const MIN_PAGE_SIZE = 10;

export const HISTORY_TAB_ID = 'history';
export const LATEST_CHECK_TAB_ID = 'latest_check';

export const HISTORICAL_RESULTS_TOUR_SELECTOR_KEY = 'data-tour-element';
Loading