81d402216d
This will speed up the common case where a Key is deserialized from disk, but is then serialized to build eg, the path to the annex object. Previously attempted in4536c93bb2
and reverted in96aba8eff7
. The problems mentioned in the latter commit are addressed now: Read/Show of KeyData is backwards-compatible with Read/Show of Key from before this change, so Types.Distribution will keep working. The Eq instance is fixed. Also, Key has smart constructors, avoiding needing to remember to update the cached serialization. Used git-annex benchmark: find is 7% faster whereis is 3% faster get when all files are already present is 5% faster Generally, the benchmarks are running 0.1 seconds faster per 2000 files, on a ram disk in my laptop.
40 lines
1.9 KiB
Text
40 lines
1.9 KiB
Text
<div ##{ident}>
|
|
<h2>Transfers
|
|
$if transfersrunning
|
|
$forall (transfer, info) <- transfers
|
|
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
|
|
<div .row>
|
|
<div .col-sm-10>
|
|
<h3 .forcewrap .small-margin-top .tiny-margin-bottom>
|
|
#{desc transfer info}
|
|
$case transferDirection transfer
|
|
$of Upload
|
|
→
|
|
$of Download
|
|
←
|
|
<small>
|
|
<a href="@{EditRepositoryR $ RepoUUID $ transferUUID transfer}">
|
|
#{maybe "unknown" Remote.name $ transferRemote info}
|
|
$with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKeyData transfer
|
|
$if isJust $ startedTime info
|
|
$if isrunning info
|
|
<span .pull-right><b>#{percent} of #{size}</b>
|
|
$else
|
|
<span .pull-right>paused at #{percent} of #{size}
|
|
$else
|
|
<span .pull-right>queued (#{size})
|
|
<div .progress .progress-striped .small-margin-bottom>
|
|
<div .progress-bar style="width: #{percent};">
|
|
<div .btn-group .col-sm-2 .small-margin-top>
|
|
$if isrunning info
|
|
^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn btn-default btn-sm" "glyphicon-pause"}
|
|
$else
|
|
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn btn-default btn-sm" "glyphicon-play"}
|
|
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn btn-default btn-sm" "glyphicon-remove"}
|
|
$if scanrunning
|
|
<img src="@{StaticR activityicon_gif}" alt=""> #
|
|
Scanning for files to transfer
|
|
$else
|
|
$if (not transfersrunning)
|
|
<i>
|
|
(No file transfers running)
|