You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by dlukyanov <gi...@git.apache.org> on 2017/01/29 11:19:27 UTC

[GitHub] zeppelin pull request #1957: Branch 0.6 Groovy Interpreter

GitHub user dlukyanov opened a pull request:

    https://github.com/apache/zeppelin/pull/1957

    Branch 0.6 Groovy Interpreter

    ### What is this PR for?
    Groovy Interpreter
    
    ### What type of PR is it?
    Feature 
    
    ### Todos
    * [Code] - Task
    * [Samples] - Task
    * [Documentation] - Task
    * [Test cases] - Task
    
    ### What is the Jira issue?
    TODO
    
    ### How should this be tested?
    Outline the steps to test the PR here.
    
    ### Samples
    
    ```groovy
    %groovy
    //get a parameter defined as z.angularBind('ngSearchParam', value, 'paragraph_id')
    //g is a context object for groovy to avoid mix with z object?
    def param = g.angular('ngSearchParam')
    //send request https://www.googleapis.com/customsearch/v1?q=ngSearchParam_value
    def r = HTTP.get(
      //assume you defined groovy interpreter property `search_baseurl`='https://www.googleapis.com/customsearch/v1'
      //in groovy object o.getProperty('A') == o.'A' == o.A == o['A']
      url : g.search_baseurl,
      query: [ q: param ],
      headers: [
        'Accept':'application/json',
        //'Authorization:' : g.getProperty('search_auth'),
      ] 
    )
    //check response code
    if( r.response.code==200 ) {
      g.html().with{ 
        //g.html() renders %angular to output and returns groovy.xml.MarkupBuilder
        h2("the response ${r.response.code}")
        span( r.response.body )
        h2("headers")
        pre( r.response.headers.join('\n') )
      }
    } else {
      //just to show that it's possible to use println with multiline groovy string to render output
      println("""%angular
        <script> alert ("code=${r.response.code} \n msg=${r.response.message}") </script>
      """)
    }
    ```
    
    
    ```groovy
    %groovy
    
    //renders a table with headers a, b, c  and two rows
    g.table(
      [
        ['a','b','c'],
        ['a1','b1','c1'],
        ['a2','b2','c2'],
      ]
    )
    ```
    
    ### Questions:
    * Does the licenses files need update?
    no
    * Is there breaking changes for older versions?
    no
    * Does this needs documentation?
    yes

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/char-com-ua/zeppelin branch-0.6

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1957.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1957
    
----
commit b26ab991b31108474d517a6dcecf82ae475f3488
Author: dlukyanov <dl...@ukr.net>
Date:   2017-01-29T09:38:32Z

    groovy interpreter: base

commit 590a15d17689fbc0305fd8a730db23a91cbe544c
Author: dlukyanov <dl...@ukr.net>
Date:   2017-01-29T10:59:57Z

    groovy interpreter: revision.txt

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by dlukyanov <gi...@git.apache.org>.
Github user dlukyanov commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    Hello 
    
    Current - is it next to 0.7 ? 
    
    30 January 2017, 08:02:58, by Jongyoul Lee < notifications@github.com >: 
    Thanks for contributing new Groovy interpreter but we didn't manage the branch-0.6 anymore. Can you rebase your contribution onto current master? \u2014 
    You are receiving this because you authored the thread. 
    Reply to this email directly, view it on GitHub , or mute the thread . 
    
    -- Regards, Dmitry 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    and please add interpreter documentation .md file and update license information as suggested in the PR template `Does the licenses files need update?` should be yes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    If you contribute code based on master, we will review and merge it into master and branch-0.7 if necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    Right - please develop against master and open a new PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1957: Branch 0.6 Groovy Interpreter

Posted by dlukyanov <gi...@git.apache.org>.
Github user dlukyanov closed the pull request at:

    https://github.com/apache/zeppelin/pull/1957


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by dlukyanov <gi...@git.apache.org>.
Github user dlukyanov commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    created a new pull request [#2068](https://github.com/apache/zeppelin/pull/2068)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1957: Branch 0.6 Groovy Interpreter

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/1957
  
    Thanks for contributing new Groovy interpreter but we didn't manage the branch-0.6 anymore. Can you rebase your contribution onto current master?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---