entity-browser-frontend/app/pages/databases.html (52 lines of code) (raw):
<div>
<div class="container-fluid" data-ng-controller="DatabasesController as databasesCtrl">
<h2>Databases <a data-ng-show="!databasesCtrl.readonly" class="btn btn-default" data-ng-click="databasesCtrl.openDialog()">
<span class="fa fa-plus"></span> add
</a></h2>
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<th>Summary</th>
<th style="padding-left: 40px;">
<span data-ng-show="!databasesCtrl.readonly">State</span>
</th>
<th data-ng-if="!databasesCtrl.readonly">Actions</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="database in databasesCtrl.dbs">
<td>
<span style="font-weight: bold">{{$index + 1}}</span>
</td>
<td>
<div class="database-row">
<span style="font-weight: bold">{{database.description}}:</span>
<span ng-if="!database.opened">{{database.location}}</span>
<a ng-if="database.opened" ng-href="databases/{{database.uuid}}">{{database.location}}</a>
<span class="badge badge-warning" ng-if="database.readonly">readonly</span>
</div>
</td>
<td>
<div style="display: flex;">
<div class="encrypted-icon-wrapper">
<i ng-if="database.encrypted" class="fas fa-user-secret pull-right" title="Encrypted"></i>
<i ng-if="!database.encrypted" class="fal fa-user pull-right" title="Not encrypted"></i>
</div>
<div data-ng-if="!databasesCtrl.readonly">
<input type="checkbox" xxx-toggle-checkbox ng-model="database.opened"
ng-change="databasesCtrl.startOrStop(database)" data-style="animation-disabled">
</div>
</div>
</td>
<td data-ng-if="!databasesCtrl.readonly">
<button style="height: 34px;" class="btn btn-danger"
ng-click="databasesCtrl.deleteDB(database)" data-ng-show="!databasesCtrl.readonly">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>