mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Persist user info instead of authentication info in paragraph
This commit is contained in:
parent
cfe4c8627b
commit
d9dae049da
2 changed files with 6 additions and 6 deletions
|
|
@ -388,8 +388,8 @@ angular.module('zeppelinWebApp')
|
|||
}
|
||||
|
||||
/** push the rest */
|
||||
$scope.paragraph.authenticationInfo = data.paragraph.authenticationInfo;
|
||||
$scope.paragraph.aborted = data.paragraph.aborted;
|
||||
$scope.paragraph.user = data.paragraph.user;
|
||||
$scope.paragraph.dateUpdated = data.paragraph.dateUpdated;
|
||||
$scope.paragraph.dateCreated = data.paragraph.dateCreated;
|
||||
$scope.paragraph.dateFinished = data.paragraph.dateFinished;
|
||||
|
|
@ -970,10 +970,7 @@ angular.module('zeppelinWebApp')
|
|||
}
|
||||
return '';
|
||||
}
|
||||
var user = 'anonymous';
|
||||
if (pdata.authenticationInfo !== null && !isEmpty(pdata.authenticationInfo.user)) {
|
||||
user = pdata.authenticationInfo.user;
|
||||
}
|
||||
var user = (pdata.user === undefined || pdata.user === null) ? 'anonymous' : pdata.user;
|
||||
var desc = 'Took ' +
|
||||
moment.duration(moment(pdata.dateFinished).diff(moment(pdata.dateStarted))).humanize() +
|
||||
'. Last updated by ' + user + ' at ' + moment(pdata.dateUpdated).format('MMMM DD YYYY, h:mm:ss A') + '.';
|
||||
|
|
|
|||
|
|
@ -50,10 +50,11 @@ public class Paragraph extends Job implements Serializable, Cloneable {
|
|||
|
||||
private transient NoteInterpreterLoader replLoader;
|
||||
private transient Note note;
|
||||
private transient AuthenticationInfo authenticationInfo;
|
||||
|
||||
String title;
|
||||
String text;
|
||||
AuthenticationInfo authenticationInfo;
|
||||
String user;
|
||||
Date dateUpdated;
|
||||
private Map<String, Object> config; // paragraph configs like isOpen, colWidth, etc
|
||||
public final GUI settings; // form and parameter settings
|
||||
|
|
@ -73,6 +74,7 @@ public class Paragraph extends Job implements Serializable, Cloneable {
|
|||
title = null;
|
||||
text = null;
|
||||
authenticationInfo = null;
|
||||
user = null;
|
||||
dateUpdated = null;
|
||||
settings = new GUI();
|
||||
config = new HashMap<String, Object>();
|
||||
|
|
@ -110,6 +112,7 @@ public class Paragraph extends Job implements Serializable, Cloneable {
|
|||
|
||||
public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
|
||||
this.authenticationInfo = authenticationInfo;
|
||||
this.user = authenticationInfo.getUser();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue