mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
dns visible if enabled
use the result of the is_dns_enabled command to show or hid the dns tab Also, Javascript lint cleanup from recent patches.
This commit is contained in:
@@ -434,7 +434,7 @@ IPA.nested_tabs = function(entity_name){
|
||||
IPA.nested_tab_labels[entity_name] =
|
||||
top_tab.children[subtab_index].label;
|
||||
if (top_tab.children[subtab_index].children){
|
||||
label = top_tab.children[subtab_index].label
|
||||
label = top_tab.children[subtab_index].label;
|
||||
nested_entities = top_tab.children[subtab_index].children;
|
||||
for ( nested_index = 0;
|
||||
nested_index < nested_entities.length;
|
||||
|
||||
@@ -95,6 +95,7 @@ var IPA = ( function () {
|
||||
that.messages = data.result.results[1].messages;
|
||||
that.whoami = data.result.results[2].result[0];
|
||||
that.env = data.result.results[3].result;
|
||||
that.dns_enabled = data.result.results[4].result;
|
||||
if (on_success) {
|
||||
on_success(data, text_status, xhr);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
IPA.admin_tab_set = function () {
|
||||
return [
|
||||
var tabset = [
|
||||
{name:'identity', label: IPA.messages.tabs.identity, children:[
|
||||
{name:'user', entity:'user'},
|
||||
{name:'group', entity:'group'},
|
||||
@@ -37,7 +37,6 @@ IPA.admin_tab_set = function () {
|
||||
{name:'service', entity:'service'}
|
||||
]},
|
||||
{name:'policy', label: IPA.messages.tabs.policy, children:[
|
||||
{name:'dnszone', entity:'dnszone'},
|
||||
{name:'hbacrule', label: IPA.messages.tabs.hbac ,
|
||||
entity:'hbacrule', children:[
|
||||
{name:'hbacsvc', entity:'hbacsvc'},
|
||||
@@ -60,6 +59,14 @@ IPA.admin_tab_set = function () {
|
||||
{name:'delegation' ,entity:'delegation'},
|
||||
{name:'config', entity:'config'}
|
||||
]}];
|
||||
|
||||
if (IPA.dns_enabled){
|
||||
tabset[1].children.unshift(
|
||||
{name:'dnszone', entity:'dnszone'}
|
||||
);
|
||||
}
|
||||
|
||||
return tabset;
|
||||
};
|
||||
|
||||
IPA.self_serv_tab_set = function(){
|
||||
@@ -139,7 +146,7 @@ $(function() {
|
||||
IPA.tab_set = IPA.admin_tab_set();
|
||||
nav_create(IPA.tab_set, navigation, 'tabs');
|
||||
} else {
|
||||
IPA.tab_set = self_serv_tab_set();
|
||||
IPA.tab_set = IPA.self_serv_tab_set();
|
||||
nav_create(IPA.tab_set, navigation, 'tabs');
|
||||
|
||||
var state = {'user-pkey':IPA.whoami_pkey ,
|
||||
|
||||
Reference in New Issue
Block a user