diff --git a/client/pom.xml b/client/pom.xml index d47b9d70b48..d53574583bc 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/common/pom.xml b/common/pom.xml index 14d465c555a..e0af8d7ccd3 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/druid-services/pom.xml b/druid-services/pom.xml index 256d5db5ce0..23c85d35136 100644 --- a/druid-services/pom.xml +++ b/druid-services/pom.xml @@ -24,11 +24,11 @@ druid-services druid-services druid-services - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/examples/pom.xml b/examples/pom.xml index 2e70a7edd94..d6bddc3fbd7 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/examples/rand/pom.xml b/examples/rand/pom.xml index f058291e86a..9ce71b3550a 100644 --- a/examples/rand/pom.xml +++ b/examples/rand/pom.xml @@ -9,7 +9,7 @@ com.metamx druid-examples - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/examples/twitter/pom.xml b/examples/twitter/pom.xml index b4432b4873c..85ca4de6fbd 100644 --- a/examples/twitter/pom.xml +++ b/examples/twitter/pom.xml @@ -9,7 +9,7 @@ com.metamx druid-examples - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/index-common/pom.xml b/index-common/pom.xml index 5b0bad72e7f..e16ec30b5d3 100644 --- a/index-common/pom.xml +++ b/index-common/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/indexer/pom.xml b/indexer/pom.xml index a2dcbf974c5..3ede7b9c648 100644 --- a/indexer/pom.xml +++ b/indexer/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/merger/pom.xml b/merger/pom.xml index ca4d5bdcc94..f1c67c73918 100644 --- a/merger/pom.xml +++ b/merger/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/pom.xml b/pom.xml index ac9dabaa23c..4258fb41e7e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ com.metamx druid pom - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT druid druid diff --git a/realtime/pom.xml b/realtime/pom.xml index 02d61e07eeb..8493ac65ac4 100644 --- a/realtime/pom.xml +++ b/realtime/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/server/pom.xml b/server/pom.xml index 864acfccdd6..3270e12a9be 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -28,7 +28,7 @@ com.metamx druid - 0.3.23-SNAPSHOT + 0.3.24-SNAPSHOT diff --git a/server/src/main/resources/static/js/druidTable-0.0.1.js b/server/src/main/resources/static/js/druidTable-0.0.1.js index 541d437923f..7b73f315375 100644 --- a/server/src/main/resources/static/js/druidTable-0.0.1.js +++ b/server/src/main/resources/static/js/druidTable-0.0.1.js @@ -55,16 +55,24 @@ var DruidTable = function() { // build table header html += ""; + // find all unique field names + var fieldNames = {}; + for (var row in this.getRows()) { + for (var field in this.getRow(row)) { + fieldNames[field] = 1; + } + } + // build table header filters html += ""; - for (var field in this.getRow(0)) { + for (var field in fieldNames) { html += ""; } html += ""; // build table header column headings html += ""; - for (var field in this.getRow(0)) { + for (var field in fieldNames) { html += "" + field + ""; } html += ""; @@ -74,8 +82,13 @@ var DruidTable = function() { html += ""; for (var r in this.getRows()) { html += ""; - for (var field in this.getRow(r)) { - html += "" + this.getCell(r, field) + ""; + for (var field in fieldNames) { + var row = this.getRow(r); + if (row.hasOwnProperty(field)) { + html += "" + this.getCell(r, field) + ""; + } else { + html += ""; + } } html += ""; } diff --git a/server/src/main/resources/static/js/tablehelper-0.0.2.js b/server/src/main/resources/static/js/tablehelper-0.0.2.js index 57e20f1a7e4..3c060ba09a4 100644 --- a/server/src/main/resources/static/js/tablehelper-0.0.2.js +++ b/server/src/main/resources/static/js/tablehelper-0.0.2.js @@ -18,7 +18,7 @@ function buildTable(data, el, dontDisplay, table, row) { // parse JSON for (var item in data) { - setTable(data[item], el, dontDisplay, table, row); + setTable(data[item], el, dontDisplay, table, row, ""); row++; } @@ -26,16 +26,16 @@ function buildTable(data, el, dontDisplay, table, row) { initDataTable(el); } -function setTable(data, el, dontDisplay, table, row) { +function setTable(data, el, dontDisplay, table, row, fieldNamespace) { for (var field in data) { if (_.contains(dontDisplay, field)) { // do nothing } else if (Array.isArray(data[field])) { - table.setCell(row, field, JSON.stringify(data[field])); + table.setCell(row, fieldNamespace + field, JSON.stringify(data[field])); } else if (!(data[field] instanceof Object)) { - table.setCell(row, field, data[field]); + table.setCell(row, fieldNamespace + field, data[field]); } else { - setTable(data[field], el, dontDisplay, table, row); + setTable(data[field], el, dontDisplay, table, row, fieldNamespace + field + " "); } } }