|
@@ -9,6 +9,107 @@ weight: 2
|
|
|
This section goes into greater detail on useful features within
|
|
This section goes into greater detail on useful features within
|
|
|
the Hue environment.
|
|
the Hue environment.
|
|
|
|
|
|
|
|
|
|
+## Building
|
|
|
|
|
+
|
|
|
|
|
+### Documentation
|
|
|
|
|
+
|
|
|
|
|
+New website:
|
|
|
|
|
+
|
|
|
|
|
+Install https://gohugo.io/getting-started/quick-start/
|
|
|
|
|
+Make sure the base URL is correct:
|
|
|
|
|
+
|
|
|
|
|
+ cd docs/docs-site
|
|
|
|
|
+ vim config.toml
|
|
|
|
|
+ baseURL='http://cloudera.github.io/hue/docs-4.4.0/'
|
|
|
|
|
+
|
|
|
|
|
+Build the doc website:
|
|
|
|
|
+
|
|
|
|
|
+ hugo server -wDs . -d ~/tmp/docs-4.4.0
|
|
|
|
|
+
|
|
|
|
|
+Add it to the github page and push:
|
|
|
|
|
+
|
|
|
|
|
+ git checkout gh-pages
|
|
|
|
|
+ cp ~/tmp/docs-4.4.0 .
|
|
|
|
|
+ rm latest
|
|
|
|
|
+ ln -s docs-4.4.0 latest
|
|
|
|
|
+
|
|
|
|
|
+ git push origin HEAD:gh-pages
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+Old documentation:
|
|
|
|
|
+
|
|
|
|
|
+ make docs
|
|
|
|
|
+
|
|
|
|
|
+### Javascript
|
|
|
|
|
+
|
|
|
|
|
+The javascript files are currently being migrated to webpack bundles, during this process some files will live under src/desktop/static/ and some will live under src/dekstop/js
|
|
|
|
|
+
|
|
|
|
|
+For changes to the files under src/desktop/js the following applies:
|
|
|
|
|
+
|
|
|
|
|
+First make sure all third-party dependencies defined in package.json are installed into node_modules/
|
|
|
|
|
+
|
|
|
|
|
+ npm install
|
|
|
|
|
+
|
|
|
|
|
+Also run this after making changes to package.json, adding new third-party dependencies etc.
|
|
|
|
|
+
|
|
|
|
|
+To generate the js bundles run:
|
|
|
|
|
+
|
|
|
|
|
+ npm run webpack
|
|
|
|
|
+ npm run webpack-workers
|
|
|
|
|
+ npm run webpack-login
|
|
|
|
|
+
|
|
|
|
|
+During development the bundles can be autogenerated when it detects changes to the .js files, for this run:
|
|
|
|
|
+
|
|
|
|
|
+ npm run dev
|
|
|
|
|
+
|
|
|
|
|
+Before sending a review with changes to the bundles run:
|
|
|
|
|
+
|
|
|
|
|
+ npm run lint-fix
|
|
|
|
|
+
|
|
|
|
|
+and possibly fix any issues it might report.
|
|
|
|
|
+
|
|
|
|
|
+### CSS / LESS
|
|
|
|
|
+
|
|
|
|
|
+After changing the CSS in a .less file, rebuilding with:
|
|
|
|
|
+
|
|
|
|
|
+ make css
|
|
|
|
|
+
|
|
|
|
|
+### SQL Autocomplete
|
|
|
|
|
+
|
|
|
|
|
+Install a patched jison:
|
|
|
|
|
+
|
|
|
|
|
+ git clone https://github.com/JohanAhlen/jison
|
|
|
|
|
+ cd jison
|
|
|
|
|
+ npm install -g .
|
|
|
|
|
+
|
|
|
|
|
+Then run:
|
|
|
|
|
+
|
|
|
|
|
+ make sql-all-parsers
|
|
|
|
|
+
|
|
|
|
|
+### Ace Editor
|
|
|
|
|
+
|
|
|
|
|
+After modifying files under tools/ace-editor run the following to build ace.js
|
|
|
|
|
+
|
|
|
|
|
+ npm install
|
|
|
|
|
+ make ace
|
|
|
|
|
+
|
|
|
|
|
+### Internationalization
|
|
|
|
|
+
|
|
|
|
|
+How to update all the messages and compile them:
|
|
|
|
|
+
|
|
|
|
|
+ make locales
|
|
|
|
|
+
|
|
|
|
|
+How to update and compile the messages of one app:
|
|
|
|
|
+
|
|
|
|
|
+ cd apps/beeswax
|
|
|
|
|
+ make compile-locale
|
|
|
|
|
+
|
|
|
|
|
+How to create a new locale for an app:
|
|
|
|
|
+
|
|
|
|
|
+ cd $APP_ROOT/src/$APP_NAME/locale
|
|
|
|
|
+ $HUE_ROOT/build/env/bin/pybabel init -D django -i en_US.pot -d . -l fr
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
## User Management
|
|
## User Management
|
|
|
|
|
|
|
|
Except for static content, `request.user` is always populated. It is a
|
|
Except for static content, `request.user` is always populated. It is a
|
|
@@ -482,103 +583,3 @@ JavaScript.
|
|
|
certain things (like configuration changes), this is not sufficient. Restart
|
|
certain things (like configuration changes), this is not sufficient. Restart
|
|
|
the server whole-heartedly.
|
|
the server whole-heartedly.
|
|
|
* We recommend developing with the Chrome console.
|
|
* We recommend developing with the Chrome console.
|
|
|
-
|
|
|
|
|
-## Building
|
|
|
|
|
-
|
|
|
|
|
-### Documentation
|
|
|
|
|
-
|
|
|
|
|
-New website:
|
|
|
|
|
-
|
|
|
|
|
-* Install https://gohugo.io/getting-started/quick-start/
|
|
|
|
|
-* Make sure the base URL is correct:
|
|
|
|
|
-
|
|
|
|
|
- cd docs/docs-site
|
|
|
|
|
- vim config.toml
|
|
|
|
|
- baseURL='http://cloudera.github.io/hue/docs-4.4.0/'
|
|
|
|
|
-
|
|
|
|
|
-* Build the doc website:
|
|
|
|
|
-
|
|
|
|
|
- hugo server -wDs . -d ~/tmp/docs-4.4.0
|
|
|
|
|
-
|
|
|
|
|
-* Add it to the github page and push:
|
|
|
|
|
-
|
|
|
|
|
- git checkout gh-pages
|
|
|
|
|
- cp ~/tmp/docs-4.4.0 .
|
|
|
|
|
- rm latest
|
|
|
|
|
- ln -s docs-4.4.0 latest
|
|
|
|
|
-
|
|
|
|
|
- git push origin HEAD:gh-pages
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-Old documentation:
|
|
|
|
|
-
|
|
|
|
|
- make docs
|
|
|
|
|
-
|
|
|
|
|
-### Javascript
|
|
|
|
|
-
|
|
|
|
|
-The javascript files are currently being migrated to webpack bundles, during this process some files will live under src/desktop/static/ and some will live under src/dekstop/js
|
|
|
|
|
-
|
|
|
|
|
-#### For changes to the files under src/desktop/js the following applies:
|
|
|
|
|
-
|
|
|
|
|
-First make sure all third-party dependencies defined in package.json are installed into node_modules/
|
|
|
|
|
-
|
|
|
|
|
- npm install
|
|
|
|
|
-
|
|
|
|
|
-Also run this after making changes to package.json, adding new third-party dependencies etc.
|
|
|
|
|
-
|
|
|
|
|
-To generate the js bundles run:
|
|
|
|
|
-
|
|
|
|
|
- npm run webpack
|
|
|
|
|
- npm run webpack-workers
|
|
|
|
|
- npm run webpack-login
|
|
|
|
|
-
|
|
|
|
|
-During development the bundles can be autogenerated when it detects changes to the .js files, for this run:
|
|
|
|
|
-
|
|
|
|
|
- npm run dev
|
|
|
|
|
-
|
|
|
|
|
-Before sending a review with changes to the bundles run:
|
|
|
|
|
-
|
|
|
|
|
- npm run lint-fix
|
|
|
|
|
-
|
|
|
|
|
-and possibly fix any issues it might report.
|
|
|
|
|
-
|
|
|
|
|
-### CSS / LESS
|
|
|
|
|
-
|
|
|
|
|
-After changing the CSS in a .less file, rebuilding with:
|
|
|
|
|
-
|
|
|
|
|
- make css
|
|
|
|
|
-
|
|
|
|
|
-### SQL Autocomplete
|
|
|
|
|
-
|
|
|
|
|
-Install a patched jison:
|
|
|
|
|
-
|
|
|
|
|
- git clone https://github.com/JohanAhlen/jison
|
|
|
|
|
- cd jison
|
|
|
|
|
- npm install -g .
|
|
|
|
|
-
|
|
|
|
|
-Then run:
|
|
|
|
|
-
|
|
|
|
|
- make sql-all-parsers
|
|
|
|
|
-
|
|
|
|
|
-### Ace Editor
|
|
|
|
|
-
|
|
|
|
|
-After modifying files under tools/ace-editor run the following to build ace.js
|
|
|
|
|
-
|
|
|
|
|
- npm install
|
|
|
|
|
- make ace
|
|
|
|
|
-
|
|
|
|
|
-### Internationalization
|
|
|
|
|
-
|
|
|
|
|
-How to update all the messages and compile them:
|
|
|
|
|
-
|
|
|
|
|
- make locales
|
|
|
|
|
-
|
|
|
|
|
-How to update and compile the messages of one app:
|
|
|
|
|
-
|
|
|
|
|
- cd apps/beeswax
|
|
|
|
|
- make compile-locale
|
|
|
|
|
-
|
|
|
|
|
-How to create a new locale for an app:
|
|
|
|
|
-
|
|
|
|
|
- cd $APP_ROOT/src/$APP_NAME/locale
|
|
|
|
|
- $HUE_ROOT/build/env/bin/pybabel init -D django -i en_US.pot -d . -l fr
|
|
|