GitHub user 1ambda opened a pull request:

    https://github.com/apache/zeppelin/pull/2261

    [ZEPPELIN-2420] Slow notebook listing in navbar

    ### What is this PR for?
    
    Notebook listing is slow as you can see in the screenshot below.
    
    The problem was,
    
    - angular-bootstrap was updated to 2.5
    - then, `dropdown-*` directives should be converted into `uib-dropdown-*`
    - otherwise, changes in angular controller scope values will not affect on 
the directives even though events are fired. (`show.bs.dropdown`, 
`hide.bs.dropdown`)
    
    ```
      function initNotebookListEventListener() {
        angular.element(document).ready(function() {
          angular.element('.notebook-list-dropdown').on('show.bs.dropdown', 
function() {
            $scope.isDrawNavbarNoteList = true;
          });
    
          angular.element('.notebook-list-dropdown').on('hide.bs.dropdown', 
function() {
            $scope.isDrawNavbarNoteList = false;
          });
        });
    ```
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    
    NONE
    
    ### What is the Jira issue?
    
    [ZEPPELIN-2420](https://issues.apache.org/jira/browse/ZEPPELIN-2420)
    
    ### How should this be tested?
    
    1. Open navbar.
    2. Notebook listing should appear immediately.
    
    ### Screenshots (if appropriate)
    
    
![](https://issues.apache.org/jira/secure/attachment/12863919/12863919_2420.gif)
    
    ### Questions:
    * Does the licenses files need update? - NO
    * Is there breaking changes for older versions? - NO
    * Does this needs documentation? - NO


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/1ambda/zeppelin 
ZEPPELIN-2420/slow-navbar-notebook-listing

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2261.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2261
    
----
commit 0fccc50d40af31feb2435f449a218b9a8a03d1cd
Author: 1ambda <[email protected]>
Date:   2017-04-19T01:36:32Z

    style: reformat DOM

commit 4237defae533a325240f268735d55ec3339d0b67
Author: 1ambda <[email protected]>
Date:   2017-04-19T01:45:43Z

    fix: Use uib-dropdown in navbar

commit b20b6c62e03c4817ddb5464605757810ed688b7a
Author: 1ambda <[email protected]>
Date:   2017-04-19T01:54:37Z

    fix: Revert ng-show -> ng-if

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to