Skip to content

Commit

Permalink
Merge pull request #435 from EverythingMe/fix_ui
Browse files Browse the repository at this point in the history
Fix: string columns with date/time values failed to render.
  • Loading branch information
arikfr committed May 19, 2015
2 parents 6312f87 + 30a89bf commit a1c8ef9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rd_ui/app/scripts/services/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

var columnTypes = {};

// TODO: we should stop manipulating incoming data, and switch to relaying on the column type set by the backend.
// This logic is prone to errors, and better be removed. Kept for now, for backward compatability.
_.each(this.query_result.data.rows, function (row) {
_.each(row, function (v, k) {
if (angular.isNumber(v)) {
Expand All @@ -30,7 +32,7 @@

_.each(this.query_result.data.columns, function(column) {
if (columnTypes[column.name]) {
if (column.type == null) {
if (column.type == null || column.type == 'string') {
column.type = columnTypes[column.name];
}
}
Expand Down

0 comments on commit a1c8ef9

Please sign in to comment.