Skip to content

Commit

Permalink
Add data button removed
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrdyn committed Dec 5, 2023
1 parent b0219f9 commit a69d1b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 42 deletions.
4 changes: 0 additions & 4 deletions x-pack/plugins/dataset_quality/common/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ export const datasetQualityAppTitle = i18n.translate('xpack.datasetQuality.appTi
defaultMessage: 'Datasets',
});

export const onboardingLinkTitle = i18n.translate('xpack.datasetQuality.onboardingLinkTitle', {
defaultMessage: 'Add data',
});

export const noDatasetsDescription = i18n.translate('xpack.datasetQuality.noDatasetsDescription', {
defaultMessage: 'Try adjusting your time or filter.',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,10 @@
* 2.0.
*/

import { EuiPageHeader } from '@elastic/eui';
import React from 'react';
import { EuiPageHeader, EuiButton } from '@elastic/eui';
import {
ObservabilityOnboardingLocatorParams,
OBSERVABILITY_ONBOARDING_LOCATOR,
} from '@kbn/deeplinks-observability';
import { datasetQualityAppTitle, onboardingLinkTitle } from '../../../common/translations';
import { useKibanaContextForPlugin } from '../../utils';
import { datasetQualityAppTitle } from '../../../common/translations';

export function Header() {
const {
services: { share },
} = useKibanaContextForPlugin();

const OnboardingLink = React.memo(() => {
const locator = share.url.locators.get<ObservabilityOnboardingLocatorParams>(
OBSERVABILITY_ONBOARDING_LOCATOR
);

const onboardingUrl = locator?.getRedirectUrl({});

return (
<EuiButton
href={onboardingUrl}
fill
size="s"
iconType="indexOpen"
data-test-subj="datasetQualityOnboardingLink"
>
{onboardingLinkTitle}
</EuiButton>
);
});

return (
<EuiPageHeader
bottomBorder
pageTitle={datasetQualityAppTitle}
rightSideItems={[<OnboardingLink />]}
/>
);
return <EuiPageHeader bottomBorder pageTitle={datasetQualityAppTitle} />;
}

0 comments on commit a69d1b6

Please sign in to comment.