mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed problem loading DNS records.
The DNS records list page was not loaded correctly due to a recent change in HBAC Test. The page has been updated to use the load_all() to show all records in the zone. Ticket #388
This commit is contained in:
committed by
Petr Vobornik
parent
7cb39b8e33
commit
c1baebe979
@@ -447,35 +447,41 @@ IPA.dns.record_search_facet = function(spec) {
|
||||
|
||||
var that = IPA.nested_search_facet(spec);
|
||||
|
||||
var init = function() {
|
||||
|
||||
that.table.load = function(result) {
|
||||
|
||||
that.table.empty();
|
||||
that.load_all = function(data) {
|
||||
|
||||
var types = IPA.dns_record_types();
|
||||
|
||||
var result = data.result.result;
|
||||
var records = [];
|
||||
|
||||
for (var i=0; i<result.length; i++) {
|
||||
var record = result[i];
|
||||
|
||||
for (var j=0; j<types.length; j++) {
|
||||
var type = types[j].value;
|
||||
if (!record[type]) continue;
|
||||
var type = types[j];
|
||||
if (!record[type.value]) continue;
|
||||
|
||||
var data = record[type];
|
||||
for (var k=0; k<data.length; k++) {
|
||||
that.table.add_record({
|
||||
var values = record[type.value];
|
||||
for (var k=0; k<values.length; k++) {
|
||||
records.push({
|
||||
idnsname: record.idnsname,
|
||||
type: type,
|
||||
data: data[k]
|
||||
type: type.label,
|
||||
data: values[k]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
init();
|
||||
that.load_records(records);
|
||||
|
||||
if (data.result.truncated) {
|
||||
var message = IPA.messages.search.truncated;
|
||||
message = message.replace('${counter}', data.result.count);
|
||||
that.table.summary.text(message);
|
||||
} else {
|
||||
that.table.summary.text(data.result.summary);
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user