Diagnostics testing: The test fails because there are 2 Run buttons in the Inputs...
[arvados.git] / apps / workbench / app / views / collections / _show_upload.html.erb
1 <div class="arv-log-refresh-control"
2      data-load-throttle="86486400000" <%# 1001 nights (in milliseconds) %>
3      ></div>
4 <div ng-cloak ng-controller="UploadToCollection" arv-uuid="<%= @object.uuid %>">
5   <div class="panel panel-primary">
6     <div class="panel-body">
7       <div class="row">
8         <div class="col-sm-4">
9           <input type="file" multiple id="file_selector" ng-model="incoming" onchange="angular.element(this).scope().addFilesToQueue(this.files); $(this).val('');">
10           <div class="btn-group btn-group-sm" role="group" style="margin-top: 1.5em">
11             <button type="button" class="btn btn-default" ng-click="stop()" ng-disabled="uploader.state !== 'Running'"><i class="fa fa-fw fa-pause"></i> Pause</button>
12             <button type="button" class="btn btn-primary" ng-click="go()" ng-disabled="uploader.state === 'Running' || countInStates(['Paused', 'Queued']) === 0"><i class="fa fa-fw fa-play"></i> Start</button>
13           </div>
14         </div>
15         <div class="col-sm-8">
16           <div ng-show="uploader.state === 'Running'"
17                class="alert alert-info"
18                ><i class="fa fa-gear"></i>
19             Upload in progress.
20             <span ng-show="countInStates(['Done']) > 0">
21               {{countInStates(['Done'])}} file{{countInStates(['Done'])>1?'s':''}} finished.
22             </span>
23           </div>
24           <div ng-show="uploader.state === 'Idle' && uploader.stateReason"
25                class="alert alert-success"
26                ><i class="fa fa-fw fa-flag-checkered"></i> &nbsp; {{uploader.stateReason}}
27           </div>
28           <div ng-show="uploader.state === 'Failed'"
29                class="alert alert-danger"
30                ><i class="fa fa-fw fa-warning"></i> &nbsp; {{uploader.stateReason}}
31           </div>
32           <div ng-show="uploader.state === 'Stopped'"
33                class="alert alert-info"
34                ><i class="fa fa-fw fa-info"></i> &nbsp; Paused. Click the Start button to resume uploading.
35           </div>
36         </div>
37       </div>
38     </div>
39   </div>
40   <div ng-repeat="upload in uploadQueue" class="row" ng-class="{lighten: upload.state==='Done'}">
41     <div class="col-sm-1">
42       <button class="btn btn-xs btn-default"
43               ng-show="upload.state!=='Done'"
44               ng-click="removeFileFromQueue($index)"
45               title="cancel"><i class="fa fa-fw fa-times"></i></button>
46       <span class="label label-success label-info"
47             ng-show="upload.state==='Done'">finished</span>
48     </div>
49     <div class="col-sm-4 nowrap" style="overflow-x:hidden;text-overflow:ellipsis">
50       <span title="{{upload.file.name}}">
51         {{upload.file.name}}
52       </span>
53     </div>
54     <div class="col-sm-1" style="text-align: right">
55       {{upload.file.size/1024 | number:0}}&nbsp;KiB
56     </div>
57     <div class="col-sm-2">
58       <div class="progress">
59         <span class="progress-bar" style="width: {{upload.progress}}%"></span>
60       </div>
61     </div>
62     <div class="col-sm-4" ng-class="{lighten: upload.state !== 'Uploading'}">
63       {{upload.statistics}}
64     </div>
65   </div>
66 </div>