Remove dropdowns on diff page

This commit is contained in:
Michael Snoyman 2020-08-20 05:58:50 +03:00
parent c308e89a16
commit 6eb463f20c
No known key found for this signature in database
GPG Key ID: 907EAE2F42B52046
2 changed files with 3 additions and 32 deletions

View File

@ -12,7 +12,6 @@ module Handler.StackageHome
, getSnapshotPackagesR
) where
import Data.Ord
import Data.These
import RIO.Time (FormatTime)
import Import
@ -55,9 +54,6 @@ getStackageDiffR name1 name2 = track "Handler.StackageHome.getStackageDiffR" $ d
cacheSeconds $ 60 * 60 * 48
Entity sid1 _ <- lookupSnapshot name1 >>= maybe notFound return
Entity sid2 _ <- lookupSnapshot name2 >>= maybe notFound return
let fixit = sortOn Down . map (snapshotName . entityVal)
ltsSnaps <- fixit <$> getSnapshots (Just LtsBranch) 20 0
nightlySnaps <- fixit <$> getSnapshots (Just NightlyBranch) 20 0
snapDiff <- getSnapshotDiff sid1 sid2
selectRep $ do
provideRep $ defaultLayout $ do

View File

@ -4,34 +4,9 @@
<div .packages>
<table .table>
<thead>
<th>
<select .form-control onchange="document.location = this.value">
<optgroup label="LTS">
$forall name1' <- ltsSnaps
$if name1' == name1
<option selected value=@{StackageDiffR name1' name2}>#{toPathPiece name1'}
$else
<option value=@{StackageDiffR name1' name2}>#{toPathPiece name1'}
<optgroup label="Nightly">
$forall name1' <- nightlySnaps
$if name1' == name1
<option selected value=@{StackageDiffR name1' name2}>#{toPathPiece name1'}
$else
<option value=@{StackageDiffR name1' name2}>#{toPathPiece name1'}
<th>
<select .form-control onchange="document.location = this.value">
<optgroup label="LTS">
$forall name2' <- ltsSnaps
$if name2' == name2
<option selected value=@{StackageDiffR name1 name2'}>#{toPathPiece name2'}
$else
<option value=@{StackageDiffR name1 name2'}>#{toPathPiece name2'}
<optgroup label="Nightly">
$forall name2' <- nightlySnaps
$if name2' == name2
<option selected value=@{StackageDiffR name1 name2'}>#{toPathPiece name2'}
$else
<option value=@{StackageDiffR name1 name2'}>#{toPathPiece name2'}
<tr>
<th>#{name1}
<th>#{name2}
<tbody>
$forall (pkgname, VersionChange verChange, versionDiff) <- toVersionedDiffList snapDiff
<tr>