mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-07 02:22:55 +00:00
fix
This commit is contained in:
parent
5c322d960f
commit
cc8b8cd4e5
@ -265,7 +265,7 @@ export default class ListGraph {
|
||||
.attr("cx", (d: Recordable) => {
|
||||
const events = d.data.attachedEvents;
|
||||
if (events && events.length > 9) {
|
||||
return 272;
|
||||
return 273;
|
||||
} else {
|
||||
return 270;
|
||||
}
|
||||
@ -350,16 +350,6 @@ export default class ListGraph {
|
||||
if (d.data.children.length === 0) return;
|
||||
this.click(d, this);
|
||||
});
|
||||
nodeUpdate
|
||||
.transition()
|
||||
.duration(400)
|
||||
.attr("transform", (d: Recordable) => `translate(${d.y + 3},${d.x})`)
|
||||
.style("opacity", 1)
|
||||
.select("circle")
|
||||
.style("fill", (d: Recordable) =>
|
||||
d._children ? `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}` : "#eee",
|
||||
);
|
||||
|
||||
// Transition exiting nodes to the parent's new position.
|
||||
node
|
||||
.exit()
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { Ref, Span, StatisticsSpan, StatisticsGroupRef, TraceTreeRef } from "@/types/trace";
|
||||
import type { Ref, Span, TraceTreeRef } from "@/types/trace";
|
||||
|
||||
export default class TraceUtil {
|
||||
public static buildTraceDataList(data: Span[]): string[] {
|
||||
@ -270,32 +270,6 @@ export default class TraceUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static getSpanGroupData(groupspans: Span[], groupRef: StatisticsGroupRef): StatisticsSpan {
|
||||
let maxTime = 0;
|
||||
let minTime = 0;
|
||||
let sumTime = 0;
|
||||
const count = groupspans.length;
|
||||
groupspans.forEach((groupspan: Span) => {
|
||||
const duration = groupspan.dur || 0;
|
||||
if (duration > maxTime) {
|
||||
maxTime = duration;
|
||||
}
|
||||
if (duration < minTime) {
|
||||
minTime = duration;
|
||||
}
|
||||
sumTime = sumTime + duration;
|
||||
});
|
||||
const avgTime = count === 0 ? 0 : sumTime / count;
|
||||
return {
|
||||
groupRef,
|
||||
maxTime,
|
||||
minTime,
|
||||
sumTime,
|
||||
avgTime,
|
||||
count,
|
||||
};
|
||||
}
|
||||
|
||||
private static calculationChildren(nodes: Span[], result: Map<string, Span[]>): void {
|
||||
nodes.forEach((node: Span) => {
|
||||
const groupRef = node.endpointName + ":" + node.type;
|
||||
|
Loading…
Reference in New Issue
Block a user