summaryrefslogtreecommitdiff
path: root/templates/dashboard/transfers.hamlet
blob: 20d1b5e8a98b89622dae560da8bc8b405e75d704 (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
31
32
33
34
35
36
37
<div .span9 ##{ident}>
  $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
                  #{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 .row-fluid>
              <div .progress .progress-striped>
                <div .bar style="width: #{percent};">
          <div .btn-group .span2>
            $if isNothing (startedTime info)
              <button .btn>
                <i .icon-play title="start"></i>
            $else
              <button .btn>
                <i .icon-pause title="pause"></i>
            <button .btn>
              <i .icon-remove title="cancel"></i>