diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx index ec2edf2df0450..095844b4e04d4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_stats.tsx @@ -10,6 +10,9 @@ import { useValues } from 'kea'; import { EuiBadge, + EuiButtonIcon, + EuiCode, + EuiCopy, EuiFlexGrid, EuiFlexGroup, EuiFlexItem, @@ -21,6 +24,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; import { Connector, ConnectorStatus, ElasticsearchIndex } from '@kbn/search-connectors'; @@ -127,40 +131,66 @@ export const ConnectorStats: React.FC = ({ connector, index } footer={ - - - - - - + + + -

- {i18n.translate( - 'xpack.enterpriseSearch.connectors.connectorStats.p.DocumentsLabel', - { - defaultMessage: '{documentAmount} Documents', - values: { - documentAmount: indexData?.count ?? 0, - }, - } - )} -

+ {connector.id}, + }} + />
+ + + {(copy) => ( + + )} + +
- - {seeDocumentsLabel} - + {[ConnectorStatus.CONNECTED, ConnectorStatus.CONFIGURED].includes( + connector.status + ) && connector.index_name ? ( + + {configureLabel} + + ) : ( + + {configureLabel} + + )}
} @@ -169,7 +199,7 @@ export const ConnectorStats: React.FC = ({ connector, index = ({ connector, index {connector.index_name} - + + + + + + + {i18n.translate('xpack.enterpriseSearch.content.conectors.indexHealth', { + defaultMessage: 'Healthy', + })} + + +
) : ( @@ -201,33 +242,40 @@ export const ConnectorStats: React.FC = ({ connector, index ) } footer={ - + + + + + + + + +

+ {i18n.translate( + 'xpack.enterpriseSearch.connectors.connectorStats.p.DocumentsLabel', + { + defaultMessage: '{documentAmount} Documents', + values: { + documentAmount: indexData?.count ?? 0, + }, + } + )} +

+
+
+
+
- {[ConnectorStatus.CONNECTED, ConnectorStatus.CONFIGURED].includes( - connector.status - ) && connector.index_name ? ( - - {configureLabel} - - ) : ( - - {configureLabel} - - )} + + {seeDocumentsLabel} +
}