Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Allow bigint to be used as time column in Presto" #7670

Closed
wants to merge 150 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
52473c5
Fix race condition when fetching results in SQL Lab (#7198) (#7242)
michellethomas Apr 8, 2019
5ef2712
[filter_box] allow empty filters list (#7220) (#7244)
michellethomas Apr 8, 2019
442cfc6
Tweaks to word cloud controls (#7212)
mistercrunch Apr 8, 2019
5192270
Fix logo / branding files (#7105)
mistercrunch Apr 9, 2019
149b31d
fix: Remove ASF license from github templates (PR and issues) (#7217)
mistercrunch Apr 9, 2019
9216639
[cache] Render label when cached (#7164)
john-bodley Apr 9, 2019
139f299
add parent ids into Dashboard layout metadata (#6945)
Apr 9, 2019
c50e6bc
feat(dashboard): direct link to single chart/tab/header in dashboard …
Apr 9, 2019
1104aca
update migration Revision for #6945 (#7258)
Apr 10, 2019
79dbb3f
[SQL Lab] fix table metadata loading spinner (#7121)
mistercrunch Apr 10, 2019
b225507
Run 'npm audit fix' to address vulnerabilities (#7263)
mistercrunch Apr 10, 2019
6c38cb1
chore: add bot config files and update issue templates (#7249)
kristw Apr 10, 2019
0c3e46f
Deprecate npm run backend-sync and related logic (#7211)
mistercrunch Apr 10, 2019
f9db605
fix: make SIPs exempt from stale bots (#7278)
kristw Apr 10, 2019
80070d0
fix: make the bot more descriptive (#7279)
kristw Apr 10, 2019
763db8f
Improve code smell, use py3k super() call (#7100)
zhaoyongjie Apr 12, 2019
14647fc
Minor improvements to <Hotkeys /> component (#7261)
mistercrunch Apr 12, 2019
9b4f5ad
bugfix: improve 'Time Table' (#6959)
mistercrunch Apr 12, 2019
b1ebfbc
Bump nvd3 dep and 'npm audit fix' (#7292)
mistercrunch Apr 12, 2019
9dfa80d
Add all database access permission to 'Alpha' role (#7271)
mistercrunch Apr 15, 2019
d253c5c
Add details to release instructions (#7296)
mistercrunch Apr 15, 2019
154f6ab
Revert "bugfix: improve 'Time Table' (#6959)" (#7304)
khtruong Apr 16, 2019
1ffd3b1
[slice] Fix, remove duplicate label_columns property (#7113)
dpgaspar Apr 17, 2019
7aa6c4e
Update AceEditorWrapper.jsx (#7315)
ddna1021 Apr 17, 2019
9341995
fix: time series table (#7302) (#7312)
michellethomas Apr 17, 2019
3d08266
[load_examples] download data at runtime (#7314)
mistercrunch Apr 17, 2019
ab8f4af
feat: bump superset-ui versions to 0.11 (#7294)
kristw Apr 17, 2019
38dd33e
Remove LICENSE entry around dataset (#7318)
mistercrunch Apr 17, 2019
51068f0
Adding permission for can_only_access_owned_queries (#7234)
michellethomas Apr 17, 2019
07d9dbd
fix: typos in translations placeholders (#7161)
leakingoxide Apr 18, 2019
5f28027
Merging lyftga into master
mistercrunch Apr 19, 2019
eb9295d
[docs] improve the RELEASING.md docs (#7329)
mistercrunch Apr 20, 2019
5db20e3
Fix #7056 'Unhashable type' in paired t-test chart (#7076)
mistercrunch Apr 20, 2019
0ea8291
fixes #6353 by changing tag on base image (#7335)
Apr 20, 2019
aa1d9ae
[table] highlight selected <td>s (#7013)
mistercrunch Apr 22, 2019
36a219d
Allow Gamma and Alpha to access '/users/userinfo/' (#6936)
mistercrunch Apr 22, 2019
845218d
Create issue_label_bot.yaml (#7341)
Apr 22, 2019
cf87173
[wtforms] Strip leading/trailing whitespace (#7084)
john-bodley Apr 23, 2019
621cef7
[schema] Updating the datasources schema (#5451)
john-bodley Apr 23, 2019
48b2af4
Add type anno (#7342)
craig-rueda Apr 23, 2019
1388452
[schema] Updating the base column schema (#5452)
john-bodley Apr 24, 2019
f58e7b2
Update 937d04c16b64_update_datasources.py (#7361)
john-bodley Apr 24, 2019
fef5b5e
Fix raw HTML in SliceAdder (#7338)
mistercrunch Apr 24, 2019
7788124
remove backendSync.json (#7331)
kristw Apr 24, 2019
e61a8ee
[bubbles] issue when using duplicated metrics (#7087)
mistercrunch Apr 24, 2019
e8af852
SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)
andrewmusselman Apr 24, 2019
7bc8355
SUPERSET-8: Update text in docs copyright footer (#7360)
andrewmusselman Apr 24, 2019
3a359fd
[schema] Adding commits and removing unnecessary foreign-key definiti…
john-bodley Apr 24, 2019
f83b979
Store last selected dashboard in sessionStorage (#7181)
leakingoxide Apr 24, 2019
f488a32
[schema] Updating the base metric schema (#5453)
john-bodley Apr 25, 2019
929fb6b
Merge branch 'lyftga'
mistercrunch Apr 25, 2019
4fe152d
Fix NoneType bug & fill the test recipients with original recipients …
tssujt Apr 25, 2019
ca2996c
Added living goods as among the users of Superset (#7407)
chelule Apr 30, 2019
9e703f3
[dashboard] allow user re-order top-level tabs (#7390)
Apr 30, 2019
11408d0
[SQL Lab] Increase timeout threshold for offline check (#7411)
Apr 30, 2019
06c4610
Bump FAB to 2.0.0 (#7323)
dpgaspar Apr 30, 2019
f504568
[annotations] Improves UX on annotation validation, start_dttm, end_d…
dpgaspar Apr 30, 2019
8703244
Setting renderTrigger on label_colors (#7410)
michellethomas Apr 30, 2019
46579b1
Refactor out controlUtils.js module + unit tests (#7350)
mistercrunch Apr 30, 2019
a6aabf8
feature: see Presto row and array data types (#7413)
DiggidyDave May 1, 2019
70be44a
Removed --console-log and superset runserver (#7421)
rjurney May 2, 2019
f6ebd78
Fixes dashboard export button missing download and #7353 (#7427)
rjurney May 2, 2019
ee78fd7
Added additional German translations to string file (#6604)
KilimAnnejaro May 2, 2019
fb627ba
[fix] Fixing SQL parsing issue (#7374)
john-bodley May 2, 2019
598526a
add chinese translate (#7402)
cscainiao May 2, 2019
c8bb7e0
Quick fix to address deadlock issue (#7434)
craig-rueda May 2, 2019
88e6ec9
feat: view presto row objects in data grid (#7445)
khtruong May 3, 2019
5cf454b
feat: Scheduling queries from SQL Lab (#7416) (#7446)
DiggidyDave May 3, 2019
2497048
feat: Add `validate_sql_json` endpoint for checking that a given sql …
bearcage May 6, 2019
f3d8e8a
Adds missing metric sum__SP_RUR_TOTL (#7452)
rjurney May 7, 2019
e2be022
Late import for optional lib pyhive (#7471)
mistercrunch May 8, 2019
a3f0912
fix: calendar heatmap examples (#7375)
mistercrunch May 8, 2019
959c35d
bugfix: Improve support for special characters in schema and table na…
villebro May 8, 2019
6b8bda6
[dashboard] After update filter, trigger new queries when charts are …
May 8, 2019
ca48f32
fix: alter sql columns to long text #7463 (#7476)
khtruong May 8, 2019
ef13500
Refactor ConsoleLog (#7428)
betodealmeida May 8, 2019
f59ed02
Revised Chinese translation (#7464)
cscainiao May 8, 2019
51fd43a
druid connector: avoid using 'dimensions' for scan queries (#7377)
elukey May 9, 2019
4377328
Add Chinese translation (#7481)
cscainiao May 12, 2019
d8be0a7
Break line before LIMIT statement to prevent trailing comment issue (…
mistercrunch May 13, 2019
a4392c8
[security] Adding Flask-Talisman (#7443)
john-bodley May 14, 2019
a4d18e7
Flatten legacy preset charts (#7500)
FelixCodes May 14, 2019
5243182
Change Visual Properties tab label to Customize (#7506)
FelixCodes May 14, 2019
fda1002
fix: cache issue for api/v1/query (#7507)
conglei May 14, 2019
156b0aa
feat: Live query validation in the SQL Lab UI (#7461) (#7516) (#7518)
May 15, 2019
9423e9a
chore: Truncate progressbar percentage decimals (#7499) (#7517) (#7519)
May 15, 2019
7f858e4
[sql lab] Fix new query stuck at pending state (#7523)
May 16, 2019
21a4670
Talisman config (#7529)
craig-rueda May 17, 2019
f0f719c
Validate start/end when scheduling queries (#7544)
betodealmeida May 18, 2019
dcafabd
Show scheduled queries (#7545)
betodealmeida May 18, 2019
c79077d
feat: add header tooltip (#7556)
khtruong May 20, 2019
1fdc96a
Disabling flask-talisman by default (#7535)
mistercrunch May 20, 2019
023faf3
Rjurney master docs update (#7426)
rjurney May 21, 2019
74704f6
[security] New, deprecate merge_perm, FAB method is fixed (#7355)
dpgaspar May 21, 2019
1ae000a
Boxplot should not require a datetime column (#5096)
AxelMathei May 21, 2019
551fe92
Add dotenv to dependencies (#7330)
mistercrunch May 21, 2019
efb085a
[cypress] fix accessing a cross-origin frame error (#7552)
May 21, 2019
6b9790c
[ad-hoc] Fixing type for count distinct (#7573)
john-bodley May 22, 2019
e5739fb
[testconn] Explicit closing engine connection (#7570)
john-bodley May 22, 2019
421183d
Adding controls for verifying options (#7468)
michellethomas May 22, 2019
9c8f494
A few improvements to scheduling queries (#7585)
betodealmeida May 23, 2019
f68f979
Fix for polling queries (#7559)
betodealmeida May 23, 2019
265e117
Add link to scheduled pipeline (#7584)
betodealmeida May 23, 2019
e4f8444
add American Express to list of users on readme (#7576)
TheLastSultan May 24, 2019
2014329
[sql lab]revert #4833 (#7498)
May 24, 2019
47ba2ad
Remove aggregates from metric options if datasource has no columns (#…
michellethomas May 24, 2019
f7d3413
Add support for period character in table names (#7453)
villebro May 26, 2019
b21f8ec
Remove the use of Pandas' iloc() in WorldMapViz (#7379)
elukey May 28, 2019
2a2f395
Add "Auto" option to Mapbox visualization point radius (#7579)
ali-bahjati May 29, 2019
fd5befe
Bump python libs, address insecure releases (#7550)
mistercrunch May 29, 2019
fc3b043
Add support for Apache Drill (#6610)
cgivre May 29, 2019
34407e8
Make timestamp expression native SQLAlchemy element (#7131)
villebro May 30, 2019
145d72c
Fix SQL Lab window resizing layout bug (#7615)
etr2460 May 30, 2019
dbdb6b0
[SQL Lab] fix unnecessary offline action (#7594)
May 30, 2019
c1712e5
Add relative start param for time filters (#7525)
villebro May 31, 2019
d408e30
Show expanded columns in gray in SQL Editor (#7627)
betodealmeida May 31, 2019
d296734
View Presto row and array objects clearly in the data grid (#7625)
khtruong May 31, 2019
9acafd5
fix: handle presto columns with whitespace (#7630)
khtruong May 31, 2019
c82a7f4
Update bug_report.md (#7583)
john-bodley May 31, 2019
5701629
[SQL Lab] Old query showing success state but not showing results (#7…
May 31, 2019
5895d8c
[SQL Lab] Prevent failed query error from disappearing (#7624)
May 31, 2019
15d0361
[requirements] Bumping pydruid version (#7622)
john-bodley May 31, 2019
722043c
Allow trailing spaces in simple filter values (#7617)
Jun 1, 2019
687f205
Wrapping up #7130 (#7633)
mistercrunch Jun 1, 2019
4b5931f
Alternative fix for #7559 (#7575)
mistercrunch Jun 1, 2019
eb42936
[FAB] set AppBuilder to update_perms=False (#7561)
mistercrunch Jun 1, 2019
1dc17f3
fix: address issue #7458 (#7593)
mistercrunch Jun 1, 2019
257c100
Fixed Time Grain and Added Drill to README (#7635)
cgivre Jun 2, 2019
7dd6635
[query] Fix, remove not possible to order columns (#7636)
dpgaspar Jun 2, 2019
45b9880
fix: SqlaColumn.type overflow on mysql (#7606)
mistercrunch Jun 3, 2019
78c1674
make filter_values() macro to properly accept value from filter box w…
jimhorng Jun 3, 2019
45b41aa
[fix] SQL parsing of table names (#7490)
john-bodley Jun 3, 2019
6d1f6e9
Adding codecov targets and thresholds (#7433)
michellethomas Jun 3, 2019
ddd7f8f
Fix colors in ellipsis (#7632)
betodealmeida Jun 3, 2019
f99ae1a
[dashboard] click tab anchor link (#7640)
Jun 3, 2019
5470d10
Add Filter on DatabaseView that filters DBs Based on Role Access (#7618)
dflionis Jun 5, 2019
25da4c7
[Profile] Fix react gravitar size prop type warning (#7647)
Jun 5, 2019
1cd0e7f
[SQL Lab] CTAS now uses the right async configuration (#7175)
enricoberti Jun 5, 2019
d62c37b
Revert "Boxplot should not require a datetime column (#5096)" (#7655)
khtruong Jun 5, 2019
de9f61e
[docs] Fix, deprecate fabmanager cli (#7660)
dpgaspar Jun 7, 2019
271612c
Add new escape characters to OnPasteSelect (#7638)
Jun 7, 2019
2793bdd
Apply DashboardFilter to the dashboards in SliceModeView (#7475)
rahul-rahul-sp Jun 7, 2019
883a02a
docs: Add Tenable to the List of Users (#7610)
dflionis Jun 7, 2019
39d67cb
[SQL Lab] Show warning when user used up localStorage (#7572)
Jun 7, 2019
f3091c5
[dashboard] pass dashboard filters to share chart url in dropdown (#7…
Jun 7, 2019
f7812a3
[SQL Lab] Clarify SQL Lab query and display limits (#7641)
Jun 8, 2019
38abf4e
Add epoch funcs for BigQuery (#7567)
villebro Jun 8, 2019
f3e5805
Remove duplicate paragraph in celery tasks documentation (#7392)
thoralf-gutierrez Jun 8, 2019
95291fa
Break up db_engine_specs (#7676)
villebro Jun 8, 2019
b1cb742
Revert "Allow bigint to be used as time column in Presto" #7670
Jun 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage:
status:
project:
default:
# Commits pushed to master should not make the overall
# project coverage decrease:
target: auto
threshold: 0%
patch:
default:
threshold: 0%
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve

---

A clear and concise description of what the bug is.

### Expected results

what you expected to happen.

### Actual results

what actually happens.

#### Screenshots

If applicable, add screenshots to help explain your problem.

#### How to reproduce the bug

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Environment

(please complete the following information):

- superset version: `superset version`
- python version: `python --version`
- node.js version: `node -v`
- npm version: `npm -v`

### Checklist

Make sure these boxes are checked before submitting your issue - thank you!

- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.

### Additional context

Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: SIP
about: Superset Improvement Proposal

---

## [SIP] Proposal for XXX

### Motivation

Description of the problem to be solved.

### Proposed Change

Describe how the feature will be implemented, or the problem will be solved. If possible, include mocks, screenshots, or screencasts (even if from different tools).

### New or Changed Public Interfaces

Describe any new additions to the model, views or `REST` endpoints. Describe any changes to existing visualizations, dashboards and React components. Describe changes that affect the Superset CLI and how Superset is deployed.

### New dependencies

Describe any `npm`/`PyPI` packages that are required. Are they actively maintained? What are their licenses?

### Migration Plan and Compatibility

Describe any database migrations that are necessary, or updates to stored URLs.

### Rejected Alternatives

Describe alternative approaches that were considered and rejected.
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### CATEGORY

Choose one

- [ ] Bug Fix
- [ ] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation

### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->

### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->

### TEST PLAN
<!--- What steps should be taken to verify the changes -->

### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API

### REVIEWERS
15 changes: 15 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Configuration for request-info - https://github.com/behaviorbot/request-info

# *Required* Comment to reply with
requestInfoReplyComment: >
We would appreciate it if you could provide us with more info about this issue/pr!
Please do not leave the `title` or `description` empty.

# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
requestInfoDefaultTitles:
- update readme.md
- updates

# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: "need:more-info"
5 changes: 5 additions & 0 deletions .github/issue_label_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# for Issue Label Bot https://github.com/marketplace/issue-label-bot
label-alias:
bug: '#bug'
feature_request: '#enhancement'
question: '#question'
27 changes: 27 additions & 0 deletions .github/move.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration for Move Issues - https://github.com/dessant/move-issues

# Delete the command comment when it contains no other content
deleteCommand: true

# Close the source issue after moving
closeSourceIssue: true

# Lock the source issue after moving
lockSourceIssue: false

# Mention issue and comment authors
mentionAuthors: true

# Preserve mentions in the issue content
keepContentMentions: false

# Move labels that also exist on the target repository
moveLabels: true

# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo

# Repository to extend settings from
# _extends: repo
19 changes: 19 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "#SIP"
- ".pinned"
- ".security"
# Label to use when marking an issue as stale
staleLabel: inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions. For admin, please label this issue `.pinned`
to prevent stale bot from closing the issue.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ searchindex.js
requirements.txt
# vendorized
vendor/*
# github configuration
.github/*
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
cache:
pip: true
jobs:
include:
- language: python
Expand Down
62 changes: 47 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,17 @@ python setup.py build_sphinx

### Flask server

Make sure your machine meets the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before following these steps.
#### OS Dependencies

Make sure your machine meets the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before following these steps.

Developers should use a virtualenv.

```
pip install virtualenv
```

Then proceed with:

```bash
# Create a virtual environemnt and activate it (recommended)
Expand All @@ -304,11 +314,12 @@ source venv/bin/activate
# Install external dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Install Superset in editable (development) mode
pip install -e .

# Create an admin user
fabmanager create-admin --app superset
# Create an admin user in your metadata database
flask fab create-admin --app superset

# Initialize the database
superset db upgrade
Expand All @@ -319,19 +330,27 @@ superset init
# Load some data to play with
superset load_examples

# Start the Flask dev web server from inside the `superset` dir at port 8088
# Start the Flask dev web server from inside your virtualenv.
# Note that your page may not have css at this point.
# See instructions below how to build the front-end assets.
cd superset
FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
```

#### Logging to the browser console

This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console:
This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console using the [ConsoleLog](https://github.com/betodealmeida/consolelog) package. You need to mutate the app, by adding the following to your `config.py` or `superset_config.py`:

```python
from console_log import ConsoleLog

def FLASK_APP_MUTATOR(app):
app.wsgi_app = ConsoleLog(app.wsgi_app, app.logger)
```

Then make sure you run your WSGI server using the right worker type:

```bash
FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger --console-log
FLASK_ENV=development gunicorn superset:app -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
```

You can log anything to the browser console, including objects:
Expand All @@ -346,7 +365,14 @@ app.logger.info(form_data)

Frontend assets (JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The `superset/assets` directory contains all NPM-managed front end assets. Note that there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap); these are not managed by NPM, and may be phased out in the future.

First, be sure you are using recent versions of NodeJS and npm. Using [nvm](https://github.com/creationix/nvm) to manage them is recommended.
#### nvm and node

First, be sure you are using recent versions of NodeJS and npm. Using [nvm](https://github.com/creationix/nvm) to manage them is recommended. Check the docs at the link to be sure, but at the time of writing the following would install nvm and node:

```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm install node
```

#### Prerequisite

Expand Down Expand Up @@ -385,9 +411,12 @@ npm run dev

# Compile the Javascript and CSS in production/optimized mode for official releases
npm run prod
```

If you run this service from somewhere other than your local machine, you may need to add hostname value to webpack.config.js at .devServer.public specifying the endpoint at which you will access the app. For example: myhost:9001. For convenience you may want to install webpack, webpack-cli and webpack-dev-server globally so that you can run them directly:

# Copy a conf file from the frontend to the backend
npm run sync-backend
```bash
npm install --global webpack webpack-cli webpack-dev-server
```

#### Updating NPM packages
Expand Down Expand Up @@ -511,14 +540,15 @@ superset db upgrade
superset init
superset load_test_users
superset load_examples
superset runserver
superset run --port 8081
```

Run Cypress tests:

```bash
cd /superset/superset/assets
cd superset/assets
npm run build
npm run install-cypress
npm run cypress run

# run tests from a specific file
Expand All @@ -528,6 +558,8 @@ npm run cypress run -- --spec cypress/integration/explore/link.test.js
npm run cypress run -- --spec cypress/integration/dashboard/index.test.js --config video=true
```

See [`superset/assets/cypress_build.sh`](https://github.com/apache/incubator-superset/blob/master/superset/assets/cypress_build.sh).

## Translating

We use [Babel](http://babel.pocoo.org/en/latest/) to translate Superset. In Python files, we import the magic `_` function using:
Expand Down Expand Up @@ -562,7 +594,7 @@ LANGUAGES = {
### Extracting new strings for translation

```bash
fabmanager babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
```

You can then translate the strings gathered in files located under
Expand All @@ -575,7 +607,7 @@ For the translations to take effect:
```bash
# In the case of JS translation, we need to convert the PO file into a JSON file, and we need the global download of the npm package po2json.
npm install -g po2json
fabmanager babel-compile --target superset/translations
flask fab babel-compile --target superset/translations
# Convert the en PO file into a JSON file
po2json -d superset -f jed1.x superset/translations/en/LC_MESSAGES/messages.po superset/translations/en/LC_MESSAGES/messages.json
```
Expand Down
Loading