Filter blueprints that have less than 4 services (#9)

This commit is contained in:
folex 2021-02-23 19:14:46 +03:00 committed by GitHub
parent a89c9f386d
commit 85957413e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,17 +15,17 @@ view model =
let
allBps =
getBlueprintsToServices model.blueprints model.discoveredPeers
info =
Dict.values allBps
|> List.map
(\( bp, servicesByPeers ) ->
{ name = bp.name
, id = bp.id
, author = "Fluence Labs"
, instanceNumber = List.length (servicesByPeers |> List.map (\( _, s ) -> s) |> List.concat)
}
)
-- TODO HACK: this is a hack to filter bloat blueprints until we have a predefined list of good ones
filteredBps = Dict.values allBps |> List.filter (\(_, services) -> List.length services > 3)
info = List.map
(\( bp, servicesByPeers ) ->
{ name = bp.name
, id = bp.id
, author = "Fluence Labs"
, instanceNumber = List.length (servicesByPeers |> List.map (\( _, s ) -> s) |> List.concat)
}
)
filteredBps
servicesView =
List.map viewService info