summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-06-28 12:02:48 -0400
committerEndi S. Dewata <edewata@redhat.com>2011-06-28 18:10:02 +0000
commitacc00afa4c0024f0a1edbb7bfa9295dad163568d (patch)
treed44d849ac138e932a1cf9b75c2792b96f02ee657 /install
parent9837bb0d10466332b486ceb958ba30dc431440d7 (diff)
downloadfreeipa-acc00afa4c0024f0a1edbb7bfa9295dad163568d.tar.gz
freeipa-acc00afa4c0024f0a1edbb7bfa9295dad163568d.tar.xz
freeipa-acc00afa4c0024f0a1edbb7bfa9295dad163568d.zip
Generate record type list from metadata https://fedorahosted.org/freeipa/ticket/945
now matches record at the end of the string
Diffstat (limited to 'install')
-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() {