mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Supprt custom scheduling in Connectors (#149815)
This commit is contained in:
parent
a2c3a3682f
commit
cb39822a80
9 changed files with 59 additions and 0 deletions
|
@ -17,6 +17,16 @@ export interface ConnectorScheduling {
|
|||
interval: string;
|
||||
}
|
||||
|
||||
export interface CustomScheduling {
|
||||
configuration_overrides: Record<string, unknown>;
|
||||
enabled: boolean;
|
||||
interval: string;
|
||||
last_synced: string | null;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ConnectorCustomScheduling = Record<string, CustomScheduling | null>;
|
||||
|
||||
export enum ConnectorStatus {
|
||||
CREATED = 'created',
|
||||
NEEDS_CONFIGURATION = 'needs_configuration',
|
||||
|
@ -125,6 +135,7 @@ export type ConnectorFeatures = Partial<{
|
|||
export interface Connector {
|
||||
api_key_id: string | null;
|
||||
configuration: ConnectorConfiguration;
|
||||
custom_scheduling: ConnectorCustomScheduling;
|
||||
description: string | null;
|
||||
error: string | null;
|
||||
features: ConnectorFeatures;
|
||||
|
|
|
@ -33,6 +33,15 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
|
|||
connector: {
|
||||
api_key_id: null,
|
||||
configuration: { foo: { label: 'bar', value: 'barbar' } },
|
||||
custom_scheduling: {
|
||||
foo: {
|
||||
configuration_overrides: {},
|
||||
enabled: false,
|
||||
interval: '',
|
||||
last_synced: null,
|
||||
name: '',
|
||||
},
|
||||
},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
@ -119,6 +128,15 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
|
|||
connector: {
|
||||
api_key_id: null,
|
||||
configuration: { foo: { label: 'bar', value: 'barbar' } },
|
||||
custom_scheduling: {
|
||||
foo: {
|
||||
configuration_overrides: {},
|
||||
enabled: false,
|
||||
interval: '',
|
||||
last_synced: null,
|
||||
name: '',
|
||||
},
|
||||
},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
|
|
@ -43,6 +43,15 @@ export const connectorIndex: ConnectorViewIndex = {
|
|||
connector: {
|
||||
api_key_id: null,
|
||||
configuration: { foo: { label: 'bar', value: 'barbar' } },
|
||||
custom_scheduling: {
|
||||
foo: {
|
||||
configuration_overrides: {},
|
||||
enabled: false,
|
||||
interval: '',
|
||||
last_synced: null,
|
||||
name: '',
|
||||
},
|
||||
},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
@ -133,6 +142,15 @@ export const crawlerIndex: CrawlerViewIndex = {
|
|||
connector: {
|
||||
api_key_id: null,
|
||||
configuration: { foo: { label: 'bar', value: 'barbar' } },
|
||||
custom_scheduling: {
|
||||
foo: {
|
||||
configuration_overrides: {},
|
||||
enabled: false,
|
||||
interval: '',
|
||||
last_synced: null,
|
||||
name: '',
|
||||
},
|
||||
},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
|
|
@ -38,6 +38,9 @@ describe('Setup Indices', () => {
|
|||
configuration: {
|
||||
type: 'object',
|
||||
},
|
||||
custom_scheduling: {
|
||||
type: 'object',
|
||||
},
|
||||
description: { type: 'text' },
|
||||
error: { type: 'keyword' },
|
||||
features: {
|
||||
|
|
|
@ -30,6 +30,7 @@ interface IndexDefinition {
|
|||
const connectorMappingsProperties: Record<string, MappingProperty> = {
|
||||
api_key_id: { type: 'keyword' },
|
||||
configuration: { type: 'object' },
|
||||
custom_scheduling: { type: 'object' },
|
||||
description: { type: 'text' },
|
||||
error: { type: 'keyword' },
|
||||
features: {
|
||||
|
|
|
@ -85,6 +85,7 @@ describe('addConnector lib function', () => {
|
|||
document: {
|
||||
api_key_id: null,
|
||||
configuration: {},
|
||||
custom_scheduling: {},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
@ -269,6 +270,7 @@ describe('addConnector lib function', () => {
|
|||
document: {
|
||||
api_key_id: null,
|
||||
configuration: {},
|
||||
custom_scheduling: {},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
@ -375,6 +377,7 @@ describe('addConnector lib function', () => {
|
|||
document: {
|
||||
api_key_id: null,
|
||||
configuration: {},
|
||||
custom_scheduling: {},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
|
|
@ -93,6 +93,7 @@ export const addConnector = async (
|
|||
const document: ConnectorDocument = {
|
||||
api_key_id: null,
|
||||
configuration: {},
|
||||
custom_scheduling: {},
|
||||
description: null,
|
||||
error: null,
|
||||
features: null,
|
||||
|
|
|
@ -35,6 +35,7 @@ describe('addConnector lib function', () => {
|
|||
api_key_id: null,
|
||||
configuration: {},
|
||||
created_at: null,
|
||||
custom_scheduling: {},
|
||||
error: null,
|
||||
index_name: 'index_name',
|
||||
last_seen: null,
|
||||
|
@ -59,6 +60,7 @@ describe('addConnector lib function', () => {
|
|||
api_key_id: null,
|
||||
configuration: {},
|
||||
created_at: null,
|
||||
custom_scheduling: {},
|
||||
error: null,
|
||||
index_name: 'index_name',
|
||||
last_seen: null,
|
||||
|
|
|
@ -34,6 +34,7 @@ describe('addConnector lib function', () => {
|
|||
api_key_id: null,
|
||||
configuration: {},
|
||||
created_at: null,
|
||||
custom_scheduling: {},
|
||||
error: null,
|
||||
index_name: 'index_name',
|
||||
last_seen: null,
|
||||
|
@ -61,6 +62,7 @@ describe('addConnector lib function', () => {
|
|||
api_key_id: null,
|
||||
configuration: {},
|
||||
created_at: null,
|
||||
custom_scheduling: {},
|
||||
error: null,
|
||||
index_name: 'index_name',
|
||||
last_seen: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue