Matteo Scandolo | f5cbbb1 | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 1 | <div class="row-fluid"> |
| 2 | <div class="span6"> |
| 3 | <h1>{$ vm.cp.humanReadableName $}</h1> |
| 4 | </div> |
| 5 | <div class="span6 text-right"> |
| 6 | <cp-actions id="vm.cp.id"></cp-actions> |
| 7 | </div> |
| 8 | </div> |
| 9 | <hr> |
| 10 | <div class="row-fluid"> |
| 11 | <div class="span2"> |
Matteo Scandolo | 82697c0 | 2015-11-04 16:30:43 +0100 | [diff] [blame] | 12 | <div ng-include="'templates/cp_side_nav.html'"></div> |
Matteo Scandolo | f5cbbb1 | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 13 | </div> |
| 14 | <div class="span10"> |
| 15 | <div ng-repeat="item in vm.cp_prf" class="well"> |
| 16 | <div class="row-fluid"> |
| 17 | <div class="span4"> |
| 18 | {{item.humanReadableName}} |
| 19 | </div> |
| 20 | <div class="span6"> |
| 21 | <!-- TODO show the name instead that id --> |
| 22 | {{item.defaultOriginServer}} |
| 23 | </div> |
| 24 | <div class="span2"> |
| 25 | <a ng-click="vm.removePrefix(item)" class="btn btn-danger pull-right"> |
| 26 | <i class="icon icon-remove"></i> |
| 27 | </a> |
| 28 | </div> |
| 29 | </div> |
| 30 | </div> |
| 31 | <hr> |
| 32 | <form ng-submit="vm.addPrefix(vm.new_prf)"> |
| 33 | <div class="row-fluid"> |
| 34 | <div class="span4"> |
| 35 | <label>Prefix</label> |
| 36 | <input type="text" ng-model="vm.new_prf.prefix" required style="max-width: 90%"> |
| 37 | </div> |
| 38 | <div class="span6"> |
| 39 | <label>Default Origin Server</label> |
| 40 | <select ng-model="vm.new_prf.defaultOriginServer" style="max-width: 100%"> |
| 41 | <option ng-repeat="prf in vm.prf" ng-value="prf.id">{$ prf.humanReadableName $}</option> |
| 42 | </select> |
| 43 | </div> |
| 44 | <div class="span2 text-right"> |
| 45 | <button class="btn btn-success margin-wells"> |
| 46 | <i class="icon icon-plus"></i> |
| 47 | </button> |
| 48 | </div> |
| 49 | </div> |
| 50 | </form> |
| 51 | <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-error': vm.result.status === 0}"> |
| 52 | {$ vm.result.msg $} |
| 53 | </div> |
| 54 | </div> |
| 55 | </div> |