File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module Handler.StackageHome
12
12
, getSnapshotPackagesR
13
13
) where
14
14
15
+ import Data.Maybe (fromJust )
15
16
import Data.These
16
17
import RIO (textDisplay )
17
18
import RIO.Time (FormatTime )
@@ -53,7 +54,8 @@ instance ToJSON SnapshotInfo where
53
54
getStackageDiffR :: SnapName -> SnapName -> Handler TypedContent
54
55
getStackageDiffR name1 name2 = track " Handler.StackageHome.getStackageDiffR" $ do
55
56
cacheSeconds $ 60 * 60 * 48
56
- Entity sid1 _ <- lookupSnapshot name1 >>= maybe notFound return
57
+ Entity sid1 prevSnap <- lookupSnapshot name1 >>= maybe notFound return
58
+ mprevprevSnapName <- map snd <$> snapshotBefore (snapshotName prevSnap)
57
59
Entity sid2 _ <- lookupSnapshot name2 >>= maybe notFound return
58
60
snapDiff <- getSnapshotDiff sid1 sid2
59
61
selectRep $ do
Original file line number Diff line number Diff line change 1
1
<h1>Compare Stackage snapshots
2
2
3
+ $if isJust mprevprevSnapName
4
+ <div .snapshot-nav>
5
+ <a href=@{StackageDiffR (fromJust mprevprevSnapName) name1}>
6
+ \< previous diff
7
+
3
8
<div .container .content>
4
9
<div .packages>
5
10
<table .table>
You can’t perform that action at this time.
0 commit comments