Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3EA76200B41 for ; Thu, 7 Jul 2016 09:21:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D2F9160A68; Thu, 7 Jul 2016 07:21:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 87639160A59 for ; Thu, 7 Jul 2016 09:21:58 +0200 (CEST) Received: (qmail 50695 invoked by uid 500); 7 Jul 2016 07:21:57 -0000 Mailing-List: contact commits-help@eagle.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@eagle.incubator.apache.org Delivered-To: mailing list commits@eagle.incubator.apache.org Received: (qmail 50686 invoked by uid 99); 7 Jul 2016 07:21:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2016 07:21:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 09DEE1804D8 for ; Thu, 7 Jul 2016 07:21:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id l5_K6yTI2Shy for ; Thu, 7 Jul 2016 07:21:56 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id B6D815F36D for ; Thu, 7 Jul 2016 07:21:55 +0000 (UTC) Received: (qmail 50676 invoked by uid 99); 7 Jul 2016 07:21:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2016 07:21:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8DCFEE03CE; Thu, 7 Jul 2016 07:21:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hao@apache.org To: commits@eagle.incubator.apache.org Message-Id: <127d71b5b65d4790850e772004a56ece@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-eagle git commit: [EAGLE-355] fix advanced sql parse logic Date: Thu, 7 Jul 2016 07:21:54 +0000 (UTC) archived-at: Thu, 07 Jul 2016 07:21:59 -0000 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 Closes #251 from zombieJ/branch-0.4. (cherry picked from commit 6a3f152b3a5e44803f19592da6ce7f284232b37a) Signed-off-by: Hao Chen 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 Authored: Thu Jul 7 15:21:10 2016 +0800 Committer: Hao Chen 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;