119 lines
6.9 KiB
HTML
119 lines
6.9 KiB
HTML
<!--
|
|
|
|
Copyright (C) 2015-2016 Jeeva Kandasamy (jkandasa@gmail.com)
|
|
|
|
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="container-fluid"> <!-- Container-fluid -->
|
|
|
|
<!-- Loading icon disaplay -->
|
|
<div ng-hide="queryResponse.$resolved">
|
|
<div ng-include src="'partials/common-html/loading.html'"></div>
|
|
</div>
|
|
|
|
<div ng-show="queryResponse.$resolved"> <!-- Main Message -->
|
|
|
|
<!-- Page Header -->
|
|
<div ng-include src="'partials/common-html/header-list.html'"></div>
|
|
|
|
<div class="col-md-12">
|
|
<div class="btn-toolbar pull-right" role="toolbar">
|
|
<div class="btn-group mc-side-space" ng-show="filteredList.length > 0">
|
|
<label class="mc-align-center mc-top-space-5px">Showing {{(query.pageLimit * (query.page - 1))+1}} to {{getMin(getMin(query.pageLimit * query.page, queryResponse.query.totalItems), queryResponse.query.filteredCount)}} of {{queryResponse.query.totalItems}} items</label>
|
|
</div>
|
|
|
|
<div class="btn-group" role="group" aria-label="" ng-show="filteredList.length > 0">
|
|
<!-- Single button -->
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" ng-disabled="itemIds.length == 0">
|
|
{{ 'ACTIONS' | translate }} <span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || delete()" class="text-danger"><i class="fa fa-lg fa-trash"></i> {{ 'DELETE' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length != 1}"><a href='' ng-click="itemIds.length != 1 || edit()" class="text-default"><i class="fa fa-lg fa-edit"></i> {{ 'EDIT' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || enable()" class="text-default"><i class="fa fa-lg fa-circle"></i> {{ 'ENABLE' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || disable()" class="text-danger"><i class="fa fa-lg fa-circle-thin"></i> {{ 'DISABLE' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || reload()" class="text-danger"><i class="fa fa-lg fa-retweet"></i> {{ 'RELOAD' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || discover()" class="text-default"><i class="fa fa-lg fa-search"></i> {{ 'DISCOVER' | translate }}</a></li>
|
|
<li ng-class="{'disabled': itemIds.length == 0}"><a href='' ng-click="itemIds.length == 0 || refreshNodesInfo()" class="text-default"><i class="fa fa-lg fa-refresh"></i> {{ 'REFRESH_NODES_INFO' | translate }}</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div ng-show="mchelper.user.permission === 'Super admin'" class="btn-group" role="group">
|
|
<a class="btn btn-primary" type="button" ui-sref="gatewaysAddEdit"><i class="fa fa-plus"></i> {{ 'ADD' | translate }}</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="pull-right mc-v-margin" ng-show="filteredList.length > 0">
|
|
<div pf-sort id="itemsSort" config="sortConfig"></div>
|
|
</div>
|
|
|
|
<div pf-filter id="itemsFilter" config="filterConfig" ng-show="queryResponse.query.totalItems > 0"></div>
|
|
</div>
|
|
|
|
<!-- Display No Items on system -->
|
|
<div ng-include src="'partials/common-html/no-items-system.html'"></div>
|
|
|
|
<!-- Display When no data on table -->
|
|
<div ng-include src="'partials/common-html/no-items-filter.html'"></div>
|
|
|
|
<div ng-show="filteredList.length > 0">
|
|
<!-- Table -->
|
|
<table class="table table-hover table-bordered table-striped mc-table">
|
|
<thead>
|
|
<th class="mc-align-center"><input type="checkbox" ng-checked="itemIds.length == filteredList.length" ng-click="selectAllItems()"></th>
|
|
<th>{{ 'ENABLED' | translate }}</th>
|
|
<th>{{ 'NAME' | translate }}</th>
|
|
<th>{{ 'TYPE' | translate }}</th>
|
|
<th>{{ 'NETWORK_TYPE' | translate }}</th>
|
|
<th>{{ 'CONNECTION_DETAILS' | translate }}</th>
|
|
<th>{{ 'STATUS' | translate }}</th>
|
|
<th>{{ 'STATUS_SINCE' | translate }}</th>
|
|
<th>{{ 'STATUS_MESSAGE' | translate }}</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
<tr dir-paginate="item in filteredList | itemsPerPage: query.pageLimit" total-items="queryResponse.query.totalItems" current-page="currentPage"
|
|
ng-class="{'mc-selected': itemIds.indexOf(item.id) != -1}" ng-click="selectItem(item)">
|
|
<td class="mc-align-center"><input type="checkbox" ng-checked="itemIds.indexOf(item.id) != -1"></td>
|
|
<td class="text-center">
|
|
<i ng-show="item.enabled" class="text-success fa fa-circle fa-lg" uib-tooltip="{{ 'ENABLED' | translate }}"></i>
|
|
<i ng-hide="item.enabled" class="text-danger fa fa-circle-o fa-lg" uib-tooltip="{{ 'DISABLED' | translate }}"></i>
|
|
</td>
|
|
<td>{{item.name}}</td>
|
|
<td>{{item.type}}</td>
|
|
<td>{{item.networkType}}</td>
|
|
<td>{{item.connectionDetails}}</td>
|
|
<td class="text-center">
|
|
<i uib-tooltip="{{ 'DOWN' | translate }}" ng-show="item.state == 'Down'" class="pficon pficon-error-circle-o fa-lg"></i>
|
|
<i uib-tooltip="{{ 'UNAVAILABLE' | translate }}" ng-show="item.state == 'Unavailable'" class="pficon pficon-help text-color-gray fa-lg"></i>
|
|
<i uib-tooltip="{{ 'UP' | translate }}" ng-show="item.state == 'Up'" class="pficon pficon-ok fa-lg"></i>
|
|
</td>
|
|
<td><span uib-tooltip="{{item.statusSince | date:mchelper.cfg.dateFormat:mchelper.cfg.timezone}}" tooltip-placement="left" am-time-ago="item.statusSince"></span></td>
|
|
<td>{{item.statusMessage}}</td>
|
|
<td class="mc-align-center">
|
|
<a class="btn btn-link" ui-sref="gatewaysDetail({'id':item.id})"><i class="fa fa-chevron-circle-right fa-lg" tooltip="{{ 'VIEW_DETAILS' | translate }}" tooltip-trigger tooltip-placement="top"></i></a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dir-pagination-controls class="pull-right" boundary-links="true" on-page-change="pageChanged(newPageNumber)"></dir-pagination-controls>
|
|
</div>
|
|
|
|
</div> <!-- Main Message -->
|
|
|
|
</div> <!-- Container-fluid -->
|