harbor/static/resources/js/components/system-management/replication.directive.html

78 lines
4.1 KiB
HTML
Raw Normal View History

<!--
Copyright (c) 2016 VMware, Inc. All Rights Reserved.
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.
-->
2016-06-26 06:56:58 +02:00
<div class="tab-pane" element-height>
<div class="col-xs-12 col-md-12 each-tab-pane">
<div class="form-inline">
<div class="input-group">
<input type="text" id="txtSearchInput" class="form-control" placeholder="" ng-model="vm.replicationName" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" ng-click="vm.search()"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
<create-policy reload="vm.retrieve()" action="vm.action" modal-title="//vm.modalTitle//" policy-id="//vm.policyId//"></create-policy>
</div>
<div class="pane">
<div class="sub-pane">
<div class="table-head-container">
<table class="table table-pane table-header">
<thead>
<th width="14%">// 'name' | tr //</th>
<th width="18%">// 'description' | tr //</th>
<th width="14%">// 'projects' | tr //</th>
<th width="12%">// 'destination' | tr //</th>
<th width="18%">// 'start_time' | tr //</th>
<th width="12%">// 'activation' | tr //</th>
<th width="12%">// 'actions' | tr //</th>
</thead>
</table>
</div>
<div class="table-body-container">
<table class="table table-pane">
<tbody>
<tr ng-if="vm.replications.length == 0">
<td colspan="7" height="100%" class="empty-hint" ><h4 class="text-muted">// 'no_replication_policies' | tr //</h4></td>
</tr>
<tr ng-if="vm.replications.length > 0" ng-repeat="r in vm.replications">
<td width="14%"><a href="repository#/replication?project_id=//r.project_id//">//r.name//</a></td>
<td width="18%">//r.description//</td>
<td width="14%">//r.project_name//</td>
<td width="12%">//r.target_name//</td>
<td width="18%">//r.start_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td width="12%" ng-switch on="//r.enabled//">
<span ng-switch-when="1">// 'enabled' | tr //</span>
<span ng-switch-when="0">// 'disabled' | tr //</span>
</td>
<td width="12%">
<div class="display-inline-block" ng-switch on="//r.enabled//">
2016-07-09 05:38:46 +02:00
<a href="javascript:void(0);" ng-click="vm.confirmToTogglePolicy(r.id, 0, r.name)" title="// 'disable' | tr //"><span ng-switch-when="1" class="glyphicon glyphicon-stop color-danger"></span></a>
<a href="javascript:void(0);" ng-click="vm.confirmToTogglePolicy(r.id, 1, r.name)" title="// 'enable' | tr //"><span ng-switch-when="0" class="glyphicon glyphicon-play color-success"></span></a>
</div>
&nbsp;
<a href="javascript:void(0);" data-toggle="modal" data-target="#createPolicyModal" ng-click="vm.editReplication(r.id)" title="// 'edit_policy' | tr //"><span class="glyphicon glyphicon-pencil"></span></a>
&nbsp;
<!--a href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a-->
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-4 col-md-12 well well-sm well-custom">
<div class="col-md-offset-10">//vm.replications ? vm.replications.length : 0// // 'items' | tr //</div>
</div>
</div>
</div>