diagnostics: add tptest_stop functionality
[juci.git] / plugins / juci-diagnostics / src / widgets / diagnostics-widget-speedtest.html
1 <div>
2         <juci-expandable>
3                 <label class="label label-warning">{{'The test can take up to two minutes'|translate}}</label>
4                 <juci-config-lines>
5                         <juci-config-line title="{{'Direction'|translate}}">
6                                 <juci-select ng-model="data.test_type" ng-items="testType"></juci-select>
7                         </juci-config-line>
8                         <juci-config-line title="{{'Automatic transfer size'|translate}}">
9                                 <div class="input-group">
10                                         <switch class="green" ng-model="data.auto" />
11                                 </div>
12                         </juci-config-line>
13                         <juci-config-line ng-show="!data.auto && (data.test_type=='down' || data.test_type=='up_down')" title="{{'Download transfer size'|translate}}">
14                                 <div class="input-group">
15                                         <input type="number" min="0" max="500" step="5" class="form-control" ng-model="data.downsize" placeholder="[Mbyte]" />
16                                         <span class="input-group-addon">MB</span>
17                                 </div>
18                         </juci-config-line>
19                         <juci-config-line ng-show="!data.auto && (data.test_type=='up' || data.test_type=='up_down')" title="{{'Upload transfer size'|translate}}">
20                                 <div class="input-group">
21                                         <input type="number" min="0" max="500" step="5" class="form-control" ng-model="data.upsize" placeholder="[Mbyte]" />
22                                         <span class="input-group-addon">MB</span>
23                                 </div>
24                         </juci-config-line>
25                         <juci-config-line title="{{'Server' | translate}}">
26                                 <juci-select ng-model="data.server" ng-items="allTestServers"/>
27                         </juci-config-line>
28                         <juci-config-line>
29                                 <div class="row">
30                                         <div class="col-xs-7 text-center" style="font-size: x-small">Remove/Add server</div>
31                                         <button class="col-xs-2 btn btn-default" ng-click="onRemoveAddress()" >
32                                                 <i class="fa fa-minus"></i>
33                                         </button>
34                                         <button class="col-xs-2 btn btn-default" ng-click="onAddAddress()" style="float: right; margin-right: 15px;">
35                                                 <i class="fa fa-plus"></i>
36                                         </button>
37                                 </div>
38                         </juci-config-line>
39                         <juci-config-line>
40                                 <button class="btn btn-default">
41                                         <span ng-click="runTest()" ng-show="(data.state != 'running')">{{'Run test' | translate}}</span>
42                                         <span ng-click="abortTest()"ng-show="(data.state == 'running')">{{'Abort' | translate}}</span></span>
43                                 </button>
44                         </juci-config-line>
45                 </juci-config-lines>
46                 <div class="alert alert-success" ng-show="data.result.length">
47                         {{'Test results'|translate}}: <br/>
48                         <pre ng-repeat="res in data.result track by $index">{{res}}<button class="btn btn-primary pull-right" ng-click="removeResult(res)"><i class="fa fa-close"></i></button</pre>
49                 </div>
50                 <div class="alert alert-success" ng-show="data.state == 'running'">
51                         <h4>
52                                 {{"Running test"|translate}}
53                                 <i class="fa fa-spinner fa-pulse fa-2x"></i>
54                         </h4>
55                 </div>
56             <div class="alert alert-danger" ng-show="data.state == 'error'">
57                         {{'Error'|translate}}: <br/>
58                         <pre>{{data.result|translate}}</pre>
59                 </div>
60         </juci-expandable>
61 </div>
62