|
52 | 52 | class="bgp-popover-text"
|
53 | 53 | style="text-align: left; position: absolute;"
|
54 | 54 | >
|
55 |
| - <div v-if="searchOptions.validateBGP && this.rotoStatus" class="options-text"> |
| 55 | + <div |
| 56 | + v-if="searchOptions.validateBGP && this.rotoStatus" |
| 57 | + class="options-text" |
| 58 | + > |
56 | 59 | will be validated with BGP ASN
|
57 | 60 | </div>
|
58 | 61 | </div>
|
|
225 | 228 | </div>
|
226 | 229 | <h4>DATA DELIVERY</h4>
|
227 | 230 | <h5>RPKI</h5>
|
228 |
| - <a :href="`https://${routinatorApiHost}/api/v1/status`" v-if="this.status.version">{{ |
229 |
| - this.status.version |
230 |
| - }}</a> |
231 |
| - <span v-else>Not available. Routinator may not be running!</span> |
| 231 | + <a |
| 232 | + :href="`https://${routinatorApiHost}/api/v1/status`" |
| 233 | + v-if="this.status.version" |
| 234 | + >{{ this.status.version }}</a |
| 235 | + > |
| 236 | + <span v-else |
| 237 | + >Not available. Routinator may not be running!</span |
| 238 | + > |
232 | 239 | <h5>BGP + RIR Allocations</h5>
|
233 | 240 | <a
|
234 | 241 | :href="`https://${rotoApiHost}/api/v1/`"
|
|
341 | 348 | />
|
342 | 349 | </div>
|
343 | 350 | <div v-else-if="!this.status.error && !this.status.waiting">
|
344 |
| - <h4 v-if="this.rotoStatus">No Origin ASN found for this Prefix in BGP.</h4> |
| 351 | + <h4 v-if="this.rotoStatus"> |
| 352 | + No Origin ASN found for this Prefix in BGP. |
| 353 | + </h4> |
345 | 354 | <div class="validation-description">
|
346 | 355 | You can enter an ASN to validate this prefix against and try again.
|
347 | 356 | </div>
|
@@ -658,7 +667,8 @@ export default {
|
658 | 667 | window.setTimeout(this.loadRoutinatorStatus, 10000);
|
659 | 668 | } else {
|
660 | 669 | this.status.error =
|
661 |
| - (err.response && err.response.data) && |
| 670 | + err.response && |
| 671 | + err.response.data && |
662 | 672 | "Routinator API returned an error. Check your Routinator installation.";
|
663 | 673 | this.status.waiting = false;
|
664 | 674 | }
|
@@ -817,7 +827,7 @@ export default {
|
817 | 827 | // gave us.
|
818 | 828 | // We're only going to do this if the availability of the roto-api has been
|
819 | 829 | // confirmed. Since it may not be enabled by the user we're failing silently.
|
820 |
| - if (this.searchOptions.validateBGP && this.rotoStatus) { |
| 830 | + if (this.searchOptions.validateBGP) { |
821 | 831 | console.log(`loading bgp+alloc data for ${this.searchForm.prefix}`);
|
822 | 832 | this.loadingRoute = true;
|
823 | 833 | this.firstSearch = false;
|
@@ -918,8 +928,14 @@ export default {
|
918 | 928 | // return;
|
919 | 929 | },
|
920 | 930 | err => {
|
921 |
| - this.error = |
922 |
| - "The BGP Lookup Server failed with an unknown error. Please retry later."; |
| 931 | + this.loadingStatus = false; |
| 932 | + // Only throw an error if we previously saw the roto-api server. |
| 933 | + if (this.rotoStatus) { |
| 934 | + this.error = |
| 935 | + "The BGP Lookup Server failed with an unknown error. Please retry later."; |
| 936 | + } else { |
| 937 | + this.error = this.$t("home.pleasevalidasn"); |
| 938 | + } |
923 | 939 | }
|
924 | 940 | )
|
925 | 941 | .catch(err => {
|
|
0 commit comments