instance -> service, update descriptions

This commit is contained in:
DieMyst 2020-12-10 15:48:48 +03:00
parent 0f312aaf81
commit d68f36436d
3 changed files with 19 additions and 7 deletions

View File

@ -7,7 +7,7 @@ import Html.Attributes exposing (attribute)
import Model exposing (Model, PeerData) import Model exposing (Model, PeerData)
import Palette exposing (classes) import Palette exposing (classes)
import Service.Model exposing (Service) import Service.Model exposing (Service)
import Utils.Utils exposing (instancesText) import Utils.Utils exposing (servicesText)
view : Model -> Html msg view : Model -> Html msg
@ -42,7 +42,7 @@ viewService blueprint =
] ]
[ div [ classes "w-100 mb3 pt1 b f3 overflow-hidden" ] [ text blueprint.name ] [ div [ classes "w-100 mb3 pt1 b f3 overflow-hidden" ] [ text blueprint.name ]
, div [ classes "w-100 mb4 fw4 gray-font" ] [ text "By ", span [ classes "lucida-in normal" ] [ text blueprint.author ] ] , div [ classes "w-100 mb4 fw4 gray-font" ] [ text "By ", span [ classes "lucida-in normal" ] [ text blueprint.author ] ]
, div [ classes "w-100 mt1 lucida gray-font" ] [ instancesText blueprint.instanceNumber ] , div [ classes "w-100 mt1 lucida gray-font" ] [ servicesText blueprint.instanceNumber ]
] ]
] ]

View File

@ -22,11 +22,11 @@ getDescription name =
modulesDescription : Dict String ModuleDescription modulesDescription : Dict String ModuleDescription
modulesDescription = modulesDescription =
Dict.fromList Dict.fromList
[ ( "sqlite3", { site = "https://github.com/fluencelabs/sqlite", description = "A database that ported on Wasm" } ) [ ( "sqlite3", { site = "https://github.com/fluencelabs/sqlite", description = "Popular embeddable database compiled to WebAssembly" } )
, ( "history", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/history", description = "Middleware that stores history (i.e. chat messages) in sqlite" } ) , ( "Message History", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/history", description = "Stores message log, used in the Chat application" } )
, ( "user-list", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/user-list", description = "Middleware that stores users with their auth (i.e. chat members) in sqlite" } ) , ( "User List", { site = "https://github.com/fluencelabs/aqua-demo/tree/master/services/user-list", description = "Basically an address book. Used in the Chat application to store chat users" } )
, ( "redis", { site = "https://github.com/fluencelabs/redis", description = "A database that ported on Wasm" } ) , ( "redis", { site = "https://github.com/fluencelabs/redis", description = "Popular embeddable database compiled to WebAssembly" } )
, ( "curl", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/curl", description = "Module that call 'curl' command" } ) , ( "curl", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/curl", description = "Module that call 'curl' command" } )
, ( "facade", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/facade", description = "An API facade for Url-Downloader app" } )
, ( "local_storage", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/local_storage", description = "Could be used to store data" } ) , ( "local_storage", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/local_storage", description = "Could be used to store data" } )
, ( "Url Downloader", { site = "https://github.com/fluencelabs/fce/tree/master/examples/url-downloader/facade", description = "cURL adapter, allows to download anything by URL" } )
] ]

View File

@ -14,3 +14,15 @@ instancesText num =
else else
Html.text (strNum ++ " instances") Html.text (strNum ++ " instances")
servicesText : Int -> Html msg
servicesText num =
let
strNum =
String.fromInt num
in
if num == 1 then
Html.text (strNum ++ " service")
else
Html.text (strNum ++ " services")