HUE-5858 [assist] Add right click menu to open sql files from git assist

Review Request #9845 - Created March 16, 2017 and updated

Information
Sai Chirravuri
hue
master
HUE-5858
11d5965...
Reviewers
hue
enricoberti, johan, romain

commit 85bbb8dcc165375d82a8faa0f8edf1658cfdb437
Author: krish krish@cloudera.com
Date: Fri Mar 17 16:10:51 2017 -0700

HUE-6085 [notebook] Add git statement type to notebook

1. Add git statement type
2. Add api to get git sql file content
3. Add refresh button and functionality
4. Add Git push button

:100644 100644 7826188... ff980df... M desktop/core/src/desktop/lib/vcs/apis/github_readonly_api.py
:100644 100644 dbcdffe... 3698767... M desktop/core/src/desktop/static/desktop/js/assist/assistGitEntry.js
:100644 100644 da2afa1... 159183d... M desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js
:100644 100644 177db78... 8c8ca6e... M desktop/libs/notebook/src/notebook/templates/editor_components.mako

commit ce8b9b851b1e27ad54d424ff0fac09a23c82e221
Author: krish krish@cloudera.com
Date: Thu Mar 16 17:02:00 2017 -0700

HUE-6081 [assist] Accept git private access token from ini

:100644 100644 75bbc1c... 5cbf619... M desktop/conf.dist/hue.ini
:100644 100644 feb8443... 3b7cf2e... M desktop/conf/pseudo-distributed.ini.tmpl
:100644 100644 a7d0c71... f414549... M desktop/core/src/desktop/conf.py
:100644 100644 ec5de58... 7826188... M desktop/core/src/desktop/lib/vcs/apis/github_readonly_api.py

commit 480a26b63e20dcd583dfe687bc8bb7af5555e69f
Author: krish krish@cloudera.com
Date: Thu Mar 16 13:13:14 2017 -0700

HUE-5858 [assist] Add right click menu to open sql files from git assist

:100644 100644 27ecc97... dbcdffe... M desktop/core/src/desktop/static/desktop/js/assist/assistGitEntry.js
:100644 100644 591cde3... dcdc156... M desktop/core/src/desktop/templates/assist.mako

manual with test git branch

Issues

  • 3
  • 0
  • 0
  • 3
Description From Last Updated
Here we will create a new 'git' type instead of files, with also more parameters like 'branch' etc and add ... Romain Rigaux Romain Rigaux
This is the utils that we should not duplicated everywhere Romain Rigaux Romain Rigaux
Any specific logic should live in get_external_statemen Romain Rigaux Romain Rigaux
Johan Åhlén
Romain Rigaux
Sai Chirravuri
Review request changed

Change Summary:

Added
1. Right click menu to open sql file in editor
2. private_access_token support in backend
2. Add git statement type
2. Add api to get git sql file content
3. Add refresh button and functionality
4. Add Git push button

Branch is specified in the remote_url specified in ini

Pending
1. git push api
2. Prompting tokens

Description:

~  

commit 11d59651299b720a0f35777f40b167106e10baa7

  ~

commit 85bbb8dcc165375d82a8faa0f8edf1658cfdb437

  + Author: krish krish@cloudera.com
  + Date: Fri Mar 17 16:10:51 2017 -0700

  +
  +
HUE-6085 [notebook] Add git statement type to notebook
  +
  +
1. Add git statement type
  +
2. Add api to get git sql file content
  +
3. Add refresh button and functionality
  +
4. Add Git push button
  +
  +
  +

:100644 100644 7826188... ff980df... M desktop/core/src/desktop/lib/vcs/apis/github_readonly_api.py

  + :100644 100644 dbcdffe... 3698767... M desktop/core/src/desktop/static/desktop/js/assist/assistGitEntry.js
  + :100644 100644 da2afa1... 159183d... M desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js
  + :100644 100644 177db78... 8c8ca6e... M desktop/libs/notebook/src/notebook/templates/editor_components.mako

  +
  +

commit ce8b9b851b1e27ad54d424ff0fac09a23c82e221

  + Author: krish krish@cloudera.com
  + Date: Thu Mar 16 17:02:00 2017 -0700

  +
  +
HUE-6081 [assist] Accept git private access token from ini
  +
  +
  +

:100644 100644 75bbc1c... 5cbf619... M desktop/conf.dist/hue.ini

  + :100644 100644 feb8443... 3b7cf2e... M desktop/conf/pseudo-distributed.ini.tmpl
  + :100644 100644 a7d0c71... f414549... M desktop/core/src/desktop/conf.py
  + :100644 100644 ec5de58... 7826188... M desktop/core/src/desktop/lib/vcs/apis/github_readonly_api.py

  +
  +

commit 480a26b63e20dcd583dfe687bc8bb7af5555e69f

    Author: krish krish@cloudera.com
    Date: Thu Mar 16 13:13:14 2017 -0700

   
   
HUE-5858 [assist] Add right click menu to open sql files from git assist
   
   
   

:100644 100644 27ecc97... dbcdffe... M desktop/core/src/desktop/static/desktop/js/assist/assistGitEntry.js

~   :100644 100644 591cde3... d1fe04a... M desktop/core/src/desktop/templates/assist.mako

  ~ :100644 100644 591cde3... dcdc156... M desktop/core/src/desktop/templates/assist.mako

Testing Done:

  +

manual with test git branch

Diff:

Revision 2 (+87 -14)

Show changes

Romain Rigaux

Is the refresh icon doing a rebase too?
How do we know that we have a repo we can push?
Can I start with a new query and push it in the repo?

We can see history + branch other that master + where to put bottons in post follow-ups of this.

  1. Is the refresh icon doing a rebase too?
    Currently we have a refresh in assist, which will get all the latest data in the branch.
    and refresh beside the filepath field currently refreshes the total content in the editor. So the new changes would be lost, which is not good. I need to see if there is some api for our usecase. Let's talk tomorrow.

    How do we know that we have a repo we can push?
    As of now, the url we provide form ini, contains the owner,repo and branch info. Ex: https://github.com/cloudera/hue/tree/master
    If any of them are missing, assist doesn't load the files. So to answer your question, we push to the repo that user sees in the assist.

    Can I start with a new query and push it in the repo?
    For this, we would need to a basic authorization call to API to see if the ini properties are working. If not, we would need to prompt them on the commit popup along with the commit message text field (not done yet!).

This is the utils that we should not duplicated everywhere

desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js (Diff revision 2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Any specific logic should live in get_external_statemen

Loading...