small fixes, added documentation

This commit is contained in:
tinkoff-dwh 2017-08-01 10:42:52 +05:00
parent 4ce5286c80
commit 514b3f57bc
9 changed files with 59 additions and 2 deletions

View file

@ -61,6 +61,7 @@
<li><a href="{{BASE_PATH}}/usage/other_features/publishing_paragraphs.html">Publishing Paragraphs</a></li>
<li><a href="{{BASE_PATH}}/usage/other_features/personalized_mode.html">Personalized Mode</a></li>
<li><a href="{{BASE_PATH}}/usage/other_features/customizing_homepage.html">Customizing Zeppelin Homepage</a></li>
<li><a href="{{BASE_PATH}}/usage/other_features/notebook_actions.html">Notebook Actions</a></li>
<li role="separator" class="divider"></li>
<li class="title"><span>REST API</span></li>
<li><a href="{{BASE_PATH}}/usage/rest_api/interpreter.html">Interpreter API</a></li>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View file

@ -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)

View file

@ -0,0 +1,55 @@
---
layout: page
title: "Notebook Actions"
description: "Description of some actions for notebooks"
group: usage/other_features
---
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% include JB/setup %}
# Revisions comparator
<div id="toc"></div>
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.
<center><img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/revisions-comparator-button.png" height="90%" width="90%"></center>
## How to compare two revisions
For compare two revisions need open dialog of comparator (by click button) and choose two revisions into comboboxes.
<center><img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/revisions-comparator-empty.png" height="90%" width="90%"></center>
After selecting the second revision will see the result of the comparison.
<center><img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/revisions-comparator-diff.png" height="90%" width="90%"></center>
## 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 <i style="color: green">added</i>, if was deleted then it will be marked as
<i style="color: red">deleted</i>. If paragraph exists in both revisions then it marked as <i style="color: orange">there are differences</i>.
To view the comparison click on the section.
<center><img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/revisions-comparator-paragraph.png" height="90%" width="90%"></center>
С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).

View file

@ -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);
}

View file

@ -140,10 +140,10 @@ limitations under the License.
</li>
</ul>
<button type="button"
ng-if="noteRevisions.length > 1"
class="btn btn-default btn-xs"
id="compareRevisions"
data-toggle="modal"
ng-disabled="noteRevisions.length < 2"
data-target="#revisionsComparatorModal"
tooltip-placement="bottom" uib-tooltip="Compare revisions">
<i class="fa fa-exchange"></i>