diff --git a/src/panel/serviceDependencyGraph/ServiceDependencyGraph.tsx b/src/panel/serviceDependencyGraph/ServiceDependencyGraph.tsx index e5e43c0..0b96542 100644 --- a/src/panel/serviceDependencyGraph/ServiceDependencyGraph.tsx +++ b/src/panel/serviceDependencyGraph/ServiceDependencyGraph.tsx @@ -33,6 +33,9 @@ interface PanelState { maxLayer: number; layerIncreaseFunction: any; layerDecreaseFunction: any; + selectionStatistics?: IntSelectionStatistics; + receiving?: TableContent[]; + sending?: TableContent[]; } cyCanvas(cytoscape); @@ -60,15 +63,13 @@ export class ServiceDependencyGraph extends PureComponent= 0) { - this.selectionStatistics.requests = Math.floor(requestCount); - } - if (errorCount >= 0) { - this.selectionStatistics.errors = Math.floor(errorCount); - } - if (duration >= 0) { - this.selectionStatistics.responseTime = Math.floor(duration); - - if (threshold >= 0) { - this.selectionStatistics.threshold = Math.floor(threshold); - this.selectionStatistics.thresholdViolation = duration > threshold; - } - } + this.selectionStatistics = { + requests: requestCount >= 0 ? Math.floor(requestCount) : undefined, + errors: errorCount >= 0 ? Math.floor(errorCount) : undefined, + responseTime: duration >= 0 ? Math.floor(duration) : undefined, + threshold: threshold >= 0 ? Math.floor(threshold) : undefined, + thresholdViolation: duration > threshold, + }; for (let i = 0; i < edges.length; i++) { const actualEdge: EdgeSingular = edges[i]; @@ -383,8 +370,13 @@ export class ServiceDependencyGraph extends PureComponent ); } -} +} \ No newline at end of file