From 46aea3381193efe6659e40459b0d06afe377cff0 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 4 Jun 2015 14:34:53 -0700 Subject: [PATCH] Extracting conditional logic to make code more readable --- .../doc_table/components/table_row/cell.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/kibana/components/doc_table/components/table_row/cell.html b/src/kibana/components/doc_table/components/table_row/cell.html index 2a3f18b9cb53e..55f1e17f0cde5 100644 --- a/src/kibana/components/doc_table/components/table_row/cell.html +++ b/src/kibana/components/doc_table/components/table_row/cell.html @@ -1,3 +1,13 @@ -> +<% +var attributes = ''; +if (timefield) { + attributes='class="discover-table-timefield" width="1%"'; +} else if (sourcefield) { + attributes='class="discover-table-sourcefield"'; +} else { + attributes='class="discover-table-datafield"'; +} +%> +> <%= formatted %>