Repository: incubator-eagle Updated Branches: refs/heads/branch-0.4 6a3f152b3 -> 2f9018881
[EAGLE-355] fix advanced sql parse logic Adjust the logic of expression parse Author: jiljiang <[email protected]> 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/2f901888 Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/2f901888 Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/2f901888 Branch: refs/heads/branch-0.4 Commit: 2f9018881fc29a6cefd557352d8d436770bfa1fb Parents: 6a3f152 Author: jiljiang <[email protected]> Authored: Mon Jul 11 16:43:57 2016 +0800 Committer: anyway1021 <[email protected]> Committed: Mon Jul 11 16:43:57 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/2f901888/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 b23d53b..e926e36 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, _cond_query, _cond_window, _cond_group, _cond_groupUnit; 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); + _cond_stream = _condition[1]; + _cond_query = _condition[3] || ""; + _cond_window = _condition[4]; + _cond_group = _condition[5]; + _cond_groupUnit = _condition.slice(7,14); // > StreamName var _streamName = _cond_stream;
