Skip to content

Commit 92616a6

Browse files
committedApr 16, 2024
add multi data source support
Signed-off-by: Lin Wang <wonglam@amazon.com>
1 parent 4988502 commit 92616a6

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

+2124
-129
lines changed
 

‎opensearch_dashboards.json

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

‎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)