From 20e332ae70c822ea4e7e7f5683c982dbba7cab40 Mon Sep 17 00:00:00 2001 From: rubik Date: Tue, 5 Jan 2016 17:42:02 +0800 Subject: [PATCH 1/9] Fixed field in structured query for ES2 --- _site/app.js | 3 ++- src/app/ui/filterBrowser/filterBrowser.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_site/app.js b/_site/app.js index 4a93fe99..1cd743fb 100644 --- a/_site/app.js +++ b/_site/app.js @@ -3897,7 +3897,8 @@ } else { value = row.find(".qual").val(); } - search.addClause(value, field, op, bool); + var use_field = field.slice(field.indexOf(".")+1); + search.addClause(value, use_field, op, bool); }); if(this.el.find(".uiFilterBrowser-showSrc").attr("checked")) { this.fire("searchSource", search.search); diff --git a/src/app/ui/filterBrowser/filterBrowser.js b/src/app/ui/filterBrowser/filterBrowser.js index 7b58d7e4..9d9465eb 100644 --- a/src/app/ui/filterBrowser/filterBrowser.js +++ b/src/app/ui/filterBrowser/filterBrowser.js @@ -102,7 +102,8 @@ } else { value = row.find(".qual").val(); } - search.addClause(value, field, op, bool); + var use_field = field.slice(field.indexOf(".")+1); + search.addClause(value, use_field, op, bool); }); if(this.el.find(".uiFilterBrowser-showSrc").attr("checked")) { this.fire("searchSource", search.search); From ae654eeba444c28623f448e0e3971793715e3991 Mon Sep 17 00:00:00 2001 From: Carlos Manzanedo Rueda Date: Fri, 8 Jan 2016 11:20:38 +0000 Subject: [PATCH 2/9] Enabled xhrFields to pass the credentials on SSO authenticated environments Additional xhrFields : { withCredentials: True} added to the connection --- _site/app.js | 3 +++ src/app/services/cluster/cluster.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/_site/app.js b/_site/app.js index 4a93fe99..8d27a893 100644 --- a/_site/app.js +++ b/_site/app.js @@ -1272,6 +1272,9 @@ return $.ajax( $.extend({ url: this.base_uri + params.path, dataType: "json", + xhrFields:{ + withCredentials: true + }, error: function(xhr, type, message) { if("console" in window) { console.log({ "XHR Error": type, "message": message }); diff --git a/src/app/services/cluster/cluster.js b/src/app/services/cluster/cluster.js index c4ddf655..b53fb18d 100644 --- a/src/app/services/cluster/cluster.js +++ b/src/app/services/cluster/cluster.js @@ -31,6 +31,9 @@ return $.ajax( $.extend({ url: this.base_uri + params.path, dataType: "json", + xhrFields:{ + withCredentials: true + }, error: function(xhr, type, message) { if("console" in window) { console.log({ "XHR Error": type, "message": message }); From 833f808bb1ba4adb5a9edabbc61b6aabe359d51c Mon Sep 17 00:00:00 2001 From: lintaba Date: Wed, 13 Jan 2016 16:53:22 +0100 Subject: [PATCH 3/9] Update README.textile plugin does not require "-" before the install. --- README.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.textile b/README.textile index 71f96f1c..a1a28bcc 100644 --- a/README.textile +++ b/README.textile @@ -10,7 +10,7 @@ There are two main ways of running and installing elasticsearch-head h4. Running as a plugin of Elasticsearch -* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ +* @sudo elasticsearch/bin/plugin install mobz/elasticsearch-head@ * @open http://localhost:9200/_plugin/head/@ This will automatically download the latest version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode; From 10a7fc3467e34ebe256734231ec77b3d8fb6e404 Mon Sep 17 00:00:00 2001 From: Bill Mitchell Date: Fri, 15 Jan 2016 16:56:35 -0500 Subject: [PATCH 4/9] very minor typographical corrections --- README.textile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.textile b/README.textile index 71f96f1c..c18aa679 100644 --- a/README.textile +++ b/README.textile @@ -15,11 +15,11 @@ h4. Running as a plugin of Elasticsearch This will automatically download the latest version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode; * elasticsearch-head automatically connects to the node that is running it -* If you've installed the .deb package, then the plugin exectuable will be available at /usr/share/elasticsearch/bin/plugin. +* If you've installed the .deb package, then the plugin executable will be available at /usr/share/elasticsearch/bin/plugin. h4. Running with built in server -* enable "cors":http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html by add @http.cors.enabled: true@ in elasticsearch configuration +* enable "cors":http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html by adding @http.cors.enabled: true@ in elasticsearch configuration * @git clone git://github.com/mobz/elasticsearch-head.git@ * @cd elasticsearch-head@ * @npm install@ @@ -33,11 +33,11 @@ h4. Alternatives h5. Running from the filesystem -elastisearch-head is a standalone webapp written in good-ol' html5. This means, you can put it up on any webserver, run it directly from the filesystem, use it on an ipad, or put it on a floppy disk and carry it with you. +elastisearch-head is a standalone webapp written in good-ol' html5. This means, you can put it up on any webserver, run it directly from the filesystem, use it on an iPad, or put it on a floppy disk and carry it with you. h4. URL Parameters -Parameters may be appended to the url set some initial state eg. @head/index.html?base_uri=http://node-01.example.com:9200@ +Parameters may be appended to the url to set an initial state eg. @head/index.html?base_uri=http://node-01.example.com:9200@ * @base_uri@ force elasticsearch-head to connect to a particular node. * @dashboard@ experimental feature to open elasticsearch-head in a mode suitable for dashboard / radiator. Accepts one parameter @dashboard=cluster@ @@ -61,8 +61,9 @@ Then # @npm install@ # downloads node dev dependencies # @grunt dev@ # builds the distribution files, then watches the src directory for changes -Changes to both _site and src directories *must* be committed, to allow people to run head without running dev tools -and folllow existing dev patterns, such as indenting with tabs +Changes to both _site and src directories *must* be committed, to allow people to +run elasticsearch-head without running dev tools and folllow existing dev patterns, +such as indenting with tabs. h5. Contributing an Internationalisation @@ -77,7 +78,7 @@ To contribute an internationalisation # Follow "Contributing" instructions above # Find your 2-character "ISO 639-1 language code":http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes # edit _site/index.html to add your 2 letter language code to the data-langs attribute of this line @@ -# make a copy of @src/app/langs/en_strings.js@ prefixed with your langugae code +# make a copy of @src/app/langs/en_strings.js@ prefixed with your language code # convert english strings and fragments to your language. "Formatting Rules":http://docs.oracle.com/javase/tutorial/i18n/format/messageintro.html # Submit a pull request From 30823ff061c685998f58b6f13f648b6e83722c9a Mon Sep 17 00:00:00 2001 From: Bill Mitchell Date: Fri, 15 Jan 2016 17:01:17 -0500 Subject: [PATCH 5/9] few more --- README.textile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index c18aa679..545c6fb5 100644 --- a/README.textile +++ b/README.textile @@ -10,7 +10,8 @@ There are two main ways of running and installing elasticsearch-head h4. Running as a plugin of Elasticsearch -* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ +* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ (ES 1.x) +* @sudo elasticsearch/bin/plugin install mobz/elasticsearch-head@ (ES 2.x) * @open http://localhost:9200/_plugin/head/@ This will automatically download the latest version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode; @@ -62,7 +63,7 @@ Then # @grunt dev@ # builds the distribution files, then watches the src directory for changes Changes to both _site and src directories *must* be committed, to allow people to -run elasticsearch-head without running dev tools and folllow existing dev patterns, +run elasticsearch-head without running dev tools and follow existing dev patterns, such as indenting with tabs. h5. Contributing an Internationalisation From a7e81b0a59127025a0f820292d8db2125a33149c Mon Sep 17 00:00:00 2001 From: Philips Kokoh Date: Wed, 20 Jan 2016 07:59:44 +0800 Subject: [PATCH 6/9] Revert "Enabled xhrFields to pass the credentials on SSO authenticated environments" --- _site/app.js | 3 --- src/app/services/cluster/cluster.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/_site/app.js b/_site/app.js index 8d27a893..4a93fe99 100644 --- a/_site/app.js +++ b/_site/app.js @@ -1272,9 +1272,6 @@ return $.ajax( $.extend({ url: this.base_uri + params.path, dataType: "json", - xhrFields:{ - withCredentials: true - }, error: function(xhr, type, message) { if("console" in window) { console.log({ "XHR Error": type, "message": message }); diff --git a/src/app/services/cluster/cluster.js b/src/app/services/cluster/cluster.js index b53fb18d..c4ddf655 100644 --- a/src/app/services/cluster/cluster.js +++ b/src/app/services/cluster/cluster.js @@ -31,9 +31,6 @@ return $.ajax( $.extend({ url: this.base_uri + params.path, dataType: "json", - xhrFields:{ - withCredentials: true - }, error: function(xhr, type, message) { if("console" in window) { console.log({ "XHR Error": type, "message": message }); From 2f77175a020ab45abd54a5528d7c731369c28703 Mon Sep 17 00:00:00 2001 From: Bill Mitchell Date: Mon, 25 Jan 2016 11:38:30 -0500 Subject: [PATCH 7/9] Amended to reflect that the -install invocation also works for 0.x vintages and that --install matches more closely the 2.x help page --- README.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 545c6fb5..d5ae1caf 100644 --- a/README.textile +++ b/README.textile @@ -10,8 +10,8 @@ There are two main ways of running and installing elasticsearch-head h4. Running as a plugin of Elasticsearch -* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ (ES 1.x) -* @sudo elasticsearch/bin/plugin install mobz/elasticsearch-head@ (ES 2.x) +* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ (ES 1.x, ES 0.x) +* @sudo elasticsearch/bin/plugin --install mobz/elasticsearch-head@ (ES 2.x) * @open http://localhost:9200/_plugin/head/@ This will automatically download the latest version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode; From 99b8938dd2b2f679a456ffcd4fe8cc9a5cee6887 Mon Sep 17 00:00:00 2001 From: Philips Kokoh Date: Fri, 29 Jan 2016 08:29:23 +0800 Subject: [PATCH 8/9] added install command for different ES version --- README.textile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 3256bbef..f34a512b 100644 --- a/README.textile +++ b/README.textile @@ -10,8 +10,14 @@ There are two main ways of running and installing elasticsearch-head h4. Running as a plugin of Elasticsearch -* @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head@ (ES 1.x, ES 0.x) -* @sudo elasticsearch/bin/plugin install mobz/elasticsearch-head@ (ES 2.x) +* Install elasticsearch-head: + - for Elasticsearch 2.x: + @sudo elasticsearch/bin/plugin install mobz/elasticsearch-head@ + - for Elasticsearch 1.x: + @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/1.x@ + - for Elasticsearch 0.9: + @sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/0.9@ + * @open http://localhost:9200/_plugin/head/@ This will automatically download the latest version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode; From 37e5ca9f67709d2c4a14f858e7ffbfc6ab06199b Mon Sep 17 00:00:00 2001 From: rubik Date: Tue, 5 Jan 2016 17:42:02 +0800 Subject: [PATCH 9/9] Fixed field in structured query for ES2 --- _site/app.js | 3 ++- src/app/ui/filterBrowser/filterBrowser.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_site/app.js b/_site/app.js index 4a93fe99..1cd743fb 100644 --- a/_site/app.js +++ b/_site/app.js @@ -3897,7 +3897,8 @@ } else { value = row.find(".qual").val(); } - search.addClause(value, field, op, bool); + var use_field = field.slice(field.indexOf(".")+1); + search.addClause(value, use_field, op, bool); }); if(this.el.find(".uiFilterBrowser-showSrc").attr("checked")) { this.fire("searchSource", search.search); diff --git a/src/app/ui/filterBrowser/filterBrowser.js b/src/app/ui/filterBrowser/filterBrowser.js index 7b58d7e4..9d9465eb 100644 --- a/src/app/ui/filterBrowser/filterBrowser.js +++ b/src/app/ui/filterBrowser/filterBrowser.js @@ -102,7 +102,8 @@ } else { value = row.find(".qual").val(); } - search.addClause(value, field, op, bool); + var use_field = field.slice(field.indexOf(".")+1); + search.addClause(value, use_field, op, bool); }); if(this.el.find(".uiFilterBrowser-showSrc").attr("checked")) { this.fire("searchSource", search.search);