summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/dns.js7
-rw-r--r--install/ui/field.js8
-rw-r--r--install/ui/host.js12
3 files changed, 27 insertions, 0 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 7b436c720..83934516a 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -33,6 +33,13 @@ IPA.dns.config_entity = function(spec) {
var that = IPA.entity(spec);
that.init = function() {
+
+ if (!IPA.dns_enabled) {
+ throw {
+ expected: true
+ };
+ }
+
that.entity_init();
that.builder.details_facet({
diff --git a/install/ui/field.js b/install/ui/field.js
index 162ec81ba..03401dffd 100644
--- a/install/ui/field.js
+++ b/install/ui/field.js
@@ -715,6 +715,14 @@ IPA.link_field = function(spec) {
that.check_entity_link = function() {
+ //In some cases other entity may not be present.
+ //For example when DNS is not configured.
+ if (!that.other_entity) {
+ that.widget.is_link = false;
+ that.widget.update(that.values);
+ return;
+ }
+
IPA.command({
entity: that.other_entity.name,
method: 'show',
diff --git a/install/ui/host.js b/install/ui/host.js
index 8c67f6361..d07d63d95 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -353,6 +353,18 @@ IPA.host_adder_dialog = function(spec) {
spec = spec || {};
spec.retry = spec.retry !== undefined ? spec.retry : false;
+ if (!IPA.dns_enabled) {
+
+ //When server is installed without DNS support, a use of host_fqdn_widget
+ //is bad because there are no DNS zones. IP address field is useless as
+ //well. Special section and IP address field should be removed and normal
+ //fqdn textbox has to be added.
+ spec.sections.shift();
+ spec.sections[0].fields.shift();
+ spec.sections[0].fields.unshift('fqdn');
+ delete spec.height;
+ }
+
var that = IPA.entity_adder_dialog(spec);
that.create = function() {