mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
Merge branch 'main' of github.com:apache/skywalking-booster-ui into feat/async-profile
This commit is contained in:
commit
bdf12cee62
@ -16,18 +16,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ElNotification } from "element-plus";
|
import { ElNotification } from "element-plus";
|
||||||
export default (value: string): void => {
|
|
||||||
const input = document.createElement("input");
|
export default (text: string): void => {
|
||||||
input.value = value;
|
navigator.clipboard
|
||||||
document.body.appendChild(input);
|
.writeText(text)
|
||||||
input.select();
|
.then(() => {
|
||||||
if (document.execCommand("Copy")) {
|
|
||||||
document.execCommand("Copy");
|
|
||||||
}
|
|
||||||
input.remove();
|
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: "Success",
|
title: "Success",
|
||||||
message: "Copied",
|
message: "Copied",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
ElNotification({
|
||||||
|
title: "Error",
|
||||||
|
message: err,
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
@ -88,7 +88,7 @@ limitations under the License. -->
|
|||||||
const index = isNaN(item.activedTabIndex) ? 0 : item.activedTabIndex;
|
const index = isNaN(item.activedTabIndex) ? 0 : item.activedTabIndex;
|
||||||
widgets.push(
|
widgets.push(
|
||||||
...item.children[index].children.filter(
|
...item.children[index].children.filter(
|
||||||
(d: LayoutConfig) => !ListChartTypes.includes(d.graph?.type || ""),
|
(d: LayoutConfig) => d.type === WidgetType.Widget && !ListChartTypes.includes(d.graph?.type || ""),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -302,37 +302,36 @@ export default class ListGraph {
|
|||||||
)
|
)
|
||||||
.attr("y", -2)
|
.attr("y", -2)
|
||||||
.style("fill", (d: Recordable) => `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}`);
|
.style("fill", (d: Recordable) => `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}`);
|
||||||
nodeEnter
|
const nodeUpdate = nodeEnter.merge(node);
|
||||||
|
nodeUpdate
|
||||||
.transition()
|
.transition()
|
||||||
.duration(400)
|
.duration(400)
|
||||||
.attr("transform", (d: Recordable) => `translate(${d.y + 5},${d.x})`)
|
.attr("transform", (d: Recordable) => `translate(${d.y + 5},${d.x})`)
|
||||||
.style("opacity", 1);
|
.style("opacity", 1);
|
||||||
nodeEnter
|
nodeUpdate
|
||||||
.append("circle")
|
.append("circle")
|
||||||
.attr("r", appStore.theme === Themes.Dark ? 4 : 3)
|
.attr("r", appStore.theme === Themes.Dark ? 4 : 3)
|
||||||
.style("cursor", "pointer")
|
.style("cursor", "pointer")
|
||||||
.attr("stroke-width", appStore.theme === Themes.Dark ? 3 : 2.5)
|
.attr("stroke-width", appStore.theme === Themes.Dark ? 3 : 2.5)
|
||||||
.attr("fill", (d: Recordable) =>
|
.style("fill", (d: Recordable) =>
|
||||||
d._children
|
d._children ? `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}` : "#eee",
|
||||||
? `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}`
|
|
||||||
: appStore.theme === Themes.Dark
|
|
||||||
? "#eee"
|
|
||||||
: "rbga(0,0,0,0)",
|
|
||||||
)
|
)
|
||||||
.style("stroke", (d: Recordable) =>
|
.style("stroke", (d: Recordable) =>
|
||||||
d.data.label === "TRACE_ROOT" ? "" : `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}`,
|
d.data.label === "TRACE_ROOT" ? "" : `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}`,
|
||||||
)
|
)
|
||||||
.on("click", (d: Recordable) => {
|
.on("click", (event: any, d: Recordable) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
if (d.data.children.length == 0) return;
|
||||||
this.click(d, this);
|
this.click(d, this);
|
||||||
});
|
});
|
||||||
node
|
nodeUpdate
|
||||||
.transition()
|
.transition()
|
||||||
.duration(400)
|
.duration(400)
|
||||||
.attr("transform", (d: Recordable) => `translate(${d.y + 3},${d.x})`)
|
.attr("transform", (d: Recordable) => `translate(${d.y + 3},${d.x})`)
|
||||||
.style("opacity", 1)
|
.style("opacity", 1)
|
||||||
.select("circle")
|
.select("circle")
|
||||||
.attr("fill", (d: Recordable) =>
|
.style("fill", (d: Recordable) =>
|
||||||
d._children ? `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}` : "",
|
d._children ? `${this.sequentialScale(this.list.indexOf(d.data.serviceCode))}` : "#eee",
|
||||||
);
|
);
|
||||||
|
|
||||||
// Transition exiting nodes to the parent's new position.
|
// Transition exiting nodes to the parent's new position.
|
||||||
|
@ -294,7 +294,9 @@ export default class TraceMap {
|
|||||||
d._children ? this.sequentialScale(this.list.indexOf(d.data.serviceCode)) : "#fff",
|
d._children ? this.sequentialScale(this.list.indexOf(d.data.serviceCode)) : "#fff",
|
||||||
)
|
)
|
||||||
.attr("cursor", "pointer")
|
.attr("cursor", "pointer")
|
||||||
.on("click", (d: Recordable) => {
|
.on("click", (event: any, d: Recordable) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
if (d.data.children.length == 0) return;
|
||||||
click(d);
|
click(d);
|
||||||
});
|
});
|
||||||
const nodeExit = node
|
const nodeExit = node
|
||||||
|
Loading…
Reference in New Issue
Block a user