Skip to content

Commit 345971f

Browse files
authored
Merge pull request #2901 from XRPLF/fix_devtool_links
Update broken leagcy links in dev tools
2 parents cccd5ac + 6300a38 commit 345971f

File tree

10 files changed

+32
-23
lines changed

10 files changed

+32
-23
lines changed

resources/dev-tools/components/websocket-api/data/connections.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"jsonrpc_url": "http://localhost:5005/",
4141
"shortname": "Local server",
4242
"longname":
43-
"localhost:6006 (Local <code>rippled</code> Server on port 6006) <br/>\n <small>(Requires that you <a href=\"install-rippled.html\">run <code>rippled</code></a> on this machine with default WebSocket settings)</small>"
43+
"localhost:6006 (Local <code>rippled</code> Server on port 6006) <br/>\n <small>(Requires that you <a href=\"../../docs/infrastructure/installation\">run <code>rippled</code></a> on this machine with default WebSocket settings)</small>"
4444
},
4545
{
4646
"id": "connection-testnet-clio",

resources/dev-tools/domain-verifier.page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import addressCodec, { encodeNodePublic } from "ripple-address-codec";
55
import { verify as keyCodecVerify } from "ripple-keypairs";
66
import { parse } from "smol-toml";
77
import { TextLookupForm } from "./components/TextLookupForm";
8-
import { addNewLogEntry, LogEntryItem, updateLogEntry } from './components/LogEntry'
9-
import { hexToBytes, hexToString, stringToHex } from "@xrplf/isomorphic/utils"
8+
import { addNewLogEntry, LogEntryItem, updateLogEntry } from "./components/LogEntry";
9+
import { hexToBytes, hexToString, stringToHex } from "@xrplf/isomorphic/utils";
10+
import { Link } from "@redocly/theme/components/Link/Link";
1011

1112
export const frontmatter = {
1213
seo: {
@@ -16,7 +17,7 @@ export const frontmatter = {
1617
};
1718

1819
const TIPS =
19-
<p>Check if the xrp-ledger.toml file is actually hosted in the /.well-known/ location at the domain in your manifest. Check your server\'s HTTPS settings and certificate, and make sure your server provides the required <a href="xrp-ledger-toml.html#cors-setup">CORS header.</a></p>;
20+
<p>Check if the xrp-ledger.toml file is actually hosted in the /.well-known/ location at the domain in your manifest. Check your server\'s HTTPS settings and certificate, and make sure your server provides the required <Link to="../../docs/references/xrp-ledger-toml#cors-setup">CORS header.</Link></p>;
2021

2122
const DomainVerificationPage = () => {
2223
const { useTranslate } = useThemeHooks();

resources/dev-tools/rpc-tool.page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export default function RpcTool() {
278278
)}
279279
{txResponse && (
280280
<RPCResponseGroup response={txResponse}
281-
anchor={<a href="tx.html">tx</a>}
281+
anchor={<Link to="../../docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx">tx</Link>}
282282
customExpanded={3}
283283
customExpandedText={translate("expand tx")}
284284
/>
@@ -287,7 +287,7 @@ export default function RpcTool() {
287287
{accountInfoResponse && (
288288
<>
289289
<h3>
290-
<a href="account_info.html">account_info</a>
290+
<Link to="../../docs/references/http-websocket-apis/public-api-methods/account-methods/account_info">account_info</Link>
291291
</h3>
292292
<JsonView
293293
src={accountInfoResponse}
@@ -299,25 +299,25 @@ export default function RpcTool() {
299299
)}
300300
{accountLinesResponse && (
301301
<RPCResponseGroup response={accountLinesResponse}
302-
anchor={<a href="account_lines.html">account_lines</a>}
302+
anchor={<Link to="../../docs/references/http-websocket-apis/public-api-methods/account-methods/account_lines">account_lines</Link>}
303303
/>)
304304
}
305305
{accountTxResponse && (
306306
<RPCResponseGroup response={accountTxResponse}
307-
anchor={<><a href="account_tx.html">account_tx</a>{" "} {translate("(last 20)")}</>}
307+
anchor={<><Link to="../../docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx">account_tx</Link>{" "} {translate("(last 20)")}</>}
308308
customExpanded={3}
309309
customExpandedText={translate("expand tx")}
310310
/>)
311311
}
312312
{accountObjectsResponse && (
313313
<RPCResponseGroup response={accountObjectsResponse}
314-
anchor={<a href="account_objects.html">account_objects</a>}
314+
anchor={<Link to="../../docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects">account_objects</Link>}
315315
/>)
316316
}
317317
</div>
318318
{ledgerResponse && (
319319
<RPCResponseGroup response={ledgerResponse}
320-
anchor={<a href="ledger.html">ledger</a>}
320+
anchor={<Link to="../../docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger">ledger</Link>}
321321
/>)
322322
}
323323
</div>

resources/dev-tools/toml-checker/ValidateTomlSteps.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react';
2+
import { Link } from "@redocly/theme/components/Link/Link";
23
import axios, { AxiosError } from "axios";
34
import { parse } from "smol-toml";
45
import { getListEntries } from "./ListTomlFields";
@@ -299,7 +300,7 @@ export async function fetchFile(
299300
followUpMessage: (<p>
300301
{"Check if the file is actually hosted at the URL above, "
301302
+ "check your server's HTTPS settings and certificate, and make sure your server provides the required "}
302-
<a href="xrp-ledger-toml.html#cors-setup">CORS header.</a>
303+
<Link to="../../docs/references/xrp-ledger-toml#cors-setup">CORS header.</Link>
303304
</p>)
304305
}}
305306
updateLogEntry(setLogEntries, errorUpdate)

resources/dev-tools/tx-sender.page.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import { useState } from 'react'
33
import { useThemeHooks } from '@redocly/theme/core/hooks';
4+
import { Link } from '@redocly/theme/components/Link/Link';
45

56
import AlertTemplate from './components/AlertTemplate';
67
import { transitions, positions, Provider as AlertProvider } from 'react-alert'
@@ -223,7 +224,7 @@ function TxSenderBody(): React.JSX.Element {
223224
{{
224225
buttonText: "Send XRP Payment",
225226
units: "drops of XRP",
226-
longerDescription: (<div>{translate("resources.dev-tool.tx-sender.send-xrp-desc.part1", "Send a ")}<a href="send-xrp.html">{translate("resources.dev-tool.tx-sender.send-xrp-desc.part2", "simple XRP-to-XRP payment")}</a>{translate("resources.dev-tool.tx-sender.send-xrp-desc.part3", ".")}</div>),
227+
longerDescription: (<div>{translate("resources.dev-tool.tx-sender.send-xrp-desc.part1", "Send a ")}<Link to="../../docs/tutorials/how-tos/send-xrp">{translate("resources.dev-tool.tx-sender.send-xrp-desc.part2", "simple XRP-to-XRP payment")}</Link>{translate("resources.dev-tool.tx-sender.send-xrp-desc.part3", ".")}</div>),
227228
}}
228229
inputSettings={
229230
{
@@ -259,7 +260,7 @@ function TxSenderBody(): React.JSX.Element {
259260
units: "drops of XRP",
260261
longerDescription: <div>{translate("Deliver a small amount of XRP with a large ")}
261262
<code>{translate("Amount")}</code>{translate(" value, to test your handling of ")}
262-
<a href="partial-payments.html">{translate("partial payments")}</a>{translate(".")}</div>,
263+
<Link to="../../docs/concepts/payment-types/partial-payments">{translate("partial payments")}</Link>{translate(".")}</div>,
263264
buttonTitle: "(Please wait for partial payments setup to finish)",
264265
}}
265266
loadingBar={{
@@ -287,7 +288,7 @@ function TxSenderBody(): React.JSX.Element {
287288
{{
288289
buttonText: translate("Create Escrow"),
289290
units: translate("seconds"),
290-
longerDescription: (<div>{translate("Create a ")}<a href="escrow.html">{translate("time-based escrow")}</a>
291+
longerDescription: (<div>{translate("Create a ")}<Link to="../../docs/concepts/payment-types/escrow">{translate("time-based escrow")}</Link>
291292
{translate(" of 1 XRP for the specified number of seconds.")}</div>),
292293
}}
293294
inputSettings={
@@ -338,7 +339,7 @@ function TxSenderBody(): React.JSX.Element {
338339
content={{
339340
buttonText: translate("Create Payment Channel"),
340341
units: translate("drops of XRP"),
341-
longerDescription: (<div>{translate("Create a ")}<a href="payment-channels.html">{translate("payment channel")}</a>
342+
longerDescription: (<div>{translate("Create a ")}<Link to="../../docs/concepts/payment-types/payment-channels">{translate("payment channel")}</Link>
342343
{translate(" and fund it with the specified amount of XRP.")}</div>),
343344
}}
344345
inputSettings={
@@ -372,7 +373,7 @@ function TxSenderBody(): React.JSX.Element {
372373
buttonText: translate("Send Issued Currency"),
373374
units: translate(trustCurrencyCode),
374375
longerDescription: (<div>{translate("Your destination address needs a ")}
375-
<a href="trust-lines-and-issuing.html">{translate("trust line")}</a>{translate(" to ")}
376+
<Link to="../../docs/concepts/tokens/fungible-tokens#trust-lines">{translate("trust line")}</Link>{translate(" to ")}
376377
<span className="sending-address-item">{translate("(the test sender)")}</span>
377378
{translate(" for the currency in question. Otherwise, you'll get tecPATH_DRY.")}</div>),
378379
}}
@@ -404,7 +405,7 @@ function TxSenderBody(): React.JSX.Element {
404405
buttonText: translate("Trust for"),
405406
units: translate(trustCurrencyCode),
406407
longerDescription: (<div>{translate("The test sender creates a ")}
407-
<a href="trust-lines-and-issuing.html">{translate("trust line")}</a>
408+
<Link to="../../docs/concepts/tokens/fungible-tokens#trust-lines">{translate("trust line")}</Link>
408409
{translate(" to your account for the given currency.")}</div>),
409410
}}
410411
inputSettings={

resources/dev-tools/websocket-api-tool.page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ export function WebsocketApiTool() {
198198
<h1>{translate("WebSocket Tool")}</h1>
199199
<div className="api-method-description-wrapper">
200200
<h3>
201-
<a
202-
href={`${currentMethod.name.split(" ")[0]}.html`}
201+
<Link
202+
to={currentMethod.link}
203203
className="selected_command"
204204
>
205205
{currentMethod.name}
206-
</a>
206+
</Link>
207207
</h3>
208208
{currentMethod.description && (
209209
<p

resources/dev-tools/xrp-faucets.page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { useThemeHooks } from '@redocly/theme/core/hooks';
3+
import { Link } from "@redocly/theme/components/Link/Link";
34
import { useState } from 'react';
45
import { Client, dropsToXrp, Wallet } from 'xrpl';
56
import * as faucetData from './faucets.json'
@@ -84,7 +85,7 @@ export default function XRPFaucets(): React.JSX.Element {
8485
<section className="container-fluid pt-3 p-md-3">
8586
<h1>{translate("XRP Faucets")}</h1>
8687
<div className="content">
87-
<p>{translate("resources.dev-tool.faucet.content.part1", "These ")}<a href="parallel-networks.html">{translate("resources.dev-tool.faucet.content.part2", "parallel XRP Ledger test networks")}</a> {translate("resources.dev-tool.faucet.content.part3", "provide platforms for testing changes to the XRP Ledger and software built on it, without using real funds.")}</p>
88+
<p>{translate("resources.dev-tool.faucet.content.part1", "These ")}<Link to="../../docs/concepts/networks-and-servers/parallel-networks">{translate("resources.dev-tool.faucet.content.part2", "parallel XRP Ledger test networks")}</Link> {translate("resources.dev-tool.faucet.content.part3", "provide platforms for testing changes to the XRP Ledger and software built on it, without using real funds.")}</p>
8889
<p>{translate("resources.dev-tool.faucet.content.part4", "These funds are intended for")} <strong>{translate("resources.dev-tool.faucet.content.part5", "testing")}</strong> {translate("resources.dev-tool.faucet.content.part6", "only. Test networks' ledger history and balances are reset as necessary. Devnets may be reset without warning.")}</p>
8990
<p>{translate("resources.dev-tool.faucet.content.part7", "All balances and XRP on these networks are separate from Mainnet. As a precaution, do not use the Testnet or Devnet credentials on the Mainnet.")}</p>
9091

resources/dev-tools/xrp-ledger-toml-checker.page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { useThemeHooks } from '@redocly/theme/core/hooks';
3+
import { Link } from "@redocly/theme/components/Link/Link";
34
import { TextLookupForm, type TextLookupFormProps } from './components/TextLookupForm';
45
import { fetchFile, fetchWallet } from './toml-checker/ValidateTomlSteps';
56
import { LogEntryItem } from './components/LogEntry';
@@ -76,7 +77,7 @@ export default function TomlChecker() {
7677
<h1>{translate(`xrp-ledger.toml Checker`)}</h1>
7778
<p>{translate('resources.dev-tools.toml-checker.p.part1', `If you run an XRP Ledger validator or use the XRP Ledger for your business,
7879
you can provide information about your usage of the XRP Ledger to the world in a machine-readable `)}
79-
<a href="https://xrpl.org/xrp-ledger-toml.html"><code>{translate(`xrp-ledger.toml`)}</code>{translate('resources.dev-tools.toml-checker.p.part2', ` file`)}</a>{translate('resources.dev-tools.toml-checker.p.part3', `.`)}</p>
80+
<Link to="../../docs/references/xrp-ledger-toml"><code>{translate(`xrp-ledger.toml`)}</code>{translate('resources.dev-tools.toml-checker.p.part2', ` file`)}</Link>{translate('resources.dev-tools.toml-checker.p.part3', `.`)}</p>
8081
</div>
8182

8283
<TextLookupForm {...domainButtonProps} />

static/css/devportal2024-v1.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/_dev-tools.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,7 @@
8282
display: none;
8383
}
8484
}
85+
86+
.form-text a {
87+
text-decoration: underline;
88+
}

0 commit comments

Comments
 (0)