From 4cef4b0b681df05b1c3acc1a1242cfee182bc41b Mon Sep 17 00:00:00 2001 From: stefounet Date: Mon, 4 Feb 2013 21:36:06 +0100 Subject: [PATCH 1/2] Add filter fields on logs --- public/lib/js/ajax.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/lib/js/ajax.js b/public/lib/js/ajax.js index fb5c14a1e..816379bda 100644 --- a/public/lib/js/ajax.js +++ b/public/lib/js/ajax.js @@ -915,6 +915,8 @@ function details_table(objid,theme) { var buttons = "" + xmlEnt(value) + "" + " " + + " " + " "; @@ -991,7 +993,12 @@ function mSearch(field, value, mode) { var query = field + ":" + "\"" + addslashes(value.toString()) + "\""; } var glue = queryinput != "" ? " AND " : " "; - window.hashjson.search = queryinput + glue + query; + if (query.indexOf('FILTER') !== -1) { + window.hashjson.search = query.slice(7); + } + else { + window.hashjson.search = queryinput + glue + query; + } setHash(window.hashjson); scroll(0, 0); } From 39f0f57a7d371d1b096fb1f7778982b846820496 Mon Sep 17 00:00:00 2001 From: stefounet Date: Mon, 4 Feb 2013 22:41:35 +0100 Subject: [PATCH 2/2] Fix parsing clickable URLs containing , and - --- public/lib/js/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/lib/js/ajax.js b/public/lib/js/ajax.js index 816379bda..4f2da7d5d 100644 --- a/public/lib/js/ajax.js +++ b/public/lib/js/ajax.js @@ -927,7 +927,7 @@ function details_table(objid,theme) { if (resultjson.kibana.clickable_urls) { var value = value === undefined ? "-" : value.toString(); // Detect URLs and inserts delimiters - var value = value.replace(RegExp("(https?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?)", "g"), + var value = value.replace(RegExp("(https?://([-\\w\\.]+)+(:\\d+)?(/([\\,-\\w/_\\.]*(\\?\\S+)?)?)?)", "g"), function (all, text, char) { return "@KIBANA_LINK_START@" + text + "@KIBANA_LINK_END@"; }