mirror of
https://github.com/fluencelabs/dashboard
synced 2025-03-16 13:30:48 +00:00
ip -> multiaddr
This commit is contained in:
parent
d68f36436d
commit
c1e2ed8b2a
@ -25,9 +25,9 @@ toInstance peerId identify blueprints service =
|
||||
|
||||
ip =
|
||||
List.head identify.external_addresses
|
||||
|> Maybe.map (String.split "/")
|
||||
|> Maybe.map (List.drop 2)
|
||||
|> Maybe.andThen List.head
|
||||
--|> Maybe.map (String.split "/")
|
||||
--|> Maybe.map (List.drop 2)
|
||||
--|> Maybe.andThen List.head
|
||||
|> Maybe.withDefault "unknown"
|
||||
in
|
||||
{ name = name, blueprintId = blueprintId, instance = service.service_id, peerId = peerId, ip = ip }
|
||||
@ -59,7 +59,7 @@ viewTable instances =
|
||||
[ th [ classes "fw5 tl pa3 gray-font" ] [ text "BLUEPRINT" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font" ] [ text "SERVICE ID" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font dn dtc-ns" ] [ text "NODE" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font dn dtc-ns" ] [ text "IP" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font dn dtc-ns" ] [ text "MULTIADDR" ]
|
||||
]
|
||||
]
|
||||
, tbody [ classes "lucida" ] (instances |> List.map viewInstance)
|
||||
|
@ -47,7 +47,7 @@ nodesView nodes =
|
||||
[ thead []
|
||||
[ tr [ classes "" ]
|
||||
[ th [ classes "fw5 tl pa3 gray-font" ] [ text "NODE ID" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font" ] [ text "IP" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font" ] [ text "MULTIADDR" ]
|
||||
, th [ classes "fw5 tl pa3 gray-font dn dtc-ns" ] [ text "SERVICES" ]
|
||||
]
|
||||
]
|
||||
|
@ -50,6 +50,7 @@ function event(name: string,peer: string,peers?: string[],identify?: string[],se
|
||||
/* eslint-enable */
|
||||
|
||||
(async () => {
|
||||
// Fluence.setLogLevel('silent')
|
||||
const pid = await Fluence.generatePeerId();
|
||||
const flags = genFlags(pid.toB58String());
|
||||
|
||||
@ -93,7 +94,7 @@ function event(name: string,peer: string,peers?: string[],identify?: string[],se
|
||||
}
|
||||
}
|
||||
|
||||
const particle = await build(client.selfPeerId, part.script, map, 25000);
|
||||
const particle = await build(client.selfPeerId, part.script, map, 45000);
|
||||
await client.sendParticle(particle);
|
||||
});
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user