summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2011-12-08 17:04:16 -0600
committerPetr Vobornik <pvoborni@redhat.com>2011-12-09 15:55:21 +0100
commitc1baebe97990a65076da02b112fe139422c44e97 (patch)
treed8d420cfa60244508335c09866b8cec1db4ba108
parent7cb39b8e33561d549c671389d38a8fa2c708ef3c (diff)
downloadfreeipa-c1baebe97990a65076da02b112fe139422c44e97.tar.gz
freeipa-c1baebe97990a65076da02b112fe139422c44e97.tar.xz
freeipa-c1baebe97990a65076da02b112fe139422c44e97.zip
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
-rw-r--r--install/ui/dns.js48
1 files changed, 27 insertions, 21 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 48020af8e..4853a9445 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -447,35 +447,41 @@ IPA.dns.record_search_facet = function(spec) {
var that = IPA.nested_search_facet(spec);
- var init = function() {
+ that.load_all = function(data) {
- that.table.load = function(result) {
+ var types = IPA.dns_record_types();
- that.table.empty();
+ var result = data.result.result;
+ var records = [];
- var types = IPA.dns_record_types();
+ for (var i=0; i<result.length; i++) {
+ var record = result[i];
- for (var i=0; i<result.length; i++) {
- var record = result[i];
+ for (var j=0; j<types.length; j++) {
+ var type = types[j];
+ if (!record[type.value]) continue;
- for (var j=0; j<types.length; j++) {
- var type = types[j].value;
- if (!record[type]) continue;
-
- var data = record[type];
- for (var k=0; k<data.length; k++) {
- that.table.add_record({
- idnsname: record.idnsname,
- type: type,
- data: data[k]
- });
- }
+ var values = record[type.value];
+ for (var k=0; k<values.length; k++) {
+ records.push({
+ idnsname: record.idnsname,
+ type: type.label,
+ data: values[k]
+ });
}
}
- };
- };
+ }
+
+ that.load_records(records);
- init();
+ 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;
};