1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

ui: Reformat with new elm-format

This commit is contained in:
James Hillyerd
2018-11-12 19:59:15 -08:00
parent c92cd309bc
commit d1954cdd6f
10 changed files with 258 additions and 258 deletions

View File

@@ -1,10 +1,10 @@
module Data.Session
exposing
( Session
( Msg(..)
, Persistent
, Msg(..)
, decoder
, Session
, decodeValueWithDefault
, decoder
, init
, none
, update

View File

@@ -1,8 +1,8 @@
module Main exposing (..)
import Data.Session as Session exposing (Session, decoder)
import Json.Decode as Decode exposing (Value)
import Html exposing (..)
import Json.Decode as Decode exposing (Value)
import Navigation exposing (Location)
import Page.Home as Home
import Page.Mailbox as Mailbox
@@ -217,7 +217,7 @@ setRoute route model =
( { model | page = Status Status.init }
, Cmd.batch
[ Ports.windowTitle "Inbucket Status"
, Cmd.map StatusMsg (Status.load)
, Cmd.map StatusMsg Status.load
]
, Session.none
)

View File

@@ -1,8 +1,8 @@
module Page.Home exposing (Model, Msg, init, update, view)
import Data.Session as Session exposing (Session)
import Html exposing (..)
import Html.Attributes exposing (..)
import Data.Session as Session exposing (Session)
-- MODEL --

View File

@@ -4,9 +4,8 @@ import Data.Message as Message exposing (Message)
import Data.MessageHeader as MessageHeader exposing (MessageHeader)
import Data.Session as Session exposing (Session)
import Date exposing (Date)
import DateFormat.Relative as Relative
import DateFormat
import Json.Decode as Decode exposing (Decoder)
import DateFormat.Relative as Relative
import Html exposing (..)
import Html.Attributes
exposing
@@ -24,6 +23,7 @@ import Html.Attributes
import Html.Events exposing (..)
import Http exposing (Error)
import HttpUtil
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode
import Ports
import Route

View File

@@ -5,17 +5,17 @@ import Data.Session as Session exposing (Session)
import Date exposing (Date)
import DateFormat
exposing
( format
, monthNameFirstThree
( amPmUppercase
, dayOfMonthFixed
, format
, hourNumber
, minuteFixed
, amPmUppercase
, monthNameFirstThree
)
import Json.Decode exposing (decodeString)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events as Events
import Json.Decode exposing (decodeString)
import Route
import WebSocket

View File

@@ -7,7 +7,7 @@ import Html exposing (..)
import Html.Attributes exposing (..)
import Http exposing (Error)
import HttpUtil
import Sparkline exposing (sparkline, Point, DataSet, Size)
import Sparkline exposing (DataSet, Point, Size, sparkline)
import Svg.Attributes as SvgAttrib
import Time exposing (Time)
@@ -69,7 +69,7 @@ init =
initDataSet : DataSet
initDataSet =
List.range 0 59
|> List.map (\x -> ( toFloat (x), 0 ))
|> List.map (\x -> ( toFloat x, 0 ))
load : Cmd Msg
@@ -171,8 +171,8 @@ updateLocalMetric metric x value =
{ metric
| value = value
, history =
(Maybe.withDefault [] (List.tail metric.history))
++ [ ( x, (toFloat value) ) ]
Maybe.withDefault [] (List.tail metric.history)
++ [ ( x, toFloat value ) ]
}
@@ -380,7 +380,7 @@ zeroPadList numbers =
60 - List.length numbers
in
if needed > 0 then
(List.repeat needed 0) ++ numbers
List.repeat needed 0 ++ numbers
else
numbers
@@ -395,6 +395,6 @@ fmtInt n =
if String.length str <= 3 then
str
else
(thousands (String.slice 0 -3 str)) ++ "," ++ (String.right 3 str)
thousands (String.slice 0 -3 str) ++ "," ++ String.right 3 str
in
thousands (toString n)

View File

@@ -10,8 +10,8 @@ import Html.Attributes
, href
, id
, placeholder
, type_
, selected
, type_
, value
)
import Html.Events as Events

View File

@@ -1,7 +1,7 @@
module Tests exposing (..)
import Test exposing (..)
import Expect
import Test exposing (..)
-- Check out http://package.elm-lang.org/packages/elm-community/elm-test/latest to learn more about testing in Elm!