Skip to content

Commit

Permalink
[Dataset quality] Remove add button (#172581)
Browse files Browse the repository at this point in the history
This PR removes `Add data` button from dataset quality

### Before
<img width="2408" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/3fcf05e9-ebbe-4db5-a0d6-ca4777c406d6">

### After
<img width="2411" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/7baa99bb-3033-4f77-93a3-41f6b15eeaeb">

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
yngrdyn and kibanamachine authored Dec 11, 2023
1 parent efe8362 commit d065840
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 43 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} />;
}
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

0 comments on commit d065840

Please sign in to comment.