chore(lpr): improve lpr log display
This commit is contained in:
parent
53c68638da
commit
d19266e918
@ -519,23 +519,25 @@ getPrintLogR = do
|
||||
|
||||
dbtIdent = "lpr-log" :: Text
|
||||
dbtSQLQuery l = do
|
||||
E.where_ $ E.val "LPR" E.==. l E.^. TransactionLogInfo E.->>. "interface-name"
|
||||
-- E.&&. E.val "interface" E.==. l E.^. TransactionLogInfo E.->>. "transaction" -- not necessary
|
||||
E.where_ $ (l E.^. TransactionLogInfo E.->>. "interface-name") `E.in_` E.valList ["LPR", "LETTER","APC", "Printer"]
|
||||
-- E.&&. E.val "interface" E.==. l E.^. TransactionLogInfo E.->>. "transaction" -- not necessary
|
||||
return l
|
||||
dbtRowKey = (E.^. TransactionLogId)
|
||||
dbtProj = dbtProjSimple $ \(Entity _ l) -> do
|
||||
return (l, Aeson.fromJSON $ transactionLogInfo l)
|
||||
dbtColonnade = dbColonnade $ mconcat
|
||||
[ sortable (Just "time") (i18nCell MsgSystemMessageTimestamp) $ \(view $ resultLog . to transactionLogTime -> t) -> dateTimeCell t
|
||||
, sortable (Just "status") (textCell "Status") $ tCell (cellMaybe iconBoolCell . transactionInterfaceSuccess)
|
||||
, sortable (Just "subtype") (i18nCell MsgInterfaceSubtype) $ tCell ( textCell . transactionInterfaceSubtype)
|
||||
, sortable (Just "info") (i18nCell MsgSystemMessageContent) $ tCellErr ( textCell . transactionInterfaceInfo)
|
||||
[ sortable (Just "time") (i18nCell MsgSystemMessageTimestamp) $ \(view $ resultLog . to transactionLogTime -> t) -> dateTimeCell t
|
||||
, sortable (Just "status") (textCell "Status" ) $ tCell (cellMaybe iconBoolCell . transactionInterfaceSuccess)
|
||||
, sortable (Just "interface") (i18nCell MsgInterfaceName ) $ tCell ( tellCell . transactionInterfaceName)
|
||||
, sortable (Just "subtype") (i18nCell MsgInterfaceSubtype ) $ tCell ( textCell . transactionInterfaceSubtype)
|
||||
, sortable (Just "info") (i18nCell MsgSystemMessageContent ) $ tCellErr ( textCell . transactionInterfaceInfo)
|
||||
]
|
||||
dbtSorting = mconcat
|
||||
[ singletonMap "time" $ SortColumn (E.^. TransactionLogTime)
|
||||
, singletonMap "status" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-success")
|
||||
, singletonMap "subtype" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-subtype")
|
||||
, singletonMap "info" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-info" )
|
||||
[ singletonMap "time" $ SortColumn (E.^. TransactionLogTime)
|
||||
, singletonMap "status" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-success")
|
||||
, singletonMap "interface" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-name" )
|
||||
, singletonMap "subtype" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-subtype")
|
||||
, singletonMap "info" $ SortColumn (\r -> r E.^. TransactionLogTime E.->>. "interface-info" )
|
||||
]
|
||||
dbtFilter = mempty
|
||||
dbtFilterUI = mempty
|
||||
|
||||
Loading…
Reference in New Issue
Block a user