Skip to content

Commit

Permalink
Bug Fixes (#878)
Browse files Browse the repository at this point in the history
* fix bugs in Network Topology

* add Feedback button to tools

* format style
  • Loading branch information
dpgiakatos authored Nov 13, 2024
1 parent 6d1e98b commit ef9f038
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 69 deletions.
2 changes: 1 addition & 1 deletion src/components/Feedback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const showFeedbackDialog = ref(false)
</QCardSection>
<QCardSection>
<div>
Please share your feedback to improve our report pages. You can either:
Please share your feedback to improve our pages. You can either:
<ul>
<li>
Send your feedback by email to
Expand Down
28 changes: 18 additions & 10 deletions src/components/charts/NetworkTopologyChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import { useRouter } from 'vue-router'
const iyp_api = inject('iyp_api')
const router = useRouter()
const emit = defineEmits(['searchChange', 'afChange'])
const emit = defineEmits(['searchChange', 'afChange', 'deleteChart'])
const props = defineProps({
searchInputP: {
type: String,
default: '2501'
type: String
// default: '2501'
},
af: {
type: String,
default: 'IPv4'
type: String
// default: 'IPv4'
},
isComponent: {
type: Boolean,
Expand Down Expand Up @@ -428,12 +428,20 @@ watch(
{ deep: true }
)
watch(searchInput, (newValue) => {
emit('searchChange', props.id, newValue)
if (isPrefix(newValue)) {
if (newValue.includes('.')) {
const watchInput = computed(() => ({
input: searchInput.value,
af: ipModel.value
}))
watch(watchInput, (newValue) => {
emit('searchChange', props.id, {
input: newValue.input,
af: newValue.af.includes('4') ? '4' : '6'
})
if (isPrefix(newValue.input)) {
if (newValue.input.includes('.')) {
ipModel.value = 'IPv4'
} else if (newValue.includes(':')) {
} else if (newValue.input.includes(':')) {
ipModel.value = 'IPv6'
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/networks/as/ASOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,18 @@ onMounted(() => {
<tr>
<td class="topology">
<NetworkTopologyChart
:search-input="String(asNumber)"
:search-input-p="String(asNumber)"
af="IPv4"
:is-component="true"
:show-legend="false"
/>
</td>
<td class="topology">
<NetworkTopologyChart :search-input="String(asNumber)" af="IPv6" :is-component="true" />
<NetworkTopologyChart
:search-input-p="String(asNumber)"
af="IPv6"
:is-component="true"
/>
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/components/networks/prefix/PrefixOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ onMounted(() => {
<tr>
<td class="topology">
<NetworkTopologyChart
:search-input="props.getPrefix"
:search-input-p="props.getPrefix"
:af="getAf(props.getPrefix)"
:is-component="true"
/>
Expand Down
2 changes: 2 additions & 0 deletions src/views/BGPMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import BGPPathsChart from '@/components/charts/BGPPathsChart.vue'
import BGPLineChart from '@/components/charts/BGPLineChart.vue'
import BGPMessagesTable from '@/components/tables/BGPMessagesTable.vue'
import '@/styles/chart.css'
import Feedback from '@/components/Feedback.vue'
const { t } = i18n.global
Expand Down Expand Up @@ -498,6 +499,7 @@ onMounted(() => {
</QCard>
</QDialog>
</div>
<Feedback />
</template>
<style>
Expand Down
Loading

0 comments on commit ef9f038

Please sign in to comment.