Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dataset quality] Remove add button #172581

Merged
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
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} />;
}
1 change: 0 additions & 1 deletion x-pack/plugins/dataset_quality/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@kbn/core",
"@kbn/core-plugins-server",
"@kbn/core-elasticsearch-server-mocks",
"@kbn/deeplinks-observability",
"@kbn/fleet-plugin",
"@kbn/observability-shared-plugin",
"@kbn/server-route-repository",
Expand Down
Loading