git-annex/templates/dashboard/transfers.hamlet

44 lines
1.9 KiB
Text
Raw Normal View History

<div .span9 ##{ident}>
$maybe reldir <- relDir webapp
<div .alert .alert-info>
<p>
git-annex is watching over your files in #
<small><tt>#{reldir}</tt></small>, #
and keeping them in sync with other repositories.
$if null transfers
$else
<h2>Transfers
$forall (transfer, info) <- transfers
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
<div .row-fluid>
<div .span10>
<div .row-fluid>
<h3>
$maybe file <- associatedFile info
#{file}
$nothing
#{key2file $ 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
$if isrunning info
<small .pull-right><b>#{percent} of #{size}</b></small>
$else
<small .pull-right>paused at #{percent} of #{size}</small>
$else
<small .pull-right>queued (#{size})</small>
<div .row-fluid>
<div .progress .progress-striped>
<div .bar style="width: #{percent};">
<div .btn-group .span2>
2012-08-10 22:50:21 +00:00
$if isrunning info
2012-09-27 16:55:00 +00:00
^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn" "icon-pause"}
2012-08-10 22:50:21 +00:00
$else
2012-09-27 16:55:00 +00:00
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}