diff --git a/.env b/.env index 643e1e14..89e5e832 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ VITE_DEFAULT_LOCALE=en VITE_FALLBACK_LOCALE=en VITE_SUPPORTED_LOCALES=en,jp -VITE_BASE_URL=/ihr \ No newline at end of file +VITE_BASE_URL=/ \ No newline at end of file diff --git a/index.html b/index.html index 956e977f..56aff020 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ content="Internet Health Report | Monitoring networks health" /> - + { class="asnDot" :style="{ backgroundColor: asnColors[tooltipData.data.asns[0].asn] || 'gray' }" /> - + AS{{ tooltipData.data.asns[0].asn }} ({{ tooltipData.data.asns[0].holder }}) @@ -463,7 +463,7 @@ watch(displayMode, () => { :style="{ backgroundColor: asnColors[asn] }" class="asn-box" > - AS{{ asn }} + AS{{ asn }} diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index b81b09a0..ecdac492 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -132,7 +132,7 @@ "title": "Route Origin Validation", "info": { "title": "Route Origin Validation", - "description": "By default this widget shows prefixes that are RPKI invalid and that are either propagated or originated by the selected AS. The dropdown menu permits to display:
AS Dependency (a.k.a. AS Hegemony) is a metric to evaluate the interdependencies between ASes. This metric is computed from BGP data.
Top plot
You can view this as the upstream providers of the selected network. Values close to 100% mean that most BGP paths to the selected AS are going via that AS.
ASes that are directly connected to the selected AS have the '(direct)' tag attached to their name.
Bottom plot
ASes that depend on the selected AS. This is equivalent to the customer cone of an AS. Click on the graph to see the details.
For more details see the documentation.
" + "description": "AS Dependency (a.k.a. AS Hegemony) is a metric to evaluate the interdependencies between ASes. This metric is computed from BGP data.
Top plot
You can view this as the upstream providers of the selected network. Values close to 100% mean that most BGP paths to the selected AS are going via that AS.
ASes that are directly connected to the selected AS have the '(direct)' tag attached to their name.
Bottom plot
ASes that depend on the selected AS. This is equivalent to the customer cone of an AS. Click on the graph to see the details.
For more details see the documentation.
" }, "defaultTrace": "Number of dependents", "yaxis": "dependency", @@ -170,7 +170,7 @@ "title": "Network Dependency", "info": { "title": "Network Dependency", - "description": "A Country network dependency is computed in two different ways, emphasizing either the distribution of the country's population or the country ASes.
Population coverage
The population coverage combines two data sources, the estimated population for each AS and the paths from the Internet to these ASes. The total value represents the percentage of the population that is reached through the corresponding AS. This value is also dissected into two parts:
AS coverage
The AS coverage is the percentage of the country's ASes that are reached via this AS. Large values represent significant transit networks for the monitored country.
See the documentation for more details.
" + "description": "A Country network dependency is computed in two different ways, emphasizing either the distribution of the country's population or the country ASes.
Population coverage
The population coverage combines two data sources, the estimated population for each AS and the paths from the Internet to these ASes. The total value represents the percentage of the population that is reached through the corresponding AS. This value is also dissected into two parts:
AS coverage
The AS coverage is the percentage of the country's ASes that are reached via this AS. Large values represent significant transit networks for the monitored country.
See the documentation for more details.
" }, "table": { "dependencyTitle": "Summary", @@ -217,7 +217,7 @@ "title": "Network Disconnections", "info": { "title": "Network Disconnections", - "description": "Network disconnections found by monitoring the status of RIPE Atlas probes. This widget reports synchronized disconnections of probes that are in the same geographical or topological area. The scope of this outage detector is limited to ASes and regions where RIPE Atlas has multiple probes.
See the documentation for more details.
" + "description": "Network disconnections found by monitoring the status of RIPE Atlas probes. This widget reports synchronized disconnections of probes that are in the same geographical or topological area. The scope of this outage detector is limited to ASes and regions where RIPE Atlas has multiple probes.
See the documentation for more details.
" }, "table": { "event": "event", @@ -236,7 +236,7 @@ "title": "Network Delay", "info": { "title": "Network Delay", - "description": "Network delays between ASes, IXPs, Atlas probes, and cities (IP addresses are geolocated with RIPE IPmap) computed using traceroute data collected with the RIPE Atlas measurement platform.
See documentation for more details.
" + "description": "Network delays between ASes, IXPs, Atlas probes, and cities (IP addresses are geolocated with RIPE IPmap) computed using traceroute data collected with the RIPE Atlas measurement platform.
See documentation for more details.
" }, "yaxis": "Median RTT (ms)", "table": { @@ -358,7 +358,7 @@ "src": "", "style": "" }, - "body": "The source code of all IHR tools is hosted on GitHub. You can review and submit bug reports for the IHR website here. If you don't have a GitHub account contact us directly." + "body": "The source code of all IHR tools is hosted on GitHub. You can review and submit bug reports for the IHR website here. If you don't have a GitHub account contact us directly." }, "6": { "header": "How can I contribute to IHR?", @@ -366,7 +366,7 @@ "src": "", "style": "" }, - "body": "IHR is mainly built and maintained by researchers and students. We need help at all levels for the frontend, backend, documentation, and data collection. Feel free to take a look at IHR projects on GitHub or contact us. The IIJ Research Laboratory summer internship program is also a good way to visit us and work on IHR tools." + "body": "IHR is mainly built and maintained by researchers and students. We need help at all levels for the frontend, backend, documentation, and data collection. Feel free to take a look at IHR projects on GitHub or contact us. The IIJ Research Laboratory summer internship program is also a good way to visit us and work on IHR tools." } } }, @@ -471,12 +471,12 @@ }, "networkreport": { "title": "Network report", - "summary": "Network reports provide all information collected by IHR about a selected network (AS or IXP). Network reports are available through the search bar at the top of the IHR webpages or by following links from the global report. Here are links to a few reports:", + "summary": "Network reports provide all information collected by IHR about a selected network (AS or IXP). Network reports are available through the search bar at the top of the IHR webpages or by following links from the global report. Here are links to a few reports:", "description": {} }, "countryreport": { "title": "Country Report", - "summary": "A country report provides information collected by IHR about a certain country. Country reports are available through the search bar at the top of the IHR webpages. Here are links to a few reports:", + "summary": "A country report provides information collected by IHR about a certain country. Country reports are available through the search bar at the top of the IHR webpages. Here are links to a few reports:", "description": {} }, "asdependency": { @@ -625,7 +625,7 @@ "src": "assets/imgs/forwarding_AS174.png", "style": "max-width:100%" }, - "body": "For forwarding anomalies let's look at another example, AS174 Cogent on November 2017.ASes that are usually seen downstream of the selected network in BGP data. This is equivalent to the customer cone of the selected AS. Values close to 100% mean that the selected AS is seen in all, or at least most, of the AS paths to that AS.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen downstream of the selected network in BGP data. This is equivalent to the customer cone of the selected AS. Values close to 100% mean that the selected AS is seen in all, or at least most, of the AS paths to that AS.
See also AS Dependency documentation.
" } }, "upstreams": { @@ -955,7 +955,7 @@ "caption": "ASes depending on AS", "info": { "title": "''Upstream'' ASes", - "description": "ASes that are usually seen upstream of the selected network in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected AS.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen upstream of the selected network in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected AS.
See also AS Dependency documentation.
" } }, "atlas": { @@ -1108,7 +1108,7 @@ "title": "''Upstream'' ASes", "info": { "title": "''Upstream'' ASes", - "description": "ASes that are usually seen upstream of the selected prefix in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected prefix.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen upstream of the selected prefix in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected prefix.
See also AS Dependency documentation.
" } }, "roas": { diff --git a/src/i18n/locales/jp.json b/src/i18n/locales/jp.json index 4d9aa7af..5b3566ea 100644 --- a/src/i18n/locales/jp.json +++ b/src/i18n/locales/jp.json @@ -132,7 +132,7 @@ "title": "Route Origin Validation", "info": { "title": "Route Origin Validation", - "description": "By default this widget shows prefixes that are RPKI invalid and that are either propagated or originated by the selected AS. The dropdown menu permits to display:AS Dependency (a.k.a. AS Hegemony) is a metric to evaluate the interdependencies between ASes. This metric is computed from BGP data.
Top plot
You can view this as the upstream providers of the selected network. Values close to 100% mean that most BGP paths to the selected AS are going via that AS.
ASes that are directly connected to the selected AS have the '(direct)' tag attached to their name.
Bottom plot
ASes that depend on the selected AS. This is equivalent to the customer cone of an AS. Click on the graph to see the details.
For more details see the documentation.
" + "description": "AS Dependency (a.k.a. AS Hegemony) is a metric to evaluate the interdependencies between ASes. This metric is computed from BGP data.
Top plot
You can view this as the upstream providers of the selected network. Values close to 100% mean that most BGP paths to the selected AS are going via that AS.
ASes that are directly connected to the selected AS have the '(direct)' tag attached to their name.
Bottom plot
ASes that depend on the selected AS. This is equivalent to the customer cone of an AS. Click on the graph to see the details.
For more details see the documentation.
" }, "defaultTrace": "Number of dependents", "yaxis": "dependency", @@ -170,7 +170,7 @@ "title": "Network Dependency", "info": { "title": "Network Dependency", - "description": "A Country network dependency is computed in two different ways, emphasizing either the distribution of the country's population or the country ASes.
Population coverage
The population coverage combines two data sources, the estimated population for each AS and the paths from the Internet to these ASes. The total value represents the percentage of the population that is reached through the corresponding AS. This value is also dissected into two parts:
AS coverage
The AS coverage is the percentage of the country's ASes that are reached via this AS. Large values represent significant transit networks for the monitored country.
See the documentation for more details.
" + "description": "A Country network dependency is computed in two different ways, emphasizing either the distribution of the country's population or the country ASes.
Population coverage
The population coverage combines two data sources, the estimated population for each AS and the paths from the Internet to these ASes. The total value represents the percentage of the population that is reached through the corresponding AS. This value is also dissected into two parts:
AS coverage
The AS coverage is the percentage of the country's ASes that are reached via this AS. Large values represent significant transit networks for the monitored country.
See the documentation for more details.
" }, "table": { "dependencyTitle": "Summary", @@ -217,7 +217,7 @@ "title": "Network Disconnections", "info": { "title": "Network Disconnections", - "description": "Network disconnections found by monitoring the status of RIPE Atlas probes. This widget reports synchronized disconnections of probes that are in the same geographical or topological area. The scope of this outage detector is limited to ASes and regions where RIPE Atlas has multiple probes.
See the documentation for more details.
" + "description": "Network disconnections found by monitoring the status of RIPE Atlas probes. This widget reports synchronized disconnections of probes that are in the same geographical or topological area. The scope of this outage detector is limited to ASes and regions where RIPE Atlas has multiple probes.
See the documentation for more details.
" }, "table": { "event": "event", @@ -236,7 +236,7 @@ "title": "Network Delay", "info": { "title": "Network Delay", - "description": "Network delays between ASes, IXPs, Atlas probes, and cities (IP addresses are geolocated with RIPE IPmap) computed using traceroute data collected with the RIPE Atlas measurement platform.
See documentation for more details.
" + "description": "Network delays between ASes, IXPs, Atlas probes, and cities (IP addresses are geolocated with RIPE IPmap) computed using traceroute data collected with the RIPE Atlas measurement platform.
See documentation for more details.
" }, "yaxis": "Median RTT (ms)", "table": { @@ -358,7 +358,7 @@ "src": "", "style": "" }, - "body": "The source code of all IHR tools is hosted on GitHub. You can review and submit bug reports for the IHR website here. If you don't have a GitHub account contact us directly." + "body": "The source code of all IHR tools is hosted on GitHub. You can review and submit bug reports for the IHR website here. If you don't have a GitHub account contact us directly." }, "6": { "header": "How can I contribute to IHR?", @@ -366,7 +366,7 @@ "src": "", "style": "" }, - "body": "IHR is mainly built and maintained by researchers and students. We need help at all levels for the frontend, backend, documentation, and data collection. Feel free to take a look at IHR projects on GitHub or contact us. The IIJ Research Laboratory summer internship program is also a good way to visit us and work on IHR tools." + "body": "IHR is mainly built and maintained by researchers and students. We need help at all levels for the frontend, backend, documentation, and data collection. Feel free to take a look at IHR projects on GitHub or contact us. The IIJ Research Laboratory summer internship program is also a good way to visit us and work on IHR tools." } } }, @@ -471,12 +471,12 @@ }, "networkreport": { "title": "Network report", - "summary": "Network reports provide all information collected by IHR about a selected network (AS or IXP). Network reports are available through the search bar at the top of the IHR webpages or by following links from the global report. Here are links to a few reports:", + "summary": "Network reports provide all information collected by IHR about a selected network (AS or IXP). Network reports are available through the search bar at the top of the IHR webpages or by following links from the global report. Here are links to a few reports:", "description": {} }, "countryreport": { "title": "Country Report", - "summary": "A country report provides information collected by IHR about a certain country. Country reports are available through the search bar at the top of the IHR webpages. Here are links to a few reports:", + "summary": "A country report provides information collected by IHR about a certain country. Country reports are available through the search bar at the top of the IHR webpages. Here are links to a few reports:", "description": {} }, "asdependency": { @@ -625,7 +625,7 @@ "src": "assets/imgs/forwarding_AS174.png", "style": "max-width:100%" }, - "body": "For forwarding anomalies let's look at another example, AS174 Cogent on November 2017.ASes that are usually seen downstream of the selected network in BGP data. This is equivalent to the customer cone of the selected AS. Values close to 100% mean that the selected AS is seen in all, or at least most, of the AS paths to that AS.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen downstream of the selected network in BGP data. This is equivalent to the customer cone of the selected AS. Values close to 100% mean that the selected AS is seen in all, or at least most, of the AS paths to that AS.
See also AS Dependency documentation.
" } }, "upstreams": { @@ -955,7 +955,7 @@ "caption": "ASes depending on AS", "info": { "title": "''Upstream'' ASes", - "description": "ASes that are usually seen upstream of the selected network in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected AS.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen upstream of the selected network in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected AS.
See also AS Dependency documentation.
" } }, "atlas": { @@ -1108,7 +1108,7 @@ "title": "''Upstream'' ASes", "info": { "title": "''Upstream'' ASes", - "description": "ASes that are usually seen upstream of the selected prefix in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected prefix.
See also AS Dependency documentation.
" + "description": "ASes that are usually seen upstream of the selected prefix in BGP data. Values close to 100% mean that the AS is seen in all, or at least most, of the AS paths to the selected prefix.
See also AS Dependency documentation.
" } }, "roas": { diff --git a/src/i18n/translation.js b/src/i18n/translation.js index 1ef1ee32..077f484a 100644 --- a/src/i18n/translation.js +++ b/src/i18n/translation.js @@ -53,11 +53,6 @@ const Trans = { async routeMiddleware(to, _from, next) { let paramLocale = to.params.locale - if (paramLocale) { - if (paramLocale.includes('-')) { - paramLocale = paramLocale.split('-')[0] - } - } if (!Trans.isLocaleSupported(paramLocale)) { return next(await Trans.guessDefaultLocale()) } diff --git a/src/router/index.js b/src/router/index.js index ac8f8737..5daaca41 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -21,6 +21,12 @@ const router = createRouter({ } }, routes: [ + { + path: '/', + redirect: () => { + return `/${Tr.defaultLocale}` + } + }, { path: '/:locale?', meta: { title: 'Internet Health Report' }, @@ -153,6 +159,21 @@ const router = createRouter({ } ] }, + { + path: '/ihr/:pathMatch(.*)*', + redirect: (to) => { + if (to.params.pathMatch.length) { + let paramLocale = to.params.pathMatch[0] + if (paramLocale) { + if (paramLocale.includes('-')) { + paramLocale = paramLocale.split('-')[0] + to.params.pathMatch[0] = paramLocale + } + } + return `/${to.params.pathMatch.join('/')}` + } + } + }, { path: '/:pathMatch(.*)*', name: 'page-not-found',