Browse Source

HUE-6678 [security] Avoid namespacing events

Enrico Berti 8 years ago
parent
commit
f85a5e81c1

+ 9 - 9
apps/security/src/security/static/security/js/hdfs.ko.js

@@ -155,7 +155,7 @@ var HdfsViewModel = (function () {
 
 
     self.afterRender = function () {
     self.afterRender = function () {
       if (!self.fromLoadMore && !self.fromRebuildTree) {
       if (!self.fromLoadMore && !self.fromRebuildTree) {
-        $(document).trigger("rendered.tree");
+        $(document).trigger("renderedTree");
       }
       }
       self.fromLoadMore = false;
       self.fromLoadMore = false;
       self.fromRebuildTree = false;
       self.fromRebuildTree = false;
@@ -399,7 +399,7 @@ var HdfsViewModel = (function () {
             self.convertItemToObject(_item);
             self.convertItemToObject(_item);
           }
           }
         });
         });
-        $(document).trigger("loaded.parents");
+        $(document).trigger("loadedParents");
       }
       }
     }
     }
 
 
@@ -487,7 +487,7 @@ var HdfsViewModel = (function () {
           self.owner(data.owner);
           self.owner(data.owner);
           self.group(data.group);
           self.group(data.group);
           self.isLoadingAcls(false);
           self.isLoadingAcls(false);
-          $(document).trigger("loaded.acls");
+          $(document).trigger("loadedAcls");
         }
         }
       }).fail(function (xhr, textStatus, errorThrown) {
       }).fail(function (xhr, textStatus, errorThrown) {
         if (xhr.responseText.search('FileNotFoundException') == -1) { // TODO only fetch on existing path
         if (xhr.responseText.search('FileNotFoundException') == -1) { // TODO only fetch on existing path
@@ -518,7 +518,7 @@ var HdfsViewModel = (function () {
               self.acls.remove(item);
               self.acls.remove(item);
             });
             });
             self.refreshTree();
             self.refreshTree();
-            $(document).trigger("updated.acls");
+            $(document).trigger("updatedAcls");
           }
           }
       ).fail(function (xhr, textStatus, errorThrown) {
       ).fail(function (xhr, textStatus, errorThrown) {
          $(document).trigger("error", JSON.parse(xhr.responseText).message);
          $(document).trigger("error", JSON.parse(xhr.responseText).message);
@@ -557,7 +557,7 @@ var HdfsViewModel = (function () {
               self.acls.removeAll();
               self.acls.removeAll();
             }
             }
             self.refreshTree();
             self.refreshTree();
-            $(document).trigger("deleted.bulk.acls");
+            $(document).trigger("deletedBulkAcls");
           }
           }
       ).fail(function (xhr, textStatus, errorThrown) {
       ).fail(function (xhr, textStatus, errorThrown) {
         $(document).trigger("error", JSON.parse(xhr.responseText).message);
         $(document).trigger("error", JSON.parse(xhr.responseText).message);
@@ -577,7 +577,7 @@ var HdfsViewModel = (function () {
             'recursive': ko.mapping.toJSON(self.recursive())
             'recursive': ko.mapping.toJSON(self.recursive())
           }, function (data) {
           }, function (data) {
             self.refreshTree();
             self.refreshTree();
-            $(document).trigger("added.bulk.acls");
+            $(document).trigger("addedBulkAcls");
           }
           }
       ).fail(function (xhr, textStatus, errorThrown) {
       ).fail(function (xhr, textStatus, errorThrown) {
         $(document).trigger("error", JSON.parse(xhr.responseText).message);
         $(document).trigger("error", JSON.parse(xhr.responseText).message);
@@ -597,7 +597,7 @@ var HdfsViewModel = (function () {
             'recursive': ko.mapping.toJSON(self.recursive())
             'recursive': ko.mapping.toJSON(self.recursive())
           }, function (data) {
           }, function (data) {
             self.refreshTree();
             self.refreshTree();
-            $(document).trigger("syncd.bulk.acls");
+            $(document).trigger("syncdBulkAcls");
           }
           }
       ).fail(function (xhr, textStatus, errorThrown) {
       ).fail(function (xhr, textStatus, errorThrown) {
          $(document).trigger("error", JSON.parse(xhr.responseText).message);
          $(document).trigger("error", JSON.parse(xhr.responseText).message);
@@ -636,7 +636,7 @@ var HdfsViewModel = (function () {
     self.init = function (path) {
     self.init = function (path) {
       self.fetchUsers();
       self.fetchUsers();
       self.assist.path(path);
       self.assist.path(path);
-      $(document).one("loaded.parents", function () {
+      $(document).one("loadedParents", function () {
         self.assist.isLoadingTree(true);
         self.assist.isLoadingTree(true);
         var _paths = self.assist.rebuildTree(self.assist.growingTree().nodes[0], []);
         var _paths = self.assist.rebuildTree(self.assist.growingTree().nodes[0], []);
         _paths.forEach(function (ipath, cnt) {
         _paths.forEach(function (ipath, cnt) {
@@ -662,7 +662,7 @@ var HdfsViewModel = (function () {
       }, function (data) {
       }, function (data) {
         self.availableHadoopUsers(data.users);
         self.availableHadoopUsers(data.users);
         self.availableHadoopGroups(data.groups);
         self.availableHadoopGroups(data.groups);
-        $(document).trigger("loaded.users");
+        $(document).trigger("loadedUsers");
       });
       });
     }
     }
   };
   };

+ 16 - 16
apps/security/src/security/static/security/js/hive.ko.js

@@ -158,7 +158,7 @@ var HiveViewModel = (function () {
       if (_found) {
       if (_found) {
         vm.role().isEditing(true);
         vm.role().isEditing(true);
         vm.list_sentry_privileges_by_role(vm.role());
         vm.list_sentry_privileges_by_role(vm.role());
-        $(document).trigger("destroy.typeahead");
+        $(document).trigger("destroyTypeahead");
       }
       }
     });
     });
     self.selected = ko.observable(false);
     self.selected = ko.observable(false);
@@ -294,7 +294,7 @@ var HiveViewModel = (function () {
             role.showPrivileges(true);
             role.showPrivileges(true);
             vm.originalRoles.unshift(role);
             vm.originalRoles.unshift(role);
             vm.list_sentry_privileges_by_authorizable();
             vm.list_sentry_privileges_by_authorizable();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -317,7 +317,7 @@ var HiveViewModel = (function () {
             $(document).trigger("info", data.message);
             $(document).trigger("info", data.message);
             vm.showCreateRole(false);
             vm.showCreateRole(false);
             vm.list_sentry_privileges_by_authorizable();
             vm.list_sentry_privileges_by_authorizable();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -338,7 +338,7 @@ var HiveViewModel = (function () {
         if (data.status == 0) {
         if (data.status == 0) {
           vm.removeRole(role.name());
           vm.removeRole(role.name());
           vm.list_sentry_privileges_by_authorizable();
           vm.list_sentry_privileges_by_authorizable();
-          $(document).trigger("removed.role");
+          $(document).trigger("removedRole");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -356,7 +356,7 @@ var HiveViewModel = (function () {
       }, function (data) {
       }, function (data) {
         if (data.status == 0) {
         if (data.status == 0) {
           vm.list_sentry_privileges_by_authorizable();
           vm.list_sentry_privileges_by_authorizable();
-          $(document).trigger("created.role");
+          $(document).trigger("createdRole");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -642,7 +642,7 @@ var HiveViewModel = (function () {
       }
       }
 
 
       self.path(obj.path());
       self.path(obj.path());
-      $(document).trigger("changed.path");
+      $(document).trigger("changedPath");
 
 
       if (self.getTreeAdditionalDataForPath(obj.path()).loaded) {
       if (self.getTreeAdditionalDataForPath(obj.path()).loaded) {
         if (typeof skipListAuthorizable == "undefined" || !skipListAuthorizable) {
         if (typeof skipListAuthorizable == "undefined" || !skipListAuthorizable) {
@@ -813,7 +813,7 @@ var HiveViewModel = (function () {
     };
     };
 
 
     self.afterRender = function () {
     self.afterRender = function () {
-      $(document).trigger("rendered.tree");
+      $(document).trigger("renderedTree");
     }
     }
   }
   }
 
 
@@ -882,7 +882,7 @@ var HiveViewModel = (function () {
     self.resetCreateRole = function () {
     self.resetCreateRole = function () {
       self.roles(self.originalRoles());
       self.roles(self.originalRoles());
       self.role(new Role(self, {}));
       self.role(new Role(self, {}));
-      $(document).trigger("create.typeahead");
+      $(document).trigger("createTypeahead");
     };
     };
 
 
     self.deletePrivilegeModal = function (role) {
     self.deletePrivilegeModal = function (role) {
@@ -948,7 +948,7 @@ var HiveViewModel = (function () {
       ko.utils.arrayForEach(self.selectedRoles(), function (role) {
       ko.utils.arrayForEach(self.selectedRoles(), function (role) {
         role.remove(role);
         role.remove(role);
       });
       });
-      $(document).trigger("deleted.role");
+      $(document).trigger("deletedRole");
     };
     };
 
 
     self.expandSelectedRoles = function () {
     self.expandSelectedRoles = function () {
@@ -1032,7 +1032,7 @@ var HiveViewModel = (function () {
     }
     }
 
 
     self.showRole = function (role) {
     self.showRole = function (role) {
-      $(document).trigger("show.role", role);
+      $(document).trigger("showRole", role);
       ko.utils.arrayForEach(self.filteredRoles(), function (r) {
       ko.utils.arrayForEach(self.filteredRoles(), function (r) {
         if (r.name() == role.name()) {
         if (r.name() == role.name()) {
           self.list_sentry_privileges_by_role(r);
           self.list_sentry_privileges_by_role(r);
@@ -1119,7 +1119,7 @@ var HiveViewModel = (function () {
             $(document).trigger("info", data.message);
             $(document).trigger("info", data.message);
             self.assist.refreshTree();
             self.assist.refreshTree();
             self.clearTempRoles();
             self.clearTempRoles();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -1232,7 +1232,7 @@ var HiveViewModel = (function () {
         if (data.status == 0) {
         if (data.status == 0) {
           if (norefresh == undefined) {
           if (norefresh == undefined) {
             self.list_sentry_privileges_by_authorizable(); // Refresh
             self.list_sentry_privileges_by_authorizable(); // Refresh
-            $(document).trigger("deleted.bulk.privileges");
+            $(document).trigger("deletedBulkPrivileges");
           }
           }
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
@@ -1253,7 +1253,7 @@ var HiveViewModel = (function () {
       }, function (data) {
       }, function (data) {
         if (data.status == 0) {
         if (data.status == 0) {
           self.list_sentry_privileges_by_authorizable(); // Refresh
           self.list_sentry_privileges_by_authorizable(); // Refresh
-          $(document).trigger("added.bulk.privileges");
+          $(document).trigger("addedBulkPrivileges");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -1280,7 +1280,7 @@ var HiveViewModel = (function () {
       $.getJSON('/desktop/api/users/autocomplete', data, function (data) {
       $.getJSON('/desktop/api/users/autocomplete', data, function (data) {
         self.availableHadoopUsers(data.users);
         self.availableHadoopUsers(data.users);
         self.availableHadoopGroups(data.groups);
         self.availableHadoopGroups(data.groups);
-        $(document).trigger("loaded.users");
+        $(document).trigger("loadedUsers");
       });
       });
     }
     }
 
 
@@ -1337,10 +1337,10 @@ var HiveViewModel = (function () {
     self.linkToBrowse = function (path) {
     self.linkToBrowse = function (path) {
       self.assist.path(path);
       self.assist.path(path);
       self.updatePathHash(path);
       self.updatePathHash(path);
-      $(document).trigger("changed.path");
+      $(document).trigger("changedPath");
       self.assist.loadParents();
       self.assist.loadParents();
       self.updateSectionHash("edit");
       self.updateSectionHash("edit");
-      $(document).trigger("show.mainSection");
+      $(document).trigger("showMainSection");
     }
     }
   };
   };
 
 

+ 16 - 16
apps/security/src/security/static/security/js/sentry.ko.js

@@ -178,7 +178,7 @@ var SentryViewModel = (function () {
       if (_found) {
       if (_found) {
         vm.role().isEditing(true);
         vm.role().isEditing(true);
         vm.list_sentry_privileges_by_role(vm.role());
         vm.list_sentry_privileges_by_role(vm.role());
-        $(document).trigger("destroy.typeahead");
+        $(document).trigger("destroyTypeahead");
       }
       }
     });
     });
     self.selected = ko.observable(false);
     self.selected = ko.observable(false);
@@ -310,7 +310,7 @@ var SentryViewModel = (function () {
             role.showPrivileges(true);
             role.showPrivileges(true);
             vm.originalRoles.unshift(role);
             vm.originalRoles.unshift(role);
             vm.list_sentry_privileges_by_authorizable();
             vm.list_sentry_privileges_by_authorizable();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -331,7 +331,7 @@ var SentryViewModel = (function () {
             $(document).trigger("info", data.message);
             $(document).trigger("info", data.message);
             vm.showCreateRole(false);
             vm.showCreateRole(false);
             vm.list_sentry_privileges_by_authorizable();
             vm.list_sentry_privileges_by_authorizable();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -350,7 +350,7 @@ var SentryViewModel = (function () {
         if (data.status == 0) {
         if (data.status == 0) {
           vm.removeRole(role.name());
           vm.removeRole(role.name());
           vm.list_sentry_privileges_by_authorizable();
           vm.list_sentry_privileges_by_authorizable();
-          $(document).trigger("removed.role");
+          $(document).trigger("removedRole");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -367,7 +367,7 @@ var SentryViewModel = (function () {
       }, function (data) {
       }, function (data) {
         if (data.status == 0) {
         if (data.status == 0) {
           vm.list_sentry_privileges_by_authorizable();
           vm.list_sentry_privileges_by_authorizable();
-          $(document).trigger("created.role");
+          $(document).trigger("createdRole");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -668,7 +668,7 @@ var SentryViewModel = (function () {
       else {
       else {
         self.path(obj.path());
         self.path(obj.path());
       }
       }
-      $(document).trigger("changed.path");
+      $(document).trigger("changedPath");
 
 
       if (self.getTreeAdditionalDataForPath(obj.path()).loaded){
       if (self.getTreeAdditionalDataForPath(obj.path()).loaded){
         if (typeof skipListAuthorizable == "undefined" || !skipListAuthorizable) {
         if (typeof skipListAuthorizable == "undefined" || !skipListAuthorizable) {
@@ -849,7 +849,7 @@ var SentryViewModel = (function () {
     };
     };
 
 
     self.afterRender = function () {
     self.afterRender = function () {
-      $(document).trigger("rendered.tree");
+      $(document).trigger("renderedTree");
     }
     }
   }
   }
 
 
@@ -928,7 +928,7 @@ var SentryViewModel = (function () {
     self.resetCreateRole = function() {
     self.resetCreateRole = function() {
       self.roles(self.originalRoles());
       self.roles(self.originalRoles());
       self.role(new Role(self, {}));
       self.role(new Role(self, {}));
-      $(document).trigger("create.typeahead");
+      $(document).trigger("createTypeahead");
     };
     };
 
 
     self.deletePrivilegeModal = function (role) {
     self.deletePrivilegeModal = function (role) {
@@ -994,7 +994,7 @@ var SentryViewModel = (function () {
       ko.utils.arrayForEach(self.selectedRoles(), function (role) {
       ko.utils.arrayForEach(self.selectedRoles(), function (role) {
         role.remove(role);
         role.remove(role);
       });
       });
-      $(document).trigger("deleted.role");
+      $(document).trigger("deletedRole");
     };
     };
 
 
     self.expandSelectedRoles = function () {
     self.expandSelectedRoles = function () {
@@ -1079,7 +1079,7 @@ var SentryViewModel = (function () {
     }
     }
 
 
     self.showRole = function (role) {
     self.showRole = function (role) {
-      $(document).trigger("show.role", role);
+      $(document).trigger("showRole", role);
       ko.utils.arrayForEach(self.filteredRoles(), function (r) {
       ko.utils.arrayForEach(self.filteredRoles(), function (r) {
         if (r.name() == role.name()){
         if (r.name() == role.name()){
           self.list_sentry_privileges_by_role(r);
           self.list_sentry_privileges_by_role(r);
@@ -1184,7 +1184,7 @@ var SentryViewModel = (function () {
             $(document).trigger("info", data.message);
             $(document).trigger("info", data.message);
             self.assist.refreshTree();
             self.assist.refreshTree();
             self.clearTempRoles();
             self.clearTempRoles();
-            $(document).trigger("created.role");
+            $(document).trigger("createdRole");
           } else {
           } else {
             $(document).trigger("error", data.message);
             $(document).trigger("error", data.message);
           }
           }
@@ -1300,7 +1300,7 @@ var SentryViewModel = (function () {
         if (data.status == 0) {
         if (data.status == 0) {
           if (norefresh == undefined) {
           if (norefresh == undefined) {
             self.list_sentry_privileges_by_authorizable(); // Refresh
             self.list_sentry_privileges_by_authorizable(); // Refresh
-            $(document).trigger("deleted.bulk.privileges");
+            $(document).trigger("deletedBulkPrivileges");
           }
           }
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
@@ -1322,7 +1322,7 @@ var SentryViewModel = (function () {
       }, function (data) {
       }, function (data) {
         if (data.status == 0) {
         if (data.status == 0) {
           self.list_sentry_privileges_by_authorizable(); // Refresh
           self.list_sentry_privileges_by_authorizable(); // Refresh
-          $(document).trigger("added.bulk.privileges");
+          $(document).trigger("addedBulkPrivileges");
         } else {
         } else {
           $(document).trigger("error", data.message);
           $(document).trigger("error", data.message);
         }
         }
@@ -1349,7 +1349,7 @@ var SentryViewModel = (function () {
       $.getJSON('/desktop/api/users/autocomplete', data, function (data) {
       $.getJSON('/desktop/api/users/autocomplete', data, function (data) {
         self.availableHadoopUsers(data.users);
         self.availableHadoopUsers(data.users);
         self.availableHadoopGroups(data.groups);
         self.availableHadoopGroups(data.groups);
-        $(document).trigger("loaded.users");
+        $(document).trigger("loadedUsers");
       });
       });
     }
     }
 
 
@@ -1405,10 +1405,10 @@ var SentryViewModel = (function () {
 
 
     self.linkToBrowse = function (path) {
     self.linkToBrowse = function (path) {
       self.assist.path(path);
       self.assist.path(path);
-      $(document).trigger("changed.path");
+      $(document).trigger("changedPath");
       self.assist.loadParents();
       self.assist.loadParents();
       self.updateSectionHash("edit");
       self.updateSectionHash("edit");
-      $(document).trigger("show.mainSection");
+      $(document).trigger("showMainSection");
     }
     }
   };
   };
 
 

+ 6 - 6
apps/security/src/security/templates/hdfs.mako

@@ -303,7 +303,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
     $(document).ready(function () {
     $(document).ready(function () {
 
 
-      $(document).on("loaded.users", function(){
+      $(document).on("loadedUsers", function(){
         $(".user-list").select2("val", viewModel.doAs());
         $(".user-list").select2("val", viewModel.doAs());
       });
       });
 
 
@@ -333,7 +333,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
       resizeComponents();
       resizeComponents();
 
 
-      $(document).on("rendered.tree", function() {
+      $(document).on("renderedTree", function() {
         var _path = viewModel.assist.path();
         var _path = viewModel.assist.path();
         if (_path[_path.length-1] == "/"){
         if (_path[_path.length-1] == "/"){
           _path = _path.substr(0, _path.length - 1);
           _path = _path.substr(0, _path.length - 1);
@@ -347,21 +347,21 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         }, 200)
         }, 200)
       });
       });
 
 
-      $(document).on("updated.acls", function() {
+      $(document).on("updatedAcls", function() {
         $(document).trigger("info", "${ _('The selected ACLs have been successfully updated.') }");
         $(document).trigger("info", "${ _('The selected ACLs have been successfully updated.') }");
       });
       });
 
 
-      $(document).on("added.bulk.acls", function() {
+      $(document).on("addedBulkAcls", function() {
         $(document).trigger("info", "${ _('The current ACLs have been successfully added to the checked paths.') }");
         $(document).trigger("info", "${ _('The current ACLs have been successfully added to the checked paths.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("deleted.bulk.acls", function() {
+      $(document).on("deletedBulkAcls", function() {
         $(document).trigger("info", "${ _('All the ACLs have been successfully removed from the checked paths.') }");
         $(document).trigger("info", "${ _('All the ACLs have been successfully removed from the checked paths.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("syncd.bulk.acls", function() {
+      $(document).on("syncdBulkAcls", function() {
         $(document).trigger("info", "${ _('All the ACLs for the checked items have been replaced with the current selection.') }");
         $(document).trigger("info", "${ _('All the ACLs for the checked items have been replaced with the current selection.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });

+ 12 - 12
apps/security/src/security/templates/hive.mako

@@ -608,7 +608,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
       resizeComponents();
       resizeComponents();
 
 
-      $(document).on("rendered.tree", function() {
+      $(document).on("renderedTree", function() {
         var _path = viewModel.assist.path();
         var _path = viewModel.assist.path();
         if (_path[_path.length-1] == "/"){
         if (_path[_path.length-1] == "/"){
           _path = _path.substr(0, _path.length - 1);
           _path = _path.substr(0, _path.length - 1);
@@ -620,7 +620,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         }
         }
       });
       });
 
 
-      $(document).on("created.role", function(){
+      $(document).on("createdRole", function(){
         $("#createRoleModal").modal("hide");
         $("#createRoleModal").modal("hide");
         $("#grantPrivilegeModal").modal("hide");
         $("#grantPrivilegeModal").modal("hide");
         $("#deletePrivilegeModal").modal("hide");
         $("#deletePrivilegeModal").modal("hide");
@@ -630,11 +630,11 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         }, 500);
         }, 500);
       });
       });
 
 
-      $(document).on("deleted.role", function(){
+      $(document).on("deletedRole", function(){
         $("#deleteRoleModal").modal("hide");
         $("#deleteRoleModal").modal("hide");
       });
       });
 
 
-      $(document).on("changed.path", function(){
+      $(document).on("changedPath", function(){
         if ($("#path").val() != viewModel.assist.path()){
         if ($("#path").val() != viewModel.assist.path()){
           $("#path").val(viewModel.assist.path());
           $("#path").val(viewModel.assist.path());
         }
         }
@@ -661,11 +661,11 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
       showMainSection(viewModel.getSectionHash());
       showMainSection(viewModel.getSectionHash());
 
 
-      $(document).on("show.mainSection", function(){
+      $(document).on("showMainSection", function(){
         showMainSection(viewModel.getSectionHash());
         showMainSection(viewModel.getSectionHash());
       });
       });
 
 
-      $(document).on("show.role", function(e, role) {
+      $(document).on("showRole", function(e, role) {
         if (typeof role != "undefined" && role.name != null){
         if (typeof role != "undefined" && role.name != null){
           $("#bulkActionsModal").modal("hide");
           $("#bulkActionsModal").modal("hide");
           showMainSection("roles");
           showMainSection("roles");
@@ -718,17 +718,17 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         viewModel.list_sentry_roles_by_group();
         viewModel.list_sentry_roles_by_group();
       });
       });
 
 
-      $(document).on("added.bulk.privileges", function() {
+      $(document).on("addedBulkPrivileges", function() {
         $(document).trigger("info", "${ _('The current privileges have been successfully added to the checked items.') }");
         $(document).trigger("info", "${ _('The current privileges have been successfully added to the checked items.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("deleted.bulk.privileges", function() {
+      $(document).on("deletedBulkPrivileges", function() {
         $(document).trigger("info", "${ _('All the privileges have been successfully removed from the checked items.') }");
         $(document).trigger("info", "${ _('All the privileges have been successfully removed from the checked items.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("syncd.bulk.privileges", function() {
+      $(document).on("syncdBulkPrivileges", function() {
         $(document).trigger("info", "${ _('All the privileges for the checked items have been replaced with the current selection.') }");
         $(document).trigger("info", "${ _('All the privileges for the checked items have been replaced with the current selection.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
@@ -741,7 +741,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         viewModel.isApplyingBulk(false);
         viewModel.isApplyingBulk(false);
       });
       });
 
 
-      $(document).on("create.typeahead", function(){
+      $(document).on("createTypeahead", function(){
         $("#createRoleName").typeahead({
         $("#createRoleName").typeahead({
           source: function (query) {
           source: function (query) {
             var _options = [];
             var _options = [];
@@ -763,12 +763,12 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
           $("#createRoleName").data('typeahead').lookup();
           $("#createRoleName").data('typeahead').lookup();
         }
         }
       });
       });
-      $(document).on("destroy.typeahead", function(){
+      $(document).on("destroyTypeahead", function(){
         $('.typeahead').unbind();
         $('.typeahead').unbind();
         $("ul.typeahead").hide();
         $("ul.typeahead").hide();
       });
       });
 
 
-      $(document).trigger("create.typeahead");
+      $(document).trigger("createTypeahead");
 
 
       $("#deletePrivilegeModal").modal({
       $("#deletePrivilegeModal").modal({
         show: false
         show: false

+ 12 - 12
apps/security/src/security/templates/sentry.mako

@@ -664,7 +664,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
       resizeComponents();
       resizeComponents();
 
 
-      $(document).on("rendered.tree", function () {
+      $(document).on("renderedTree", function () {
         var _path = viewModel.assist.path();
         var _path = viewModel.assist.path();
         if (_path[_path.length - 1] == "/") {
         if (_path[_path.length - 1] == "/") {
           _path = _path.substr(0, _path.length - 1);
           _path = _path.substr(0, _path.length - 1);
@@ -676,7 +676,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         }
         }
       });
       });
 
 
-      $(document).on("created.role", function () {
+      $(document).on("createdRole", function () {
         $("#createRoleModal").modal("hide");
         $("#createRoleModal").modal("hide");
         $("#grantPrivilegeModal").modal("hide");
         $("#grantPrivilegeModal").modal("hide");
         $("#deletePrivilegeModal").modal("hide");
         $("#deletePrivilegeModal").modal("hide");
@@ -686,11 +686,11 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         }, 500);
         }, 500);
       });
       });
 
 
-      $(document).on("deleted.role", function () {
+      $(document).on("deletedRole", function () {
         $("#deleteRoleModal").modal("hide");
         $("#deleteRoleModal").modal("hide");
       });
       });
 
 
-      $(document).on("changed.path", function () {
+      $(document).on("changedPath", function () {
         if ($("#path").val() != viewModel.assist.path()) {
         if ($("#path").val() != viewModel.assist.path()) {
           $("#path").val(viewModel.assist.path());
           $("#path").val(viewModel.assist.path());
         }
         }
@@ -717,11 +717,11 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
 
 
       showMainSection(viewModel.getSectionHash());
       showMainSection(viewModel.getSectionHash());
 
 
-      $(document).on("show.mainSection", function () {
+      $(document).on("showMainSection", function () {
         showMainSection(viewModel.getSectionHash());
         showMainSection(viewModel.getSectionHash());
       });
       });
 
 
-      $(document).on("show.role", function (e, role) {
+      $(document).on("showRole", function (e, role) {
         if (typeof role != "undefined" && role.name != null) {
         if (typeof role != "undefined" && role.name != null) {
           $("#bulkActionsModal").modal("hide");
           $("#bulkActionsModal").modal("hide");
           showMainSection("roles");
           showMainSection("roles");
@@ -775,17 +775,17 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         viewModel.list_sentry_roles_by_group();
         viewModel.list_sentry_roles_by_group();
       });
       });
 
 
-      $(document).on("added.bulk.privileges", function () {
+      $(document).on("addedBulkPrivileges", function () {
         $(document).trigger("info", "${ _('The current privileges have been successfully added to the checked items.') }");
         $(document).trigger("info", "${ _('The current privileges have been successfully added to the checked items.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("deleted.bulk.privileges", function () {
+      $(document).on("deletedBulkPrivileges", function () {
         $(document).trigger("info", "${ _('All the privileges have been successfully removed from the checked items.') }");
         $(document).trigger("info", "${ _('All the privileges have been successfully removed from the checked items.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
 
 
-      $(document).on("syncd.bulk.privileges", function () {
+      $(document).on("syncdBulkPrivileges", function () {
         $(document).trigger("info", "${ _('All the privileges for the checked items have been replaced with the current selection.') }");
         $(document).trigger("info", "${ _('All the privileges for the checked items have been replaced with the current selection.') }");
         $("#bulkActionsModal").modal("hide");
         $("#bulkActionsModal").modal("hide");
       });
       });
@@ -798,7 +798,7 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
         viewModel.isApplyingBulk(false);
         viewModel.isApplyingBulk(false);
       });
       });
 
 
-      $(document).on("create.typeahead", function () {
+      $(document).on("createTypeahead", function () {
         $("#createRoleName").typeahead({
         $("#createRoleName").typeahead({
           source: function (query) {
           source: function (query) {
             var _options = [];
             var _options = [];
@@ -820,12 +820,12 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
           $("#createRoleName").data('typeahead').lookup();
           $("#createRoleName").data('typeahead').lookup();
         }
         }
       });
       });
-      $(document).on("destroy.typeahead", function () {
+      $(document).on("destroyTypeahead", function () {
         $('.typeahead').unbind();
         $('.typeahead').unbind();
         $("ul.typeahead").hide();
         $("ul.typeahead").hide();
       });
       });
 
 
-      $(document).trigger("create.typeahead");
+      $(document).trigger("createTypeahead");
 
 
       $("#deletePrivilegeModal").modal({
       $("#deletePrivilegeModal").modal({
         show: false
         show: false