mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
dns multiple records show multiple records that share the same dnsname
This commit is contained in:
parent
980848b45b
commit
7d72eb291a
@ -421,28 +421,33 @@ IPA.records_facet = function(spec) {
|
|||||||
that.set_title(this.container, title);
|
that.set_title(this.container, title);
|
||||||
};
|
};
|
||||||
|
|
||||||
that.get_record = function(result, index) {
|
|
||||||
var record = {};
|
|
||||||
|
|
||||||
|
that.get_records = function(result) {
|
||||||
|
var idnsname;
|
||||||
if (result.idnsname) {
|
if (result.idnsname) {
|
||||||
record.idnsname = result.idnsname[0];
|
idnsname = result.idnsname[0];
|
||||||
} else {
|
} 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++){
|
for (var i=0; i<record_types.length; i++){
|
||||||
var type = record_types[i];
|
var type = record_types[i];
|
||||||
var data = result[type+'record'];
|
var data = result[type+'record'] || [];
|
||||||
if (data) {
|
for (var j =0 ; j < data.length; j+=1){
|
||||||
record.type = type;
|
var record = {
|
||||||
record.data = data[0];
|
idnsname: idnsname,
|
||||||
break;
|
type : type,
|
||||||
|
data : data[j]
|
||||||
|
};
|
||||||
|
records.unshift(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return record;
|
return records;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
that.refresh = function() {
|
that.refresh = function() {
|
||||||
|
|
||||||
function on_success(data, text_status, xhr) {
|
function on_success(data, text_status, xhr) {
|
||||||
@ -451,8 +456,12 @@ IPA.records_facet = function(spec) {
|
|||||||
|
|
||||||
var result = data.result.result;
|
var result = data.result.result;
|
||||||
for (var i = 0; i<result.length; i++) {
|
for (var i = 0; i<result.length; i++) {
|
||||||
var record = that.get_record(result[i], 0);
|
var records = that.get_records(result[i]);
|
||||||
that.table.add_record(record);
|
|
||||||
|
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);
|
var summary = $('span[name=summary]', that.table.tfoot);
|
||||||
@ -509,4 +518,3 @@ IPA.records_facet = function(spec) {
|
|||||||
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,106 +1,111 @@
|
|||||||
{
|
{
|
||||||
"error": null,
|
"error": null,
|
||||||
"id": 10,
|
"id": null,
|
||||||
"result": {
|
"result": {
|
||||||
"count": 11,
|
"count": 11,
|
||||||
"result": [
|
"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": [
|
"idnsname": [
|
||||||
"@"
|
"@"
|
||||||
],
|
],
|
||||||
"nsrecord": [
|
"nsrecord": [
|
||||||
"ipa.ayoung.boston.devel.redhat.com."
|
"server15.ayoung.boston.devel.redhat.com."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arecord": [
|
"dn": "idnsname=_kerberos,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
||||||
"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",
|
|
||||||
"idnsname": [
|
|
||||||
"ipa"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dn": "idnsname=_ldap._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
|
||||||
"idnsname": [
|
|
||||||
"_ldap._tcp"
|
|
||||||
],
|
|
||||||
"srvrecord": [
|
|
||||||
"0 100 389 ipa"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dn": "idnsname=_kerberos,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
|
||||||
"idnsname": [
|
"idnsname": [
|
||||||
"_kerberos"
|
"_kerberos"
|
||||||
],
|
],
|
||||||
"txtrecord": [
|
"txtrecord": [
|
||||||
"AYOUNG.BOSTON.DEVEL.REDHAT.COM"
|
"SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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-master._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"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dn": "idnsname=_kerberos._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
|
||||||
"idnsname": [
|
|
||||||
"_kerberos._udp"
|
|
||||||
],
|
|
||||||
"srvrecord": [
|
|
||||||
"0 100 88 ipa"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"dn": "idnsname=_kerberos-master._tcp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
|
||||||
"idnsname": [
|
"idnsname": [
|
||||||
"_kerberos-master._tcp"
|
"_kerberos-master._tcp"
|
||||||
],
|
],
|
||||||
"srvrecord": [
|
"srvrecord": [
|
||||||
"0 100 88 ipa"
|
"0 100 88 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=_kerberos-master._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
||||||
"idnsname": [
|
"idnsname": [
|
||||||
"_kerberos-master._udp"
|
"_kerberos-master._udp"
|
||||||
],
|
],
|
||||||
"srvrecord": [
|
"srvrecord": [
|
||||||
"0 100 88 ipa"
|
"0 100 88 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=_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 server15"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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 server15"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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": [
|
"idnsname": [
|
||||||
"_kpasswd._tcp"
|
"_kpasswd._tcp"
|
||||||
],
|
],
|
||||||
"srvrecord": [
|
"srvrecord": [
|
||||||
"0 100 464 ipa"
|
"0 100 464 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=_kpasswd._udp,idnsname=ayoung.boston.devel.redhat.com,cn=dns,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
|
||||||
"idnsname": [
|
"idnsname": [
|
||||||
"_kpasswd._udp"
|
"_kpasswd._udp"
|
||||||
],
|
],
|
||||||
"srvrecord": [
|
"srvrecord": [
|
||||||
"0 100 464 ipa"
|
"0 100 464 server15"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dn": "idnsname=_ntp._udp,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": [
|
||||||
|
"_ldap._tcp"
|
||||||
|
],
|
||||||
|
"srvrecord": [
|
||||||
|
"0 100 389 server15"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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": [
|
"idnsname": [
|
||||||
"_ntp._udp"
|
"_ntp._udp"
|
||||||
],
|
],
|
||||||
"srvrecord": [
|
"srvrecord": [
|
||||||
"0 100 123 ipa"
|
"0 100 123 server15"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aaaarecord": [
|
||||||
|
"00::11",
|
||||||
|
"00::112"
|
||||||
|
],
|
||||||
|
"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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user