Skip to content

Commit

Permalink
auto run traceroutes
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Dec 5, 2024
1 parent 6d4bfa7 commit a22cf5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/pages/NodeRunTraceRoutePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<!-- run trace route button -->
<div class="w-full">
<button @click="runTraceRoute(node)" type="button" class="mx-auto flex cursor-pointer bg-white rounded shadow px-3 py-2 text-black font-semibold hover:bg-gray-100">
<button @click="runTraceRoute(node.num)" type="button" class="mx-auto flex cursor-pointer bg-white rounded shadow px-3 py-2 text-black font-semibold hover:bg-gray-100">
Run Now
</button>
</div>
Expand Down Expand Up @@ -102,6 +102,9 @@ export default {
return;
}
// auto run traceroute
this.runTraceRoute(this.node.num);
},
beforeUnmount() {
Expand All @@ -112,7 +115,7 @@ export default {
},
methods: {
getNodeLongName: (nodeId) => NodeUtils.getNodeLongName(nodeId),
async runTraceRoute(node) {
async runTraceRoute(nodeId) {
// do nothing if already running
if(this.isRunningTraceRoute){
Expand All @@ -124,7 +127,7 @@ export default {
// run trace route
try {
await NodeAPI.traceRoute(node.num);
await NodeAPI.traceRoute(nodeId);
} catch(e) {
// don't care about timeout
}
Expand Down

0 comments on commit a22cf5b

Please sign in to comment.