blob: 8532e6a3117b23472ec0adb49d3a625a7cc148a5 [file] [log] [blame]
Matteo Scandolof5cbbb12015-10-28 12:00:07 +01001<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 Scandolo82697c02015-11-04 16:30:43 +010012 <div ng-include="'templates/cp_side_nav.html'"></div>
Matteo Scandolof5cbbb12015-10-28 12:00:07 +010013 </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>