mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[hotfix] not grouped by -2
This commit is contained in:
parent
55e462d90b
commit
10ea63557a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "superset",
|
||||
"version": "0.16.1rc3",
|
||||
"version": "0.16.1rc4",
|
||||
"description": "Superset is a data exploration platform designed to be visual, intuitive, and interactive.",
|
||||
"license": "Apache-2.0",
|
||||
"directories": {
|
||||
|
@ -19,14 +19,13 @@ function tableVis(slice, payload) {
|
||||
const fd = slice.formData;
|
||||
// Removing metrics (aggregates) that are strings
|
||||
const realMetrics = [];
|
||||
if (fd.metrics) {
|
||||
for (const k in data.records[0]) {
|
||||
if (fd.metrics.indexOf(k) > -1 && !isNaN(data.records[0][k])) {
|
||||
realMetrics.push(k);
|
||||
}
|
||||
let metrics = fd.metrics || [];
|
||||
for (const k in data.records[0]) {
|
||||
if (metrics.indexOf(k) > -1 && !isNaN(data.records[0][k])) {
|
||||
realMetrics.push(k);
|
||||
}
|
||||
}
|
||||
const metrics = realMetrics;
|
||||
metrics = realMetrics;
|
||||
|
||||
function col(c) {
|
||||
const arr = [];
|
||||
@ -145,8 +144,8 @@ function tableVis(slice, payload) {
|
||||
fixDataTableBodyHeight(
|
||||
container.find('.dataTables_wrapper'), height);
|
||||
// Sorting table by main column
|
||||
if (fd.metrics.length > 0) {
|
||||
const mainMetric = fd.metrics[0];
|
||||
if (metrics.length > 0) {
|
||||
const mainMetric = metrics[0];
|
||||
datatable.column(data.columns.indexOf(mainMetric)).order('desc').draw();
|
||||
}
|
||||
container.parents('.widget').find('.tooltip').remove();
|
||||
|
Loading…
Reference in New Issue
Block a user