From ccae52028bdea318229d343aed6c3b5bd14fb184 Mon Sep 17 00:00:00 2001
From: Adam Young
Date: Fri, 11 Feb 2011 20:40:01 -0500
Subject: [PATCH] DNS record search
The current version of the DNS Plugin does not support searching by record, so that is commented out.
The search field wasn't working either. The search criteria had to be appended to the params array, just after the zone.
https://fedorahosted.org/freeipa/ticket/907
---
install/ui/policy.js | 27 ++-
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/install/ui/policy.js b/install/ui/policy.js
index 4e92e7ea6a5b3d6983e1ae3d0268f8677355ca08..f7e4761a3c6c0e73bc417ded0ac60cf83683bc59 100644
--- a/install/ui/policy.js
+++ b/install/ui/policy.js
@@ -293,11 +293,16 @@ IPA.records_facet = function (spec){
name: 'search-' + that.entity_name + '-filter'
}));
-control_span.append('Type');
-
-create_type_select('dns-record-type-filter',true).
-appendTo(control_span);
+/*
+ THe OLD DNS plugin allowed for search based on record type.
+ This one does not. If the plugin gets modified to support
+ Record type searches, uncomment the followin lines and
+ adjust the code that modifies the search parameters.
+ control_span.append('Type');
+ create_type_select('dns-record-type-filter',true).
+ appendTo(control_span);
+*/
IPA.button({
'label': IPA.messages.button.find,
@@ -399,9 +404,9 @@ IPA.records_facet = function (spec){
var resource_filter = that.container.
find("#dns-record-resource-filter").val();
-if (resource_filter){
-options.idnsname = resource_filter;
-}
+//if (resource_filter){
+//options.idnsname = resource_filter;
+//}
var type_filter = that.container.find("#dns-record-type-filter").val();
if (type_filter){
@@ -413,8 +418,12 @@ IPA.records_facet = function (spec){
options.data = data_filter;
}
-var pkey = $.bbq.getState(that.entity_name + '-pkey', true);
-IPA.cmd('dnsrecord_find',[pkey],options,load_on_win, load_on_fail);
+var pkey = [$.bbq.getState(that.entity_name + '-pkey', true)];
+
+if (resource_filter){
+pkey.push(resource_filter);
+}
+IPA.cmd('dnsrecord_find',pkey,options,load_on_win, load_on_fail);
}
--
1.7.3.5
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel