summaryrefslogtreecommitdiffstats
path: root/install/static/sudorule.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/static/sudorule.js')
-rwxr-xr-xinstall/static/sudorule.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/install/static/sudorule.js b/install/static/sudorule.js
index 60cf4d3e..f936ebcd 100755
--- a/install/static/sudorule.js
+++ b/install/static/sudorule.js
@@ -92,6 +92,20 @@ function ipa_sudorule_search_facet(spec) {
that.create = function(container) {
+ var action_panel = that.get_action_panel();
+
+ var ul = $('ul', action_panel);
+
+ $('<li/>', {
+ title: 'sudocmd',
+ text: 'SUDO Commands'
+ }).appendTo(ul);
+
+ $('<li/>', {
+ title: 'sudocmdgroup',
+ text: 'SUDO Command Groups'
+ }).appendTo(ul);
+
that.search_facet_create(container);
// TODO: replace with IPA.metadata[that.entity_name].label
@@ -101,6 +115,29 @@ function ipa_sudorule_search_facet(spec) {
};
+ that.setup = function(container) {
+
+ that.search_facet_setup(container);
+
+ var action_panel = that.get_action_panel();
+
+ var li = $('li[title=sudocmd]', action_panel);
+ li.click(function() {
+ var state = {};
+ state['sudo-entity'] = 'sudocmd';
+ nav_push_state(state);
+ return false;
+ });
+
+ li = $('li[title=sudocmdgroup]', action_panel);
+ li.click(function() {
+ var state = {};
+ state['sudo-entity'] = 'sudocmdgroup';
+ nav_push_state(state);
+ return false;
+ });
+ };
+
return that;
}