git-annex/templates/dashboard/transfers.hamlet
Joey Hess 958312885f webapp: Improve UI around remote that have no annex.uuid set, either because setup of them is incomplete, or because the remote git repository is not a git-annex repository.
Complicated by such repositories potentially being repos that should have
an annex.uuid, but it failed to be gotten, perhaps due to the past ssh repo
setup bugs. This is handled now by an Upgrade Repository button.
2013-11-07 18:02:00 -04:00

45 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-fluid>
<div .span10>
<div .row-fluid>
<h3 .forcewrap>
$maybe file <- associatedFile info
#{file}
$nothing
#{key2file $ transferKey transfer}
$case transferDirection transfer
$of Upload
&rarr;
$of Download
&larr;
<small>
<a href="@{EditRepositoryR $ RepoUUID $ transferUUID transfer}">
#{maybe "unknown" Remote.name $ transferRemote info}
$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>
$if isrunning info
^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn" "icon-pause"}
$else
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
$if scanrunning
<img src="@{StaticR activityicon_gif}" alt=""> #
Scanning for files to transfer
$else
$if (not transfersrunning)
<i>
(No file transfers running)