blob: baa540298c0aca6c8f9100a841f258349a595e1d [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18
Matteo Scandolo15d692c2015-10-28 12:00:07 +010019<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 Scandolobbcc01b2015-11-04 16:30:43 +010030 <div ng-include="'templates/cp_side_nav.html'"></div>
Matteo Scandolo15d692c2015-10-28 12:00:07 +010031 </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>