You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by fj...@apache.org on 2019/04/13 19:05:21 UTC
[incubator-druid] branch master updated: Display null in SQL table
cell (#7463)
This is an automated email from the ASF dual-hosted git repository.
fjy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new 233d485 Display null in SQL table cell (#7463)
233d485 is described below
commit 233d485ad0d79ae033ff5fb88f4192ceabec5bc3
Author: Qi Shu <sh...@gmail.com>
AuthorDate: Sat Apr 13 12:05:14 2019 -0700
Display null in SQL table cell (#7463)
* Display null if cell in table is empty
* Add null
* re-indent
---
web-console/src/views/sql-view.scss | 4 ++++
web-console/src/views/sql-view.tsx | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/web-console/src/views/sql-view.scss b/web-console/src/views/sql-view.scss
index 2cc8876..1cd7ecc 100644
--- a/web-console/src/views/sql-view.scss
+++ b/web-console/src/views/sql-view.scss
@@ -36,6 +36,10 @@
.ReactTable {
flex: 1;
+
+ .null-table-cell {
+ font-style: italic;
+ }
}
}
diff --git a/web-console/src/views/sql-view.tsx b/web-console/src/views/sql-view.tsx
index 1713066..9ae57d3 100644
--- a/web-console/src/views/sql-view.tsx
+++ b/web-console/src/views/sql-view.tsx
@@ -195,7 +195,19 @@ export class SqlView extends React.Component<SqlViewProps, SqlViewState> {
loading={loading}
noDataText={!loading && result && !result.rows.length ? 'No results' : (error || '')}
sortable={false}
- columns={(result ? result.header : []).map((h: any, i) => ({ Header: h, accessor: String(i) }))}
+ columns={
+ (result ? result.header : []).map((h: any, i) => {
+ return {
+ Header: h,
+ accessor: String(i),
+ Cell: row => {
+ const value = row.value;
+ if (value === '' || value === null) return <span className="null-table-cell">null</span>;
+ return value;
+ }
+ };
+ })
+ }
defaultPageSize={10}
className="-striped -highlight"
/>;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org