zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject [zeppelin] branch master updated: [ZEPPELIN-4014] Show note name on the search list, not the note id
Date Tue, 10 Sep 2019 01:33:28 GMT
This is an automated email from the ASF dual-hosted git repository.

zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new 08d4b9a  [ZEPPELIN-4014] Show note name on the search list, not the note id
08d4b9a is described below

commit 08d4b9a3bf31e02d9ff4c7a47cf3821061458eaa
Author: Jay Jin <jayjinjay@gmail.com>
AuthorDate: Tue Sep 3 01:25:55 2019 +0900

    [ZEPPELIN-4014] Show note name on the search list, not the note id
    
    ### What is this PR for?
    
    The note IDs were shown on the search list(even if it's filtered by note's name)
    Need to show note name rather than id.
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-4014
    
    ### How should this be tested?
    * First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
    * Strongly recommended: add automated unit tests for any new or changed behavior
    * Outline any manual steps to test the PR here.
    
    ### Screenshots (if appropriate)
    (Before: Notebook IDs are shown)
    ![image](https://user-images.githubusercontent.com/3839771/64126895-8346b000-cdea-11e9-87a7-54cf5c3a21d9.png)
    
    (After: Notebook names are shown)
    ![image](https://user-images.githubusercontent.com/3839771/64126858-5f836a00-cdea-11e9-9604-91622c52bfba.png)
    
    ### Questions:
    * Does the licenses files need update?
    * Is there breaking changes for older versions?
    * Does this needs documentation?
    
    Author: Jay Jin <jayjinjay@gmail.com>
    
    Closes #3436 from milooy/feat/ZEPPELIN-4014 and squashes the following commits:
    
    8818febb4 [Jay Jin] Return note name on the notes.flatList to show note name in the search
list
---
 zeppelin-web/src/components/note-list/note-list.factory.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/zeppelin-web/src/components/note-list/note-list.factory.js b/zeppelin-web/src/components/note-list/note-list.factory.js
index 20310e3..ecb04bf 100644
--- a/zeppelin-web/src/components/note-list/note-list.factory.js
+++ b/zeppelin-web/src/components/note-list/note-list.factory.js
@@ -25,8 +25,12 @@ function NoteListFactory(arrayOrderingSrv, TRASH_FOLDER_ID) {
     setNotes: function(notesList) {
       // a flat list to boost searching
       notes.flatList = _.map(notesList, (note) => {
+        let notePath = note.path || note.id;
+        let nodes = notePath.match(/([^\/][^\/]*)/g) || [];
+
         note.isTrash = note.path
           ? note.path.split('/')[1] === TRASH_FOLDER_ID : false;
+        note.name = nodes.pop();
         return note;
       });
 


Mime
View raw message