summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-06-14 12:34:56 -0400
committerEndi S. Dewata <edewata@redhat.com>2011-06-14 23:28:19 +0000
commit7d72eb291a89f8fef372905df5fbb051f15be1c9 (patch)
tree2ad62d6dc8a5d9d20228bd78eb46483c8278a226 /install
parent980848b45bb42fc828d52d0af231211c8393d9e9 (diff)
downloadfreeipa-7d72eb291a89f8fef372905df5fbb051f15be1c9.tar.gz
freeipa-7d72eb291a89f8fef372905df5fbb051f15be1c9.tar.xz
freeipa-7d72eb291a89f8fef372905df5fbb051f15be1c9.zip
dns multiple records show multiple records that share the same dnsname
Diffstat (limited to 'install')
-rw-r--r--install/ui/dns.js34
-rw-r--r--install/ui/test/data/dnsrecord_find.json79
2 files changed, 63 insertions, 50 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 55feaa034..1d6b81813 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -421,28 +421,33 @@ IPA.records_facet = function(spec) {
that.set_title(this.container, title);
};
- that.get_record = function(result, index) {
- var record = {};
+ that.get_records = function(result) {
+ var idnsname;
if (result.idnsname) {
- record.idnsname = result.idnsname[0];
+ idnsname = result.idnsname[0];
} else {
- record.idnsname = result.dn.split(',')[0].split('=')[1];
+ idnsname = result.dn.split(',')[0].split('=')[1];
}
+ var records = [];
for (var i=0; i<record_types.length; i++){
var type = record_types[i];
- var data = result[type+'record'];
- if (data) {
- record.type = type;
- record.data = data[0];
- break;
+ var data = result[type+'record'] || [];
+ for (var j =0 ; j < data.length; j+=1){
+ var record = {
+ idnsname: idnsname,
+ type : type,
+ data : data[j]
+ };
+ records.unshift(record);
}
}
- return record;
+ return records;
};
+
that.refresh = function() {
function on_success(data, text_status, xhr) {
@@ -451,8 +456,12 @@ IPA.records_facet = function(spec) {
var result = data.result.result;
for (var i = 0; i<result.length; i++) {
- var record = that.get_record(result[i], 0);
- that.table.add_record(record);
+ var records = that.get_records(result[i]);
+
+ for (var j =0; j < records.length; j +=1){
+ var record = records[j];
+ that.table.add_record(record);
+ }
}
var summary = $('span[name=summary]', that.table.tfoot);
@@ -509,4 +518,3 @@ IPA.records_facet = function(spec) {
return that;
};
-
diff --git a/install/ui/test/data/dnsrecord_find.json b/install/ui/test/data/dnsrecord_find.json
index 1d64b3abb..fa103d109 100644
--- a/install/ui/test/data/dnsrecord_find.json
+++ b/install/ui/test/data/dnsrecord_find.json
@@ -1,110 +1,115 @@
{
"error": null,
- "id": 10,
+ "id": null,
"result": {
"count": 11,
"result": [
{
- "dn": "idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
"@"
],
"nsrecord": [
- "ipa.ayoung.boston.devel.redhat.com."
+ "server15.ayoung.boston.devel.redhat.com."
]
},
{
- "arecord": [
- "192.168.122.81"
- ],
- "dn": "idnsname=ipa,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kerberos,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "ipa"
+ "_kerberos"
+ ],
+ "txtrecord": [
+ "SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM"
]
},
{
- "dn": "idnsname=_ldap._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kerberos-master._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_ldap._tcp"
+ "_kerberos-master._tcp"
],
"srvrecord": [
- "0 100 389 ipa"
+ "0 100 88 server15"
]
},
{
- "dn": "idnsname=_kerberos,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kerberos-master._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_kerberos"
+ "_kerberos-master._udp"
],
- "txtrecord": [
- "AYOUNG.BOSTON.DEVEL.REDHAT.COM"
+ "srvrecord": [
+ "0 100 88 server15"
]
},
{
- "dn": "idnsname=_kerberos._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kerberos._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
"_kerberos._tcp"
],
"srvrecord": [
- "0 100 88 ipa"
+ "0 100 88 server15"
]
},
{
- "dn": "idnsname=_kerberos._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kerberos._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
"_kerberos._udp"
],
"srvrecord": [
- "0 100 88 ipa"
+ "0 100 88 server15"
]
},
{
- "dn": "idnsname=_kerberos-master._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kpasswd._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_kerberos-master._tcp"
+ "_kpasswd._tcp"
],
"srvrecord": [
- "0 100 88 ipa"
+ "0 100 464 server15"
]
},
{
- "dn": "idnsname=_kerberos-master._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_kpasswd._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_kerberos-master._udp"
+ "_kpasswd._udp"
],
"srvrecord": [
- "0 100 88 ipa"
+ "0 100 464 server15"
]
},
{
- "dn": "idnsname=_kpasswd._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_ldap._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_kpasswd._tcp"
+ "_ldap._tcp"
],
"srvrecord": [
- "0 100 464 ipa"
+ "0 100 389 server15"
]
},
{
- "dn": "idnsname=_kpasswd._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "dn": "idnsname=_ntp._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
"idnsname": [
- "_kpasswd._udp"
+ "_ntp._udp"
],
"srvrecord": [
- "0 100 464 ipa"
+ "0 100 123 server15"
]
},
{
- "dn": "idnsname=_ntp._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
- "idnsname": [
- "_ntp._udp"
+ "aaaarecord": [
+ "00::11",
+ "00::112"
],
- "srvrecord": [
- "0 100 123 ipa"
+ "arecord": [
+ "192.168.122.28",
+ "1.2.3.4"
+ ],
+ "dn": "idnsname=server15,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+ "idnsname": [
+ "server15"
]
}
],
"summary": null,
"truncated": false
}
-} \ No newline at end of file
+}