summaryrefslogtreecommitdiffstats
path: root/install/ui/dns.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/dns.js')
-rw-r--r--install/ui/dns.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 14be46468..25addc425 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -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() {