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