Skip to content

Commit

Permalink
Merge branch 'main' into entity-analytics-execution
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema authored Dec 11, 2023
2 parents 3e5c1a8 + 946b38e commit d886820
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 47 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ export function getUiSettings(
name: i18n.translate('data.advancedSettings.defaultIndexTitle', {
defaultMessage: 'Default data view',
}),
value: null,
value: '',
type: 'string',
description: i18n.translate('data.advancedSettings.defaultIndexText', {
defaultMessage: 'Used by discover and visualizations when a data view is not set.',
}),
schema: schema.nullable(schema.string()),
schema: schema.string(),
},
[UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX]: {
name: i18n.translate('data.advancedSettings.courier.ignoreFilterTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) {
expect(response5.status).to.be(200);

const response6 = await supertest.get(defaultPath);
expect(response6.body[serviceKeyId]).to.be(null);
expect(response6.body[serviceKeyId]).to.be('');
});
});
});
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function ({ getService }: FtrProviderContext) {
// TODO: The response comes back undefined in Serverless
const body = response6.body[serviceKeyId];
const expected = body === undefined ? null : body;
expect(expected).to.be(null);
expect(expected).to.be('');
});
});
});
Expand Down

0 comments on commit d886820

Please sign in to comment.