diff --git a/docs/_includes/themes/zeppelin/_navigation.html b/docs/_includes/themes/zeppelin/_navigation.html index 906d6e8806..d1b33e4a52 100644 --- a/docs/_includes/themes/zeppelin/_navigation.html +++ b/docs/_includes/themes/zeppelin/_navigation.html @@ -61,6 +61,7 @@
  • Publishing Paragraphs
  • Personalized Mode
  • Customizing Zeppelin Homepage
  • +
  • Notebook Actions
  • REST API
  • Interpreter API
  • diff --git a/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_button.png b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_button.png new file mode 100644 index 0000000000..168809cc45 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_button.png differ diff --git a/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_diff.png b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_diff.png new file mode 100644 index 0000000000..5c392a5b09 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_diff.png differ diff --git a/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_empty.png b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_empty.png new file mode 100644 index 0000000000..82d7b78b61 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_empty.png differ diff --git a/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_paragraph.png b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_paragraph.png new file mode 100644 index 0000000000..d6900669ba Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/revisions_comparator_paragraph.png differ diff --git a/docs/index.md b/docs/index.md index 95104a76df..f5fc524da8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -72,6 +72,7 @@ limitations under the License. * [Publishing Paragraphs](./usage/other_features/publishing_paragraphs.html) results into your external website * [Personalized Mode](./usage/other_features/personalized_mode.html) * [Customizing Zeppelin Homepage](./usage/other_features/customizing_homepage.html) with one of your notebooks + * [Notebook actions](./usage/other_features/notebook_actions.html) * REST API: available REST API list in Apache Zeppelin * [Interpreter API](./usage/rest_api/interpreter.html) * [Zeppelin Server API](./usage/rest_api/zeppelin_server.html) diff --git a/docs/usage/other_features/notebook_actions.md b/docs/usage/other_features/notebook_actions.md new file mode 100644 index 0000000000..a57bb5397e --- /dev/null +++ b/docs/usage/other_features/notebook_actions.md @@ -0,0 +1,55 @@ +--- +layout: page +title: "Notebook Actions" +description: "Description of some actions for notebooks" +group: usage/other_features +--- + +{% include JB/setup %} + +# Revisions comparator + +
    + +Apache Zeppelin allows you to compare revisions of notebook. +To see which paragraphs have been changed, removed or added. +This action becomes available if your notebook has more than one revision. + +
    + +## How to compare two revisions + +For compare two revisions need open dialog of comparator (by click button) and choose two revisions into comboboxes. + +
    + +After selecting the second revision will see the result of the comparison. + +
    + +## How to read the result of the comparison + +Result it is list of paragraphs which was in both revisions. If paragraph was added in second revision ("Head") +then so it will be marked as added, if was deleted then it will be marked as +deleted. If paragraph exists in both revisions then it marked as there are differences. +To view the comparison click on the section. + +
    + +Сhanges in the text of the paragraph are highlighted in green and red. Red it is line (block of lines) which was deleted, green it is line (block of lines) which was added). + + + + 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 b936a43aff..1de5ab56bd 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 @@ -1929,7 +1929,7 @@ public class NotebookServer extends WebSocketServlet AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal); Note revisionNote; if (revisionId.equals("Head")) { - revisionNote = notebook.loadNoteFromRepo(noteId, subject); + revisionNote = notebook.getNote(noteId); } else { revisionNote = notebook.getNoteByRevision(noteId, revisionId, subject); } diff --git a/zeppelin-web/src/app/notebook/notebook-actionBar.html b/zeppelin-web/src/app/notebook/notebook-actionBar.html index 7fdc0874cd..491a48d9d7 100644 --- a/zeppelin-web/src/app/notebook/notebook-actionBar.html +++ b/zeppelin-web/src/app/notebook/notebook-actionBar.html @@ -140,10 +140,10 @@ limitations under the License.