zeppelin git commit: [ZEPPELIN-3198] UI should not show Version/GIT Control if the same if not supported

2018-02-14 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 ec4f3e08a -> b7676ad56


[ZEPPELIN-3198] UI should not show Version/GIT Control if the same if not 
supported

Currently, UI shows an option for version/GIT Control even when it is not 
supported by the underlying implementing storage configuration.

It is only after users try to save a commit and get an error "Couldn't 
checkpoint note revision: possibly storage doesn't support versioning. Please 
check the logs for more details.".

So, if implementing storage configuration doesn't support git storage, UI 
should not show those options.

[Improvement]

* 
[ZEPPELIN-3198](https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-3198)

On using "org.apache.zeppelin.notebook.repo.GitNotebookRepo"  for 
`zeppelin.notebook.storage`  user should see revision/version control option, 
for rest of the others e.g. "FileSystemNotebookRepo" user should not see that 
option

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh 

Closes #2757 from prabhjyotsingh/ZEPPELIN-3198 and squashes the following 
commits:

1f854e80c [Prabhjyot Singh] check for NotebookRepoSync and fall back
d2e19094d [Prabhjyot Singh] rename isDefaultRepoGit to 
isRevisionSupportedInDefaultRepo
70abc4420 [Prabhjyot Singh] revert NotebookRepoCommon
e152ec194 [Prabhjyot Singh] rename NotebookGitRepo to 
NotebookRepoWithVersionControl
987edf05d [Prabhjyot Singh] fix test
580674d9c [Prabhjyot Singh] use {{isRepoGit(0)}}
11baf6f2d [Prabhjyot Singh] refactor into NotebookRepo and NotebookGitRepo
c1d34df26 [Prabhjyot Singh] revert imports
cd7fde105 [Prabhjyot Singh] ZEPPELIN-3198: add isRevisionSupported for 
NotebookRepo

Change-Id: Ib464af447af49ee9e70da86e0e0f293ef38dd3a1
(cherry picked from commit 0605aae240f00c1c04667756599c0e61e4d8e48a)
Signed-off-by: Prabhjyot Singh 


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

Branch: refs/heads/branch-0.8
Commit: b7676ad56b9b62abf59909bd55ca5220a7546763
Parents: ec4f3e0
Author: Prabhjyot Singh 
Authored: Mon Feb 12 14:47:44 2018 +0530
Committer: Prabhjyot Singh 
Committed: Wed Feb 14 14:29:56 2018 +0530

--
 .../apache/zeppelin/socket/NotebookServer.java  |  2 +-
 .../src/app/notebook/notebook-actionBar.html|  2 +-
 .../java/org/apache/zeppelin/notebook/Note.java | 13 +++
 .../org/apache/zeppelin/notebook/Notebook.java  | 34 +--
 .../notebook/repo/AzureNotebookRepo.java| 26 --
 .../notebook/repo/FileSystemNotebookRepo.java   | 27 +-
 .../zeppelin/notebook/repo/GitNotebookRepo.java |  3 +-
 .../notebook/repo/MongoNotebookRepo.java| 28 +-
 .../zeppelin/notebook/repo/NotebookRepo.java| 62 -
 .../notebook/repo/NotebookRepoSync.java | 54 +++
 .../repo/NotebookRepoWithVersionControl.java| 97 
 .../zeppelin/notebook/repo/S3NotebookRepo.java  | 26 --
 .../zeppelin/notebook/repo/VFSNotebookRepo.java | 28 +-
 .../repo/zeppelinhub/ZeppelinHubRepo.java   |  4 +-
 .../notebook/repo/GitNotebookRepoTest.java  |  2 +-
 .../NotebookRepoSyncInitializationTest.java |  4 +-
 16 files changed, 184 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b7676ad5/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
index 20d5ba9..d1cf9e5 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
@@ -49,7 +49,7 @@ import org.apache.zeppelin.notebook.NotebookEventListener;
 import org.apache.zeppelin.notebook.NotebookImportDeserializer;
 import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.notebook.ParagraphJobListener;
-import org.apache.zeppelin.notebook.repo.NotebookRepo.Revision;
+import 
org.apache.zeppelin.notebook.repo.NotebookRepoWithVersionControl.Revision;
 import org.apache.zeppelin.notebook.socket.Message;
 import org.apache.zeppelin.notebook.socket.Message.OP;
 import org.apache.zeppelin.notebook.socket.WatcherMessage;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b7676ad5/zeppelin-web/src/app/notebook/notebook-actionBar.html
--
diff --git a/zeppelin-web/src/app/notebook/notebook

zeppelin git commit: [ZEPPELIN-3198] UI should not show Version/GIT Control if the same if not supported

2018-02-14 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/master fffdf2587 -> 0605aae24


[ZEPPELIN-3198] UI should not show Version/GIT Control if the same if not 
supported

Currently, UI shows an option for version/GIT Control even when it is not 
supported by the underlying implementing storage configuration.

It is only after users try to save a commit and get an error "Couldn't 
checkpoint note revision: possibly storage doesn't support versioning. Please 
check the logs for more details.".

So, if implementing storage configuration doesn't support git storage, UI 
should not show those options.

[Improvement]

* 
[ZEPPELIN-3198](https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-3198)

On using "org.apache.zeppelin.notebook.repo.GitNotebookRepo"  for 
`zeppelin.notebook.storage`  user should see revision/version control option, 
for rest of the others e.g. "FileSystemNotebookRepo" user should not see that 
option

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh 

Closes #2757 from prabhjyotsingh/ZEPPELIN-3198 and squashes the following 
commits:

1f854e80c [Prabhjyot Singh] check for NotebookRepoSync and fall back
d2e19094d [Prabhjyot Singh] rename isDefaultRepoGit to 
isRevisionSupportedInDefaultRepo
70abc4420 [Prabhjyot Singh] revert NotebookRepoCommon
e152ec194 [Prabhjyot Singh] rename NotebookGitRepo to 
NotebookRepoWithVersionControl
987edf05d [Prabhjyot Singh] fix test
580674d9c [Prabhjyot Singh] use {{isRepoGit(0)}}
11baf6f2d [Prabhjyot Singh] refactor into NotebookRepo and NotebookGitRepo
c1d34df26 [Prabhjyot Singh] revert imports
cd7fde105 [Prabhjyot Singh] ZEPPELIN-3198: add isRevisionSupported for 
NotebookRepo

Change-Id: Ib464af447af49ee9e70da86e0e0f293ef38dd3a1


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

Branch: refs/heads/master
Commit: 0605aae240f00c1c04667756599c0e61e4d8e48a
Parents: fffdf25
Author: Prabhjyot Singh 
Authored: Mon Feb 12 14:47:44 2018 +0530
Committer: Prabhjyot Singh 
Committed: Wed Feb 14 14:29:28 2018 +0530

--
 .../apache/zeppelin/socket/NotebookServer.java  |  2 +-
 .../src/app/notebook/notebook-actionBar.html|  2 +-
 .../java/org/apache/zeppelin/notebook/Note.java | 13 +++
 .../org/apache/zeppelin/notebook/Notebook.java  | 34 +--
 .../notebook/repo/AzureNotebookRepo.java| 26 --
 .../notebook/repo/FileSystemNotebookRepo.java   | 27 +-
 .../zeppelin/notebook/repo/GitNotebookRepo.java |  3 +-
 .../notebook/repo/MongoNotebookRepo.java| 28 +-
 .../zeppelin/notebook/repo/NotebookRepo.java| 62 -
 .../notebook/repo/NotebookRepoSync.java | 54 +++
 .../repo/NotebookRepoWithVersionControl.java| 97 
 .../zeppelin/notebook/repo/S3NotebookRepo.java  | 26 --
 .../zeppelin/notebook/repo/VFSNotebookRepo.java | 28 +-
 .../repo/zeppelinhub/ZeppelinHubRepo.java   |  4 +-
 .../notebook/repo/GitNotebookRepoTest.java  |  2 +-
 .../NotebookRepoSyncInitializationTest.java |  4 +-
 16 files changed, 184 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0605aae2/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
index 20d5ba9..d1cf9e5 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
@@ -49,7 +49,7 @@ import org.apache.zeppelin.notebook.NotebookEventListener;
 import org.apache.zeppelin.notebook.NotebookImportDeserializer;
 import org.apache.zeppelin.notebook.Paragraph;
 import org.apache.zeppelin.notebook.ParagraphJobListener;
-import org.apache.zeppelin.notebook.repo.NotebookRepo.Revision;
+import 
org.apache.zeppelin.notebook.repo.NotebookRepoWithVersionControl.Revision;
 import org.apache.zeppelin.notebook.socket.Message;
 import org.apache.zeppelin.notebook.socket.Message.OP;
 import org.apache.zeppelin.notebook.socket.WatcherMessage;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0605aae2/zeppelin-web/src/app/notebook/notebook-actionBar.html
--
diff --git a/zeppelin-web/src/app/notebook/notebook-actionBar.html 
b/zeppelin-web/src/app/notebook/notebook-actionBar.html
index 9b50e81..f8ff830 100644
--- a/