Skip to content

Commit

Permalink
Merge branch 'main' into stateful-sidenav/feedback-btn
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga authored Oct 11, 2024
2 parents 4784705 + 56f93fa commit 2737355
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 185 deletions.
4 changes: 2 additions & 2 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ if (!prConfig) {
}

const GITHUB_PR_LABELS = process.env.GITHUB_PR_LABELS ?? '';
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i'));
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i'));
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed!.map((r) => new RegExp(r, 'i'));
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new RegExp(r, 'i'));

const getPipeline = (filename: string, removeSteps = true) => {
const str = fs.readFileSync(filename).toString();
Expand Down
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,12 @@ module.exports = {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error',
},
},
{
files: ['x-pack/plugins/search*/**/*.tsx', 'x-pack/packages/search/**/*.tsx'],
rules: {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn',
},
},
{
files: [
'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const ApiKeyForm: React.FC<ApiKeyFormProps> = ({ hasTitle = true }) => {
value={displayedApiKey}
copyValue={apiKey}
dataTestSubj="apiKeyFormAPIKey"
copyValueDataTestSubj="APIKeyButtonCopy"
actions={[
<EuiButtonIcon
iconType={apiKeyIsVisible ? 'eyeClosed' : 'eye'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export interface TryInConsoleButtonProps {
content?: string | React.ReactElement;
showIcon?: boolean;
type?: 'link' | 'button' | 'emptyButton';
telemetryId?: string;
onClick?: () => void;
}
export const TryInConsoleButton = ({
request,
Expand All @@ -38,6 +40,8 @@ export const TryInConsoleButton = ({
content = RUN_IN_CONSOLE,
showIcon = true,
type = 'emptyButton',
telemetryId,
onClick: onClickProp,
}: TryInConsoleButtonProps) => {
const url = sharePlugin?.url;
const canShowDevtools = !!application?.capabilities?.dev_tools?.show;
Expand Down Expand Up @@ -65,6 +69,7 @@ export const TryInConsoleButton = ({
} else {
window.open(consolePreviewLink, '_blank', 'noreferrer');
}
onClickProp?.();
};

const getAriaLabel = () => {
Expand All @@ -84,6 +89,7 @@ export const TryInConsoleButton = ({
const commonProps = {
'data-test-subj': type === 'link' ? 'tryInConsoleLink' : 'tryInConsoleButton',
'aria-label': getAriaLabel(),
'data-telemetry-id': telemetryId,
onClick,
};
const iconType = showIcon ? 'play' : undefined;
Expand Down
19 changes: 9 additions & 10 deletions src/plugins/custom_integrations/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
advanced_analytics_ueba: { title: 'Advanced Analytics (UEBA', parent_id: 'security' },
analytics_engine: { title: 'Analytics Engine', parent_id: 'observability' },
application_observability: { title: 'Application', parent_id: 'observability' },
app_search: { title: 'Application Search', parent_id: 'enterprise_search' },
auditd: { title: 'AuditD', parent_id: 'security' },
authentication: { title: 'Authentication', parent_id: 'security' },
aws: { title: 'AWS', parent_id: undefined },
Expand All @@ -29,10 +28,10 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
cdn_security: { title: 'Content Delivery Network', parent_id: 'security' },
cloud: { title: 'Cloud', parent_id: undefined },
config_management: { title: 'Config management', parent_id: undefined },
connector: { title: 'Connector', parent_id: 'enterprise_search' },
connector_client: { title: 'Connector Client', parent_id: 'enterprise_search' },
connector: { title: 'Connector', parent_id: 'search' },
connector_client: { title: 'Connector Client', parent_id: 'search' },
containers: { title: 'Containers', parent_id: undefined },
crawler: { title: 'Crawler', parent_id: 'enterprise_search' },
crawler: { title: 'Crawler', parent_id: 'search' },
credential_management: { title: 'Credential Management', parent_id: 'security' },
crm: { title: 'CRM', parent_id: undefined },
custom: { title: 'Custom', parent_id: undefined },
Expand All @@ -45,20 +44,19 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
elasticsearch_sdk: { title: 'Elasticsearch SDK', parent_id: undefined },
elastic_stack: { title: 'Elastic Stack', parent_id: undefined },
email_security: { title: 'Email', parent_id: 'security' },
enterprise_search: { title: 'Search', parent_id: undefined },
firewall_security: { title: 'Firewall', parent_id: 'security' },
google_cloud: { title: 'Google Cloud', parent_id: undefined },
iam: { title: 'Identity and Access Management', parent_id: 'security' },
ids_ips: { title: 'IDS/IPS', parent_id: 'security' },
infrastructure: { title: 'Infrastructure', parent_id: undefined },
java_observability: { title: 'Java', parent_id: 'observability' },
kubernetes: { title: 'Kubernetes', parent_id: 'observability' },
language_client: { title: 'Language Client', parent_id: 'enterprise_search' },
language_client: { title: 'Language Client', parent_id: 'search' },
languages: { title: 'Languages', parent_id: undefined },
load_balancer: { title: 'Load Balancer', parent_id: 'observability' },
message_queue: { title: 'Message Broker', parent_id: 'observability' },
monitoring: { title: 'Monitoring', parent_id: 'observability' },
native_search: { title: 'Native Search', parent_id: 'enterprise_search' },
native_search: { title: 'Native Search', parent_id: 'search' },
network: { title: 'Network', parent_id: undefined },
network_security: { title: 'Network', parent_id: 'security' },
notification: { title: 'Notification', parent_id: 'observability' },
Expand All @@ -68,7 +66,8 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
productivity: { title: 'Productivity', parent_id: undefined },
productivity_security: { title: 'Productivity', parent_id: 'security' },
proxy_security: { title: 'Proxy', parent_id: 'security' },
sdk_search: { title: 'SDK', parent_id: 'enterprise_search' },
sdk_search: { title: 'SDK', parent_id: 'search' },
search: { title: 'Search', parent_id: undefined },
security: { title: 'Security', parent_id: undefined },
stream_processing: { title: 'Stream Processing', parent_id: 'observability' },
support: { title: 'Support', parent_id: undefined },
Expand All @@ -83,7 +82,7 @@ export const INTEGRATION_CATEGORY_DISPLAY: {
websphere: { title: 'WebSphere Application Server', parent_id: 'observability' },
workplace_search_content_source: {
title: 'Workplace Search Content Source',
parent_id: 'enterprise_search',
parent_id: 'search',
},
// Kibana added
apm: { title: 'APM', parent_id: undefined },
Expand Down Expand Up @@ -122,7 +121,7 @@ export interface IntegrationCategoryCount {
// TODO: consider i18n
export const SHIPPER_DISPLAY = {
beats: 'Beats',
enterprise_search: 'Search',
search: 'Search',
language_clients: 'Language clients',
other: 'Other',
sample_data: 'Sample data',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be(56);
expect(resp.body.length).to.be(55);

// Test for sample data card
expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface FormInfoFieldProps {
value: string;
copyValue?: string;
dataTestSubj?: string;
copyValueDataTestSubj?: string;
}

export const FormInfoField: React.FC<FormInfoFieldProps> = ({
Expand All @@ -31,6 +32,7 @@ export const FormInfoField: React.FC<FormInfoFieldProps> = ({
value,
copyValue,
dataTestSubj,
copyValueDataTestSubj,
}) => {
const { euiTheme } = useEuiTheme();

Expand Down Expand Up @@ -71,6 +73,7 @@ export const FormInfoField: React.FC<FormInfoFieldProps> = ({
<EuiButtonIcon
onClick={copy}
iconType="copy"
data-test-subj={copyValueDataTestSubj}
aria-label={i18n.translate('xpack.searchSharedUI.formInfoField.copyMessage', {
defaultMessage: 'Copy to clipboard',
})}
Expand Down
32 changes: 5 additions & 27 deletions x-pack/plugins/enterprise_search/server/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@ export const registerEnterpriseSearchIntegrations = (
connectors: ConnectorServerSideDefinition[]
) => {
const nativeSearchTag = config.hasNativeConnectors && isCloud ? ['native_search'] : [];
if (config.canDeployEntSearch) {
customIntegrations.registerCustomIntegration({
id: 'app_search_json',
title: i18n.translate('xpack.enterpriseSearch.appSearch.integrations.jsonName', {
defaultMessage: 'JSON',
}),
description: i18n.translate('xpack.enterpriseSearch.appSearch.integrations.jsonDescription', {
defaultMessage: 'Search over your JSON data with App Search.',
}),
categories: ['enterprise_search', 'custom', 'app_search'],
uiInternalPath: '/app/enterprise_search/app_search/engines/new?method=json',
icons: [
{
type: 'eui',
src: 'logoAppSearch',
},
],
shipper: 'enterprise_search',
isBeta: false,
});
}

if (config.hasWebCrawler) {
customIntegrations.registerCustomIntegration({
id: 'web_crawler',
Expand All @@ -48,15 +26,15 @@ export const registerEnterpriseSearchIntegrations = (
description: i18n.translate('xpack.enterpriseSearch.integrations.webCrawlerDescription', {
defaultMessage: 'Add search to your website with the web crawler.',
}),
categories: ['enterprise_search', 'app_search', 'web', 'elastic_stack', 'crawler'],
categories: ['search', 'web', 'elastic_stack', 'crawler'],
uiInternalPath: '/app/enterprise_search/content/crawlers/new_crawler',
icons: [
{
type: 'eui',
src: 'logoEnterpriseSearch',
},
],
shipper: 'enterprise_search',
shipper: 'search',
isBeta: false,
});
}
Expand All @@ -69,15 +47,15 @@ export const registerEnterpriseSearchIntegrations = (
description: i18n.translate('xpack.enterpriseSearch.integrations.apiDescription', {
defaultMessage: "Add search to your application with Elasticsearch's robust APIs.",
}),
categories: ['enterprise_search', 'custom', 'elastic_stack', 'sdk_search', 'language_client'],
categories: ['search', 'custom', 'elastic_stack', 'sdk_search', 'language_client'],
uiInternalPath: '/app/enterprise_search/content/search_indices/new_index/api',
icons: [
{
type: 'eui',
src: 'logoEnterpriseSearch',
},
],
shipper: 'enterprise_search',
shipper: 'search',
isBeta: false,
});

Expand All @@ -99,7 +77,7 @@ export const registerEnterpriseSearchIntegrations = (
],
id: `${connector.serviceType}-${connector.name}`,
isBeta: connector.isBeta,
shipper: 'enterprise_search',
shipper: 'search',
title: connector.name,
uiInternalPath: `/app/enterprise_search/content/connectors/new_connector?connector_type=${connectorType}&service_type=${connector.serviceType}`,
});
Expand Down
Loading

0 comments on commit 2737355

Please sign in to comment.