diff --git a/packages/playground/package.json b/packages/playground/package.json index 34f5593cdf..e2a76fbd54 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -41,6 +41,7 @@ "mosha-vue-toastify": "^1.0.23", "pinia": "^2.0.32", "qrcode": "^1.5.1", + "url-join": "^5.0.0", "validator": "^13.9.0", "vue": "^3.2.47", "vue-chartjs": "^5.2.0", diff --git a/packages/playground/src/components/node_details_cards/iperf_details_card.vue b/packages/playground/src/components/node_details_cards/iperf_details_card.vue index 3f8cfe6407..0f03ad7385 100644 --- a/packages/playground/src/components/node_details_cards/iperf_details_card.vue +++ b/packages/playground/src/components/node_details_cards/iperf_details_card.vue @@ -70,6 +70,10 @@ export default { downloadSpeed: format(node.download_speed), uploadSpeed: format(node.upload_speed), })); + if (array.length === 0) { + console.error("Empty array returned from the IPerf test"); + throw new Error("Can't get the test results, please try again later."); + } IperfDetails.value = array; return IperfDetails.value; }; diff --git a/packages/playground/src/utils/manual.ts b/packages/playground/src/utils/manual.ts index 0af98de2e3..6bcf104c94 100644 --- a/packages/playground/src/utils/manual.ts +++ b/packages/playground/src/utils/manual.ts @@ -1,18 +1,20 @@ -const BASE = window.env.MANUAL_URL; +import urlJoin from "url-join"; +const BASE = window.env.MANUAL_URL; export const manual = { - dedicated_machines: `${BASE}/documentation/dashboard/deploy/node_finder.html#dedicated-nodes`, - tft_bridges: `${BASE}/documentation/threefold_token/tft_bridges/tft_bridges.html`, - buy_sell_tft: `${BASE}/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html`, - farmers: `${BASE}/documentation/farmers/farmers.html`, - governance: `${BASE}/documentation/dashboard/tfchain/tf_dao.html`, - pricing: `${BASE}/knowledge_base/cloud/pricing/pricing.html`, - dao: `${BASE}/documentation/dashboard/tfchain/tf_dao.html`, - caprover: `${BASE}/documentation/dashboard/solutions/caprover.html`, - tf_connect_app: `${BASE}/documentation/threefold_token/storing_tft/tf_connect_app.html`, - contract_locking: `${BASE}/documentation/developers/tfchain/tfchain.html#contract-locking`, - billing_pricing: `${BASE}/documentation/dashboard/deploy/node_finder.html#billing--pricing`, - discount_levels: `${BASE}/knowledge_base/cloud/pricing/pricing.html#staking-discount`, - tfchain_stellar_bridge: `${BASE}/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html`, - minting_receipts: `${BASE}/documentation/farmers/3node_building/minting_receipts.html`, + dedicated_machines: urlJoin(BASE, "/documentation/dashboard/deploy/node_finder.html#dedicated-nodes"), + tft_bridges: urlJoin(BASE, "/documentation/threefold_token/tft_bridges/tft_bridges.html"), + buy_sell_tft: urlJoin(BASE, "/documentation/threefold_token/buy_sell_tft/buy_sell_tft.html"), + farmers: urlJoin(BASE, "/documentation/farmers/farmers.html"), + governance: urlJoin(BASE, "/documentation/dashboard/tfchain/tf_dao.html"), + pricing: urlJoin(BASE, "/knowledge_base/cloud/pricing/pricing.html"), + dao: urlJoin(BASE, "/documentation/dashboard/tfchain/tf_dao.html"), + caprover: urlJoin(BASE, "/documentation/dashboard/solutions/caprover.html"), + tf_connect_app: urlJoin(BASE, "/documentation/threefold_token/storing_tft/tf_connect_app.html"), + tf_connect_wallet: urlJoin(BASE, "/documentation/dashboard/wallet_connector.html"), + contract_locking: urlJoin(BASE, "/documentation/developers/tfchain/tfchain.html#contract-locking"), + billing_pricing: urlJoin(BASE, "/documentation/dashboard/deploy/node_finder.html#billing--pricing"), + discount_levels: urlJoin(BASE, "/knowledge_base/cloud/pricing/pricing.html#staking-discount"), + tfchain_stellar_bridge: urlJoin(BASE, "/documentation/threefold_token/tft_bridges/tfchain_stellar_bridge.html"), + minting_receipts: urlJoin(BASE, "/documentation/farmers/3node_building/minting_receipts.html"), }; diff --git a/packages/playground/src/weblets/profile_manager.vue b/packages/playground/src/weblets/profile_manager.vue index cef65de4da..8a7590b88e 100644 --- a/packages/playground/src/weblets/profile_manager.vue +++ b/packages/playground/src/weblets/profile_manager.vue @@ -72,7 +72,7 @@

Please visit - the manual + the manual get started.