[Dataset quality] 🐞 firing OPEN_FLYOUT event when flyout is initialized in URL (#184495)

When moving dataset-quality instance from Observability Logs Explorer to
Stack Management > Data I left out triggering the flyout event whenever
flyout information is defined in the URL.

This PR contains a fix for the aforementioned and a change in the copy
of the DegradedDocs Improvements tooltip

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Yngrid Coello 2024-05-30 13:26:13 +02:00 committed by GitHub
parent 3e44cca7e7
commit 0a8b651f8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 18 deletions

View file

@ -43,6 +43,14 @@ export function DatasetQualityContextProvider({
initialState,
});
datasetQualityController.service.start();
if (initialState?.flyout?.dataset) {
datasetQualityController.service.send({
type: 'OPEN_FLYOUT',
dataset: initialState.flyout.dataset,
});
}
setController(datasetQualityController);
const datasetQualityStateSubscription = datasetQualityController.state$.subscribe((state) => {

View file

@ -147,8 +147,7 @@ export const flyoutImprovementText = i18n.translate(
export const flyoutImprovementTooltip = i18n.translate(
'xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip',
{
defaultMessage:
'Set of degraded fields in the dataset. Please not that this list may not be exhaustive.',
defaultMessage: 'A partial list of degraded fields found in your dataset.',
}
);

View file

@ -6,5 +6,4 @@
*/
export * from './create_controller';
export * from './provider';
export * from './types';

View file

@ -1,15 +0,0 @@
/*
* 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 createContainer from 'constate';
import type { DatasetQualityController } from './types';
const useDatasetQualityController = ({ controller }: { controller: DatasetQualityController }) =>
controller;
export const [DatasetQualityControllerProvider, useDatasetQualityControllerContext] =
createContainer(useDatasetQualityController);