mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-12 15:55:24 +00:00
feat: sort nodes
This commit is contained in:
parent
3d3cb0e9c9
commit
2a62cf5bcf
@ -228,7 +228,15 @@ limitations under the License. -->
|
|||||||
function draw() {
|
function draw() {
|
||||||
const node = findMostFrequent(topologyStore.calls);
|
const node = findMostFrequent(topologyStore.calls);
|
||||||
const levels = [];
|
const levels = [];
|
||||||
const nodes = JSON.parse(JSON.stringify(topologyStore.nodes));
|
const nodes = topologyStore.nodes.sort((a: Node, b: Node) => {
|
||||||
|
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (a.name.toLowerCase() > b.name.toLowerCase()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
const index = nodes.findIndex((n: Node) => n.type === "USER");
|
const index = nodes.findIndex((n: Node) => n.type === "USER");
|
||||||
let key = index;
|
let key = index;
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user