InternetHealthReport / ihr-website

Vue.js code for IHR website
https://ihr.iijlab.net/ihr/en
GNU General Public License v3.0
65 stars 122 forks source link

"Network is Unreachable" label not cleared when switching report timeframe #864

Closed m-appel closed 3 weeks ago

m-appel commented 1 month ago

Describe the bug When selecting a report timeframe during which no AS Hegemony data is available, a message "Network is Unreachable" or "No Data Available" is displayed. However, choosing a different timeframe with data, does not clear this message.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://ihr.iijlab.net/ihr/en/network/AS2497?af=4&last=3&date=2024-09-28&active=monitoring
  2. Observe "No Data Available" message
  3. Select a different date (e.g., 2024-09-29)
  4. "No Data Available" message will be overlaying the graph

Expected behavior "No Data Available" message should disappear.

Screenshots

image

Desktop (please complete the following information):

Additional context

I also noticed that the message differs depending on the way the page is loaded. Accessing the page via a link (like above) results in "No Data Available". Navigating from a timeframe with data to one without results in "Network is Unreachable".

abansal15 commented 1 month ago

Hello @m-appel @dpgiakatos can you please assign this issue to me

dpgiakatos commented 1 month ago

Can you describe how you plan to address it?

ArnabBCA commented 3 weeks ago

Hi @dpgiakatos, I would like to work on this issue, I have tested my solution and it appears that resetting before every fetch by adding layout.value.annotations = [] in the function fetchHegemony solves the overlaying issue https://github.com/InternetHealthReport/ihr-website/blob/65b495915b4fb5aee088377954a00c9e1033dfe3/src/components/charts/AsInterdependenciesChart.vue#L338C1-L340C27'

And to fix the issue in the Additional context we have to add the >= instead of > in the queryHegemonyTier1API function because by default the noDataError is set to true when the website mounts. Its sets to false in this function only, if we dont do this it will get stopped always in the first if statement when it mounts in the fetchHegemony function. https://github.com/InternetHealthReport/ihr-website/blob/65b495915b4fb5aee088377954a00c9e1033dfe3/src/components/charts/AsInterdependenciesChart.vue#L317C5-L317C61

dpgiakatos commented 3 weeks ago

Sounds good the proposed solution!

dpgiakatos commented 3 weeks ago

Sorry for the short notice. Would it be possible to address this before the start of next week, specifically by Sunday? I would like to include this PR in the upcoming release. If that's not feasible, no worries—please take your time. Thanks.