summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/src/freeipa/hbac.js38
-rw-r--r--install/ui/src/freeipa/netgroup.js35
-rw-r--r--install/ui/src/freeipa/selinux.js33
-rw-r--r--install/ui/src/freeipa/sudo.js51
4 files changed, 99 insertions, 58 deletions
diff --git a/install/ui/src/freeipa/hbac.js b/install/ui/src/freeipa/hbac.js
index 0c7b95c95..dc29fad55 100644
--- a/install/ui/src/freeipa/hbac.js
+++ b/install/ui/src/freeipa/hbac.js
@@ -24,10 +24,12 @@ define([
'./jquery',
'./phases',
'./reg',
- './details',
- './search',
'./association',
- './entity'],
+ './details',
+ './entity',
+ './rule',
+ './search'
+ ],
function(IPA, $, phases, reg) {
var exp = IPA.hbac = {
@@ -36,7 +38,7 @@ var exp = IPA.hbac = {
};
var make_rule_spec = function() {
-return {
+var spec = {
name: 'hbacrule',
facets: [
{
@@ -97,7 +99,11 @@ return {
adder_dialog: {
fields: [ 'cn' ]
}
-};};
+};
+
+ add_hbacrule_details_facet_widgets(spec.facets[1]);
+ return spec;
+};
var make_service_spec = function() {
return {
@@ -218,9 +224,10 @@ return {
}
};};
-IPA.hbacrule_details_facet = function(spec) {
-
- var entity_name = spec.entity.name;
+/**
+ * @param {Object} facet spec
+ */
+var add_hbacrule_details_facet_widgets = function (spec) {
//
// General
@@ -303,7 +310,7 @@ IPA.hbacrule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'hbacrule-memberuser_user',
name: 'memberuser_user',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -312,7 +319,7 @@ IPA.hbacrule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'hbacrule-memberuser_group',
name: 'memberuser_group',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -376,7 +383,7 @@ IPA.hbacrule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'hbacrule-memberuser_user',
name: 'memberhost_host',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -385,7 +392,7 @@ IPA.hbacrule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'hbacrule-memberuser_group',
name: 'memberhost_hostgroup',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -443,7 +450,7 @@ IPA.hbacrule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'hbacrule-memberuser_user',
name: 'memberservice_hbacsvc',
add_method: 'add_service',
remove_method: 'remove_service',
@@ -452,7 +459,7 @@ IPA.hbacrule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'hbacrule-memberuser_group',
name: 'memberservice_hbacsvcgroup',
add_method: 'add_service',
remove_method: 'remove_service',
@@ -464,6 +471,9 @@ IPA.hbacrule_details_facet = function(spec) {
]
}
);
+};
+
+IPA.hbacrule_details_facet = function(spec) {
var that = IPA.details_facet(spec);
diff --git a/install/ui/src/freeipa/netgroup.js b/install/ui/src/freeipa/netgroup.js
index 776872514..4b2de497a 100644
--- a/install/ui/src/freeipa/netgroup.js
+++ b/install/ui/src/freeipa/netgroup.js
@@ -23,10 +23,12 @@ define([
'./jquery',
'./phases',
'./reg',
- './details',
- './search',
'./association',
- './entity'],
+ './entity',
+ './details',
+ './rule',
+ './search'
+ ],
function(IPA, $, phases, reg) {
var exp = IPA.netgroup = {
@@ -35,7 +37,7 @@ var exp = IPA.netgroup = {
};
var make_spec = function() {
-return {
+var spec = {
name: 'netgroup',
facet_groups: ['settings', 'member', 'memberof'],
facets: [
@@ -67,11 +69,17 @@ return {
}
]
}
-};};
+};
-IPA.netgroup.details_facet = function(spec) {
+ add_netgroup_details_facet_widgets(spec.facets[1]);
+ return spec;
+};
- var entity_name = spec.entity.name;
+
+/**
+ * @param {Object} facet spec
+ */
+var add_netgroup_details_facet_widgets = function (spec) {
//
// Identity
@@ -161,7 +169,7 @@ IPA.netgroup.details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'netgroup-memberuser_user',
name: 'memberuser_user',
add_method: 'add_member',
remove_method: 'remove_member',
@@ -177,7 +185,7 @@ IPA.netgroup.details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'netgroup-memberuser_group',
name: 'memberuser_group',
add_method: 'add_member',
remove_method: 'remove_member',
@@ -249,7 +257,7 @@ IPA.netgroup.details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberhost_host',
+ id: 'netgroup-memberhost_host',
name: 'memberhost_host',
add_method: 'add_member',
remove_method: 'remove_member',
@@ -272,7 +280,7 @@ IPA.netgroup.details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberhost_hostgroup',
+ id: 'netgroup-memberhost_hostgroup',
name: 'memberhost_hostgroup',
add_method: 'add_member',
remove_method: 'remove_member',
@@ -291,6 +299,9 @@ IPA.netgroup.details_facet = function(spec) {
]
}
);
+};
+
+IPA.netgroup.details_facet = function(spec) {
var that = IPA.details_facet(spec);
@@ -315,5 +326,5 @@ exp.register = function() {
};
phases.on('registration', exp.register);
-return {};
+return exp;
}); \ No newline at end of file
diff --git a/install/ui/src/freeipa/selinux.js b/install/ui/src/freeipa/selinux.js
index faf0d4cb7..4eb5fbee5 100644
--- a/install/ui/src/freeipa/selinux.js
+++ b/install/ui/src/freeipa/selinux.js
@@ -23,10 +23,12 @@ define([
'./jquery',
'./phases',
'./reg',
- './details',
- './search',
'./association',
- './entity'],
+ './entity',
+ './details',
+ './rule',
+ './search'
+ ],
function(IPA, $, phases, reg) {
var exp = IPA.selinux = {
@@ -34,7 +36,7 @@ var exp = IPA.selinux = {
};
var make_spec = function() {
-return {
+var spec = {
name: 'selinuxusermap',
facets: [
{
@@ -99,11 +101,17 @@ return {
'ipaselinuxuser'
]
}
-};};
+};
-IPA.selinux_details_facet = function(spec) {
+ add_selinux_details_facet_widgets(spec.facets[1]);
+ return spec;
+};
- var entity_name = spec.entity.name;
+
+/**
+ * @param {Object} facet spec
+ */
+var add_selinux_details_facet_widgets = function (spec) {
//
// General
@@ -205,7 +213,7 @@ IPA.selinux_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'selinuxusermap-memberuser_user',
name: 'memberuser_user',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -214,7 +222,7 @@ IPA.selinux_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'selinuxusermap-memberuser_group',
name: 'memberuser_group',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -278,7 +286,7 @@ IPA.selinux_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'selinuxusermap-memberuser_user',
name: 'memberhost_host',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -287,7 +295,7 @@ IPA.selinux_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'selinuxusermap-memberuser_group',
name: 'memberhost_hostgroup',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -299,6 +307,9 @@ IPA.selinux_details_facet = function(spec) {
]
}
);
+};
+
+IPA.selinux_details_facet = function(spec) {
var that = IPA.details_facet(spec);
diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js
index d97cde300..638b2380f 100644
--- a/install/ui/src/freeipa/sudo.js
+++ b/install/ui/src/freeipa/sudo.js
@@ -24,10 +24,12 @@ define([
'./phases',
'./reg',
'./text',
- './details',
- './search',
'./association',
- './entity'],
+ './entity',
+ './details',
+ './rule',
+ './search'
+ ],
function(IPA, $, phases, reg, text) {
var exp = IPA.sudo = {
@@ -36,7 +38,7 @@ var exp = IPA.sudo = {
};
var make_rule_spec = function() {
-return {
+var spec = {
name: 'sudorule',
facets: [
{
@@ -96,7 +98,11 @@ return {
adder_dialog: {
fields: [ 'cn' ]
}
-};};
+};
+
+ add_sudorule_details_facet_widgets(spec.facets[1]);
+ return spec;
+};
var make_cmd_spec = function() {
@@ -219,9 +225,10 @@ return {
}
};};
-IPA.sudorule_details_facet = function(spec) {
-
- var entity_name = spec.entity.name;
+/**
+ * @param {Object} facet spec
+ */
+var add_sudorule_details_facet_widgets = function (spec) {
//
// General
@@ -272,8 +279,7 @@ IPA.sudorule_details_facet = function(spec) {
{
$factory: IPA.sudo.options_section,
name: 'options',
- label: '@i18n:objects.sudorule.options',
- facet: that
+ label: '@i18n:objects.sudorule.options'
}
);
@@ -329,7 +335,7 @@ IPA.sudorule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'sudorule-memberuser_user',
name: 'memberuser_user',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -339,7 +345,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'sudorule-memberuser_group',
name: 'memberuser_group',
add_method: 'add_user',
remove_method: 'remove_user',
@@ -404,7 +410,7 @@ IPA.sudorule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_user',
+ id: 'sudorule-memberuser_user',
name: 'memberhost_host',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -414,7 +420,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberuser_group',
+ id: 'sudorule-memberuser_group',
name: 'memberhost_hostgroup',
add_method: 'add_host',
remove_method: 'remove_host',
@@ -496,7 +502,7 @@ IPA.sudorule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-memberallowcmd_sudocmd',
+ id: 'sudorule-memberallowcmd_sudocmd',
name: 'memberallowcmd_sudocmd',
add_method: 'add_allow_command',
remove_method: 'remove_allow_command',
@@ -505,7 +511,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberallowcmd_sudocmdgroup',
+ id: 'sudorule-memberallowcmd_sudocmdgroup',
name: 'memberallowcmd_sudocmdgroup',
add_method: 'add_allow_command',
remove_method: 'remove_allow_command',
@@ -522,7 +528,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberdenycmd_sudocmd',
+ id: 'sudorule-memberdenycmd_sudocmd',
name: 'memberdenycmd_sudocmd',
add_method: 'add_deny_command',
remove_method: 'remove_deny_command',
@@ -531,7 +537,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-memberdenycmd_sudocmdgroup',
+ id: 'sudorule-memberdenycmd_sudocmdgroup',
name: 'memberdenycmd_sudocmdgroup',
add_method: 'add_deny_command',
remove_method: 'remove_deny_command',
@@ -600,7 +606,7 @@ IPA.sudorule_details_facet = function(spec) {
widgets: [
{
$type: 'rule_association_table',
- id: entity_name+'-runasruser_user',
+ id: 'sudorule-runasruser_user',
name: 'ipasudorunas_user',
external: 'ipasudorunasextuser',
add_method: 'add_runasuser',
@@ -610,7 +616,7 @@ IPA.sudorule_details_facet = function(spec) {
},
{
$type: 'rule_association_table',
- id: entity_name+'-runasuser_group',
+ id: 'sudorule-runasuser_group',
name: 'ipasudorunas_group',
add_method: 'add_runasuser',
remove_method: 'remove_runasuser',
@@ -632,7 +638,7 @@ IPA.sudorule_details_facet = function(spec) {
],
widgets: [{
$type: 'rule_association_table',
- id: entity_name+'-runasgroup_group',
+ id: 'sudorule-runasgroup_group',
name: 'ipasudorunasgroup_group',
external: 'ipasudorunasextgroup',
add_method: 'add_runasgroup',
@@ -644,6 +650,9 @@ IPA.sudorule_details_facet = function(spec) {
]
}
);
+};
+
+IPA.sudorule_details_facet = function(spec) {
var that = IPA.details_facet(spec);