kong-dashboard
Version:
Web UI for managing Kong gateway
97 lines (89 loc) • 3.72 kB
HTML
<div class="container" infinite-scroll="loadMore()" infinite-scroll-distance="5" infinite-scroll-use-document-bottom="true">
<ul ng-show="upstreams.length >= 1" class="horizontal right">
<li class="search" style="width:300px;">
<div class="search-wrapper card">
<input class="search" placeholder="Search upstreams" value=""
ng-focus="searchBarFocused = true"
ng-blur="searchBarFocused = false"
ng-model="searchInput"
ng-change="searchUpstreams()">
<i class="material-icons">search</i>
<div class="search-results collection" ng-show="searchBarFocused || viewingResults" ng-mouseover="viewingResults = true" ng-mouseout="viewingResults = false">
<p class="collection-item grey-text" ng-if="!searchInput">
<small>
Search Upstreams by ID or name.
</small>
</p>
<p class="collection-item grey-text" ng-if="searching && Utils.keys(searchResults).length == 0">
No results found.
</p>
<a class="collection-item" ng-repeat="(id, name) in searchResults" href="#/upstreams/{{ id }}">
{{ name }}
</a>
</div>
</div>
</li>
<li>
<a href="#/upstreams/add" class="btn-floating btn-large waves-effect waves-light">
<i class="material-icons">add</i>
</a>
</li>
</ul>
<h3 class="header">
Upstreams
</h3>
<p class="flow-text center" ng-show="total === null" style="margin-top:50px;">
<app-loader></app-loader>
</p>
<div class ng-show="total === 0">
<p class="flow-text center">
You haven't defined any Upstream in Kong yet.
</p>
<p class="center">
<a href="#/upstreams/add" class="waves-effect waves-light btn">
<i class="material-icons left">add_box</i>
Add Upstream
</a>
</p>
</div>
<table class="bordered " ng-show="total > 0">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Slots</th>
<th>Created</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="upstream in upstreams">
<td>{{upstream.id}}</td>
<td>{{upstream.name}}</td>
<td>{{upstream.slots}}</td>
<td>{{upstream.created_at | date}}</td>
<td class="right">
<a class="btn-floating waves-effect waves-light" href="#/upstreams/{{upstream.id}}/targets" alt="List Targets">
<i class="material-icons tooltipped" data-position="bottom" data-tooltip="List Targets" data-delay="0" >input</i>
</a>
<a class="btn-floating waves-effect waves-light" href="#/upstreams/{{upstream.id}}">
<i class="material-icons">mode_edit</i>
</a>
<a class="btn-floating waves-effect waves-light red modal-trigger" ng-click="showDeleteModal(upstream.id, upstream.name)">
<i class="material-icons">delete</i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Modal Structure -->
<div id="deleteUpstream" class="modal">
<div class="modal-content">
<h5>Do you really want to delete the Upstream "{{current.name}}"?</h5>
</div>
<div class="modal-footer">
<a class="waves-effect waves-green btn" ng-click="abortDelete()">Noooooo!</a>
<a class="waves-effect waves-red btn red" ng-click="performDelete()" style="margin-right:10px">Yes</a>
</div>
</div>