Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | GHC2021 |
Synopsis
- type Success = Bool
- data UIName
- data PreviousStates = PreviousStates {}
- prevStatesFinishedTime :: PreviousStates -> Maybe ElapsedSeconds
- type ElapsedSeconds = Integer
- data StateInfo (bk :: k) = StateInfo {
- state :: TaskState bk
- specName :: Text
- dbName :: Text
- taskType :: TaskType
- previousStates :: PreviousStates
- type States (bk :: k) = Map TaskId (StateInfo bk)
- data DrawState (bk :: k) = DrawState {
- startTime :: UTCTime
- showPostProcessedTableRef :: Bool
- taskStates :: States bk
- elapsedTime :: ElapsedSeconds
- processingTime :: ElapsedSeconds
- runDone :: Bool
- wantsToQuit :: Bool
- eta :: EtaType
- totalStats :: QueryStats bk
- showError :: Bool
- specListView :: SpecListView bk
- type SpecListView (bk :: k) = List UIName (StateLine bk)
- data UpdateEvent (b :: k)
- eventHandler :: forall {k} (b :: k). HasBackendQueryStats b => BrickEvent UIName (UpdateEvent b) -> EventM UIName (DrawState b) ()
- cliReporter :: forall {k} (b :: k) bk. HasBackendQueryStats b => RuntimeEventQueueDAG b -> (SpecTableName -> Ref Table) -> TasksDAG Full bk -> EtaType -> IO Success
- success :: forall {k} (b :: k). DrawState b -> Success
- prettyElapsedTime :: Integer -> Text
- 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]
- prettyUTCTime :: UTCTime -> Text
- data StateLine (bk :: k) = StateLine {
- specName :: Text
- dbName :: Text
- _type :: Text
- state :: TaskState bk
- previousStates :: 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
- cliAttrMap :: AttrMap
- tableRowSelected :: AttrName
- successStateLine :: AttrName
- skippedStateLine :: AttrName
- failureStateLine :: AttrName
- processingStateLine :: AttrName
- pendingStateLine :: AttrName
- dependencyFailedLine :: AttrName
- blockedStateLine :: AttrName
- introBox :: AttrName
- errorBox :: AttrName
- tableStatus :: AttrName
- tableStatusError :: AttrName
- napkinText :: [Text]
Documentation
Unique names for user interface elements necessary for brick.
data PreviousStates #
Instances
type ElapsedSeconds = Integer #
StateInfo | |
|
Instances
Generic (StateInfo bk) # | |||||
Defined in Napkin.Spec.CliReporterDAG
| |||||
type Rep (StateInfo bk) # | |||||
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))))) |
DrawState | |
|
Instances
Generic (DrawState bk) # | |||||
Defined in Napkin.Spec.CliReporterDAG
| |||||
type Rep (DrawState bk) # | |||||
Defined in Napkin.Spec.CliReporterDAG type Rep (DrawState bk) = D1 ('MetaData "DrawState" "Napkin.Spec.CliReporterDAG" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "DrawState" 'PrefixI 'True) (((S1 ('MetaSel ('Just "startTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "showPostProcessedTableRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "taskStates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (States bk)) :*: (S1 ('MetaSel ('Just "elapsedTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ElapsedSeconds) :*: S1 ('MetaSel ('Just "processingTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ElapsedSeconds)))) :*: ((S1 ('MetaSel ('Just "runDone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "wantsToQuit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "eta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EtaType))) :*: (S1 ('MetaSel ('Just "totalStats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (QueryStats bk)) :*: (S1 ('MetaSel ('Just "showError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "specListView") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SpecListView bk))))))) |
type SpecListView (bk :: k) = List UIName (StateLine bk) #
eventHandler :: forall {k} (b :: k). HasBackendQueryStats b => BrickEvent UIName (UpdateEvent b) -> EventM UIName (DrawState b) () #
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.
prettyElapsedTime :: Integer -> Text #
printFinalReport :: forall {k} (b :: k). HasBackendQueryStats b => DrawState b -> IO () #
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] #
prettyUTCTime :: UTCTime -> Text #
StateLine | |
|
Instances
Generic (StateLine bk) # | |||||
Defined in Napkin.Spec.CliReporterDAG
| |||||
type Rep (StateLine bk) # | |||||
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 #
cliAttrMap :: AttrMap #
tableStatus :: AttrName #
napkinText :: [Text] #