Repository: zeppelin
Updated Branches:
  refs/heads/master d92d14aae -> 164db0794


[ZEPPELIN-2512] Prevent slow note, interpreter search. (master, branch-0.7)

### What is this PR for?

Use debounce in search input to avoid the slow search.

See more:

![image](https://cloud.githubusercontent.com/assets/4968473/25814653/3be8890e-3459-11e7-9be2-6a440ab41861.png)

### What type of PR is it?
[Improvement]

### Todos

NONE

### What is the Jira issue?

[ZEPPELIN-2512](https://issues.apache.org/jira/browse/ZEPPELIN-2512)

### How should this be tested?

1. Create many notes with different names. (50+)
2. Search using note name filter in home and navbar.
3. Do the same thing for interpreters in the interpreter page

### Screenshots (if appropriate)

NONE

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <1am...@gmail.com>

Closes #2324 from 1ambda/ZEPPELIN-2512/add-debounce-for-search-inputs and 
squashes the following commits:

20292fb [1ambda] feat: Add debounce for interpreter search input
b792ee5 [1ambda] feat: Add debounce for note name filter


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

Branch: refs/heads/master
Commit: 164db0794fea1cf289068de71af2b62ae6811cfd
Parents: d92d14a
Author: 1ambda <1am...@gmail.com>
Authored: Tue May 9 01:35:38 2017 +0900
Committer: Lee moon soo <m...@apache.org>
Committed: Mon May 15 08:15:03 2017 -0700

----------------------------------------------------------------------
 zeppelin-web/src/app/interpreter/interpreter.html            | 5 ++++-
 .../src/components/filterNoteNames/filter-note-names.html    | 8 ++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/164db079/zeppelin-web/src/app/interpreter/interpreter.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.html 
b/zeppelin-web/src/app/interpreter/interpreter.html
index 90dc0f8..a9c932e 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.html
+++ b/zeppelin-web/src/app/interpreter/interpreter.html
@@ -41,7 +41,10 @@ limitations under the License.
     <div class="row">
       <div class="col-md-4">
         <div class="input-group" style="margin-top: 10px">
-          <input type="text" ng-model="searchInterpreter" class="form-control 
ng-pristine ng-untouched ng-valid ng-empty" placeholder="Search interpreters"/>
+          <input type="text" ng-model="searchInterpreter"
+                 class="form-control ng-pristine ng-untouched ng-valid 
ng-empty"
+                 ng-model-options="{ updateOn: 'default blur', debounce: { 
'default': 300, 'blur': 0 } }"
+                 placeholder="Search interpreters"/>
           <span class="input-group-btn">
             <button type="submit" class="btn btn-default" 
ng-disabled="!navbar.connected">
               <i class="glyphicon glyphicon-search"></i>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/164db079/zeppelin-web/src/components/filterNoteNames/filter-note-names.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/filterNoteNames/filter-note-names.html 
b/zeppelin-web/src/components/filterNoteNames/filter-note-names.html
index 1aede1e..071cba4 100644
--- a/zeppelin-web/src/components/filterNoteNames/filter-note-names.html
+++ b/zeppelin-web/src/components/filterNoteNames/filter-note-names.html
@@ -11,5 +11,9 @@ 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.
 -->
-<input type="text" class="note-name-query form-control" 
ng-click="$event.stopPropagation()"
-       placeholder="&#xf002 Filter" ng-model="$parent.query.q" />
+<input type="text"
+       class="note-name-query form-control"
+       ng-click="$event.stopPropagation()"
+       placeholder="&#xf002 Filter"
+       ng-model="$parent.query.q"
+       ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 
300, 'blur': 0 } }" />

Reply via email to