zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mina...@apache.org
Subject zeppelin git commit: [ZEPPELIN-1963] set cron job executor to current user by default
Date Tue, 17 Jan 2017 06:00:17 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 2dc5c8806 -> 350cf9c29


[ZEPPELIN-1963] set cron job executor to current user by default

### What is this PR for?
currently when executing cron job, backend doesn't know who initiated cron job (with subsequent
save) unless user puts his name. This PR adds user name by default by keeping compatibility
with current workflow.

### What type of PR is it?
Improvement

### Todos
* [x] - add user on front

### What is the Jira issue?
[ZEPPELIN-1963](https://issues.apache.org/jira/browse/ZEPPELIN-1963)

### How should this be tested?
go and set cron job

### Screenshots (if appropriate)
![cron_user](https://cloud.githubusercontent.com/assets/1642088/21919566/25330daa-d910-11e6-9373-aa3c44064f39.gif)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Khalid Huseynov <khalidhnv@gmail.com>

Closes #1898 from khalidhuseynov/cron-user and squashes the following commits:

30dc440 [Khalid Huseynov] add logged cron executing user

(cherry picked from commit 8daf32563960b16db739e30c8dcd91d60f854917)
Signed-off-by: Mina Lee <minalee@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/350cf9c2
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/350cf9c2
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/350cf9c2

Branch: refs/heads/branch-0.7
Commit: 350cf9c294114cd40ceef00c570d8f53caeea922
Parents: 2dc5c88
Author: Khalid Huseynov <khalidhnv@gmail.com>
Authored: Thu Jan 12 21:32:02 2017 -0800
Committer: Mina Lee <minalee@apache.org>
Committed: Tue Jan 17 15:00:10 2017 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/notebook.controller.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/350cf9c2/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index 248ef8a..ccf64b7 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -401,6 +401,13 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
 
   /** Set cron expression for this note **/
   $scope.setCronScheduler = function(cronExpr) {
+    if (cronExpr) {
+      if (!$scope.note.config.cronExecutingUser) {
+        $scope.note.config.cronExecutingUser = $rootScope.ticket.principal;
+      }
+    } else {
+      $scope.note.config.cronExecutingUser = '';
+    }
     $scope.note.config.cron = cronExpr;
     $scope.setConfig();
   };
@@ -1011,4 +1018,3 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
     angular.element(document.getElementById('content')).css('padding-top', actionbarHeight
- 20);
   });
 }
-


Mime
View raw message