Matteo Scandolo | d2044a4 | 2017-08-07 16:08:28 -0700 | [diff] [blame^] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 19 | <div class="row-fluid"> |
| 20 | <div class="span6"> |
| 21 | <h1>{$ vm.cp.humanReadableName $}</h1> |
| 22 | </div> |
| 23 | <div class="span6 text-right"> |
| 24 | <cp-actions id="vm.cp.id"></cp-actions> |
| 25 | </div> |
| 26 | </div> |
| 27 | <hr> |
| 28 | <div class="row-fluid"> |
| 29 | <div class="span2"> |
Matteo Scandolo | bbcc01b | 2015-11-04 16:30:43 +0100 | [diff] [blame] | 30 | <div ng-include="'templates/cp_side_nav.html'"></div> |
Matteo Scandolo | 15d692c | 2015-10-28 12:00:07 +0100 | [diff] [blame] | 31 | </div> |
| 32 | <div class="span10"> |
| 33 | <div ng-repeat="item in vm.cp_prf" class="well"> |
| 34 | <div class="row-fluid"> |
| 35 | <div class="span4"> |
| 36 | {{item.humanReadableName}} |
| 37 | </div> |
| 38 | <div class="span6"> |
| 39 | <!-- TODO show the name instead that id --> |
| 40 | {{item.defaultOriginServer}} |
| 41 | </div> |
| 42 | <div class="span2"> |
| 43 | <a ng-click="vm.removePrefix(item)" class="btn btn-danger pull-right"> |
| 44 | <i class="icon icon-remove"></i> |
| 45 | </a> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |
| 49 | <hr> |
| 50 | <form ng-submit="vm.addPrefix(vm.new_prf)"> |
| 51 | <div class="row-fluid"> |
| 52 | <div class="span4"> |
| 53 | <label>Prefix</label> |
| 54 | <input type="text" ng-model="vm.new_prf.prefix" required style="max-width: 90%"> |
| 55 | </div> |
| 56 | <div class="span6"> |
| 57 | <label>Default Origin Server</label> |
| 58 | <select ng-model="vm.new_prf.defaultOriginServer" style="max-width: 100%"> |
| 59 | <option ng-repeat="prf in vm.prf" ng-value="prf.id">{$ prf.humanReadableName $}</option> |
| 60 | </select> |
| 61 | </div> |
| 62 | <div class="span2 text-right"> |
| 63 | <button class="btn btn-success margin-wells"> |
| 64 | <i class="icon icon-plus"></i> |
| 65 | </button> |
| 66 | </div> |
| 67 | </div> |
| 68 | </form> |
| 69 | <div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-error': vm.result.status === 0}"> |
| 70 | {$ vm.result.msg $} |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |