New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zeppelin-2572] multiple paragraphs actions #2952
Conversation
# Conflicts: # zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java # zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
@r-kamath, I fixed this flaw. |
@@ -291,6 +291,9 @@ public void onMessage(NotebookSocket conn, String msg) { | |||
case MOVE_PARAGRAPH: | |||
moveParagraph(conn, userAndRoles, notebook, messagereceived); | |||
break; | |||
case MOVE_SEVERAL_PARAGRAPHS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use MOVE_PARAGRAPHS for moving multiple paragraphs?
@@ -1641,6 +1686,35 @@ private void moveParagraph(NotebookSocket conn, HashSet<String> userAndRoles, No | |||
new Message(OP.PARAGRAPH_MOVED).put("id", paragraphId).put("index", newIndex)); | |||
} | |||
|
|||
private void moveSeveralParagraphs(NotebookSocket conn, HashSet<String> userAndRoles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moveParagraphs
ng-hide="viewOnly" | ||
tooltip-placement="bottom" uib-tooltip="Enable/Disable for running" | ||
ng-disabled="revisionView"> | ||
<i ng-class="isAnableRun ? 'fa fa-lock' : 'fa fa-unlock'"></i> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEnableRun
@r-kamath, I fixed it. |
LGTM |
@jongyoul @zjffdu @prabhjyotsingh please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. left one minor spelling comment.
tested this manually. will deploy to users soon.
great improvement.
data-toggle="modal" data-target="#noteCreateModal" data-clone-note="true" | ||
data-only-selected-paragraphs="true" | ||
data-selected-paragraphs="{{getSelectedParagraphs()}}" | ||
tooltip-placement="bottom" uib-tooltip="Clone this note use selected paragraphs"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Clone this note using selected paragraphs
ng-class="{'disabled':isNoteRunning()}" | ||
tooltip-placement="bottom" uib-tooltip="Run all paragraphs" | ||
tooltip-placement="bottom" | ||
uib-tooltip="{{isSelectionMode() ? 'Run selected paragraph' : 'Run all paragraphs'}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selected paragraphs
class="btn btn-default btn-xs" | ||
ng-if="isSelectionMode()" | ||
ng-click="removeSelectedParagraph(note.id)" | ||
tooltip-placement="bottom" uib-tooltip="Delete selected paragraph"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"delete selected paragraphs"
# Conflicts: # zeppelin-web/src/app/notebook/notebook.controller.js # zeppelin-web/src/app/notebook/notebook.css
<span class="{{selectedParagraphsIds.has(paragraph.id) ? 'icon-check checked-paragraph-check-button' : 'icon-plus'}}" | ||
tooltip-placement="top" | ||
style="cursor:pointer" | ||
uib-tooltip="Select a paragraph" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Add this paragraph to selection"
We were using PR this in prod for a couple of weeks. Works great. |
@Tagar, thanks. I changed the tooltip. |
# Conflicts: # zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java # zeppelin-web/src/components/websocket/websocket-event.factory.js # zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/socket/Message.java
Let me test it in my local |
Changed the UI and add shortcut to select/deselect paragraph. @jongyoul, what you say about it? |
@@ -191,7 +191,13 @@ | |||
INTERPRETER_INSTALL_RESULT, // [s-c] Status of an interpreter installation | |||
COLLABORATIVE_MODE_STATUS, // [s-c] collaborative mode status | |||
PATCH_PARAGRAPH, // [c-s][s-c] patch editor text | |||
NOTICE // [s-c] Notice | |||
NOTICE, // [s-c] Notice | |||
REMOVE_SELECTED_PARAGRAPHS, // [c-s] remove selected paragraphs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge these with the single paragraph operation to reduce code duplication ? Otherwise if we introduce new operation in future, we have to introduce 2 message, one for single paragraph, another for multiple paragraph, which is inefficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll think about how to improve this.
refactored and transferred to Zeppelin-2572 ver2 |
### What is this PR for? This PR adds the ability to perform actions on several paragraphs simultaneously. He adds the checkbox to each paragraph. When you select at least one paragraph in the action bar, buttons appear that perform actions on the selected paragraphs. ### What type of PR is it? Feature ### What is the Jira issue? [ZEPPELIN-2572](https://issues.apache.org/jira/browse/ZEPPELIN-2572) ZP-24 apache#2952 declined. apache#3145 #6 ### Screenshots (if appropriate) ![mult_v2](https://user-images.githubusercontent.com/30798933/44201040-e4a0d000-a150-11e8-955c-2837683f4651.gif) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no
### What is this PR for? This PR adds the ability to perform actions on several paragraphs simultaneously. He adds the checkbox to each paragraph. When you select at least one paragraph in the action bar, buttons appear that perform actions on the selected paragraphs. ### What type of PR is it? Feature ### What is the Jira issue? [ZEPPELIN-2572](https://issues.apache.org/jira/browse/ZEPPELIN-2572) ZP-24 apache#2952 declined. apache#3145 #6 ### Screenshots (if appropriate) ![mult_v2](https://user-images.githubusercontent.com/30798933/44201040-e4a0d000-a150-11e8-955c-2837683f4651.gif) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no
What is this PR for?
This PR adds the ability to perform actions on several paragraphs simultaneously. He adds the checkbox to each paragraph. When you select at least one paragraph in the action bar, buttons appear that perform actions on the selected paragraphs.
What type of PR is it?
Feature
What is the Jira issue?
ZEPPELIN-2572
Screenshots (if appropriate)
Questions: