Repository: incubator-zeppelin Updated Branches: refs/heads/master 458556aad -> 2cbb79885
[ZEPPELIN-819] Add 'Last updated by X at Y' message in paragraph footer ### What is this PR for? In a large organization, it is helpful to know who updated a paragraph along with the time. ### What type of PR is it? Improvement (Minor) ### Todos * [x] - Understand why the user is not updated immediately after running the paragraph. ### What is the Jira issue? [ZEPPELIN-819] (https://issues.apache.org/jira/browse/ZEPPELIN-819) ### How should this be tested? 1. Login to the zeppelin server 2. Create a note 3. Run a paragraph 4. Reload Paragraph footer should display the 'Last updated by X at Y' message ### Screenshots (if appropriate) NA ### Questions: NA Author: Prasad Wagle <pwa...@twitter.com> Closes #848 from prasadwagle/ZEPPELIN-819 and squashes the following commits: c44d2d2 [Prasad Wagle] Change == to === and != to !== to fix jshint errors 8ec09be [Prasad Wagle] Merge branch 'master' into ZEPPELIN-819 c198b83 [Prasad Wagle] Revert changes to shiro.ini and websocketEvents.factory.js 7e17f67 [Prasad Wagle] Update authentication info on updateParagraph, improve message when dateUpdated is null f05543b [Prasad Wagle] Handle anonymous user case 53deb67 [Prasad Wagle] Add 'Last updated by X at Y' message in paragraph footer Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/2cbb7988 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/2cbb7988 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/2cbb7988 Branch: refs/heads/master Commit: 2cbb798859610dca4097f442f669b4201320fad5 Parents: 458556a Author: Prasad Wagle <pwa...@twitter.com> Authored: Sat Apr 30 12:00:53 2016 -0700 Committer: Lee moon soo <m...@apache.org> Committed: Fri May 6 09:59:02 2016 -0700 ---------------------------------------------------------------------- .../src/app/notebook/paragraph/paragraph.controller.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/2cbb7988/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 0de6584..21dd279 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -386,6 +386,7 @@ angular.module('zeppelinWebApp') } /** push the rest */ + $scope.paragraph.authenticationInfo = data.paragraph.authenticationInfo; $scope.paragraph.aborted = data.paragraph.aborted; $scope.paragraph.dateUpdated = data.paragraph.dateUpdated; $scope.paragraph.dateCreated = data.paragraph.dateCreated; @@ -967,7 +968,12 @@ angular.module('zeppelinWebApp') } return ''; } - var desc = 'Took ' + (timeMs/1000) + ' seconds'; + var user = 'anonymous'; + if (pdata.authenticationInfo !== null && pdata.authenticationInfo.user !== null) { + user = pdata.authenticationInfo.user; + } + var dateUpdated = (pdata.dateUpdated === null) ? 'unknown' : pdata.dateUpdated; + var desc = 'Took ' + (timeMs/1000) + ' seconds. Last updated by ' + user + ' at time ' + dateUpdated + '.'; if ($scope.isResultOutdated()){ desc += ' (outdated)'; }