mirror of
https://github.com/fluencelabs/dashboard
synced 2025-04-25 15:52:13 +00:00
ip -> multiaddr
This commit is contained in:
parent
d68f36436d
commit
c1e2ed8b2a
@ -25,9 +25,9 @@ toInstance peerId identify blueprints service =
|
|||||||
|
|
||||||
ip =
|
ip =
|
||||||
List.head identify.external_addresses
|
List.head identify.external_addresses
|
||||||
|> Maybe.map (String.split "/")
|
--|> Maybe.map (String.split "/")
|
||||||
|> Maybe.map (List.drop 2)
|
--|> Maybe.map (List.drop 2)
|
||||||
|> Maybe.andThen List.head
|
--|> Maybe.andThen List.head
|
||||||
|> Maybe.withDefault "unknown"
|
|> Maybe.withDefault "unknown"
|
||||||
in
|
in
|
||||||
{ name = name, blueprintId = blueprintId, instance = service.service_id, peerId = peerId, ip = ip }
|
{ 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 "BLUEPRINT" ]
|
||||||
, th [ classes "fw5 tl pa3 gray-font" ] [ text "SERVICE ID" ]
|
, 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 "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)
|
, tbody [ classes "lucida" ] (instances |> List.map viewInstance)
|
||||||
|
@ -47,7 +47,7 @@ nodesView nodes =
|
|||||||
[ thead []
|
[ thead []
|
||||||
[ tr [ classes "" ]
|
[ tr [ classes "" ]
|
||||||
[ th [ classes "fw5 tl pa3 gray-font" ] [ text "NODE ID" ]
|
[ 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" ]
|
, 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 */
|
/* eslint-enable */
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
// Fluence.setLogLevel('silent')
|
||||||
const pid = await Fluence.generatePeerId();
|
const pid = await Fluence.generatePeerId();
|
||||||
const flags = genFlags(pid.toB58String());
|
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);
|
await client.sendParticle(particle);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user