Skip to content

Commit 8dcd819

Browse files
committedApr 22, 2024
add multi data source support (opensearch-project#315)
* add multi data source support Signed-off-by: Lin Wang <wonglam@amazon.com> * add unit tests for server side Signed-off-by: Lin Wang <wonglam@amazon.com> * Use dataSource to check if data source enabled Signed-off-by: Lin Wang <wonglam@amazon.com> * Add comments for DO_NOT_FETCH Signed-off-by: Lin Wang <wonglam@amazon.com> --------- Signed-off-by: Lin Wang <wonglam@amazon.com>
1 parent de46a91 commit 8dcd819

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2077
-128
lines changed
 

‎opensearch_dashboards.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"dashboard",
1313
"opensearchUiShared"
1414
],
15-
"optionalPlugins": []
15+
"optionalPlugins": ["dataSource", "dataSourceManagement"]
1616
}

‎public/apis/connector.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@ interface GetAllInternalConnectorResponse {
2323
}
2424

2525
export class Connector {
26-
public getAll() {
27-
return InnerHttpProvider.getHttp().get<GetAllConnectorResponse>(CONNECTOR_API_ENDPOINT);
26+
public getAll({ dataSourceId }: { dataSourceId?: string }) {
27+
return InnerHttpProvider.getHttp().get<GetAllConnectorResponse>(CONNECTOR_API_ENDPOINT, {
28+
query: {
29+
data_source_id: dataSourceId,
30+
},
31+
});
2832
}
2933

30-
public getAllInternal() {
34+
public getAllInternal({ dataSourceId }: { dataSourceId?: string }) {
3135
return InnerHttpProvider.getHttp().get<GetAllInternalConnectorResponse>(
32-
INTERNAL_CONNECTOR_API_ENDPOINT
36+
INTERNAL_CONNECTOR_API_ENDPOINT,
37+
{
38+
query: {
39+
data_source_id: dataSourceId,
40+
},
41+
}
3342
);
3443
}
3544
}

0 commit comments

Comments
 (0)