paddings, overflow hidden

This commit is contained in:
DieMyst 2020-12-08 17:29:39 +03:00
parent 3bbd0ba656
commit 118b39fddf
4 changed files with 16 additions and 12 deletions

View File

@ -3,7 +3,7 @@ module BlueprintPage.View exposing (..)
import BlueprintPage.Model exposing (BlueprintViewInfo)
import Blueprints.Model exposing (Blueprint)
import Dict exposing (Dict)
import Html exposing (Html, article, div, h2, span, text)
import Html exposing (Html, article, div, span, text)
import Html.Events exposing (onClick)
import Instances.View
import Interface.View exposing (interfaceView)
@ -27,12 +27,12 @@ view model id =
Instances.View.view model (\service -> service.blueprint_id == id)
in
div [ classes "fl w-100" ]
[ div [ classes "fl w-100 pb3 pt4" ]
[ div [ classes "fl w-100 pb4 pt4" ]
[ div [ redFont, classes "f1 fw4 pt5" ] [ text ("Blueprint: " ++ bi.name) ]
, span [ classes "fl w-100", darkRed ] [ text bi.id ]
]
, div [ classes "fl w-100 bg-white mt2 ph4 pt3 mb5 pb3 br3" ] [ viewInfo bi ]
, h2 [ classes "pt4 fw5 f3 pb3" ] [ text ("Instances (" ++ String.fromInt instanceNum ++ ")") ]
, div [ classes "pt4 fw5 f3 pb4" ] [ text ("Instances (" ++ String.fromInt instanceNum ++ ")") ]
, div [ classes "fl w-100 mt2 mb4 bg-white br3" ]
[ instanceView ]
]

View File

@ -1,7 +1,7 @@
module HubPage.View exposing (..)
import Blueprints.View
import Html exposing (Html, a, div, h2, span, text)
import Html exposing (Html, a, div, span, text)
import Html.Attributes exposing (attribute)
import Instances.View
import Model exposing (Model)
@ -14,11 +14,11 @@ view model =
div [ classes "pt4" ]
[ div [ redFont, classes "f1 fw4 pt5 pb3" ] [ text "Developer Hub" ]
, welcomeText
, h2 [ classes "pt4 f3 fw5 pb3" ] [ text "Featured Blueprints" ]
, div [ classes "pt4 f3 fw5 pb4" ] [ text "Featured Blueprints" ]
, Blueprints.View.view model
, h2 [ classes "pt4 f3 fw5 pb3" ] [ text "Featured Modules" ]
, div [ classes "pt4 f3 fw5 pb4" ] [ text "Featured Modules" ]
, Modules.View.view model
, h2 [ classes "pt4 f3 fw5 pb3" ] [ text "Blueprint Instances" ]
, div [ classes "pt4 f3 fw5 pb4" ] [ text "Blueprint Instances" ]
, Tuple.second (Instances.View.view model (\_ -> True))
]

View File

@ -18,7 +18,11 @@ toInstance peerId identify blueprints service =
blueprints |> Dict.get service.blueprint_id |> Maybe.map .name |> Maybe.withDefault "unknown"
ip =
List.head identify.external_addresses |> Maybe.map (String.split "/") |> Maybe.map (List.drop 2) |> Maybe.andThen List.head |> Maybe.withDefault "unknown"
List.head identify.external_addresses
|> Maybe.map (String.split "/")
|> Maybe.map (List.drop 2)
|> Maybe.andThen List.head
|> Maybe.withDefault "unknown"
in
{ name = name, instance = service.service_id, peerId = peerId, ip = ip }
@ -41,7 +45,7 @@ view model filter =
viewTable : List Instance -> Html msg
viewTable instances =
div [ classes "pa1 mt2 bg-white br3" ]
div [ classes "pa1 mt2 bg-white br3 overflow-auto" ]
[ div [ classes "mw8-ns pa2 " ]
[ table [ classes "f6 w-100 center ws-normal-ns", attribute "cellspacing" "0" ]
[ thead []

View File

@ -1,7 +1,7 @@
module ModulePage.View exposing (..)
import Dict exposing (Dict)
import Html exposing (Html, a, article, div, h2, span, text)
import Html exposing (Html, a, article, div, span, text)
import Html.Attributes exposing (attribute, property)
import Info exposing (getDescription, getSite)
import Instances.View
@ -32,11 +32,11 @@ view model id =
Instances.View.view model filter
in
div [ classes "fl w-100 cf ph2-ns" ]
[ div [ classes "fl w-100 mb2 pt4 pb3" ]
[ div [ classes "fl w-100 mb2 pt4 pb4" ]
[ div [ redFont, classes "f1 fw4 pt5" ] [ text ("Module: " ++ mi.name) ]
]
, div [ classes "fl w-100 bg-white mt2 ph4 pt3 mb4 pb2 br3" ] [ viewInfo mi ]
, h2 [ classes "pt4 fw5 f3 pb3" ] [ text ("Instances (" ++ String.fromInt instanceNum ++ ")") ]
, div [ classes "pt4 fw5 f3 pb4" ] [ text ("Instances (" ++ String.fromInt instanceNum ++ ")") ]
, div [ classes "fl w-100 mt2 mb4 bg-white br3" ] [ instanceView ]
]