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:19 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/branch-0.4 f76a97248 -> 6a3f152b3


[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.


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

Branch: refs/heads/branch-0.4
Commit: 6a3f152b3a5e44803f19592da6ce7f284232b37a
Parents: f76a972
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:10 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/6a3f152b/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 72af7eb..b23d53b 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
@@ -644,15 +644,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