Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ class ChartContainer extends React.PureComponent {
{}
),

addFilter: () => {},

removeFilter: () => {},

done: () => {},
clearError: () => {
// no need to do anything here since Alert is closable
Expand Down
23 changes: 12 additions & 11 deletions superset/assets/visualizations/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,24 @@ function tableVis(slice, payload) {
.enter()
.append('tr')
.selectAll('td')
.data((row) => data.columns.map((c) => {
let val = row[c];
.data(row => data.columns.map(c => {
const val = row[c];
let html;
const isMetric = metrics.indexOf(c) >= 0;
if (c === 'timestamp') {
val = timestampFormatter(val);
html = timestampFormatter(val);
}
if (typeof(val) === 'string') {
val = `<span class="like-pre">${val}</span>`;
html = `<span class="like-pre">${val}</span>`;
}
if (isMetric) {
html = slice.d3format(c, val);
}
return {
col: c,
val,
isMetric: metrics.indexOf(c) >= 0,
html,
isMetric,
};
}))
.enter()
Expand Down Expand Up @@ -118,12 +124,7 @@ function tableVis(slice, payload) {
.style('cursor', function (d) {
return (!d.isMetric) ? 'pointer' : '';
})
.html((d) => {
if (d.isMetric) {
return slice.d3format(d.col, d.val);
}
return d.val;
});
.html(d => d.html ? d.html : d.val);
const height = slice.height();
let paging = false;
let pageLength;
Expand Down