@ -57,7 +57,7 @@
|
||||
</tr>
|
||||
<tr class="warning" ng-if="certificate.toggle" ng-repeat-end>
|
||||
<td colspan="12">
|
||||
<uib-tabset justified="true" class="col-md-6">
|
||||
<uib-tabset justified="true" class="col-md-8">
|
||||
<uib-tab>
|
||||
<uib-tab-heading>Basic Info</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
@ -114,6 +114,18 @@
|
||||
</li>
|
||||
</ul>
|
||||
</uib-tab>
|
||||
<uib-tab>
|
||||
<uib-tab-heading>Endpoints</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" ng-repeat="endpoint in certificate.endpoints">
|
||||
<span class="pull-right"><label class="label label-default">{{ endpoint.type }}</label></span>
|
||||
<ul class="list-unstyled">
|
||||
<li>{{ endpoint.name }}</li>
|
||||
<li><span class="text-muted">{{ endpoint.dnsname }}</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</uib-tab>
|
||||
<uib-tab>
|
||||
<uib-tab-heading>Notifications</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
@ -158,7 +170,7 @@
|
||||
</ul>
|
||||
</uib-tab>
|
||||
</uib-tabset>
|
||||
<uib-tabset justified="true" class="col-md-6">
|
||||
<uib-tabset justified="true" class="col-md-4">
|
||||
<uib-tab>
|
||||
<uib-tab-heading>
|
||||
Chain
|
||||
|
21
lemur/static/app/angular/endpoints/services.js
vendored
Normal file
21
lemur/static/app/angular/endpoints/services.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
angular.module('lemur')
|
||||
.service('EndpointApi', function (LemurRestangular) {
|
||||
return LemurRestangular.all('endpoints');
|
||||
})
|
||||
.service('EndpointService', function ($location, EndpointApi) {
|
||||
var EndpointService = this;
|
||||
EndpointService.findEndpointsByName = function (filterValue) {
|
||||
return EndpointApi.getList({'filter[label]': filterValue})
|
||||
.then(function (endpoints) {
|
||||
return endpoints;
|
||||
});
|
||||
};
|
||||
|
||||
EndpointService.getCertificates = function (endpoint) {
|
||||
endpoint.getList('certificates').then(function (certificates) {
|
||||
endpoint.certificates = certificates;
|
||||
});
|
||||
};
|
||||
return EndpointService;
|
||||
});
|
47
lemur/static/app/angular/endpoints/view/view.js
vendored
Normal file
47
lemur/static/app/angular/endpoints/view/view.js
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('lemur')
|
||||
|
||||
.config(function config($stateProvider) {
|
||||
$stateProvider.state('endpoints', {
|
||||
url: '/endpoints',
|
||||
templateUrl: '/angular/endpoints/view/view.tpl.html',
|
||||
controller: 'EndpointsViewController'
|
||||
});
|
||||
})
|
||||
|
||||
.controller('EndpointsViewController', function ($q, $scope, $uibModal, EndpointApi, EndpointService, MomentService, ngTableParams) {
|
||||
$scope.filter = {};
|
||||
$scope.endpointsTable = new ngTableParams({
|
||||
page: 1, // show first page
|
||||
count: 10, // count per page
|
||||
sorting: {
|
||||
id: 'desc' // initial sorting
|
||||
},
|
||||
filter: $scope.filter
|
||||
}, {
|
||||
total: 0, // length of data
|
||||
getData: function ($defer, params) {
|
||||
EndpointApi.getList(params.url()).then(
|
||||
function (data) {
|
||||
params.total(data.total);
|
||||
$defer.resolve(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$scope.ciphers = [
|
||||
{'title': 'Protocol-SSLv2', 'id': 'Protocol-SSLv2'},
|
||||
{'title': 'Protocol-SSLv3', 'id': 'Protocol-SSLv3'},
|
||||
{'title': 'Protocol-TLSv1', 'id': 'Protocol-TLSv1'},
|
||||
{'title': 'Protocol-TLSv1.1', 'id': 'Protocol-TLSv1.1'},
|
||||
{'title': 'Protocol-TLSv1.1', 'id': 'Protocol-TLSv1.2'},
|
||||
];
|
||||
|
||||
$scope.momentService = MomentService;
|
||||
|
||||
$scope.endpointService = EndpointService;
|
||||
|
||||
});
|
108
lemur/static/app/angular/endpoints/view/view.tpl.html
Normal file
108
lemur/static/app/angular/endpoints/view/view.tpl.html
Normal file
@ -0,0 +1,108 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 class="featurette-heading">Endpoints
|
||||
<span class="text-muted"><small>443 or bust</small></span></h2>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group">
|
||||
<button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
|
||||
btn-checkbox-true="1"
|
||||
btn-checkbox-false="0">Filter</button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table ng-table="endpointsTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html" >
|
||||
<tbody>
|
||||
<tr ng-repeat-start="endpoint in $data track by $index">
|
||||
<td data-title="''" class="centered-cell">
|
||||
<i ng-if="endpoint.issues.length" class="fa fa-exclamation-triangle" uib-tooltip="Issues Found" tooltip-placement="right" style="color: #FF5154;" aria-hidden="true"></i>
|
||||
<i ng-if="!endpoint.issues.length" class="fa fa-check-circle" aria-hidden="true" uib-tooltip="No issues" tooltip-placement="right" style="color: #93c54b;"></i>
|
||||
</td>
|
||||
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">
|
||||
<ul class="list-unstyled">
|
||||
<li>{{ endpoint.name }}</li>
|
||||
<li><span class="text-muted">{{ endpoint.dnsname }}</span></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td data-title="'Port'" sortable="'port'" filter="{ 'port': 'number' }" class="centered-cell">
|
||||
{{ endpoint.port }}
|
||||
</td>
|
||||
<td data-title="'Type'" sortable="'type'" filter="{ 'type': 'text'}" class="centered-cell">
|
||||
<ul class="list-unstyled">
|
||||
<li><label class="label label-default text-uppercase">{{ endpoint.type }}</label></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td data-title="''" filter="{ 'ciphers' : 'select'}" filter-data="ciphers" class="centered-cell">
|
||||
<div class="btn-group-vertical pull-right">
|
||||
<button ng-model="endpoint.toggle" class="btn btn-sm btn-info" uib-btn-checkbox
|
||||
btn-checkbox-true="1"
|
||||
btn-checkbox-false="0">More
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="warning" ng-if="endpoint.toggle" ng-repeat-end>
|
||||
<td colspan="12">
|
||||
<uib-tabset justified="true" class="col-md-6">
|
||||
<uib-tab>
|
||||
<uib-tab-heading>Certificate</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<strong>Name</strong>
|
||||
<span class="pull-right">
|
||||
{{ endpoint.certificate.name }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Not Before</strong>
|
||||
<span class="pull-right" uib-tooltip="{{ endpoint.certificate.notBefore }}">
|
||||
{{ momentService.createMoment(endpoint.certificate.notBefore) }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Not After</strong>
|
||||
<span class="pull-right" uib-tooltip="{{ endpoint.certificate.notAfter }}">
|
||||
{{ momentService.createMoment(endpoint.certificate.notAfter) }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Description</strong>
|
||||
<p>{{ endpoint.certificate.description }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</uib-tab>
|
||||
<uib-tab>
|
||||
<uib-tab-heading>
|
||||
Issues
|
||||
</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" ng-repeat="issue in endpoint.issues">
|
||||
<ul class="list-unstyled">
|
||||
<li>{{ issue.name | titleCase }}</li>
|
||||
<li><span class="text-muted">{{ issue.value }}</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</uib-tab>
|
||||
</uib-tabset>
|
||||
<uib-tabset justified="true" class="col-md-6">
|
||||
<uib-tab>
|
||||
<uib-tab-heading>
|
||||
Ciphers/Protocols
|
||||
</uib-tab-heading>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" ng-repeat="cipher in endpoint.policy.ciphers">
|
||||
<strong>{{ cipher.name }}</strong>
|
||||
</li>
|
||||
</ul>
|
||||
</uib-tab>
|
||||
</uib-tabset>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -51,13 +51,14 @@
|
||||
<li><a ui-sref="dashboard">Dashboard</a></li>
|
||||
<li><a ui-sref="certificates">Certificates</a></li>
|
||||
<li><a ui-sref="authorities">Authorities</a></li>
|
||||
<li><a ui-sref="endpoints">Endpoints</a></li>
|
||||
<li><a ui-sref="notifications">Notifications</a></li>
|
||||
<li><a ui-sref="destinations">Destinations</a></li>
|
||||
<li><a ui-sref="sources">Sources</a></li>
|
||||
<li></li>
|
||||
<li class="dropdown" uib-dropdown on-toggle="toggled(open)">
|
||||
<a href class="dropdown-toggle" uib-dropdown-toggle>Settings <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a ui-sref="destinations">Destinations</a></li>
|
||||
<li><a ui-sref="sources">Sources</a></li>
|
||||
<li><a ui-sref="roles">Roles</a></li>
|
||||
<li><a ui-sref="users">Users</a></li>
|
||||
<li><a ui-sref="domains">Domains</a></li>
|
||||
|
@ -198,3 +198,8 @@ a {
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
.centered-cell {
|
||||
vertical-align:middle;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user