mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-02 13:33:06 +00:00
Update port message
This commit is contained in:
parent
d5549b5311
commit
5004e7512b
@ -83,6 +83,8 @@ export function HealthChecks({ online, onStepValid }: Props) {
|
||||
.then(() => codex.refetch());
|
||||
};
|
||||
|
||||
const hasPort = HealthCheckUtils.hasPort(address);
|
||||
|
||||
return (
|
||||
<div className="health-checks">
|
||||
<div
|
||||
@ -116,13 +118,21 @@ export function HealthChecks({ online, onStepValid }: Props) {
|
||||
|
||||
<p>
|
||||
<li>
|
||||
Ensure that your Codex node is running on{" "}
|
||||
<span className="address-hint">
|
||||
{HealthCheckUtils.removePort(address)}
|
||||
</span>{" "}
|
||||
on port{" "}
|
||||
<span className="port-hint">{HealthCheckUtils.getPort(address)}</span>
|
||||
{}
|
||||
{hasPort ? (
|
||||
<>
|
||||
<span>Port detected is </span>
|
||||
<span className="port-hint">
|
||||
{HealthCheckUtils.getPort(address)}
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span>Port is not specified, default is </span>
|
||||
<span className="port-hint">
|
||||
{HealthCheckUtils.getPort(address)}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</li>
|
||||
<li>Ensure that port forwarding is enabled for your settings.</li>
|
||||
</p>
|
||||
|
||||
@ -14,6 +14,10 @@ export const HealthCheckUtils = {
|
||||
return parseInt(url.split(":")[2] || defaultPort, 10);
|
||||
},
|
||||
|
||||
hasPort(url: string) {
|
||||
return !!url.split(":")[2];
|
||||
},
|
||||
|
||||
containsPort(url: string) {
|
||||
return url.split(":").length > 2;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user