summaryrefslogtreecommitdiffstats
path: root/install/ui/host.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-05-04 14:02:01 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-05-15 12:51:57 +0200
commit69877296dc9da05e89a8f2585165becc7bbd9c99 (patch)
tree135d3b5c8d44d610868e79dab449763d6eae5681 /install/ui/host.js
parentabbecf450f367022a2848dc55c4e809e8d94d344 (diff)
downloadfreeipa-69877296dc9da05e89a8f2585165becc7bbd9c99.tar.gz
freeipa-69877296dc9da05e89a8f2585165becc7bbd9c99.tar.xz
freeipa-69877296dc9da05e89a8f2585165becc7bbd9c99.zip
Host page fixed to work with disabled DNS support
When DNS support was disabled there were following errors in Web UI: 1) Host details page was not filled with data 2) Host adder dialog was broken -> unusable 3) DNS tab was displayed in navigation The bugs were fixed by: 1) Was caused by entity_link_widget. The widget was modified to do not show link if other_entity (in this case dnsrecord) is not present. 2) Was caused by host_fqdn_widget. The widget is unusable becouse withou DNS support it doesn't have access to DNS zone entity. The section with this widget was removed. Also IP address field was removed because it shouln't be used without DNS support. New 'fqdn' text box was added for specifying hostname. 3) New DNS config entity was initialized but it wasn't shown because it caused some JavaScript error. The dnsconfig's init method was modified to throw expected exception. Now no dns entity is initialized and therefore DNS tab in navigation is not displayed. https://fedorahosted.org/freeipa/ticket/2728
Diffstat (limited to 'install/ui/host.js')
-rw-r--r--install/ui/host.js12
1 files changed, 12 insertions, 0 deletions
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() {