Matteo Scandolo | b0b9093 | 2017-03-31 17:34:57 -0700 | [diff] [blame] | 1 | <style> |
| 2 | .row + .row { |
| 3 | margin-top: 20px; |
| 4 | } |
| 5 | </style> |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 6 | <div class="row"> |
| 7 | <div class="col-xs-12"> |
Matteo Scandolo | 5a5a97d | 2017-03-30 16:43:39 -0700 | [diff] [blame] | 8 | <h1>Virtual Truck Roll Dashboard</h1> |
| 9 | <p>Use this page to run test against your subscribers</p> |
Matteo Scandolo | b0b9093 | 2017-03-31 17:34:57 -0700 | [diff] [blame] | 10 | <blockquote>Please note that this is a reference implementation that is intended to demontrate all the possible capabilities. <br/>In a real scenario you may want to integrate the API provided by this service in your help desk software.</blockquote> |
Matteo Scandolo | e19fa10 | 2017-03-09 15:38:59 -0800 | [diff] [blame] | 11 | </div> |
| 12 | </div> |
| 13 | <form ng-submit="vm.runTest()"> |
| 14 | <div class="row"> |
| 15 | <div class="col-xs-12"> |
| 16 | <label>Target:</label> |
| 17 | </div> |
| 18 | <div class="col-xs-12"> |
| 19 | <select class="form-control" ng-model="vm.truckroll.target_id" ng-options="s.id as s.name for s in vm.subscribers"></select> |
| 20 | </div> |
| 21 | </div> |
| 22 | <div class="row"> |
| 23 | <div class="col-xs-12"> |
| 24 | <label>Scope:</label> |
| 25 | </div> |
| 26 | <div class="col-xs-6"> |
| 27 | <a |
| 28 | ng-click="vm.truckroll.scope = 'container'" |
| 29 | ng-class="{'btn-default': vm.truckroll.scope !== 'container', 'btn-primary': vm.truckroll.scope === 'container'}" |
| 30 | class="btn btn-block" |
| 31 | >Container</a> |
| 32 | </div> |
| 33 | <div class="col-xs-6"> |
| 34 | <a |
| 35 | ng-click="vm.truckroll.scope = 'vm'" |
| 36 | ng-class="{'btn-default': vm.truckroll.scope !== 'vm', 'btn-primary': vm.truckroll.scope === 'vm'}" |
| 37 | class="btn btn-block" |
| 38 | >VM</a> |
| 39 | </div> |
| 40 | </div> |
| 41 | <div class="row"> |
| 42 | <div class="col-xs-12"> |
| 43 | <label>Test:</label> |
| 44 | </div> |
| 45 | <div class="col-xs-4"> |
| 46 | <a |
| 47 | ng-click="vm.truckroll.test = 'ping'" |
| 48 | ng-class="{'btn-default': vm.truckroll.test !== 'ping', 'btn-primary': vm.truckroll.test === 'ping'}" |
| 49 | class="btn btn-block">Ping</a> |
| 50 | </div> |
| 51 | <div class="col-xs-4"> |
| 52 | <a |
| 53 | ng-click="vm.truckroll.test = 'traceroute'" |
| 54 | ng-class="{'btn-default': vm.truckroll.test !== 'traceroute', 'btn-primary': vm.truckroll.test === 'traceroute'}" |
| 55 | class="btn btn-block">Traceroute</a> |
| 56 | </div> |
| 57 | <div class="col-xs-4"> |
| 58 | <a |
| 59 | ng-click="vm.truckroll.test = 'tcpdump'" |
| 60 | ng-class="{'btn-default': vm.truckroll.test !== 'tcpdump', 'btn-primary': vm.truckroll.test === 'tcpdump'}" |
| 61 | class="btn btn-block">Tcp Dump</a> |
| 62 | </div> |
| 63 | </div> |
| 64 | <div class="row"> |
| 65 | <div class="col-xs-12"> |
| 66 | <label>Argument:</label> |
| 67 | </div> |
| 68 | <div class="col-xs-12"> |
| 69 | <input type="text" class="form-control" ng-model="vm.truckroll.argument" required /> |
| 70 | </div> |
| 71 | </div> |
| 72 | <div class="row"> |
| 73 | <div class="col-xs-12" ng-show="!vm.loader"> |
| 74 | <button class="btn btn-success btn-block">Run test</button> |
| 75 | </div> |
| 76 | </div> |
| 77 | </form> |
| 78 | <div class="row"> |
| 79 | <div class="col-xs-12 animate-vertical" ng-show="vm.loader"> |
| 80 | <div class="loader"></div> |
| 81 | </div> |
| 82 | </div> |
| 83 | <div class="row" ng-hide="!vm.truckroll.result_code"> |
| 84 | <div class="col-xs-12"> |
| 85 | <label>Result Code</label> |
| 86 | </div> |
| 87 | <div class="col-xs-12"> |
| 88 | <pre>{{vm.truckroll.result_code}}</pre> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div class="row" ng-hide="!vm.truckroll.result"> |
| 92 | <div class="col-xs-12"> |
| 93 | <label>Result:</label> |
| 94 | </div> |
| 95 | <div class="col-xs-12"> |
| 96 | <pre>{{vm.truckroll.result}}</pre> |
| 97 | </div> |
| 98 | </div> |
| 99 | <div class="row" ng-hide="!vm.truckroll.backend_status"> |
| 100 | <div class="col-xs-12"> |
| 101 | <label>Backend Status</label> |
| 102 | </div> |
| 103 | <div class="col-xs-12"> |
| 104 | <pre>{{vm.truckroll.backend_status}}</pre> |
| 105 | </div> |
| 106 | </div> |
| 107 | |
| 108 | <div class="row" ng-show="vm.error"> |
| 109 | <div class="col-xs-12"> |
| 110 | <div class="alert alert-danger"> |
| 111 | {{vm.error}} |
| 112 | </div> |
| 113 | </div> |
| 114 | </div> |