Skip to content
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
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,11 @@ module.exports = {
},
},
{
files: ['x-pack/solutions/search/**/*.tsx'],
files: [
'x-pack/solutions/search/**/*.tsx',
'x-pack/platform/plugins/shared/content_connectors/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/search_inference_endpoints/**/*.{ts,tsx}',
],
rules: {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export const GeneratedConfigFields: React.FC<GeneratedConfigFieldsProps> = ({
</EuiFlexItem>
<EuiFlexItem>
<EuiLinkTo
data-test-subj="contentConnectorsGeneratedConfigFieldsConnectorNameLink"
external
target="_blank"
to={generateEncodedPath(CONNECTOR_DETAIL_PATH, {
Expand All @@ -171,6 +172,7 @@ export const GeneratedConfigFields: React.FC<GeneratedConfigFieldsProps> = ({
>
<EuiFlexItem grow={false}>
<EuiLinkTo
data-test-subj="contentConnectorsGeneratedConfigFieldsConnectorIdLink"
external
target="_blank"
to={generateEncodedPath(CONNECTOR_DETAIL_PATH, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
connector.status
) && connector.index_name ? (
<EuiButtonEmptyTo
data-test-subj="contentConnectorsConnectorStatsConfigureEmptyButton"
size="s"
to={generateEncodedPath(CONNECTOR_DETAIL_TAB_PATH, {
connectorId: connector.id,
Expand All @@ -248,6 +249,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
</EuiButtonEmptyTo>
) : (
<EuiButtonTo
data-test-subj="contentConnectorsConnectorStatsConfigureButton"
color="primary"
size="s"
fill
Expand Down Expand Up @@ -325,6 +327,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmptyTo
data-test-subj="contentConnectorsConnectorStatsSeeDocumentsButton"
isDisabled={!(connector.index_name && indexData)}
size="s"
to={generateEncodedPath(CONNECTOR_DETAIL_TAB_PATH, {
Expand Down Expand Up @@ -361,6 +364,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiLink
data-test-subj="contentConnectorsConnectorStatsLink"
target={'_blank'}
external={false}
href={http?.basePath.prepend(
Expand All @@ -384,6 +388,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButtonEmpty
data-test-subj="contentConnectorsConnectorStatsElasticConnectorsButton"
isDisabled={!connector.service_type}
iconType="plugs"
color="text"
Expand Down Expand Up @@ -428,6 +433,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
<EuiFlexItem grow={false}>
{agentlessAgentExists && (
<EuiButtonEmpty
data-test-subj="contentConnectorsConnectorStatsHostOverviewButton"
isDisabled={!agentlessOverview || !agentlessOverview.agent.id}
size="s"
href={http?.basePath.prepend(
Expand All @@ -445,6 +451,7 @@ export const ConnectorStats: React.FC<ConnectorStatsProps> = ({
<EuiFlexItem grow={false}>
{agnetlessPolicyExists ? (
<EuiButtonEmpty
data-test-subj="contentConnectorsConnectorStatsManagePolicyButton"
isDisabled={!agentlessOverview || !agentlessOverview.policy.id}
size="s"
href={http?.basePath.prepend(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export const ConnectorDetailOverview: React.FC = () => {
</EuiText>
<EuiSpacer />
<EuiButtonTo
data-test-subj="contentConnectorsConnectorOverviewAttachIndexButton"
color="warning"
fill
to={`${generateEncodedPath(CONNECTOR_DETAIL_TAB_PATH, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const ConnectorsTable: React.FC<ConnectorsTableProps> = ({
),
render: (connector: ConnectorViewItem) => (
<EuiLinkTo
data-test-subj="contentConnectorsConnectorsTableNameLink"
to={generateEncodedPath(CONNECTOR_DETAIL_PATH, { connectorId: connector.id })}
>
{connector.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const ConnectorOverviewPanels: React.FC = () => {
>
{ingestionStatus === IngestionStatus.INCOMPLETE ? (
<EuiLinkTo
data-test-subj="contentConnectorsConnectorOverviewPanelsIngestionStatusLink"
to={generateEncodedPath(SEARCH_INDEX_TAB_PATH, {
indexName: index.name,
tabId: SearchIndexTabId.CONFIGURATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const ConnectorSyncRulesForm: FC<PropsWithChildren<unknown>> = ({ childre
{isEditing && (
<EuiFlexItem grow={false}>
<EuiButtonEmpty
data-test-subj="contentConnectorsConnectorSyncRulesFormCancelButton"
data-telemetry-id="entSearchContent-connector-syncRules-editRules-cancelEditing"
onClick={() => {
setIsEditing(!isEditing);
Expand All @@ -62,6 +63,7 @@ export const ConnectorSyncRulesForm: FC<PropsWithChildren<unknown>> = ({ childre
)}
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="contentConnectorsConnectorSyncRulesFormSaveAndValidateDraftButton"
data-telemetry-id="entSearchContent-connector-syncRules-editRules-saveAndValidate"
disabled={hasJsonValidationError}
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export const SyncRulesTable: React.FC = () => {
<EuiText size="s" color="default">
{getSyncRulesDescription(indexName)}
<EuiSpacer />
<EuiLink href={docLinks.syncRules} external target="_blank">
<EuiLink
data-test-subj="contentConnectorsSyncRulesTableLink"
href={docLinks.syncRules}
external
target="_blank"
>
{SYNC_RULES_LEARN_MORE_LINK}
</EuiLink>
</EuiText>
Expand All @@ -92,6 +97,7 @@ export const SyncRulesTable: React.FC = () => {
{
editingRender: (filteringRule, onChange) => (
<EuiSelect
data-test-subj="contentConnectorsColumnsPolicySelect"
fullWidth
value={filteringRule.policy}
onChange={(e) => onChange(e.target.value)}
Expand Down Expand Up @@ -119,6 +125,7 @@ export const SyncRulesTable: React.FC = () => {
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
<EuiFlexItem>
<EuiFieldText
data-test-subj="contentConnectorsColumnsFieldFieldText"
fullWidth
value={rule.field}
onChange={(e) => onChange(e.target.value)}
Expand All @@ -138,6 +145,7 @@ export const SyncRulesTable: React.FC = () => {
{
editingRender: (filteringRule, onChange) => (
<EuiSelect
data-test-subj="contentConnectorsColumnsRuleSelect"
fullWidth
value={filteringRule.rule}
onChange={(e) => onChange(e.target.value)}
Expand All @@ -157,6 +165,7 @@ export const SyncRulesTable: React.FC = () => {
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false}>
<EuiFlexItem>
<EuiFieldText
data-test-subj="contentConnectorsColumnsValueFieldText"
fullWidth
value={rule.value}
onChange={(e) => onChange(e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const SyncRulesStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({
<EuiFlexItem>
<span>
<EuiButton
data-test-subj="contentConnectorsSyncRulesStateCalloutsEditDraftRulesButton"
data-telemetry-id="entSearchContent-connector-syncRules-validatingCallout-editRules"
onClick={editDraft}
color="warning"
Expand Down Expand Up @@ -97,6 +98,7 @@ export const SyncRulesStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({
<EuiFlexItem>
<span>
<EuiButton
data-test-subj="contentConnectorsSyncRulesStateCalloutsEditDraftRulesButton"
data-telemetry-id="entSearchContent-connector-syncRules-errorCallout-editRules"
onClick={editDraft}
color="danger"
Expand Down Expand Up @@ -140,6 +142,7 @@ export const SyncRulesStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({
<EuiFlexItem grow={false}>
<span>
<EuiButton
data-test-subj="contentConnectorsSyncRulesStateCalloutsActivateDraftRulesButton"
data-telemetry-id="entSearchContent-connector-syncRules-successCallout-applyRules"
onClick={applyDraft}
color="success"
Expand All @@ -157,6 +160,7 @@ export const SyncRulesStateCallouts: React.FC<FilteringStatusCalloutsProps> = ({
<EuiFlexItem grow={false}>
<span>
<EuiButton
data-test-subj="contentConnectorsSyncRulesStateCalloutsEditDraftRulesButton"
data-telemetry-id="entSearchContent-connector-syncRules-successCallout-editRules"
onClick={editDraft}
color="success"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const ConnectorViewIndexLink: React.FC<{

return (
<EuiLink
data-test-subj="contentConnectorsConnectorViewIndexLinkLink"
target={target ? '_blank' : undefined}
external={target ?? false}
href={`${http?.basePath.prepend(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('PageIntroduction component', () => {
description="some description"
title="some title"
links={
<EuiLink href="testlink" external>
<EuiLink data-test-subj="contentConnectorsTestLinkToNowhereLink" href="testlink" external>
test link to nowhere
</EuiLink>
}
Expand All @@ -81,10 +81,14 @@ describe('PageIntroduction component', () => {
description="some description"
title="some title"
links={[
<EuiLink href="testlink" external>
<EuiLink data-test-subj="contentConnectorsTestLinkToNowhereLink" href="testlink" external>
test link to nowhere
</EuiLink>,
<EuiLink href="testlink2" external>
<EuiLink
data-test-subj="contentConnectorsTestLinkToNowhere2Link"
href="testlink2"
external
>
test link to nowhere2
</EuiLink>,
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ export const ActionColumn = <Item extends ItemWithAnID>({
<EuiFlexItem grow={null}>
{!canRemoveLastItem && displayedItems.length === 1 ? (
<EuiToolTip content={lastItemWarning}>
<EuiButtonEmpty aria-label={DELETE_BUTTON_LABEL} size="xs" disabled>
<EuiButtonEmpty
data-test-subj="contentConnectorsActionColumnButton"
aria-label={DELETE_BUTTON_LABEL}
size="xs"
disabled
>
{DELETE_BUTTON_LABEL}
</EuiButtonEmpty>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const ElasticInferenceServiceModelsHeader = () => {
...(cloud?.isCloudEnabled && billingUrl
? [
<EuiButton
data-test-subj="searchInferenceEndpointsElasticInferenceServiceModelsHeaderViewCloudUsageButton"
href={billingUrl}
target="_blank"
iconType="external"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,13 @@ export const AddEndpointModal: React.FC<AddEndpointModalProps> = ({
fullWidth
>
<EuiFieldText
data-test-subj="searchInferenceEndpointsAddEndpointModalFieldText"
value={modelId}
readOnly
fullWidth
prepend={
<EuiButtonIcon
data-test-subj="searchInferenceEndpointsAddEndpointModalCopyModelIdButton"
iconType="copyClipboard"
size="xs"
color="text"
Expand Down Expand Up @@ -280,6 +282,7 @@ export const AddEndpointModal: React.FC<AddEndpointModalProps> = ({
data-test-subj="addEndpointIdField"
prepend={
<EuiButtonIcon
data-test-subj="searchInferenceEndpointsAddEndpointModalCopyEndpointIdButton"
iconType="copyClipboard"
size="xs"
color="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ export const ModelDetailFlyout: React.FC<ModelDetailFlyoutProps> = ({
defaultMessage: 'Documentation',
}),
description: (
<EuiLink href={docLinks.elasticInferenceService} target="_blank" external>
<EuiLink
data-test-subj="searchInferenceEndpointsModelDetailFlyoutViewDocumentationLink"
href={docLinks.elasticInferenceService}
target="_blank"
external
>
{i18n.translate(
'xpack.searchInferenceEndpoints.modelDetailFlyout.viewDocumentationLink',
{ defaultMessage: 'View documentation' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const ModelEndpointRow: React.FC<ModelEndpointRowProps> = ({
)}
>
<EuiButtonIcon
data-test-subj="searchInferenceEndpointsModelEndpointRowViewButton"
iconType="eye"
size="xs"
color="primary"
Expand All @@ -70,6 +71,7 @@ export const ModelEndpointRow: React.FC<ModelEndpointRowProps> = ({
)}
>
<EuiButtonIcon
data-test-subj="searchInferenceEndpointsModelEndpointRowCopyButton"
iconType="copyClipboard"
size="xs"
color="text"
Expand Down Expand Up @@ -101,6 +103,7 @@ export const ModelEndpointRow: React.FC<ModelEndpointRowProps> = ({
>
<span tabIndex={0}>
<EuiButtonIcon
data-test-subj="searchInferenceEndpointsModelEndpointRowLockButton"
iconType="lock"
size="xs"
isDisabled
Expand Down
Loading