Requirements update
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||
"""
|
||||
from inflection import underscore
|
||||
from sqlalchemy import exc
|
||||
from sqlalchemy import exc, func
|
||||
from sqlalchemy.sql import and_, or_
|
||||
from sqlalchemy.orm import make_transient
|
||||
|
||||
@ -267,6 +267,12 @@ def clone(model):
|
||||
return model
|
||||
|
||||
|
||||
def get_count(q):
|
||||
count_q = q.statement.with_only_columns([func.count()]).order_by(None)
|
||||
count = q.session.execute(count_q).scalar()
|
||||
return count
|
||||
|
||||
|
||||
def sort_and_page(query, model, args):
|
||||
"""
|
||||
Helper that allows us to combine sorting and paging
|
||||
@ -289,7 +295,7 @@ def sort_and_page(query, model, args):
|
||||
if sort_by and sort_dir:
|
||||
query = sort(query, model, sort_by, sort_dir)
|
||||
|
||||
total = query.count()
|
||||
total = get_count(query)
|
||||
|
||||
# offset calculated at zero
|
||||
page -= 1
|
||||
|
@ -80,6 +80,7 @@ def delete_txt_record(change_id, account_number, domain, token):
|
||||
|
||||
zone = Zone(zone_name)
|
||||
node = Node(zone_name, fqdn)
|
||||
|
||||
all_txt_records = node.get_all_records_by_type('TXT')
|
||||
for txt_record in all_txt_records:
|
||||
if txt_record.txtdata == ("{}".format(token)):
|
||||
|
@ -258,6 +258,11 @@ angular.module('lemur')
|
||||
opened: false
|
||||
};
|
||||
|
||||
CertificateService.getDnsProviders().then(function (providers) {
|
||||
$scope.dnsProviders = providers;
|
||||
}
|
||||
);
|
||||
|
||||
$scope.clearDates = function () {
|
||||
$scope.certificate.validityStart = null;
|
||||
$scope.certificate.validityEnd = null;
|
||||
|
@ -243,6 +243,10 @@ angular.module('lemur')
|
||||
certificate.authority = defaults.authority;
|
||||
}
|
||||
}
|
||||
|
||||
if (certificate.dnsProviderId) {
|
||||
certificate.dnsProvider = {id: certificate.dnsProviderId};
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user