eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic
Date Thu, 07 Jul 2016 07:21:54 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/branch-0.3 d75050124 -> 3696a7fdc


[EAGLE-355] fix advanced sql parse logic

Adjust the logic of expression parse

Author: jiljiang <jiljiang@ebay.com>

Closes #251 from zombieJ/branch-0.4.

(cherry picked from commit 6a3f152b3a5e44803f19592da6ce7f284232b37a)
Signed-off-by: Hao Chen <hao@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3696a7fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3696a7fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3696a7fd

Branch: refs/heads/branch-0.3
Commit: 3696a7fdcb8555ccebb40c5086c9ee0754097259
Parents: d750501
Author: jiljiang <jiljiang@ebay.com>
Authored: Thu Jul 7 15:21:10 2016 +0800
Committer: Hao Chen <hao@apache.org>
Committed: Thu Jul 7 15:21:42 2016 +0800

----------------------------------------------------------------------
 .../main/webapp/app/public/feature/common/controller.js  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3696a7fd/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index 50f377c..ee1597c 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -489,15 +489,16 @@
 						// >> Parse expression
 						$scope.policy.__.conditions = {};
 						var _condition = _policyUnit.expression.match(/from\s+(\w+)(\[(.*)])?(#window[^\)]*\))?\s+(select
(\w+, )?(\w+)\((\w+)\) as [\w\d_]+ (group by (\w+) )?having ([\w\d_]+) ([<>=]+) ([^\s]+))?/);
-						var _cond_stream = _condition[1];
-						var _cond_query = _condition[3] || "";
-						var _cond_window = _condition[4];
-						var _cond_group = _condition[5];
-						var _cond_groupUnit = _condition.slice(7,14);
 
 						if(!_condition) {
 							$scope.policy.__.advanced = true;
 						} else {
+							var _cond_stream = _condition[1];
+							var _cond_query = _condition[3] || "";
+							var _cond_window = _condition[4];
+							var _cond_group = _condition[5];
+							var _cond_groupUnit = _condition.slice(7,14);
+
 							// > StreamName
 							var _streamName = _cond_stream;
 							var _cond = _cond_query;


Mime
View raw message