|
@@ -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");
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|