summaryrefslogtreecommitdiffstats
path: root/install/ui/dns.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/dns.js')
-rw-r--r--install/ui/dns.js34
1 files changed, 33 insertions, 1 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index bba1e5cbf..7cef5ae72 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -265,7 +265,17 @@ IPA.entity_factories.dnsrecord = function() {
return IPA.entity_builder().
entity('dnsrecord').
containing_entity('dnszone').
- details_facet({
+ details_facet({
+ post_update_hook:function(data){
+ var result = data.result.result;
+ if (result.idnsname) {
+ this.load(result);
+ } else {
+ this.reset();
+ var dialog = IPA.dnsrecord_redirection_dialog();
+ dialog.open(this.container);
+ }
+ },
disable_breadcrumb: false,
sections:[
{
@@ -424,6 +434,28 @@ IPA.entity_factories.dnsrecord = function() {
build();
};
+IPA.dnsrecord_redirection_dialog = function(spec) {
+ spec = spec || {};
+ spec.title = spec.title || IPA.messages.dialogs.redirection;
+
+ var that = IPA.dialog(spec);
+
+ that.create = function() {
+ $('<p/>', {
+ 'text': IPA.messages.objects.dnsrecord.deleted_no_data
+ }).appendTo(that.container);
+ $('<p/>', {
+ 'text': IPA.messages.objects.dnsrecord.redirection_dnszone
+ }).appendTo(that.container);
+ };
+
+ that.add_button(IPA.messages.buttons.ok, function() {
+ that.close();
+ IPA.nav.show_page('dnszone','default');
+ });
+ return that;
+};
+
IPA.dnsrecord_host_link_widget = function(spec){
var that = IPA.entity_link_widget(spec);
that.other_pkeys = function(){