[Enterprise Search] Add Google Drive connector tile to content UI (#161359)

## Summary

This adds Google Drive connector tile to Enterprise Search.

### Preview

Google drive connector documentation link:
https://www.elastic.co/guide/en/enterprise-search/master/connectors-google-drive.html

Tile view:

<img width="1681" alt="Screenshot 2023-07-06 at 16 18 33"
src="805dea1c-70ca-46f8-b4df-78802a614b37">


Google Drive configuration - we only require service account JSON:

<img width="869" alt="Screenshot 2023-07-06 at 16 20 03"
src="ea50966f-64a6-49ed-a2e0-f697cb870e9c">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Jedrzej Blaszyk 2023-07-07 10:51:11 +02:00 committed by GitHub
parent fde953907c
commit 94e850dcb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 0 deletions

View file

@ -139,6 +139,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
connectorsDropbox: `${ENTERPRISE_SEARCH_DOCS}connectors-dropbox.html`,
connectorsContentExtraction: `${ENTERPRISE_SEARCH_DOCS}connectors-content-extraction.html`,
connectorsGoogleCloudStorage: `${ENTERPRISE_SEARCH_DOCS}connectors-google-cloud.html`,
connectorsGoogleDrive: `${ENTERPRISE_SEARCH_DOCS}connectors-google-drive.html`,
connectorsJira: `${ENTERPRISE_SEARCH_DOCS}connectors-jira.html`,
connectorsMicrosoftSQL: `${ENTERPRISE_SEARCH_DOCS}connectors-ms-sql.html`,
connectorsMongoDB: `${ENTERPRISE_SEARCH_DOCS}connectors-mongodb.html`,

View file

@ -123,6 +123,7 @@ export interface DocLinks {
readonly connectorsContentExtraction: string;
readonly connectorsDropbox: string;
readonly connectorsGoogleCloudStorage: string;
readonly connectorsGoogleDrive: string;
readonly connectorsJira: string;
readonly connectorsMicrosoftSQL: string;
readonly connectorsMongoDB: string;

View file

@ -58,6 +58,16 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [
}),
serviceType: 'google_cloud_storage',
},
{
iconPath: 'google_drive.svg',
isBeta: true,
isNative: false,
keywords: ['google', 'drive', 'connector'],
name: i18n.translate('xpack.enterpriseSearch.content.nativeConnectors.googleDrive.name', {
defaultMessage: 'Google Drive',
}),
serviceType: 'google_drive',
},
{
iconPath: 'mongodb.svg',
isBeta: false,

View file

@ -43,6 +43,12 @@ export const CONNECTORS_DICT: Record<string, ConnectorClientSideDefinition> = {
externalDocsUrl: 'https://cloud.google.com/storage/docs',
icon: CONNECTOR_ICONS.google_cloud_storage,
},
google_drive: {
docsUrl: docLinks.connectorsGoogleDrive,
externalAuthDocsUrl: 'https://cloud.google.com/iam/docs/service-account-overview',
externalDocsUrl: 'https://developers.google.com/drive',
icon: CONNECTOR_ICONS.google_drive,
},
jira: {
docsUrl: docLinks.connectorsJira,
externalAuthDocsUrl: '',

View file

@ -68,6 +68,7 @@ class DocLinks {
public connectorsContentExtraction: string;
public connectorsDropbox: string;
public connectorsGoogleCloudStorage: string;
public connectorsGoogleDrive: string;
public connectorsJira: string;
public connectorsMicrosoftSQL: string;
public connectorsMongoDB: string;
@ -223,6 +224,7 @@ class DocLinks {
this.connectorsClients = '';
this.connectorsDropbox = '';
this.connectorsGoogleCloudStorage = '';
this.connectorsGoogleDrive = '';
this.connectorsJira = '';
this.connectorsMicrosoftSQL = '';
this.connectorsMongoDB = '';
@ -380,6 +382,7 @@ class DocLinks {
this.connectorsDropbox = docLinks.links.enterpriseSearch.connectorsDropbox;
this.connectorsGoogleCloudStorage =
docLinks.links.enterpriseSearch.connectorsGoogleCloudStorage;
this.connectorsGoogleDrive = docLinks.links.enterpriseSearch.connectorsGoogleDrive;
this.connectorsJira = docLinks.links.enterpriseSearch.connectorsJira;
this.connectorsMicrosoftSQL = docLinks.links.enterpriseSearch.connectorsMicrosoftSQL;
this.connectorsMongoDB = docLinks.links.enterpriseSearch.connectorsMongoDB;

View file

@ -11,6 +11,7 @@ import custom from '../../../assets/source_icons/custom.svg';
import dropbox from '../../../assets/source_icons/dropbox.svg';
import github from '../../../assets/source_icons/github.svg';
import google_cloud_storage from '../../../assets/source_icons/google_cloud_storage.svg';
import google_drive from '../../../assets/source_icons/google_drive.svg';
import jira_cloud from '../../../assets/source_icons/jira_cloud.svg';
import mongodb from '../../../assets/source_icons/mongodb.svg';
import microsoft_sql from '../../../assets/source_icons/mssql.svg';
@ -31,6 +32,7 @@ export const CONNECTOR_ICONS = {
dropbox,
github,
google_cloud_storage,
google_drive,
jira_cloud,
microsoft_sql,
mongodb,