GitHub user 1ambda reopened a pull request:

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

    [ZEPPELIN-2411] Improve Table

    
    ### What is this PR for?
    
    **Improve Table** using 
[ui-grid](http://ui-grid.info/docs/#/tutorial/401_AllFeatures).
    
    - persist column type (**custom feature** which is not provided by 
[ui-grid](https://github.com/angular-ui/ui-grid))
    - persist column state: order, hide/show, **sorting**
    - **column filter**
    - **pagination**
    - **configurable table**: using `setting` menu.
    - **selectable rows** + export only selected rows to CSV
    - **group by** + **aggregation**
    - **pinning**: left / right
    
    And **all these things are persisted and synchronized among web socket 
clients**
    
    See the screenshot section for more detail.
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [x] - Remove handsontable dependencies
    * [x] - Use npm packaged moment* packages.
    * [x] - Apply ui-grid
    * [x] - Add setting menu
    * [x] - Fix some issues
    * [x] - Persist column type
    
    ### What is the Jira issue?
    
    [ZEPPELIN-2411](https://issues.apache.org/jira/browse/ZEPPELIN-2411)
    
    ### How should this be tested?
    
    1. Build: `mvn clean package -DskipTests; ./bin/zeppelin-daemon.sh restart`
    2. Open a note and create tables. If you don't have proper paragraphs, use 
this snippet.
    
    ```scala
    %spark
    
    import org.apache.commons.io.IOUtils
    import java.net.URL
    import java.nio.charset.Charset
    
    val bankText = sc.parallelize(
        IOUtils.toString(
            new 
URL("https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv";),
            Charset.forName("utf8")).split("\n"))
    
    case class Bank(
        age: Integer, 
        job: String, 
        marital: String, 
        education: String, 
        balance: Integer,
        housing: Boolean,
        loan: Boolean,
        contact: String,
        day: Int,
        month: String,
        duration: Int,
        y: Boolean
    )
    
    val bank = bankText.map(s => s.split(";")).filter(s => s(0) != 
"\"age\"").map(
        s => Bank(s(0).toInt, 
                s(1).replaceAll("\"", ""),
                s(2).replaceAll("\"", ""),
                s(3).replaceAll("\"", ""),
                s(5).replaceAll("\"", "").toInt,
                if (s(6).replaceAll("\"", "") == "yes") true else false,
                if (s(7).replaceAll("\"", "") == "yes") true else false,
                s(8).replaceAll("\"", ""),
                s(9).replaceAll("\"", "").toInt,
                s(10).replaceAll("\"", ""),
                s(11).replaceAll("\"", "").toInt,
                if (s(16).replaceAll("\"", "") == "yes") true else false
            )
    ).toDF()
    bank.registerTempTable("bank")
    ```
    
    ```sql
    select age, education, job, balance from bank limit 1000
    ```
    
    ### Screenshots (if appropriate)
    
    #### Before
    
    
![image](https://cloud.githubusercontent.com/assets/4968473/25803644/d0d81524-3432-11e7-8cf6-dde16465a447.png)
    
    #### After: column filter
    
    
![2411_filter](https://cloud.githubusercontent.com/assets/4968473/25825895/b3cc6442-347f-11e7-9332-acda323f5597.gif)
    
    #### After: group by + aggregation
    
    
![2411_group_aggr](https://cloud.githubusercontent.com/assets/4968473/25825888/b030d6b0-347f-11e7-8065-5b67bb341142.gif)
    
    #### After: pagination
    
    
![2411_pagination](https://cloud.githubusercontent.com/assets/4968473/25825886/ac95c7ae-347f-11e7-9168-2f9d5157e78c.gif)
    
    #### After: selectable rows which can be exported into CSV
    
    
![2411_selection](https://cloud.githubusercontent.com/assets/4968473/25825879/a5ed0868-347f-11e7-9100-8b18089e7387.gif)
    
    #### After: setting menu for table
    
    
![2411_setting](https://cloud.githubusercontent.com/assets/4968473/25825872/9e59d036-347f-11e7-990e-6f33472dcd8a.gif)
    
    #### After: change order, hide / show, pinning
    
    
![2411_change_order](https://cloud.githubusercontent.com/assets/4968473/25825863/942e6afe-347f-11e7-9077-501cadfea442.gif)
    
    
    #### After: persisted column type + sorting state
    
    
![image](https://cloud.githubusercontent.com/assets/4968473/25805972/a4251d74-343c-11e7-86f0-135b8cbf6b2b.png)
    
    #### synchronized
    
    
![2411_sync](https://cloud.githubusercontent.com/assets/4968473/25825850/881121c6-347f-11e7-8c84-97055ce8aed6.gif)
    
    
    ### Questions:
    * Does the licenses files need update? - YES, updated
    * 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-2411/prettify-table

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

    https://github.com/apache/zeppelin/pull/2323.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 #2323
    
----
commit ed7f7782bc724ca6a78bad6663f21c5949c68279
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T06:08:23Z

    refactor: extract table related css to display-table.css

commit 15cbfe3d9e79182bcc8a1823c32232d90c3210a3
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T06:09:34Z

    fix: Remove unused css

commit 571e90783011f56287953902037f18ea02ff6efd
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T06:18:09Z

    refactor: variable name

commit 6fa1539f93f7cf9a41117998e21ae5617bf6a0a4
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T07:51:38Z

    fix: Remove handsonhelper while using moment form npm

commit b0291c46b2080129e6623d12874c731406575bf8
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T08:19:30Z

    feat: render setting for table

commit 898c1f3db781af19e7e5763b14b8f7d038eba6cf
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-05T15:51:23Z

    feat: Use tabledata

commit a7a2c7c2361bd51d19450f0db2741178229754e0
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-06T18:19:27Z

    feat: Add table option

commit f71daaf73b277e69ec7ad98a051b77eb6d49a94f
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T02:58:40Z

    feat: resetTableOption

commit f6cda899b866cea13291228a3e0cee79d2af5525
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T03:40:46Z

    fix: persist initial config

commit 3f7180f6b6a48c347aacf507dd8de203ae6a9d40
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T03:54:10Z

    docs: Update desc for table option

commit 3acde9a531632b419fcec06b764909378565060c
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T07:36:50Z

    fix: set valid pagination opts

commit 3b85afdeba2b0d885564d5c638283c904484c7e1
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T08:20:09Z

    feat: Add paginiation table opts

commit 99b2b74d310e60963cadffa5cac3911a4708bec8
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T09:13:19Z

    feat: Add types to menu

commit 9d6269917f51205cff60b4c2448712185f9ece61
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T10:12:52Z

    fix: enable scroll in col menus

commit e876b6b27454aea8b9d70ada1f3959274562cb49
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T10:40:06Z

    fix: Remove refresh in menu actions

commit 7baa9048c121c09cb41799e064581987cb0a15ca
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T15:22:01Z

    refactor: Add getGrid* funcs

commit 767d3ccd0acb96be073bdd3486a9c32429e5b906
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T17:51:35Z

    feat: Persist grid state

commit 25630989992c0c850ec000cc808884581738f23b
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-07T18:23:21Z

    fix: Prevent recursive emitting

commit 4a8717d8e2bb216b46148340787d04d56cb4dc08
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T05:21:40Z

    feat: Add missing change events

commit 7d9744b17cfd7fa34b9ce16947100c48e3d0b205
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T07:17:53Z

    fix: Commit graph config when closing

commit 69cb5084613219b94b1280fe734135fd3ac5f5d6
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T07:18:18Z

    fix: Persist tableOption immediately

commit 706b57da331a22321d7bf425e34b5d542e28e740
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T07:49:33Z

    fix: Use isRestoring flag to avoid triggering event when initializing

commit 7e497dcda5a4d111407b55747a74f756cab41bb6
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T11:38:16Z

    feat: Persist type

commit 57d379de8d40461a4cfd138660a100ee3391dfac
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T13:00:17Z

    fix: DON'T debounce for emit

commit 6fea47584b671f0fa65c85d720d91d9d205b6453
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T13:46:06Z

    fix: RAT issue

commit 8104b1032f99b0df9bdd4a40324418244e37495c
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T14:18:37Z

    fix: css loader for karma test

commit 474912222e534b2c358866c8e2409d6c67335319
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T15:16:19Z

    chore: Remove unused license

commit a6af720b58a5882c4490169d71699aacaa2e1b90
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T15:16:42Z

    fix: Remove duplicated console

commit a576cffd6055b0e674340ca7f3d50bd3f77ed70d
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-08T18:05:13Z

    fix: SparkParagraphIT for table

commit ecde027e869406832c7ad5a7d5975c59ff485f86
Author: 1ambda <1am...@gmail.com>
Date:   2017-05-09T19:51:29Z

    fix: Reset tableColumnTypeState

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to