git-annex/templates/transfers.hamlet

41 lines
1.5 KiB
Text
Raw Normal View History

<span ##{ident}>
2012-07-29 00:55:22 -04:00
$if warnNoScript
<noscript>
<div .alert .alert-block>
<h4 .alert-heading>Javascript is disabled
<p>
This display cannot update in real-time without Javascript. #
Can you turn it on?
<p>
Otherwise, there are two options:
<p>
<div .btn-group>
<a .btn href="@{NoScriptAutoR}">Auto-refresh every 3 seconds #
<a .btn href="@{NoScriptR}">Manually refresh
<div .span9>
$if null transfers
<h2>No current transfers
$else
<h2>Transfers
$forall (transfer, info) <- transfers
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
<div .row-fluid>
<h3>
$maybe file <- associatedFile info
#{file}
$nothing
#{show $ transferKey transfer}
$case transferDirection transfer
$of Upload
&rarr;
$of Download
&larr;
<small>#{maybe "unknown" Remote.name $ transferRemote info}</small>
$with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer
$if isJust $ startedTime info
<small .pull-right><b>#{percent} of #{size}</b></small>
$else
<small .pull-right>queued (#{size})</small>
<div .progress .progress-striped>
<div .bar style="width: #{percent};">