more code cleanup
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
<script setup>
|
||||
const emit = defineEmits(['showTraceRoute']);
|
||||
import moment from 'moment';
|
||||
import { state } from '../../store.js';
|
||||
import { findNodeById } from '../../utils.js';
|
||||
import { state } from '@/store.js';
|
||||
import { useMapStore } from '@/stores/mapStore';
|
||||
const mapData = useMapStore();
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
@ -17,7 +18,7 @@ import { findNodeById } from '../../utils.js';
|
||||
<div class="block flex-1 px-4 py-2">
|
||||
<div class="relative flex min-w-0 flex-1 items-center">
|
||||
<div>
|
||||
<p class="text-sm text-gray-900"><span class="font-medium">{{ findNodeById(traceroute.to)?.long_name || '???' }}</span> to <span class="font-medium">{{ findNodeById(traceroute.from)?.long_name || '???' }}</span></p>
|
||||
<p class="text-sm text-gray-900"><span class="font-medium">{{ mapData.findNodeById(traceroute.to)?.long_name || '???' }}</span> to <span class="font-medium">{{ mapData.findNodeById(traceroute.from)?.long_name || '???' }}</span></p>
|
||||
<div class="text-sm text-gray-700">{{ moment(new Date(traceroute.updated_at)).fromNow() }} - {{ traceroute.route.length }} hops {{ traceroute.channel_id ? `on ${traceroute.channel_id}` : '' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user