From f7c795c7f67979a636e11742c1ebfa788c552e8a Mon Sep 17 00:00:00 2001 From: kevgliss Date: Tue, 20 Dec 2016 14:26:29 -0800 Subject: [PATCH] Closes #577. (#622) --- lemur/certificates/service.py | 4 +++- lemur/static/app/angular/certificates/view/view.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index 6a77ea4d..1a763ee7 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -9,7 +9,7 @@ import arrow from datetime import timedelta from flask import current_app -from sqlalchemy import func, or_ +from sqlalchemy import func, or_, cast, Boolean from cryptography import x509 from cryptography.hazmat.backends import default_backend @@ -294,6 +294,8 @@ def render(args): elif 'destination' in terms: query = query.filter(Certificate.destinations.any(Destination.id == terms[1])) + elif 'notify' in filt: + query = query.filter(Certificate.notify == cast(terms[1], Boolean)) elif 'active' in filt: query = query.filter(Certificate.active == terms[1]) elif 'cn' in terms: diff --git a/lemur/static/app/angular/certificates/view/view.js b/lemur/static/app/angular/certificates/view/view.js index 95c17316..248366d1 100644 --- a/lemur/static/app/angular/certificates/view/view.js +++ b/lemur/static/app/angular/certificates/view/view.js @@ -98,7 +98,7 @@ angular.module('lemur') }; $scope.getCertificateStatus = function () { var def = $q.defer(); - def.resolve([{'title': 'Active', 'id': true}, {'title': 'Inactive', 'id': false}]); + def.resolve([{'title': 'True', 'id': true}, {'title': 'False', 'id': false}]); return def; };