You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by babokim <gi...@git.apache.org> on 2015/11/04 14:42:15 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

GitHub user babokim opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/389

    ZEPPELIN-385 Read-only mode for zeppelin notebooks, for analysis sharing

    This PR is for read-only mode.  

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

    $ git pull https://github.com/babokim/incubator-zeppelin readonly

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

    https://github.com/apache/incubator-zeppelin/pull/389.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 #389
    
----
commit c531375c6c6da62011f2ecc499d3a29205dbb9d7
Author: Hyoungjun Kim <hy...@hyoungjuns-macbook-pro.local>
Date:   2015-10-26T09:51:21Z

    ZEPPELIN-385 Read-only mode for zeppelin notebooks, for analysis sharing

----


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-157945971
  
    @corneadoug Thank you for your kindness. I will try as your way.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

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

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-157299400
  
    @Leemoonsoo I think we should take a care of a style of `import *`. What do you think of it? This looks minor for now but it needs to keep it.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

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

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-192082716
  
    @babokim haven't heard from you - would you be able to continue this work?


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by rishitesh <gi...@git.apache.org>.
Github user rishitesh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-173854524
  
    Its really a useful feature for demo , where multiple users might try their hands.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-157601761
  
    @babokim 
    That's not exactly how it should be used, the goal is to use it as a data storage.
    Let's say you have a similar DataFactory as the one I gave in example:
    ```
    angular.module('zeppelinWebApp').factory('systemConfDataFactory', function() {
      var vm = {};
    
      vm.conf = {};
    
      vm.setSystemConf = function(systemConf) {
        vm.conf = angular.copy(systemConf);
      };
      return vm;
    });
    ```
    
    Then you just have to call ``setSystemConf`` in your websocketEvents like this:
    ```
    angular.module('zeppelinWebApp').factory('websocketEvents', function ( ...,  systemConfDataFactory) {
      websocketCalls.ws.onMessage(function(event) {
        ...
        } else if (op === 'GET_SYSTEM_CONF') {
          systemConfDataFactory.setSystemConf(data.conf);
        }
      }
    }
    
    ```
    
    And when you need to do some ng-if or ng-hide, you can do like this:
    ``home.controller``
    ```
     angular.module('zeppelinWebApp').controller('HomeCtrl', function(..., systemConfDataFactory) {
       vm.conf = systemConfDataFactory;
    ```
    
    ``home.html``
    ```
    
    <h5 ng-hide="home.conf.readonly">
      <a href="" data-toggle="modal" data-target="#noteNameModal" style="text-decoration: none;">
        <i style="font-size: 15px;" class="icon-notebook"></i> Create new note</a>
    </h5>
    
    ```



---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-156999761
  
    Merging if there're no more discussions.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by H4ml3t <gi...@git.apache.org>.
Github user H4ml3t commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-218296304
  
    Ditto! :) :+1: 


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by rishitesh <gi...@git.apache.org>.
Github user rishitesh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-173854434
  
    @babokim , Can you please merge this feature ?


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by FRosner <gi...@git.apache.org>.
Github user FRosner commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-207450535
  
    Thumbs up also from my side if we can resolve conflicts, finish discussions and merge if appropriate :+1: 


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-163376715
  
    @babokim Do you mind rebase or merge master to resolve the conflicts?


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-157302094
  
    I'm a bit late for the party,
    However I would prefer the ``isReadOnly()`` part in zeppelin-web to be handled as a DataFactory instead of storing it in the $rootScope and copy pasting the same function in every controllers.
    
    There is a good example here:
    https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-web/src/components/notebookListDataFactory/notebookList.datafactory.js
    
    And you can see it in action here:
    https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-web/src/components/navbar/navbar.controller.js


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-175972492
  
    I can also make a PR to this one to fix the zeppelin-web part if you don't have the time


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by dusenberrymw <gi...@git.apache.org>.
Github user dusenberrymw commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-183064013
  
    Agree with @rishitesh that this would be really great for live demos!


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by babokim <gi...@git.apache.org>.
Github user babokim commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-157395618
  
    @corneadoug Thank you for your advise. I tried storing system config values in a DataFactory. That way also has similar duplication. To set the data in that DataFactory after receiving from the Websocket, each controller should have receiver function like the following code. That function code also is duplicated in every controllers.
    
    ```
    angular.module('zeppelinWebApp').factory('websocketEvents', function ( ... ) {
      websocketCalls.ws.onMessage(function(event) {
        ...
        } else if (op === 'GET_SYSTEM_CONF') {
          $rootScope.$broadcast('setSystemConf', data.conf);
        }
      }
    }
    
    angular.module('zeppelinWebApp').controller('NotebookCtrl'..., function(...)  {
      $scope.$on('setSystemConf', function(event, systemConf  {
        systemConfigDataFactory.setSystemConf(systemConf);
      });
    ``` 
    
    If there is another way to set system config data, please let me know. Thanks.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by nolangrace <gi...@git.apache.org>.
Github user nolangrace commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-218252933
  
    I would love to take advantage of this feature is there anything I can do help move this pull request forward?


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by r-kamath <gi...@git.apache.org>.
Github user r-kamath commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-154282387
  
    @babokim Thanks for the update. Looks good to me.


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

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

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-175945775
  
    @babokim - would you be able to update this PR? It looks like the community would appreciate your contributor to make this possible ;)



---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-156605456
  
    Tested and working nicely.
    Thanks @babokim for contributing really useful feature.
    
     Looks good to me


---
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] incubator-zeppelin pull request: ZEPPELIN-385 Read-only mode for z...

Posted by Xrixcis <gi...@git.apache.org>.
Github user Xrixcis commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/389#issuecomment-155395535
  
    Hi, great feature, thanks!
    One little bug I came across, isReadOnly function seems to be missing in paragraph.controller.js.


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