Skip to content

Commit

Permalink
fix: update (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fine0830 authored Aug 17, 2023
1 parent 30a5667 commit 1732aa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
t.variables.serviceIds = serviceObj.map((d: {layers: string[], id: string}) => d.id);
// fetch topology data from api
const res = await this.doRequest(t);
if (!res.data.topology) {
throw new Error('Layer or service is not found');
}
const {nodes, calls} = this.setTopologyData({nodes: res.data.topology.nodes || [], calls: res.data.topology.calls || []});
const idsS = calls.filter((i: Call) => i.detectPoints.includes('SERVER')).map((b: Call) => b.id);
const idsC = calls.filter((i: Call) => i.detectPoints.includes('CLIENT')).map((b: Call) => b.id);
Expand Down

0 comments on commit 1732aa9

Please sign in to comment.