Skip to content

Commit

Permalink
[Workplace Search] Port Box changes from ent-search (#83675)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottybollinger authored Nov 18, 2020
1 parent 2a365ff commit b63830f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const SOURCE_STATUSES = {
};

export const SOURCE_NAMES = {
BOX: i18n.translate('xpack.enterpriseSearch.workplaceSearch.sources.sourceNames.box', {
defaultMessage: 'Box',
}),
CONFLUENCE: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sourceNames.confluence',
{ defaultMessage: 'Confluence' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const PRIVATE_SOURCES_DOCS_URL = `${DOCUMENT_PERMISSIONS_DOCS_URL}#source
export const EXTERNAL_IDENTITIES_DOCS_URL = `${DOCS_PREFIX}/workplace-search-external-identities-api.html`;
export const SECURITY_DOCS_URL = `${DOCS_PREFIX}/workplace-search-security.html`;
export const SMTP_DOCS_URL = `${DOCS_PREFIX}/workplace-search-smtp-mailer.html`;
export const BOX_DOCS_URL = `${DOCS_PREFIX}/workplace-search-box-connector.html`;
export const CONFLUENCE_DOCS_URL = `${DOCS_PREFIX}/workplace-search-confluence-cloud-connector.html`;
export const CONFLUENCE_SERVER_DOCS_URL = `${DOCS_PREFIX}/workplace-search-confluence-server-connector.html`;
export const DROPBOX_DOCS_URL = `${DOCS_PREFIX}/workplace-search-dropbox-connector.html`;
Expand Down Expand Up @@ -59,6 +60,7 @@ export const ORG_SOURCES_PATH = `${ORG_PATH}${SOURCES_PATH}`;

export const SOURCE_ADDED_PATH = `${SOURCES_PATH}/added`;
export const ADD_SOURCE_PATH = `${SOURCES_PATH}/add`;
export const ADD_BOX_PATH = `${SOURCES_PATH}/add/box`;
export const ADD_CONFLUENCE_PATH = `${SOURCES_PATH}/add/confluence-cloud`;
export const ADD_CONFLUENCE_SERVER_PATH = `${SOURCES_PATH}/add/confluence-server`;
export const ADD_DROPBOX_PATH = `${SOURCES_PATH}/add/dropbox`;
Expand Down Expand Up @@ -93,6 +95,7 @@ export const ORG_SETTINGS_PATH = `${ORG_PATH}/settings`;
export const ORG_SETTINGS_CUSTOMIZE_PATH = `${ORG_SETTINGS_PATH}/customize`;
export const ORG_SETTINGS_CONNECTORS_PATH = `${ORG_SETTINGS_PATH}/connectors`;
export const ORG_SETTINGS_OAUTH_APPLICATION_PATH = `${ORG_SETTINGS_PATH}/oauth`;
export const EDIT_BOX_PATH = `${ORG_SETTINGS_CONNECTORS_PATH}/box/edit`;
export const EDIT_CONFLUENCE_PATH = `${ORG_SETTINGS_CONNECTORS_PATH}/confluence-cloud/edit`;
export const EDIT_CONFLUENCE_SERVER_PATH = `${ORG_SETTINGS_CONNECTORS_PATH}/confluence-server/edit`;
export const EDIT_DROPBOX_PATH = `${ORG_SETTINGS_CONNECTORS_PATH}/dropbox/edit`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { i18n } from '@kbn/i18n';

import {
ADD_BOX_PATH,
ADD_CONFLUENCE_PATH,
ADD_CONFLUENCE_SERVER_PATH,
ADD_DROPBOX_PATH,
Expand All @@ -24,6 +25,7 @@ import {
ADD_SLACK_PATH,
ADD_ZENDESK_PATH,
ADD_CUSTOM_PATH,
EDIT_BOX_PATH,
EDIT_CONFLUENCE_PATH,
EDIT_CONFLUENCE_SERVER_PATH,
EDIT_DROPBOX_PATH,
Expand All @@ -41,6 +43,7 @@ import {
EDIT_SLACK_PATH,
EDIT_ZENDESK_PATH,
EDIT_CUSTOM_PATH,
BOX_DOCS_URL,
CONFLUENCE_DOCS_URL,
CONFLUENCE_SERVER_DOCS_URL,
GITHUB_ENTERPRISE_DOCS_URL,
Expand Down Expand Up @@ -82,6 +85,44 @@ const connectStepDescription = {
};

export const staticSourceData = [
{
name: SOURCE_NAMES.BOX,
serviceType: 'box',
addPath: ADD_BOX_PATH,
editPath: EDIT_BOX_PATH,
configuration: {
isPublicKey: false,
hasOauthRedirect: true,
needsBaseUrl: false,
documentationUrl: BOX_DOCS_URL,
applicationPortalUrl: 'https://app.box.com/developers/console',
},
sourceDescription: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sourceDescriptions.box',
{
defaultMessage:
'{sourceName} is a cloud-based storage service for organizations of all sizes. Create, store, share and automatically synchronize documents across your desktop and web.',
values: { sourceName: SOURCE_NAMES.BOX },
}
),
connectStepDescription: connectStepDescription.files,
objTypes: [SOURCE_OBJ_TYPES.ALL_FILES],
features: {
basicOrgContext: [
FeatureIds.SyncFrequency,
FeatureIds.SyncedItems,
FeatureIds.GlobalAccessPermissions,
],
basicOrgContextExcludedFeatures: [FeatureIds.DocumentLevelPermissions],
platinumOrgContext: [FeatureIds.SyncFrequency, FeatureIds.SyncedItems],
platinumPrivateContext: [
FeatureIds.Private,
FeatureIds.SyncFrequency,
FeatureIds.SyncedItems,
],
},
accountContextOnly: false,
},
{
name: SOURCE_NAMES.CONFLUENCE,
serviceType: 'confluence_cloud',
Expand Down

0 comments on commit b63830f

Please sign in to comment.