display of last fsck time
This commit is contained in:
parent
5e891672e5
commit
3989ad91e6
3 changed files with 13 additions and 0 deletions
|
@ -112,6 +112,12 @@ runFsckForm new activity = case activity of
|
||||||
defaultFsck :: ScheduledActivity
|
defaultFsck :: ScheduledActivity
|
||||||
defaultFsck = ScheduledSelfFsck (Schedule Daily AnyTime) (Duration $ 60*60)
|
defaultFsck = ScheduledSelfFsck (Schedule Daily AnyTime) (Duration $ 60*60)
|
||||||
|
|
||||||
|
showFsckStatus :: ScheduledActivity -> Widget
|
||||||
|
showFsckStatus activity = do
|
||||||
|
m <- liftAnnex getLastRunTimes
|
||||||
|
let lastrun = M.lookup activity m
|
||||||
|
$(widgetFile "configurators/fsck/status")
|
||||||
|
|
||||||
getConfigFsckR :: Handler Html
|
getConfigFsckR :: Handler Html
|
||||||
getConfigFsckR = postConfigFsckR
|
getConfigFsckR = postConfigFsckR
|
||||||
postConfigFsckR :: Handler Html
|
postConfigFsckR :: Handler Html
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
Currently scheduled checks:
|
Currently scheduled checks:
|
||||||
$forall check <- checks
|
$forall check <- checks
|
||||||
^{showFsckForm False check}
|
^{showFsckForm False check}
|
||||||
|
<div style="margin-left: 5em">
|
||||||
|
^{showFsckStatus check}
|
||||||
<p>
|
<p>
|
||||||
Add a check:
|
Add a check:
|
||||||
^{showFsckForm True defaultFsck}
|
^{showFsckForm True defaultFsck}
|
||||||
|
|
5
templates/configurators/fsck/status.hamlet
Normal file
5
templates/configurators/fsck/status.hamlet
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<i>
|
||||||
|
$maybe t <- lastrun
|
||||||
|
(last run: #{show t})
|
||||||
|
$nothing
|
||||||
|
(not yet run)
|
Loading…
Add table
Add a link
Reference in a new issue