napkin-1.0.0
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageGHC2021

Napkin.Spec.CliReporterDAG

Description

 
Synopsis

Documentation

type Success = Bool #

data UIName #

Unique names for user interface elements necessary for brick.

Instances

Instances details
Show UIName # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Eq UIName # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Methods

(==) :: UIName -> UIName -> Bool #

(/=) :: UIName -> UIName -> Bool #

Ord UIName # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

data PreviousStates #

Instances

Instances details
Generic PreviousStates # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Associated Types

type Rep PreviousStates 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep PreviousStates = D1 ('MetaData "PreviousStates" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "PreviousStates" 'PrefixI 'True) (S1 ('MetaSel ('Just "procTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)) :*: (S1 ('MetaSel ('Just "finishedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)) :*: S1 ('MetaSel ('Just "blockedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)))))
Default PreviousStates # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Methods

def :: PreviousStates #

type Rep PreviousStates # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep PreviousStates = D1 ('MetaData "PreviousStates" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "PreviousStates" 'PrefixI 'True) (S1 ('MetaSel ('Just "procTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)) :*: (S1 ('MetaSel ('Just "finishedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)) :*: S1 ('MetaSel ('Just "blockedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ElapsedSeconds)))))

data StateInfo (bk :: k) #

Instances

Instances details
Generic (StateInfo bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Associated Types

type Rep (StateInfo bk) 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep (StateInfo bk) = D1 ('MetaData "StateInfo" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "StateInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TaskState bk)) :*: S1 ('MetaSel ('Just "specName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "dbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "taskType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TaskType) :*: S1 ('MetaSel ('Just "previousStates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreviousStates)))))

Methods

from :: StateInfo bk -> Rep (StateInfo bk) x #

to :: Rep (StateInfo bk) x -> StateInfo bk #

type Rep (StateInfo bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep (StateInfo bk) = D1 ('MetaData "StateInfo" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "StateInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TaskState bk)) :*: S1 ('MetaSel ('Just "specName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "dbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "taskType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TaskType) :*: S1 ('MetaSel ('Just "previousStates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreviousStates)))))

type States (bk :: k) = Map TaskId (StateInfo bk) #

data DrawState (bk :: k) #

Instances

Instances details
Generic (DrawState bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Associated Types

type Rep (DrawState bk) 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Methods

from :: DrawState bk -> Rep (DrawState bk) x #

to :: Rep (DrawState bk) x -> DrawState bk #

type Rep (DrawState bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type SpecListView (bk :: k) = List UIName (StateLine bk) #

data UpdateEvent (b :: k) #

Constructors

Event TaskId (TaskState b) 
RunDone 
Tick 

cliReporter :: forall {k} (b :: k) bk. HasBackendQueryStats b => RuntimeEventQueueDAG b -> (SpecTableName -> Ref Table) -> TasksDAG Full bk -> EtaType -> IO Success #

Pump the runtime event queue to display Spec execution progress in the terminal. Returns after all Specs are completed.

success :: forall {k} (b :: k). DrawState b -> Success #

printFinalReport :: forall {k} (b :: k). HasBackendQueryStats b => DrawState b -> IO () #

filterByState :: forall {k} (bk :: k). (TaskState bk -> Bool) -> States bk -> States bk #

infoState :: forall {k} (bk :: k). HasBackendQueryStats bk => States bk -> Bool -> TaskState bk -> Maybe Text #

drawScreen :: forall {k} (bk :: k). HasBackendQueryStats bk => DrawState bk -> [Widget UIName] #

data StateLine (bk :: k) #

Instances

Instances details
Generic (StateLine bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

Associated Types

type Rep (StateLine bk) 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep (StateLine bk) = D1 ('MetaData "StateLine" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "StateLine" 'PrefixI 'True) ((S1 ('MetaSel ('Just "specName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "dbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TaskState bk)) :*: S1 ('MetaSel ('Just "previousStates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreviousStates)))))

Methods

from :: StateLine bk -> Rep (StateLine bk) x #

to :: Rep (StateLine bk) x -> StateLine bk #

type Rep (StateLine bk) # 
Instance details

Defined in Napkin.Spec.CliReporterDAG

type Rep (StateLine bk) = D1 ('MetaData "StateLine" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "StateLine" 'PrefixI 'True) ((S1 ('MetaSel ('Just "specName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "dbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TaskState bk)) :*: S1 ('MetaSel ('Just "previousStates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreviousStates)))))

sortedStatesList :: forall {k} (bk :: k). States bk -> [StateLine bk] #

renderOneState :: forall {k} (bk :: k). HasBackendQueryStats bk => ElapsedSeconds -> Bool -> States bk -> Bool -> StateLine bk -> Widget UIName #