diff --git a/common/constants/data_sources.ts b/common/constants/data_sources.ts index 3faa8987ee..c396951a8a 100644 --- a/common/constants/data_sources.ts +++ b/common/constants/data_sources.ts @@ -37,6 +37,7 @@ export const ACCELERATION_TIME_INTERVAL = [ export const ACCELERATION_ADD_FIELDS_TEXT = '(add fields here)'; export const ACCELERATION_INDEX_NAME_REGEX = /^[a-z][a-z_]*$/; export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+/; +export const SPARK_HIVE_TABLE_REGEX = /Provider:\s*hive/; export const TIMESTAMP_DATATYPE = 'timestamp'; export const ACCELERATION_INDEX_TYPES = [ diff --git a/common/constants/shared.ts b/common/constants/shared.ts index 3da8eaccd7..892fa9fc00 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -17,6 +17,7 @@ export const INTEGRATIONS_BASE = '/api/integrations'; export const JOBS_BASE = '/query/jobs'; export const DATACONNECTIONS_BASE = '/api/dataconnections'; export const EDIT = '/edit'; +export const DATACONNECTIONS_UPDATE_STATUS = '/status'; export const SECURITY_ROLES = '/api/v1/configuration/roles'; export const EVENT_ANALYTICS = '/event_analytics'; export const SAVED_OBJECTS = '/saved_objects'; diff --git a/common/types/data_connections.ts b/common/types/data_connections.ts index 8ebab0d11e..62b48bad97 100644 --- a/common/types/data_connections.ts +++ b/common/types/data_connections.ts @@ -56,12 +56,15 @@ export interface PrometheusProperties { 'prometheus.uri': string; } +export type DatasourceStatus = 'ACTIVE' | 'DISABLED'; + export interface DatasourceDetails { allowedRoles: string[]; name: string; connector: DatasourceType; description: string; properties: S3GlueProperties | PrometheusProperties; + status: DatasourceStatus; } interface AsyncApiDataResponse { diff --git a/public/components/datasources/components/__tests__/__snapshots__/data_connection.test.tsx.snap b/public/components/datasources/components/__tests__/__snapshots__/data_connection.test.tsx.snap index 5d14f60385..031297a662 100644 --- a/public/components/datasources/components/__tests__/__snapshots__/data_connection.test.tsx.snap +++ b/public/components/datasources/components/__tests__/__snapshots__/data_connection.test.tsx.snap @@ -156,24 +156,16 @@ exports[`Data Connection Page test Renders S3 data connection page with data 1`] > @@ -230,7 +222,7 @@ exports[`Data Connection Page test Renders S3 data connection page with data 1`] > diff --git a/public/components/datasources/components/__tests__/__snapshots__/inactive_data_connection.test.tsx.snap b/public/components/datasources/components/__tests__/__snapshots__/inactive_data_connection.test.tsx.snap new file mode 100644 index 0000000000..2587fc5cb0 --- /dev/null +++ b/public/components/datasources/components/__tests__/__snapshots__/inactive_data_connection.test.tsx.snap @@ -0,0 +1,58 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Data Connection Inactive Page test Renders inactive data connection callout 1`] = ` +
+ Associated objects and accelerations are not available while this connection is inactive. +
+ ++ Associated objects and accelerations are not available while this connection is inactive. +
+