| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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="box box-primary"> |
| <div class="box-header with-border"> |
| <span class="fa fa-rocket"></span> |
| <h3 class="box-title"> |
| Policy List |
| </h3> |
| </div> |
| <div class="box-body"> |
| <!-- Site Filter --> |
| <ul class="nav nav-pills with-border"> |
| <li><span>Site Filter:</span></li> |
| <li ng-class="{active: siteFilter === ''}" ng-click="updateSiteFilter('')"><a>All</a></li> |
| <li ng-class="{active: siteFilter === site.siteId}" ng-click="updateSiteFilter(site.siteId)" |
| ng-repeat="site in Site.list track by $index"> |
| <a>{{site.siteName || site.siteId}}</a> |
| </li> |
| </ul> |
| |
| <div sort-table="policyList" ng-show="policyList.length"> |
| <table class="table table-bordered"> |
| <thead> |
| <tr> |
| <th sortpath="policyStatus" width="10"></th> |
| <th sortpath="name" width="10%">Name</th> |
| <th>Description</th> |
| <th width="85">Action</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td> |
| <span class="fa fa-square" ng-class="item.policyStatus === 'ENABLED' ? 'text-green' : 'text-muted'"></span> |
| </td> |
| <td> |
| <a ui-sref="policyDetail({name: item.name})">{{item.name}}</a> |
| </td> |
| <td>{{item.description}}</td> |
| <td class="text-center"> |
| <div class="btn-group btn-group-xs"> |
| <button class="btn btn-default opt" ng-if="item.policyStatus !== 'ENABLED'" ng-click="startPolicy(item)"> |
| <span class="fa fa-play"></span> |
| </button> |
| <button class="btn btn-default opt" ng-if="item.policyStatus === 'ENABLED'" ng-click="stopPolicy(item)"> |
| <span class="fa fa-stop"></span> |
| </button> |
| <a ui-sref="policyEdit({name: item.name})" class="btn btn-default opt"><span class="fa fa-pencil"></span></a> |
| <button class="btn btn-danger opt" ng-click="deletePolicy(item)"><span class="fa fa-trash"></span></button> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| |
| <div class="callout callout-warning no-margin" ng-show="!loading && policyList.length === 0"> |
| <h4>No Policy yet</h4> |
| <p>You have not create policy yet. Click <a ui-sref="policyCreate()">here</a> to create a new policy.</p> |
| </div> |
| </div> |
| |
| <div class="overlay" ng-if="loading"> |
| <i class="fa fa-refresh fa-spin"></i> |
| </div> |
| |
| <div class="box-footer text-right"> |
| <a ui-sref="policyCreate()" class="btn btn-primary">New Policy</a> |
| </div> |
| </div> |