You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/04/01 06:04:51 UTC
[1/5] storm git commit: STORM-708. CORS support for STORM UI.
Repository: storm
Updated Branches:
refs/heads/master cd6206320 -> 20084ba34
STORM-708. CORS support for STORM UI.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/0201a90a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/0201a90a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/0201a90a
Branch: refs/heads/master
Commit: 0201a90aec9a73c75ec7bed640ddf70efb1874d8
Parents: 3d48f42
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Mon Mar 16 15:33:31 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Mon Mar 16 15:33:31 2015 -0700
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/ui/helpers.clj | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/0201a90a/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index 925b9dc..562a407 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -26,7 +26,8 @@
(:import [org.eclipse.jetty.server Server]
[org.eclipse.jetty.server.nio SelectChannelConnector]
[org.eclipse.jetty.server.ssl SslSocketConnector]
- [org.eclipse.jetty.servlet ServletHolder FilterMapping])
+ [org.eclipse.jetty.servlet ServletHolder FilterMapping]
+ [org.eclipse.jetty.servlets CrossOriginFilter])
(:require [ring.util servlet])
(:require [compojure.route :as route]
[compojure.handler :as handler]))
@@ -168,12 +169,20 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
(when (> port 0)
(.addConnector server (mk-ssl-connector port ks-path ks-password ks-type))))
+(defn cors-filter-handler
+ []
+ (doto (org.eclipse.jetty.servlet.FilterHolder. (CrossOriginFilter.))
+ (.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
+ (.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
+ (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "*")))
+
(defn config-filter [server handler filters-confs]
(if filters-confs
(let [servlet-holder (ServletHolder.
(ring.util.servlet/servlet handler))
context (doto (org.eclipse.jetty.servlet.ServletContextHandler. server "/")
(.addServlet servlet-holder "/"))]
+ (.addFilter context (cors-filter-handler) "/*" FilterMapping/ALL)
(doseq [{:keys [filter-name filter-class filter-params]} filters-confs]
(if filter-class
(let [filter-holder (doto (org.eclipse.jetty.servlet.FilterHolder.)
[2/5] storm git commit: STORM-708. CORS support for STORM UI.
Posted by sr...@apache.org.
STORM-708. CORS support for STORM UI.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/2c486b31
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/2c486b31
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/2c486b31
Branch: refs/heads/master
Commit: 2c486b31844a18808364cfb3ff68ec967ec46124
Parents: 0201a90
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Sun Mar 22 11:03:42 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Sun Mar 22 11:03:42 2015 -0700
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/ui/core.clj | 3 ++-
storm-core/src/clj/backtype/storm/ui/helpers.clj | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/2c486b31/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj
index c64f35d..a13fcf3 100644
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@ -892,7 +892,8 @@
(defnk json-response
[data callback :serialize-fn to-json :status 200]
{:status status
- :headers (merge {"Cache-Control" "no-cache, no-store"}
+ :headers (merge {"Cache-Control" "no-cache, no-store"
+ "Access-Control-Allow-Origin" "*"}
(if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
{"Content-Type" "application/json;charset=utf-8"}))
:body (if (not-nil? callback)
http://git-wip-us.apache.org/repos/asf/storm/blob/2c486b31/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index 562a407..a7eb280 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -23,10 +23,12 @@
(:use [backtype.storm.util :only [clojurify-structure uuid defnk url-encode]])
(:use [clj-time coerce format])
(:import [backtype.storm.generated ExecutorInfo ExecutorSummary])
+ (:import [java.util EnumSet])
(:import [org.eclipse.jetty.server Server]
[org.eclipse.jetty.server.nio SelectChannelConnector]
[org.eclipse.jetty.server.ssl SslSocketConnector]
[org.eclipse.jetty.servlet ServletHolder FilterMapping]
+ [org.eclipse.jetty.server DispatcherType]
[org.eclipse.jetty.servlets CrossOriginFilter])
(:require [ring.util servlet])
(:require [compojure.route :as route]
@@ -174,7 +176,8 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
(doto (org.eclipse.jetty.servlet.FilterHolder. (CrossOriginFilter.))
(.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
(.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
- (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "*")))
+ (.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "X-Requested-With, X-Requested-By, Access-Control-Allow-Origin, Content-Type, Content-Length, Accept, Origin")
+ ))
(defn config-filter [server handler filters-confs]
(if filters-confs
@@ -182,7 +185,7 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
(ring.util.servlet/servlet handler))
context (doto (org.eclipse.jetty.servlet.ServletContextHandler. server "/")
(.addServlet servlet-holder "/"))]
- (.addFilter context (cors-filter-handler) "/*" FilterMapping/ALL)
+ (.addFilter context (cors-filter-handler) "/*" (EnumSet/allOf DispatcherType))
(doseq [{:keys [filter-name filter-class filter-params]} filters-confs]
(if filter-class
(let [filter-holder (doto (org.eclipse.jetty.servlet.FilterHolder.)
[3/5] storm git commit: STORM-708. CORS support for STORM UI. Allow
CORS to do POST.
Posted by sr...@apache.org.
STORM-708. CORS support for STORM UI. Allow CORS to do POST.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/9c0581e2
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/9c0581e2
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/9c0581e2
Branch: refs/heads/master
Commit: 9c0581e2f0c3ce534017c377e1c0ca206dc90634
Parents: 2c486b3
Author: Sriharsha Chintalapani <ma...@harsha.io>
Authored: Sun Mar 29 21:32:38 2015 -0700
Committer: Sriharsha Chintalapani <ma...@harsha.io>
Committed: Sun Mar 29 21:32:38 2015 -0700
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/ui/core.clj | 3 ++-
storm-core/src/clj/backtype/storm/ui/helpers.clj | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/9c0581e2/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj
index a13fcf3..b8ecbe2 100644
--- a/storm-core/src/clj/backtype/storm/ui/core.clj
+++ b/storm-core/src/clj/backtype/storm/ui/core.clj
@@ -893,7 +893,8 @@
[data callback :serialize-fn to-json :status 200]
{:status status
:headers (merge {"Cache-Control" "no-cache, no-store"
- "Access-Control-Allow-Origin" "*"}
+ "Access-Control-Allow-Origin" "*"
+ "Access-Control-Allow-Headers" "Content-Type, Access-Control-Allow-Headers, Access-Controler-Allow-Origin, X-Requested-By, X-Csrf-Token, Authorization, X-Requested-With"}
(if (not-nil? callback) {"Content-Type" "application/javascript;charset=utf-8"}
{"Content-Type" "application/json;charset=utf-8"}))
:body (if (not-nil? callback)
http://git-wip-us.apache.org/repos/asf/storm/blob/9c0581e2/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj
index a7eb280..b54a46a 100644
--- a/storm-core/src/clj/backtype/storm/ui/helpers.clj
+++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj
@@ -177,6 +177,7 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers:
(.setInitParameter CrossOriginFilter/ALLOWED_ORIGINS_PARAM "*")
(.setInitParameter CrossOriginFilter/ALLOWED_METHODS_PARAM "GET, POST, PUT")
(.setInitParameter CrossOriginFilter/ALLOWED_HEADERS_PARAM "X-Requested-With, X-Requested-By, Access-Control-Allow-Origin, Content-Type, Content-Length, Accept, Origin")
+ (.setInitParameter CrossOriginFilter/ACCESS_CONTROL_ALLOW_ORIGIN_HEADER "*")
))
(defn config-filter [server handler filters-confs]
[5/5] storm git commit: Added STORM-708 to CHANGELOG.
Posted by sr...@apache.org.
Added STORM-708 to CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/20084ba3
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/20084ba3
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/20084ba3
Branch: refs/heads/master
Commit: 20084ba3405ac0ef089fa5b951e9f64f9e0f6f50
Parents: 33f1a4e
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:44:13 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:44:13 2015 -0700
----------------------------------------------------------------------
CHANGELOG.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/20084ba3/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d11d5a6..bb1e4e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
## 0.11.0
- * STORM:615: Add REST API to upload topology.
+ * STORM-708: CORS support for STORM UI.
+ * STORM-615: Add REST API to upload topology.
* STORM-741: Allow users to pass a config value to perform impersonation.
* STORM-724: Document RedisStoreBolt and RedisLookupBolt which is missed.
* STORM-711: All connectors should use collector.reportError and tuple anchoring.
[4/5] storm git commit: Merge branch 'STORM-708' of
https://github.com/harshach/incubator-storm into STORM-708
Posted by sr...@apache.org.
Merge branch 'STORM-708' of https://github.com/harshach/incubator-storm into STORM-708
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/33f1a4ef
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/33f1a4ef
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/33f1a4ef
Branch: refs/heads/master
Commit: 33f1a4ef86852b6f033f512512d4f9969668bfda
Parents: cd62063 9c0581e
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Tue Mar 31 20:43:36 2015 -0700
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Tue Mar 31 20:43:36 2015 -0700
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/ui/core.clj | 4 +++-
storm-core/src/clj/backtype/storm/ui/helpers.clj | 15 ++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/33f1a4ef/storm-core/src/clj/backtype/storm/ui/core.clj
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/33f1a4ef/storm-core/src/clj/backtype/storm/ui/helpers.clj
----------------------------------------------------------------------