mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-12 09:11:55 -06:00
Generate record type list from metadata https://fedorahosted.org/freeipa/ticket/945
now matches record at the end of the string
This commit is contained in:
parent
9837bb0d10
commit
acc00afa4c
@ -105,12 +105,22 @@ IPA.dnsrecord_facet = function(spec) {
|
||||
|
||||
var that = IPA.search_facet(spec);
|
||||
|
||||
var record_types = [
|
||||
'a', 'aaaa', 'dname', 'cname', 'mx', 'ns', 'ptr',
|
||||
'srv', 'txt', 'a6', 'afsdb', 'cert', 'ds',
|
||||
'key', 'kx', 'loc', 'naptr', 'nsec',
|
||||
'rrsig', 'sshfp'
|
||||
];
|
||||
function generate_recordtype_list(){
|
||||
var attrs = IPA.metadata.objects.dnsrecord.default_attributes;
|
||||
var record_types = [];
|
||||
for (var i =0; i < attrs.length; i+=1){
|
||||
var attr = attrs[i];
|
||||
var index = attr.search('record$');
|
||||
if (index > -1){
|
||||
var rec_type = attr.substring(0,index);
|
||||
record_types.push(rec_type);
|
||||
}
|
||||
}
|
||||
return record_types;
|
||||
|
||||
}
|
||||
|
||||
var record_types = generate_recordtype_list();
|
||||
|
||||
that.init = function() {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user