From 71fd90f44eeea1f7f73cd835bbea31f14a95225e Mon Sep 17 00:00:00 2001 From: AmyangXYZ Date: Sat, 6 Jan 2024 18:44:01 -0500 Subject: [PATCH] add loadPresetTopo --- public/topologies/example.json | 21 ---- src/components/NodeStats.vue | 2 +- src/components/TopoEditToolbox.vue | 103 +++++++++--------- src/core/network.ts | 76 +++++++++---- src/core/node_five_g_ue.ts | 4 + src/core/preset_topologies.json | 72 +++++++++++++ src/hooks/useDrawTopology.ts | 167 ++++++++++++++++------------- src/hooks/useStates.ts | 2 +- 8 files changed, 277 insertions(+), 170 deletions(-) delete mode 100644 public/topologies/example.json create mode 100644 src/core/preset_topologies.json diff --git a/public/topologies/example.json b/public/topologies/example.json deleted file mode 100644 index e3722bc..0000000 --- a/public/topologies/example.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "example", - "nodes": [ - { - "id": 1, - "type": 2, - "pos": [ - 0, - 0 - ] - }, - { - "id": 1, - "type": 2, - "pos": [ - 0, - 0 - ] - } - ] -} \ No newline at end of file diff --git a/src/components/NodeStats.vue b/src/components/NodeStats.vue index 599b6e1..820e873 100644 --- a/src/components/NodeStats.vue +++ b/src/components/NodeStats.vue @@ -6,7 +6,7 @@ import { NODE_TYPE, NODE_TYPE_DISPLAY_NAME } from '@/core/typedefs'