summaryrefslogtreecommitdiff
path: root/templates/status.hamlet
blob: 9b9b0f7d18b19e751ad31464fd280b8a104b18d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<span id="#{updating}">
  <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
                  &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 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}