github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/src/Dashboard/Models.elm (about) 1 module Dashboard.Models exposing 2 ( DragState(..) 3 , DropState(..) 4 , Dropdown(..) 5 , FetchError(..) 6 , FooterModel 7 , Model 8 ) 9 10 import Concourse 11 import Dashboard.Group.Models 12 import Dict exposing (Dict) 13 import FetchResult exposing (FetchResult) 14 import Login.Login as Login 15 import Message.Effects exposing (Effect(..)) 16 import Message.Message exposing (DropTarget) 17 import Routes 18 import Set exposing (Set) 19 import Time 20 21 22 type alias Model = 23 FooterModel 24 (Login.Model 25 { now : Maybe Time.Posix 26 , highDensity : Bool 27 , query : String 28 , pipelinesWithResourceErrors : Set ( String, String ) 29 , jobs : FetchResult (Dict ( String, String, String ) Concourse.Job) 30 , pipelineLayers : Dict ( String, String ) (List (List Concourse.JobIdentifier)) 31 , teams : FetchResult (List Concourse.Team) 32 , dragState : DragState 33 , dropState : DropState 34 , isJobsRequestFinished : Bool 35 , isTeamsRequestFinished : Bool 36 , isPipelinesRequestFinished : Bool 37 , isResourcesRequestFinished : Bool 38 , jobsError : Maybe FetchError 39 , teamsError : Maybe FetchError 40 , resourcesError : Maybe FetchError 41 , pipelinesError : Maybe FetchError 42 , viewportWidth : Float 43 , viewportHeight : Float 44 , scrollTop : Float 45 , pipelineJobs : Dict ( String, String ) (List Concourse.JobIdentifier) 46 , effectsToRetry : List Effect 47 } 48 ) 49 50 51 type FetchError 52 = Failed 53 | Disabled 54 55 56 type DragState 57 = NotDragging 58 | Dragging Concourse.TeamName Concourse.PipelineName 59 60 61 type DropState 62 = NotDropping 63 | Dropping DropTarget 64 | DroppingWhileApiRequestInFlight Concourse.TeamName 65 66 67 type alias FooterModel r = 68 { r 69 | hideFooter : Bool 70 , hideFooterCounter : Int 71 , showHelp : Bool 72 , pipelines : Maybe (Dict String (List Dashboard.Group.Models.Pipeline)) 73 , dropdown : Dropdown 74 , highDensity : Bool 75 , dashboardView : Routes.DashboardView 76 } 77 78 79 type Dropdown 80 = Hidden 81 | Shown (Maybe Int)