diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-27 11:47:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-27 11:47:34 -0400 |
commit | 0f6292920ac360f78c3c4a3b9d883b758900c063 (patch) | |
tree | 987d0f0b7620e0b130568de396ba718641e6a92e /templates | |
parent | 4b8feea853e17f73d05f34b1139477fee3016124 (diff) |
webapp now displays the real running and queued transfers
yowza!!!
Diffstat (limited to 'templates')
-rw-r--r-- | templates/status.hamlet | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/templates/status.hamlet b/templates/status.hamlet index 1da189d1f..9b9b0f7d1 100644 --- a/templates/status.hamlet +++ b/templates/status.hamlet @@ -1,26 +1,30 @@ <span id="#{updating}"> - <div class="hero-unit"> - <div class="row-fluid"> - <h3> - foo ← - <small>usb drive</small> - <small class="pull-right">40% of 10 mb</small> - <div class="progress progress-striped"> - <div class="bar" style="width: 40%;"> - <div class="row-fluid"> - <h3> - some_filenames_are_long_and_ugly_like_this_one.mp3 → - <small>Amazon S3</small> - <small class="pull-right">10% of 50 mb</small> - <div class="progress progress-striped"> - <div class="bar" style="width: 10%;"> - <div class="row-fluid"> - <h3> - bigfile ← - <small>usb drive</small> - <small class="pull-right">0% of 512 mb</small> - <div class="progress progress-striped"> - <div class="bar" style="width: 0%;"> + <div class="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 class="row-fluid"> + <h3> + $maybe file <- associatedFile info + #{file} + $nothing + #{show $ transferKey transfer} + $case transferDirection transfer + $of Upload + → + $of Download + ← + <small>#{maybe "unknown" Remote.name $ transferRemote info}</small> + $with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer + $if isJust $ startedTime info + <small class="pull-right"><b>#{percent} of #{size}</b></small> + $else + <small class="pull-right">queued (#{size})</small> + <div class="progress progress-striped"> + <div class="bar" style="width: #{percent};"> <footer> <span> polled at #{time} |