Fix services filtering (#11)

This commit is contained in:
folex 2021-03-05 00:08:52 +03:00 committed by GitHub
parent 450b6a3b75
commit 2c4186946e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,6 @@ view model =
allBps =
getBlueprintsToServices model.blueprints model.discoveredPeers
-- 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 ) ->
@ -30,10 +26,13 @@ view model =
, instanceNumber = List.length (servicesByPeers |> List.map (\( _, s ) -> s) |> List.concat)
}
)
filteredBps
(Dict.values allBps)
-- TODO HACK: this is a hack to filter bloat blueprints until we have a predefined list of good ones
filtered = List.filter (\service -> service.instanceNumber > 3) info
servicesView =
List.map viewService info
List.map viewService filtered
finalView =
if List.length servicesView == 0 then