You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by 1ambda <gi...@git.apache.org> on 2017/05/08 13:31:59 UTC
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
GitHub user 1ambda opened 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

#### After: column filter

#### After: group by + aggregation

#### After: pagination

#### After: selectable rows which can be exported into CSV

#### After: setting menu for table

#### After: change order, hide / show, pinning
![Uploading 2411_change_order.gif…]()
#### After: persisted column type + sorting state

#### synchronized
![Uploading 2411_sync.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 <1a...@gmail.com>
Date: 2017-05-05T06:08:23Z
refactor: extract table related css to display-table.css
commit 15cbfe3d9e79182bcc8a1823c32232d90c3210a3
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:09:34Z
fix: Remove unused css
commit 571e90783011f56287953902037f18ea02ff6efd
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:18:09Z
refactor: variable name
commit 6fa1539f93f7cf9a41117998e21ae5617bf6a0a4
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T07:51:38Z
fix: Remove handsonhelper while using moment form npm
commit b0291c46b2080129e6623d12874c731406575bf8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T08:19:30Z
feat: render setting for table
commit 898c1f3db781af19e7e5763b14b8f7d038eba6cf
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T15:51:23Z
feat: Use tabledata
commit a7a2c7c2361bd51d19450f0db2741178229754e0
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-06T18:19:27Z
feat: Add table option
commit f71daaf73b277e69ec7ad98a051b77eb6d49a94f
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T02:58:40Z
feat: resetTableOption
commit f6cda899b866cea13291228a3e0cee79d2af5525
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:40:46Z
fix: persist initial config
commit 3f7180f6b6a48c347aacf507dd8de203ae6a9d40
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:54:10Z
docs: Update desc for table option
commit 3acde9a531632b419fcec06b764909378565060c
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T07:36:50Z
fix: set valid pagination opts
commit 3b85afdeba2b0d885564d5c638283c904484c7e1
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T08:20:09Z
feat: Add paginiation table opts
commit 99b2b74d310e60963cadffa5cac3911a4708bec8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T09:13:19Z
feat: Add types to menu
commit 9d6269917f51205cff60b4c2448712185f9ece61
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:12:52Z
fix: enable scroll in col menus
commit e876b6b27454aea8b9d70ada1f3959274562cb49
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:40:06Z
fix: Remove refresh in menu actions
commit 7baa9048c121c09cb41799e064581987cb0a15ca
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T15:22:01Z
refactor: Add getGrid* funcs
commit 767d3ccd0acb96be073bdd3486a9c32429e5b906
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T17:51:35Z
feat: Persist grid state
commit 25630989992c0c850ec000cc808884581738f23b
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T18:23:21Z
fix: Prevent recursive emitting
commit 4a8717d8e2bb216b46148340787d04d56cb4dc08
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T05:21:40Z
feat: Add missing change events
commit 7d9744b17cfd7fa34b9ce16947100c48e3d0b205
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:17:53Z
fix: Commit graph config when closing
commit 69cb5084613219b94b1280fe734135fd3ac5f5d6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:18:18Z
fix: Persist tableOption immediately
commit 706b57da331a22321d7bf425e34b5d542e28e740
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:49:33Z
fix: Use isRestoring flag to avoid triggering event when initializing
commit 7e497dcda5a4d111407b55747a74f756cab41bb6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T11:38:16Z
feat: Persist type
commit 57d379de8d40461a4cfd138660a100ee3391dfac
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T13:00:17Z
fix: DON'T debounce for emit
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2323
@Leemoonsoo
Colorizing (even rows) is cognitively better because we are not confused when investigating closer rows.
Here are more bright versions
<img width="804" alt="2411_alter" src="https://cloud.githubusercontent.com/assets/4968473/26037441/6eef6ace-392d-11e7-992d-4fb38186852b.png">
<img width="801" alt="2411_white" src="https://cloud.githubusercontent.com/assets/4968473/26037442/764ea582-392d-11e7-9ae8-254b8b3100e3.png">
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2323
Each cell in table supposed to print html. For example
```
%sh echo -e "%table key\tvalue\nsun\t%html <img width=50px src=http://www.freeiconspng.com/uploads/sun-icon-4.jpg></img>"
```
This PR

In master branch

---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Tagar <gi...@git.apache.org>.
Github user Tagar commented on the issue:
https://github.com/apache/zeppelin/pull/2323
Great improvement.
Submitted https://issues.apache.org/jira/browse/ZEPPELIN-3251 to consider showing rows/columns lazily on scrolling events as otherwise ui-grid has a significant overhead for wide datasets so it randers much slower too. Other ideas?
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2323
@Leemoonsoo just rebased and
updated to use `white` color in each cell background in c56edca
now it looks like

---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2323
And this PR adds background in rows.
Master branch

This PR

What do you think? Keep appearance the same as before, so we can keep user experience change minimum. Or is adding background color in rows brings more benefit?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda closed the pull request at:
https://github.com/apache/zeppelin/pull/2323
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2323
@guptarajat Hi, refer the last GIF. "persist" means that all state of table is saved in the note.josn. For example, sorting state will be saved after this PR but it is not in current master.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2323
GTM. Thanks @1ambda for great improvement.
Merge to master if no further discussions.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2323
Here's few feedbacks.
1. Table does not refreshed after height / width of paragraph change.
TBD
2. How about remove 'type' in column table option?
- Removed
- While adding tooltip for each option

3. showColumnFilter
It's used to display aggregated values. I changed the name to `showAggregationFooter` which easier to understand than before.

4. pagination
- Removed pagination related settings.

5. Header bar in the option
- Removed the `save` button.
- Updated icon for reset and added tooltip for it.

---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2323
Tested and overall it's great improvement!
Here's few feedbacks.
1. Table does not refreshed after height / width of paragraph change.
2. How about remove 'type' in column table option?

I guess user will be okay without knowing it.
3. showColumnFilter
Following is screenshot with 'showColumnFilter' on. I don't know what this option supposed to do except for adding empty sticky row in the bottom.

4. pagenation
`defaultPaginationSize ` size can be only changed after the Table is displayed with `defaultPaginationSize ` applied. So changing default does not mean too much in this case. Isn't it?
`availablePaginationSizes` - It's minor opinion, I think it is okay with hardcoded value and not make user configurable.
5. Header bar in the option

Two buttons - 'Save', 'Delete' icon - on right little bit confuses me. It was difficult to guess what those button supposed to do. And figured out
'save' - apply option to the table.
'delete' - restore to default options
While option change applies immediately, how about hide 'Save' button? And change 'delete' icon to something more appropriate? For example "Restore the default values" text would be more intuitive.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2323
@Leemoonsoo
Oops. I missed that feature.
1. Now table renders HTML display in the cells

2. Fixed to have more bright even rows.

---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda closed the pull request at:
https://github.com/apache/zeppelin/pull/2323
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
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

#### After: column filter

#### After: group by + aggregation

#### After: pagination

#### After: selectable rows which can be exported into CSV

#### After: setting menu for table

#### After: change order, hide / show, pinning

#### After: persisted column type + sorting state

#### synchronized

### 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 <1a...@gmail.com>
Date: 2017-05-05T06:08:23Z
refactor: extract table related css to display-table.css
commit 15cbfe3d9e79182bcc8a1823c32232d90c3210a3
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:09:34Z
fix: Remove unused css
commit 571e90783011f56287953902037f18ea02ff6efd
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:18:09Z
refactor: variable name
commit 6fa1539f93f7cf9a41117998e21ae5617bf6a0a4
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T07:51:38Z
fix: Remove handsonhelper while using moment form npm
commit b0291c46b2080129e6623d12874c731406575bf8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T08:19:30Z
feat: render setting for table
commit 898c1f3db781af19e7e5763b14b8f7d038eba6cf
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T15:51:23Z
feat: Use tabledata
commit a7a2c7c2361bd51d19450f0db2741178229754e0
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-06T18:19:27Z
feat: Add table option
commit f71daaf73b277e69ec7ad98a051b77eb6d49a94f
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T02:58:40Z
feat: resetTableOption
commit f6cda899b866cea13291228a3e0cee79d2af5525
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:40:46Z
fix: persist initial config
commit 3f7180f6b6a48c347aacf507dd8de203ae6a9d40
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:54:10Z
docs: Update desc for table option
commit 3acde9a531632b419fcec06b764909378565060c
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T07:36:50Z
fix: set valid pagination opts
commit 3b85afdeba2b0d885564d5c638283c904484c7e1
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T08:20:09Z
feat: Add paginiation table opts
commit 99b2b74d310e60963cadffa5cac3911a4708bec8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T09:13:19Z
feat: Add types to menu
commit 9d6269917f51205cff60b4c2448712185f9ece61
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:12:52Z
fix: enable scroll in col menus
commit e876b6b27454aea8b9d70ada1f3959274562cb49
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:40:06Z
fix: Remove refresh in menu actions
commit 7baa9048c121c09cb41799e064581987cb0a15ca
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T15:22:01Z
refactor: Add getGrid* funcs
commit 767d3ccd0acb96be073bdd3486a9c32429e5b906
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T17:51:35Z
feat: Persist grid state
commit 25630989992c0c850ec000cc808884581738f23b
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T18:23:21Z
fix: Prevent recursive emitting
commit 4a8717d8e2bb216b46148340787d04d56cb4dc08
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T05:21:40Z
feat: Add missing change events
commit 7d9744b17cfd7fa34b9ce16947100c48e3d0b205
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:17:53Z
fix: Commit graph config when closing
commit 69cb5084613219b94b1280fe734135fd3ac5f5d6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:18:18Z
fix: Persist tableOption immediately
commit 706b57da331a22321d7bf425e34b5d542e28e740
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:49:33Z
fix: Use isRestoring flag to avoid triggering event when initializing
commit 7e497dcda5a4d111407b55747a74f756cab41bb6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T11:38:16Z
feat: Persist type
commit 57d379de8d40461a4cfd138660a100ee3391dfac
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T13:00:17Z
fix: DON'T debounce for emit
commit 6fea47584b671f0fa65c85d720d91d9d205b6453
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T13:46:06Z
fix: RAT issue
commit 8104b1032f99b0df9bdd4a40324418244e37495c
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T14:18:37Z
fix: css loader for karma test
commit 474912222e534b2c358866c8e2409d6c67335319
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T15:16:19Z
chore: Remove unused license
commit a6af720b58a5882c4490169d71699aacaa2e1b90
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T15:16:42Z
fix: Remove duplicated console
commit a576cffd6055b0e674340ca7f3d50bd3f77ed70d
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T18:05:13Z
fix: SparkParagraphIT for table
commit ecde027e869406832c7ad5a7d5975c59ff485f86
Author: 1ambda <1a...@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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
Posted by 1ambda <gi...@git.apache.org>.
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

#### After: column filter

#### After: group by + aggregation

#### After: pagination

#### After: selectable rows which can be exported into CSV

#### After: setting menu for table

#### After: change order, hide / show, pinning
![Uploading 2411_change_order.gif…]()
#### After: persisted column type + sorting state

#### synchronized
![Uploading 2411_sync.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 <1a...@gmail.com>
Date: 2017-05-05T06:08:23Z
refactor: extract table related css to display-table.css
commit 15cbfe3d9e79182bcc8a1823c32232d90c3210a3
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:09:34Z
fix: Remove unused css
commit 571e90783011f56287953902037f18ea02ff6efd
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T06:18:09Z
refactor: variable name
commit 6fa1539f93f7cf9a41117998e21ae5617bf6a0a4
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T07:51:38Z
fix: Remove handsonhelper while using moment form npm
commit b0291c46b2080129e6623d12874c731406575bf8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T08:19:30Z
feat: render setting for table
commit 898c1f3db781af19e7e5763b14b8f7d038eba6cf
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-05T15:51:23Z
feat: Use tabledata
commit a7a2c7c2361bd51d19450f0db2741178229754e0
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-06T18:19:27Z
feat: Add table option
commit f71daaf73b277e69ec7ad98a051b77eb6d49a94f
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T02:58:40Z
feat: resetTableOption
commit f6cda899b866cea13291228a3e0cee79d2af5525
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:40:46Z
fix: persist initial config
commit 3f7180f6b6a48c347aacf507dd8de203ae6a9d40
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T03:54:10Z
docs: Update desc for table option
commit 3acde9a531632b419fcec06b764909378565060c
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T07:36:50Z
fix: set valid pagination opts
commit 3b85afdeba2b0d885564d5c638283c904484c7e1
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T08:20:09Z
feat: Add paginiation table opts
commit 99b2b74d310e60963cadffa5cac3911a4708bec8
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T09:13:19Z
feat: Add types to menu
commit 9d6269917f51205cff60b4c2448712185f9ece61
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:12:52Z
fix: enable scroll in col menus
commit e876b6b27454aea8b9d70ada1f3959274562cb49
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T10:40:06Z
fix: Remove refresh in menu actions
commit 7baa9048c121c09cb41799e064581987cb0a15ca
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T15:22:01Z
refactor: Add getGrid* funcs
commit 767d3ccd0acb96be073bdd3486a9c32429e5b906
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T17:51:35Z
feat: Persist grid state
commit 25630989992c0c850ec000cc808884581738f23b
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-07T18:23:21Z
fix: Prevent recursive emitting
commit 4a8717d8e2bb216b46148340787d04d56cb4dc08
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T05:21:40Z
feat: Add missing change events
commit 7d9744b17cfd7fa34b9ce16947100c48e3d0b205
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:17:53Z
fix: Commit graph config when closing
commit 69cb5084613219b94b1280fe734135fd3ac5f5d6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:18:18Z
fix: Persist tableOption immediately
commit 706b57da331a22321d7bf425e34b5d542e28e740
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T07:49:33Z
fix: Use isRestoring flag to avoid triggering event when initializing
commit 7e497dcda5a4d111407b55747a74f756cab41bb6
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T11:38:16Z
feat: Persist type
commit 57d379de8d40461a4cfd138660a100ee3391dfac
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T13:00:17Z
fix: DON'T debounce for emit
commit 6fea47584b671f0fa65c85d720d91d9d205b6453
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T13:46:06Z
fix: RAT issue
commit 8104b1032f99b0df9bdd4a40324418244e37495c
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T14:18:37Z
fix: css loader for karma test
commit 474912222e534b2c358866c8e2409d6c67335319
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T15:16:19Z
chore: Remove unused license
commit a6af720b58a5882c4490169d71699aacaa2e1b90
Author: 1ambda <1a...@gmail.com>
Date: 2017-05-08T15:16:42Z
fix: Remove duplicated console
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by guptarajat <gi...@git.apache.org>.
Github user guptarajat commented on the issue:
https://github.com/apache/zeppelin/pull/2323
"all these things are persisted and synchronized among web socket clients"
What does this mean?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2323
Bright version looks better for me
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2323: [ZEPPELIN-2411] Improve Table
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/2323
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2323: [ZEPPELIN-2411] Improve Table
Posted by vglushak <gi...@git.apache.org>.
Github user vglushak commented on the issue:
https://github.com/apache/zeppelin/pull/2323
> Now table renders HTML display in the cells and adjusts row height based on the content.
There are some limitations for this feature. img, links works. But when I want to place button it just ignore html and display text only.
---