parent
fc957b63ff
commit
310e1d4501
|
@ -9,7 +9,7 @@ import arrow
|
|||
from datetime import timedelta
|
||||
|
||||
from flask import current_app
|
||||
from sqlalchemy import func, or_, not_, cast, Boolean
|
||||
from sqlalchemy import func, or_, not_, cast, Boolean, Integer
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
@ -299,6 +299,8 @@ def render(args):
|
|||
Certificate.domains.any(Domain.name.ilike('%{0}%'.format(terms[1])))
|
||||
)
|
||||
)
|
||||
elif 'id' in terms:
|
||||
query = query.filter(Certificate.id == cast(terms[1], Integer))
|
||||
else:
|
||||
query = database.filter(query, Certificate, terms)
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
<table ng-table="certificateTable" class="table" show-filter="showFilter" template-pagination="angular/pager.html">
|
||||
<tbody>
|
||||
<tr ng-class="{'even-row': $even }" ng-repeat-start="certificate in $data track by $index">
|
||||
<td data-title="'Id'" filter="{'id': 'text'}">
|
||||
{{ certificate.id }}
|
||||
</td>
|
||||
<td data-title="'Name'" sortable="'name'" filter="{ 'name': 'text' }">
|
||||
<ul class="list-unstyled">
|
||||
<li>{{ certificate.name }}</li>
|
||||
|
|
Loading…
Reference in New Issue