|
@@ -27,6 +27,9 @@ var InitialData = {
|
|
|
'displayLength': {},
|
|
|
'startIndex': {},
|
|
|
'sortingConditions': {}
|
|
|
+ },
|
|
|
+ 'access': {
|
|
|
+ 'showJobsForNonAdmin': ''
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -176,6 +179,13 @@ App.db.setDisplayLength = function(name, displayLength) {
|
|
|
localStorage.setObject('ambari', App.db.data);
|
|
|
};
|
|
|
|
|
|
+App.db.setShowJobsForNonAdmin = function(showJobsForNonAdmin) {
|
|
|
+ console.log('TRACE: Entering db:setShowJobsForNonAdmin function');
|
|
|
+ App.db.data = localStorage.getObject('ambari');
|
|
|
+ App.db.data.app.access.showJobsForNonAdmin = showJobsForNonAdmin;
|
|
|
+ localStorage.setObject('ambari', App.db.data);
|
|
|
+};
|
|
|
+
|
|
|
App.db.setStartIndex = function(name, startIndex) {
|
|
|
console.log('TRACE: Entering db:setStartIndex function');
|
|
|
App.db.data = localStorage.getObject('ambari');
|
|
@@ -554,6 +564,15 @@ App.db.getDisplayLength = function(name) {
|
|
|
return null;
|
|
|
};
|
|
|
|
|
|
+App.db.getShowJobsForNonAdmin = function() {
|
|
|
+ console.log('TRACE: Entering db:getShowJobsForNonAdmin function');
|
|
|
+ App.db.data = localStorage.getObject('ambari');
|
|
|
+ if (App.db.data.app.access && typeof (App.db.data.app.access.showJobsForNonAdmin) == "boolean") {
|
|
|
+ return App.db.data.app.access.showJobsForNonAdmin;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+};
|
|
|
+
|
|
|
App.db.getStartIndex = function(name) {
|
|
|
console.log('TRACE: Entering db:getStartIndex function');
|
|
|
App.db.data = localStorage.getObject('ambari');
|