From d9bf05f21a9e792dd69c7bf4da80414143cf0a78 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Thu, 14 Sep 2023 13:39:31 +0530 Subject: [PATCH] fix: addressing review comments --- .../topology/topology-data-source.model.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/projects/observability/src/shared/dashboard/data/graphql/topology/topology-data-source.model.ts b/projects/observability/src/shared/dashboard/data/graphql/topology/topology-data-source.model.ts index 4953e9f9f..8f07939fa 100644 --- a/projects/observability/src/shared/dashboard/data/graphql/topology/topology-data-source.model.ts +++ b/projects/observability/src/shared/dashboard/data/graphql/topology/topology-data-source.model.ts @@ -23,7 +23,8 @@ import { } from '../../../../graphql/request/handlers/entities/query/topology/entity-topology-graphql-query-handler.service'; import { GraphQlDataSourceModel } from '../graphql-data-source.model'; import { TopologyMetricsData, TopologyMetricsModel } from './metrics/topology-metrics.model'; -import { AttributeExpression, GraphQlFieldFilter } from '../../../../../public-api'; +import { GraphQlFieldFilter } from '../../../../graphql/model/schema/filter/field/graphql-field-filter'; +import { AttributeExpression } from '../../../../graphql/model/attribute/attribute-expression'; @Model({ type: 'topology-data-source' @@ -104,16 +105,16 @@ export class TopologyDataSourceModel extends GraphQlDataSourceModel 0 && edgeFilterEntityType !== undefined ? [edgeFilterEntityType] : undefined; + topologyFilters.edges.length > 0 && edgeFilterEntityType !== undefined ? [edgeFilterEntityType] : undefined; return { requestType: ENTITY_TOPOLOGY_GQL_REQUEST, rootNodeType: this.entityType, rootNodeLimit: 100, rootNodeSpecification: rootEntitySpec, - rootNodeFilters: topologyFilters.forNode, + rootNodeFilters: topologyFilters.nodes, edgeSpecification: edgeSpec, - edgeFilters: topologyFilters.forEdge, + edgeFilters: topologyFilters.edges, upstreamNodeSpecifications: this.buildUpstreamSpecifications(requiredEdgeEntityTypes), downstreamNodeSpecifications: this.buildDownstreamSpecifications(requiredEdgeEntityTypes), timeRange: this.getTimeRangeOrThrow() @@ -148,8 +149,8 @@ export class TopologyDataSourceModel extends GraphQlDataSourceModel