From f4af6502921748632b194e5f806b3bb67e982b57 Mon Sep 17 00:00:00 2001 From: Ryan McClarnon Date: Mon, 10 Aug 2015 16:17:39 +0100 Subject: [PATCH 1/2] Enables multi-filtering for big-query. Before had issue with hyphen in field name --- rd_ui/app/scripts/services/resources.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rd_ui/app/scripts/services/resources.js b/rd_ui/app/scripts/services/resources.js index dd7c7e2a0f..4242670413 100644 --- a/rd_ui/app/scripts/services/resources.js +++ b/rd_ui/app/scripts/services/resources.js @@ -198,8 +198,8 @@ var yValues = {}; _.each(row, function (value, definition) { - var name = definition.split("::")[0]; - var type = definition.split("::")[1]; + var name = definition.split("::")[0] || definition.split("__")[0]; + var type = definition.split("::")[1] || definition.split("__")[0]; if (mapping) { type = mapping[definition]; } @@ -224,6 +224,10 @@ seriesName = String(value); } + if (type == 'multiFilter') { + seriesName = String(value); + } + if (type == 'multi-filter') { seriesName = String(value); } @@ -322,7 +326,7 @@ QueryResult.prototype.prepareFilters = function () { var filters = []; - var filterTypes = ['filter', 'multi-filter']; + var filterTypes = ['filter', 'multi-filter', 'multiFilter']; _.each(this.getColumnNames(), function (col) { var type = col.split('::')[1] || col.split('__')[1]; if (_.contains(filterTypes, type)) { @@ -331,7 +335,7 @@ name: col, friendlyName: this.getColumnFriendlyName(col), values: [], - multiple: (type=='multi-filter') + multiple: (type=='multiFilter') || (type=='multi-filter') } filters.push(filter); } From 371422a9ae847c4629f60de43f2401deb7b0d408 Mon Sep 17 00:00:00 2001 From: Ryan McClarnon Date: Mon, 10 Aug 2015 23:58:46 +0100 Subject: [PATCH 2/2] Merge multi-filter check into one statement --- rd_ui/app/scripts/services/resources.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rd_ui/app/scripts/services/resources.js b/rd_ui/app/scripts/services/resources.js index 4242670413..213e1a90fc 100644 --- a/rd_ui/app/scripts/services/resources.js +++ b/rd_ui/app/scripts/services/resources.js @@ -224,11 +224,7 @@ seriesName = String(value); } - if (type == 'multiFilter') { - seriesName = String(value); - } - - if (type == 'multi-filter') { + if (type == 'multiFilter' || type == 'multi-filter') { seriesName = String(value); } });