Skip to content

Commit

Permalink
[Feature] Add Retrieval from Catalog Cache (opensearch-project#1517)
Browse files Browse the repository at this point in the history
* initial commit for attaching cache to associated objects tab

Signed-off-by: Sean Li <[email protected]>

* adding cache retrieval

Signed-off-by: Sean Li <[email protected]>

* rebasing

Signed-off-by: Sean Li <[email protected]>

* fixing some implementation details, still draft state

Signed-off-by: Sean Li <[email protected]>

* adding refresh button capabilities

Signed-off-by: Sean Li <[email protected]>

* refactor logic and miscellaneous fixes

Signed-off-by: Sean Li <[email protected]>

* addressing comments and adding tests

Signed-off-by: Sean Li <[email protected]>

* ensuring tests pass

Signed-off-by: Sean Li <[email protected]>

* rebase with main, updating refresh implementation

Signed-off-by: Sean Li <[email protected]>

* fixing issues with rebase

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Sean Li <[email protected]>
  • Loading branch information
sejli authored Mar 15, 2024
1 parent 220e347 commit a07b3c1
Show file tree
Hide file tree
Showing 28 changed files with 5,693 additions and 10,521 deletions.
28 changes: 22 additions & 6 deletions common/types/data_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,31 @@ export interface AssociatedObject {
name: string;
database: string;
type: string;
createdByIntegration: string;
accelerations: Acceleration[];
columns: TableColumn[];
columns?: TableColumn[];
}

export type Role = EuiComboBoxOptionOption;

export type DatasourceType = 'S3GLUE' | 'PROMETHEUS';

export interface S3GlueProperties {
'glue.indexstore.opensearch.uri': string;
'glue.indexstore.opensearch.region': string;
}

export interface PrometheusProperties {
'prometheus.uri': string;
}

export interface DatasourceDetails {
allowedRoles: string[];
name: string;
connector: DatasourceType;
description: string;
properties: S3GlueProperties | PrometheusProperties;
}

interface AsyncApiDataResponse {
status: string;
schema?: Array<{ name: string; type: string }>;
Expand Down Expand Up @@ -105,7 +121,7 @@ export interface DataSourceCacheData {
dataSources: CachedDataSource[];
}

export interface CachedAccelerations {
export interface CachedAcceleration {
flintIndexName: string;
type: AccelerationIndexType;
database: string;
Expand All @@ -115,16 +131,16 @@ export interface CachedAccelerations {
status: string;
}

export interface CachedAcclerationByDataSource {
export interface CachedAccelerationByDataSource {
name: string;
accelerations: CachedAccelerations[];
accelerations: CachedAcceleration[];
lastUpdated: string; // date string in UTC format
status: CachedDataSourceStatus;
}

export interface AccelerationsCacheData {
version: string;
dataSources: CachedAcclerationByDataSource[];
dataSources: CachedAccelerationByDataSource[];
}

export interface PollingSuccessResult {
Expand Down
1 change: 1 addition & 0 deletions common/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ export enum DirectQueryLoadingStatus {
SCHEDULED = 'scheduled',
CANCELED = 'canceled',
WAITING = 'waiting',
INITIAL = 'initial',
}

export interface DirectQueryRequest {
Expand Down
Loading

0 comments on commit a07b3c1

Please sign in to comment.