From 31a9d5f81b79b91a12a7e0b74f172ff8afc4bdd3 Mon Sep 17 00:00:00 2001 From: Ivana Date: Mon, 13 Jul 2020 16:12:08 +0200 Subject: [PATCH] Remove _source field from table results as we are showing each source field as column --- .../datasource/elasticsearch/elastic_response.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/public/app/plugins/datasource/elasticsearch/elastic_response.ts b/public/app/plugins/datasource/elasticsearch/elastic_response.ts index e2579b85a16..447fede18ae 100644 --- a/public/app/plugins/datasource/elasticsearch/elastic_response.ts +++ b/public/app/plugins/datasource/elasticsearch/elastic_response.ts @@ -571,13 +571,6 @@ const createEmptyDataFrame = ( }).parse = (v: any) => { return v || ''; }; - } else { - series.addField({ - name: '_source', - type: FieldType.string, - }).parse = (v: any) => { - return JSON.stringify(v, null, 2); - }; } if (logLevelField) { @@ -596,6 +589,10 @@ const createEmptyDataFrame = ( if (fieldNames.includes(propName)) { continue; } + // Do not add _source field as we are showing each _source field in table instead. + if (propName === '_source') { + continue; + } series.addField({ name: propName,