blob: baa540298c0aca6c8f9100a841f258349a595e1d [file] [log] [blame]
<!--
Copyright 2017-present Open Networking Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="row-fluid">
<div class="span6">
<h1>{$ vm.cp.humanReadableName $}</h1>
</div>
<div class="span6 text-right">
<cp-actions id="vm.cp.id"></cp-actions>
</div>
</div>
<hr>
<div class="row-fluid">
<div class="span2">
<div ng-include="'templates/cp_side_nav.html'"></div>
</div>
<div class="span10">
<div ng-repeat="item in vm.cp_prf" class="well">
<div class="row-fluid">
<div class="span4">
{{item.humanReadableName}}
</div>
<div class="span6">
<!-- TODO show the name instead that id -->
{{item.defaultOriginServer}}
</div>
<div class="span2">
<a ng-click="vm.removePrefix(item)" class="btn btn-danger pull-right">
<i class="icon icon-remove"></i>
</a>
</div>
</div>
</div>
<hr>
<form ng-submit="vm.addPrefix(vm.new_prf)">
<div class="row-fluid">
<div class="span4">
<label>Prefix</label>
<input type="text" ng-model="vm.new_prf.prefix" required style="max-width: 90%">
</div>
<div class="span6">
<label>Default Origin Server</label>
<select ng-model="vm.new_prf.defaultOriginServer" style="max-width: 100%">
<option ng-repeat="prf in vm.prf" ng-value="prf.id">{$ prf.humanReadableName $}</option>
</select>
</div>
<div class="span2 text-right">
<button class="btn btn-success margin-wells">
<i class="icon icon-plus"></i>
</button>
</div>
</div>
</form>
<div class="alert" ng-show="vm.result" ng-class="{'alert-success': vm.result.status === 1,'alert-error': vm.result.status === 0}">
{$ vm.result.msg $}
</div>
</div>
</div>