summaryrefslogtreecommitdiffstats
path: root/install/ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/src')
-rw-r--r--install/ui/src/freeipa/facet.js5
-rw-r--r--install/ui/src/freeipa/idviews.js26
2 files changed, 29 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 556b17fe7..43627d9d5 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -211,7 +211,8 @@ exp.facet = IPA.facet = function(spec, no_init) {
* Facet header
* @property {facet.facet_header}
*/
- that.header = spec.header || IPA.facet_header({ facet: that });
+ that.header = builder.build('', spec.header || {}, {},
+ { $pre_ops: [{ facet: that }], $factory: IPA.facet_header });
/**
* Hard override for `needs_update()` logic. When set, `needs_update`
@@ -1400,6 +1401,8 @@ exp.facet_header = IPA.facet_header = function(spec) {
that.load();
};
+ that.facet_header_set_pkey = that.set_pkey;
+
return that;
};
diff --git a/install/ui/src/freeipa/idviews.js b/install/ui/src/freeipa/idviews.js
index ccf5c1663..5c2562864 100644
--- a/install/ui/src/freeipa/idviews.js
+++ b/install/ui/src/freeipa/idviews.js
@@ -37,7 +37,9 @@ define([
* @class
* @singleton
*/
-var idviews = IPA.idviews = {};
+var idviews = IPA.idviews = {
+ DEFAULT_TRUST_VIEW: 'Default Trust View'
+};
var make_spec = function() {
return {
@@ -82,6 +84,7 @@ return {
},
{
$type: 'details',
+ header: idviews.idview_facet_header,
actions: [
'delete'
],
@@ -104,6 +107,7 @@ return {
{
$type: 'nested_search',
facet_group: 'overrides',
+ header: idviews.idview_facet_header,
nested_entity: 'idoverrideuser',
search_all_entries: true,
label: '@mo:idoverrideuser.label',
@@ -123,6 +127,7 @@ return {
{
$type: 'nested_search',
facet_group: 'overrides',
+ header: idviews.idview_facet_header,
nested_entity: 'idoverridegroup',
search_all_entries: true,
label: '@mo:idoverridegroup.label',
@@ -371,6 +376,25 @@ idviews.appliedtohosts_facet = function(spec, no_init) {
return that;
};
+idviews.idview_facet_header = function(spec) {
+
+ var that = mod_facet.facet_header(spec);
+
+ /**
+ * Set pkeys and hides 'appliedtohosts' facet for 'Default Trust View'
+ * @param {string} value pkey
+ */
+ that.set_pkey = function(value) {
+
+ that.facet_header_set_pkey(value);
+ var display = value === idviews.DEFAULT_TRUST_VIEW ? 'none' : '';
+ $('.facet-group[name="appliedto"]', that.facet_tabs).
+ css('display', display);
+ };
+
+ return that;
+};
+
/**
* Apply Id view on hosts on hostgroup action base class
*