summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Voborník <pvoborni@redhat.com>2012-02-15 15:00:16 +0100
committerPetr Vobornik <pvoborni@redhat.com>2012-02-29 13:07:22 +0100
commit335c4ff116441cc1062ea90fadf2e3739e75f8fe (patch)
tree0977608b76b46889271181f3cfe2eca07ddecc39
parentc19b9eee5b65284d152346479f1fe3ebb765b3cd (diff)
downloadfreeipa.git-335c4ff116441cc1062ea90fadf2e3739e75f8fe.tar.gz
freeipa.git-335c4ff116441cc1062ea90fadf2e3739e75f8fe.tar.xz
freeipa.git-335c4ff116441cc1062ea90fadf2e3739e75f8fe.zip
New UI for DNS global configuration
UI for DNS global configuration was implemented. https://fedorahosted.org/freeipa/ticket/2350
-rw-r--r--install/ui/dns.js30
-rw-r--r--install/ui/navigation.js4
-rw-r--r--install/ui/test/data/dnsconfig_mod.json32
-rw-r--r--install/ui/test/data/dnsconfig_show.json33
-rw-r--r--install/ui/test/data/ipa_init.json3
-rw-r--r--install/ui/webui.js13
-rw-r--r--ipalib/plugins/internal.py3
7 files changed, 109 insertions, 9 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 13fba5b1..c849eeca 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -28,6 +28,35 @@
IPA.dns = {};
+IPA.dns.config_entity = function(spec) {
+
+ var that = IPA.entity(spec);
+
+ that.init = function() {
+ that.entity_init();
+
+ that.builder.details_facet({
+ title: IPA.metadata.objects.config.label,
+ sections: [
+ {
+ name: 'options',
+ label: IPA.messages.objects.dnsconfig.options,
+ fields: [
+ {
+ type: 'multivalued',
+ name: 'idnsforwarders',
+ validators: [IPA.ip_address_validator()]
+ }
+ ]
+ }
+ ],
+ needs_update: true
+ });
+ };
+
+ return that;
+};
+
IPA.dns.zone_entity = function(spec) {
var that = IPA.entity(spec);
@@ -2242,5 +2271,6 @@ IPA.network_validator = function(spec) {
return that;
};
+IPA.register('dnsconfig', IPA.dns.config_entity);
IPA.register('dnszone', IPA.dns.zone_entity);
IPA.register('dnsrecord', IPA.dns.record_entity);
diff --git a/install/ui/navigation.js b/install/ui/navigation.js
index 72c91426..a4ad2898 100644
--- a/install/ui/navigation.js
+++ b/install/ui/navigation.js
@@ -408,8 +408,8 @@ IPA.navigation = function(spec) {
container.tabs('select', index);
var tab = tabs[index];
- if (tab.hidden) {
- depth--;
+ if (tab.depth !== undefined) {
+ depth += tab.depth;
}
if (tab.children && tab.children.length) {
diff --git a/install/ui/test/data/dnsconfig_mod.json b/install/ui/test/data/dnsconfig_mod.json
new file mode 100644
index 00000000..e82e0735
--- /dev/null
+++ b/install/ui/test/data/dnsconfig_mod.json
@@ -0,0 +1,32 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "result": {
+ "attributelevelrights": {
+ "aci": "rscwo",
+ "cn": "rscwo",
+ "idnsallowsyncptr": "rscwo",
+ "idnsforwarders": "rscwo",
+ "idnsforwardpolicy": "rscwo",
+ "idnspersistentsearch": "rscwo",
+ "idnszonerefresh": "rscwo",
+ "nsaccountlock": "rscwo",
+ "objectclass": "rscwo"
+ },
+ "cn": [
+ "dns"
+ ],
+ "idnsforwarders": [
+ "2001:beef::1"
+ ],
+ "objectclass": [
+ "idnsConfigObject",
+ "nsContainer",
+ "top"
+ ]
+ },
+ "summary": null,
+ "value": ""
+ }
+} \ No newline at end of file
diff --git a/install/ui/test/data/dnsconfig_show.json b/install/ui/test/data/dnsconfig_show.json
new file mode 100644
index 00000000..e663abcc
--- /dev/null
+++ b/install/ui/test/data/dnsconfig_show.json
@@ -0,0 +1,33 @@
+{
+ "error": null,
+ "id": null,
+ "result": {
+ "result": {
+ "attributelevelrights": {
+ "aci": "rscwo",
+ "cn": "rscwo",
+ "idnsallowsyncptr": "rscwo",
+ "idnsforwarders": "rscwo",
+ "idnsforwardpolicy": "rscwo",
+ "idnspersistentsearch": "rscwo",
+ "idnszonerefresh": "rscwo",
+ "nsaccountlock": "rscwo",
+ "objectclass": "rscwo"
+ },
+ "cn": [
+ "dns"
+ ],
+ "dn": "cn=dns,dc=dev,dc=example,dc=com",
+ "idnsforwarders": [
+ "2001:beef::1"
+ ],
+ "objectclass": [
+ "idnsConfigObject",
+ "nsContainer",
+ "top"
+ ]
+ },
+ "summary": null,
+ "value": ""
+ }
+} \ No newline at end of file
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 8e07dbc9..f0789d07 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -183,6 +183,9 @@
"user": "User Options"
},
"delegation": {},
+ "dnsconfig": {
+ "options": "Options"
+ },
"dnsrecord": {
"data": "Data",
"deleted_no_data": "DNS record was deleted because it contained no data.",
diff --git a/install/ui/webui.js b/install/ui/webui.js
index 6850ff5a..b8394d28 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -40,10 +40,9 @@ IPA.admin_navigation = function(spec) {
{entity: 'hostgroup'},
{entity: 'netgroup'},
{entity: 'service'},
- {name:'dns',
- label: IPA.messages.tabs.dns,
- children:[
- {entity: 'dnszone', hidden:true},
+ {name:'dns', label: IPA.messages.tabs.dns, children:[
+ {entity: 'dnszone'},
+ {entity: 'dnsconfig'},
{entity: 'dnsrecord', hidden:true}
]
}
@@ -63,9 +62,9 @@ IPA.admin_navigation = function(spec) {
{name:'automount',
label: IPA.messages.tabs.automount,
children:[
- {entity: 'automountlocation', hidden:true},
- {entity: 'automountmap', hidden: true},
- {entity: 'automountkey', hidden: true}]},
+ {entity: 'automountlocation', hidden:true, depth: -1},
+ {entity: 'automountmap', hidden: true, depth: -1},
+ {entity: 'automountkey', hidden: true, depth: -1}]},
{entity: 'pwpolicy'},
{entity: 'krbtpolicy'},
{entity: 'selinuxusermap'},
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 11c6bd0f..2ee4316f 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -320,6 +320,9 @@ class i18n_messages(Command):
},
"delegation": {
},
+ "dnsconfig": {
+ "options": _("Options"),
+ },
"dnsrecord": {
"data": _("Data"),
"deleted_no_data": _("DNS record was deleted because it contained no data."),