Compare commits
503 Commits
0.18.0
...
0.21.0.rc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea3a0814fc | ||
|
|
680e1cbb42 | ||
|
|
2d37dec5ff | ||
|
|
3f4c306bd6 | ||
|
|
ac432495d7 | ||
|
|
12fb7c1a62 | ||
|
|
feb15a30a2 | ||
|
|
eb0f3970cf | ||
|
|
b82d15af76 | ||
|
|
32b38ee2d6 | ||
|
|
1d702f2142 | ||
|
|
4ae77ba8af | ||
|
|
3c72e1f8fb | ||
|
|
4bfe08d7c3 | ||
|
|
3a7ed8d194 | ||
|
|
4d204b3b36 | ||
|
|
39ee33aeff | ||
|
|
831cd21737 | ||
|
|
f92a172c7f | ||
|
|
a82bb588f4 | ||
|
|
a84bd5225c | ||
|
|
f2b9f3d5c8 | ||
|
|
7faf38c976 | ||
|
|
357b25e5ae | ||
|
|
8e307a3e4d | ||
|
|
f0acc11249 | ||
|
|
fa35d7d2f4 | ||
|
|
e65aba3c46 | ||
|
|
fab7b1083b | ||
|
|
d9161fb76a | ||
|
|
85b18ff5e7 | ||
|
|
3a8af5d0b0 | ||
|
|
1c545d3a2d | ||
|
|
120a5d08f9 | ||
|
|
b586cb0ba7 | ||
|
|
ae2205aeb5 | ||
|
|
2e25fc4161 | ||
|
|
ba89b2d091 | ||
|
|
aee8438924 | ||
|
|
a6ba841e57 | ||
|
|
8643228b51 | ||
|
|
de869973c7 | ||
|
|
ac57780607 | ||
|
|
630604bc6b | ||
|
|
eb5d220b5e | ||
|
|
3f076b00cd | ||
|
|
514f9452f3 | ||
|
|
068c343be0 | ||
|
|
500455fc72 | ||
|
|
1b4f128f55 | ||
|
|
1a3a8daf49 | ||
|
|
7fce8eab3a | ||
|
|
b4c9402737 | ||
|
|
8459347bdc | ||
|
|
f7bf17290c | ||
|
|
d908e48d61 | ||
|
|
a3a4687ebf | ||
|
|
4d48d5d854 | ||
|
|
83e6807fa0 | ||
|
|
ba96984048 | ||
|
|
591e5ec32e | ||
|
|
690de862e8 | ||
|
|
35810ce2bf | ||
|
|
6c52f2ff72 | ||
|
|
d663bea5e6 | ||
|
|
1ea4521d0c | ||
|
|
c4153c0bbe | ||
|
|
ae8b249dc2 | ||
|
|
9500f0aae3 | ||
|
|
be3da6396f | ||
|
|
330926c167 | ||
|
|
cbcc00c929 | ||
|
|
d03b74f754 | ||
|
|
ec21d5af21 | ||
|
|
70c7315ae0 | ||
|
|
4fa1f0ab17 | ||
|
|
39e502faae | ||
|
|
0280bc52e0 | ||
|
|
dee47864c4 | ||
|
|
17623f71d4 | ||
|
|
7453131858 | ||
|
|
e822fb50d8 | ||
|
|
e2bca47421 | ||
|
|
7987cb794b | ||
|
|
7483e2c942 | ||
|
|
e6129eb492 | ||
|
|
b10aca2de1 | ||
|
|
02cbad59de | ||
|
|
ccb87d337c | ||
|
|
63a49983eb | ||
|
|
81dd622fdb | ||
|
|
9a49b1c41d | ||
|
|
b059506afa | ||
|
|
13c17e1526 | ||
|
|
8e3217a921 | ||
|
|
aed7c7436a | ||
|
|
7f3edad119 | ||
|
|
7fd9c82ae8 | ||
|
|
f3c7052f30 | ||
|
|
326d90a5e4 | ||
|
|
cccc47311b | ||
|
|
5c03167948 | ||
|
|
87b6d76c32 | ||
|
|
abfa03474c | ||
|
|
5bc734b2e5 | ||
|
|
814b70ffd8 | ||
|
|
1e18bfdea4 | ||
|
|
200b66d088 | ||
|
|
cbd01074ba | ||
|
|
1582fa1964 | ||
|
|
a9b6d11ade | ||
|
|
c4b6324e74 | ||
|
|
9432ea80be | ||
|
|
f412b4c158 | ||
|
|
547a3bf4e7 | ||
|
|
e97dc9d3cb | ||
|
|
efae14592e | ||
|
|
1d06495629 | ||
|
|
ffdfdb94ab | ||
|
|
8d7e97a26e | ||
|
|
f8b8f6a343 | ||
|
|
4967342362 | ||
|
|
9893847991 | ||
|
|
18e9640d99 | ||
|
|
58ea736ed6 | ||
|
|
b4bdc45a6b | ||
|
|
fa07b8d51b | ||
|
|
e121a8585e | ||
|
|
adef519583 | ||
|
|
08f09b4761 | ||
|
|
2a89c90e0b | ||
|
|
ce5fa379ec | ||
|
|
d4d4a9b1f1 | ||
|
|
d0b5b449b2 | ||
|
|
bad6938d1a | ||
|
|
48e28eff9b | ||
|
|
f87163413b | ||
|
|
52a9f2742b | ||
|
|
7f07fbefbc | ||
|
|
93660c6838 | ||
|
|
3ebadbcda9 | ||
|
|
3df3e0d681 | ||
|
|
4a3c09187a | ||
|
|
76f8d33d81 | ||
|
|
6cc6637454 | ||
|
|
d7f8a7fde3 | ||
|
|
80eb9c2c64 | ||
|
|
bd45e3b19a | ||
|
|
b866b33dee | ||
|
|
8994bdacbd | ||
|
|
f3b403d346 | ||
|
|
5ad4167512 | ||
|
|
ca67a7a4e9 | ||
|
|
64ef8b14b4 | ||
|
|
912c6f6231 | ||
|
|
6f1351fbbb | ||
|
|
f75dc0271d | ||
|
|
1fb8716231 | ||
|
|
ed212440b5 | ||
|
|
1528288b59 | ||
|
|
7c936e7f60 | ||
|
|
ff268a7526 | ||
|
|
e9804aedff | ||
|
|
e95132ddc3 | ||
|
|
bb0f69d074 | ||
|
|
645de384e3 | ||
|
|
15ecdeb3ba | ||
|
|
04ea3addc4 | ||
|
|
7e64f2e988 | ||
|
|
40fbf1c761 | ||
|
|
a85968eadb | ||
|
|
efc63669a6 | ||
|
|
076f9cd095 | ||
|
|
fdbc936dc9 | ||
|
|
18e459e19e | ||
|
|
064363df78 | ||
|
|
f8cc05b54e | ||
|
|
9baca6758d | ||
|
|
b39d165913 | ||
|
|
bc3ad64619 | ||
|
|
0bd2ac5353 | ||
|
|
03e2af8bd9 | ||
|
|
82b85d1d6c | ||
|
|
17c7ca239a | ||
|
|
ef59b6b650 | ||
|
|
d1a7a7b85c | ||
|
|
3d72eb475a | ||
|
|
b50489eb96 | ||
|
|
8773e32cd6 | ||
|
|
f438ccbcb1 | ||
|
|
f829b486d1 | ||
|
|
06e52e600e | ||
|
|
f0636b8748 | ||
|
|
c629282ec4 | ||
|
|
7d934e7246 | ||
|
|
8efcaeb768 | ||
|
|
cf0b670932 | ||
|
|
3949d39478 | ||
|
|
5718d6bbaf | ||
|
|
f3146ef6f9 | ||
|
|
255ea69977 | ||
|
|
9af34ba51c | ||
|
|
1cf634afa2 | ||
|
|
d7fc364ff4 | ||
|
|
aebd089ca5 | ||
|
|
ae7f163372 | ||
|
|
ed9f56448f | ||
|
|
ccd5fd44cf | ||
|
|
c5252d0f43 | ||
|
|
ede1432936 | ||
|
|
c3c9ceb1cc | ||
|
|
6fe93e18c7 | ||
|
|
c988080990 | ||
|
|
a26e65f418 | ||
|
|
e66f68d36c | ||
|
|
cb4d934ba5 | ||
|
|
6962c76412 | ||
|
|
b0d25a154a | ||
|
|
e22aecb0d1 | ||
|
|
32bd827b25 | ||
|
|
e399a8c613 | ||
|
|
b90d8e32f1 | ||
|
|
c81026ddb1 | ||
|
|
dd72048320 | ||
|
|
ad604aed09 | ||
|
|
31b7b9a6a0 | ||
|
|
745784fc97 | ||
|
|
fdee06bbf2 | ||
|
|
816c517f0f | ||
|
|
49f24d128b | ||
|
|
8223729e1e | ||
|
|
2d6b9422c6 | ||
|
|
3c0e85e2c0 | ||
|
|
490c707eb6 | ||
|
|
7c1b56f3a9 | ||
|
|
3e9f797949 | ||
|
|
f3de758363 | ||
|
|
90e46cb39c | ||
|
|
fe77534c03 | ||
|
|
1f135e41cd | ||
|
|
147c12dddf | ||
|
|
3dfdde130a | ||
|
|
255a36c280 | ||
|
|
66f646ac66 | ||
|
|
e53f3032bb | ||
|
|
3b4cd812ae | ||
|
|
ac5da46fb2 | ||
|
|
497a6f1df9 | ||
|
|
1fd08a5912 | ||
|
|
9676f02497 | ||
|
|
42dd64e413 | ||
|
|
c3ab796734 | ||
|
|
a782d623f0 | ||
|
|
48b88e5241 | ||
|
|
a47a512808 | ||
|
|
aff7a82664 | ||
|
|
2d237fe2ef | ||
|
|
c944c61747 | ||
|
|
0c8b24378d | ||
|
|
90ba6ee6a0 | ||
|
|
8d877e8a35 | ||
|
|
c5b1eb7f5b | ||
|
|
46d60880eb | ||
|
|
0c36827368 | ||
|
|
2b1bb35c5c | ||
|
|
d3824bbb38 | ||
|
|
670ba5d32e | ||
|
|
64c91ec9e3 | ||
|
|
1fda6f0745 | ||
|
|
f8e596b9d8 | ||
|
|
254645773c | ||
|
|
e79adbbc5f | ||
|
|
75e69f02e8 | ||
|
|
6fc837db51 | ||
|
|
2923a125db | ||
|
|
527572c3eb | ||
|
|
a7ba6e4a5d | ||
|
|
e31ad22f50 | ||
|
|
813ed6018d | ||
|
|
0454ef3726 | ||
|
|
afedcdf0d8 | ||
|
|
9f3aeb22d9 | ||
|
|
59268e978a | ||
|
|
b9a2fa4015 | ||
|
|
3c8577b853 | ||
|
|
0aa3d2a818 | ||
|
|
fbd0d46e8a | ||
|
|
c4e056929d | ||
|
|
84e59a11f1 | ||
|
|
9fcd5d67e4 | ||
|
|
ccf505a480 | ||
|
|
d1d1c49009 | ||
|
|
232a5c392e | ||
|
|
9c6248f3ba | ||
|
|
6841697917 | ||
|
|
81817309d3 | ||
|
|
025ef5a0f1 | ||
|
|
9a4e4d0443 | ||
|
|
c9c6bcaabe | ||
|
|
144f516700 | ||
|
|
c17ffc1e9c | ||
|
|
0d4137d21e | ||
|
|
0c5db55d55 | ||
|
|
bd4a4c2753 | ||
|
|
f399fcd624 | ||
|
|
08e40e2d78 | ||
|
|
2898f9d379 | ||
|
|
dfea8df7c9 | ||
|
|
a5320a0f37 | ||
|
|
b68084b9ac | ||
|
|
3b24d7df83 | ||
|
|
b3107bb603 | ||
|
|
08b7e891a7 | ||
|
|
57421d14d0 | ||
|
|
0cf0860a3d | ||
|
|
327c052456 | ||
|
|
033ba2cb66 | ||
|
|
cc36428260 | ||
|
|
6da68ab271 | ||
|
|
be01851ef7 | ||
|
|
20915457ff | ||
|
|
2385cd445b | ||
|
|
0429e842b5 | ||
|
|
f68189b54e | ||
|
|
dcf83031d1 | ||
|
|
ef7e9dd336 | ||
|
|
ae0655028f | ||
|
|
166c576c94 | ||
|
|
7190cf8e77 | ||
|
|
2ef9bfed20 | ||
|
|
0191fa58c8 | ||
|
|
4c3313b01c | ||
|
|
5278b53218 | ||
|
|
4ea770068b | ||
|
|
91bd38a851 | ||
|
|
163f4e359c | ||
|
|
90592d3e3d | ||
|
|
62fcdf2a92 | ||
|
|
48821b5101 | ||
|
|
3b129253a3 | ||
|
|
48760849ec | ||
|
|
9c1ca07c40 | ||
|
|
774ad45efb | ||
|
|
299e9ce6b8 | ||
|
|
219f33f0d1 | ||
|
|
58a704b84c | ||
|
|
b58cfbcb91 | ||
|
|
1e325d9645 | ||
|
|
ad5a4389a2 | ||
|
|
e4fba0ffb7 | ||
|
|
e584a9673f | ||
|
|
b888802e05 | ||
|
|
25c599d040 | ||
|
|
fb866a937b | ||
|
|
aa95e03eb9 | ||
|
|
cf1d0f38ad | ||
|
|
fca982c609 | ||
|
|
747bf80474 | ||
|
|
4f7fd65c8b | ||
|
|
6045063e78 | ||
|
|
0ec9cd4ad2 | ||
|
|
4268513653 | ||
|
|
7654eef110 | ||
|
|
b301ba1f57 | ||
|
|
95509f2000 | ||
|
|
49ab09101b | ||
|
|
40d9e15126 | ||
|
|
a141695b2b | ||
|
|
d01e67a159 | ||
|
|
c34df3eea4 | ||
|
|
56bcbb0f8e | ||
|
|
51f1aa3106 | ||
|
|
d7e419127c | ||
|
|
27fab0d54f | ||
|
|
091e93c831 | ||
|
|
bb6b2da267 | ||
|
|
7abe2d5eee | ||
|
|
7b015faae9 | ||
|
|
e834154030 | ||
|
|
256a521bf1 | ||
|
|
a626f994bf | ||
|
|
76dda688b1 | ||
|
|
163a6a20e5 | ||
|
|
3d136aa0a4 | ||
|
|
ff3057de5d | ||
|
|
7045018d86 | ||
|
|
a55f963e52 | ||
|
|
8dfe2b70b2 | ||
|
|
fdbb569c3e | ||
|
|
cc3e63f1de | ||
|
|
a48e246aa0 | ||
|
|
6eba6cac0b | ||
|
|
bd706ebbd1 | ||
|
|
abbf138cfb | ||
|
|
de346a3eba | ||
|
|
99e1de58bc | ||
|
|
5344a80535 | ||
|
|
0b09a74d37 | ||
|
|
e21745ac9d | ||
|
|
593861eac6 | ||
|
|
53dead9c29 | ||
|
|
f64e2ba7d5 | ||
|
|
80515d2a92 | ||
|
|
4d72afb54b | ||
|
|
06fcaa3095 | ||
|
|
de88764e93 | ||
|
|
9051e1f3e2 | ||
|
|
ba93e6a2d1 | ||
|
|
7e5e229f48 | ||
|
|
b9915e7ecf | ||
|
|
3e51c61dbf | ||
|
|
591e512327 | ||
|
|
fc5db474b7 | ||
|
|
c083aec8e8 | ||
|
|
1ce3b81d01 | ||
|
|
89cd10b3ce | ||
|
|
712297480c | ||
|
|
6ddccaaa9b | ||
|
|
1dcf2c4326 | ||
|
|
f0a8ea644b | ||
|
|
fb6ef26a24 | ||
|
|
00b34d7fbd | ||
|
|
8329ea2b9b | ||
|
|
da0a87a735 | ||
|
|
7aeca39c46 | ||
|
|
e1751c065c | ||
|
|
e5151cb915 | ||
|
|
24e3c7f89a | ||
|
|
987cb9978d | ||
|
|
274d21795f | ||
|
|
0d2c2b0681 | ||
|
|
1eff48facb | ||
|
|
17bd7512ff | ||
|
|
16141ecb94 | ||
|
|
34f381bc25 | ||
|
|
24292dbc11 | ||
|
|
24a2f5b8f0 | ||
|
|
0e6f754af9 | ||
|
|
fb85f008fa | ||
|
|
85fb4a933d | ||
|
|
d3ace6d63f | ||
|
|
205eed8350 | ||
|
|
5bf40e2256 | ||
|
|
7c28e4eace | ||
|
|
a882f7a55f | ||
|
|
9aba77db74 | ||
|
|
c9e5fbb09b | ||
|
|
65f25a1e5a | ||
|
|
e0dd5d9d1d | ||
|
|
737db25b6e | ||
|
|
bea702269c | ||
|
|
d78da8a9bf | ||
|
|
ed8153ff8b | ||
|
|
f7ce100180 | ||
|
|
72291d65c9 | ||
|
|
0d3f57a78d | ||
|
|
04fb0e2c2d | ||
|
|
155fec0a6b | ||
|
|
d90044cd52 | ||
|
|
62bd4eb211 | ||
|
|
677c427b16 | ||
|
|
52b0716571 | ||
|
|
04b662ea11 | ||
|
|
db052b17ea | ||
|
|
e300273e71 | ||
|
|
c5f2eafc90 | ||
|
|
90e4d6469d | ||
|
|
1e7773eb16 | ||
|
|
3c89c8cc46 | ||
|
|
74086dae2b | ||
|
|
66403f1876 | ||
|
|
3a4cd3ae24 | ||
|
|
4ffc1f613e | ||
|
|
dfbba84400 | ||
|
|
77864e6cf4 | ||
|
|
4d12251806 | ||
|
|
0c9f9b695b | ||
|
|
a4a2bf7ae9 | ||
|
|
d0a04cde49 | ||
|
|
69685b9dcc | ||
|
|
b308a3eb4e | ||
|
|
bfa40bd360 | ||
|
|
b0e2904c24 | ||
|
|
ce506bdf65 | ||
|
|
922cc037bf | ||
|
|
8252ada1f9 | ||
|
|
a2d2f8bb8c | ||
|
|
7c5f61d6a6 | ||
|
|
841e18a08c | ||
|
|
dbc7fef7f5 | ||
|
|
cbfe3cb2dc | ||
|
|
5fcd25def1 | ||
|
|
fe3f5f69ae | ||
|
|
2395fbbdaa | ||
|
|
960b26c7a2 | ||
|
|
28ac3504d6 | ||
|
|
ecc00bdd26 | ||
|
|
e7946451d6 | ||
|
|
9b34600c8e | ||
|
|
884610861b | ||
|
|
d9bd3d6460 | ||
|
|
38375be5c3 | ||
|
|
91d951ac42 |
@@ -5,6 +5,11 @@ engines:
|
||||
enabled: false
|
||||
eslint:
|
||||
enabled: true
|
||||
checks:
|
||||
import/extensions:
|
||||
enabled: false
|
||||
import/no-extraneous-dependencies:
|
||||
enabled: false
|
||||
config:
|
||||
config: superset/assets/.eslintrc
|
||||
pep8:
|
||||
|
||||
@@ -1 +1 @@
|
||||
repo_token: eESbYiv4An6KEvjpmguDs4L7YkubXbqn1
|
||||
repo_token: 4P9MpvLrZfJKzHdGZsdV3MzO43OZJgYFn
|
||||
|
||||
5
.gitignore
vendored
@@ -24,6 +24,8 @@ app.db
|
||||
*.bak
|
||||
.idea
|
||||
*.sqllite
|
||||
.vscode
|
||||
.python-version
|
||||
|
||||
# Node.js, webpack artifacts
|
||||
*.entry.js
|
||||
@@ -32,3 +34,6 @@ node_modules
|
||||
npm-debug.log
|
||||
yarn.lock
|
||||
superset/assets/version_info.json
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[pycodestyle]
|
||||
max-line-length = 90
|
||||
@@ -102,7 +102,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
|
||||
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma
|
||||
bad-names=foo,bar,baz,toto,tutu,tata
|
||||
bad-names=foo,bar,baz,toto,tutu,tata,d,fd
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
|
||||
14
.travis.yml
@@ -1,21 +1,18 @@
|
||||
|
||||
language: python
|
||||
services:
|
||||
- redis-server
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token: 5f3a06c425eef7be4b43627d7d07a3e46c45bdc07155217825ff7c49cb6a470c
|
||||
apt:
|
||||
sources:
|
||||
- deadsnakes
|
||||
packages:
|
||||
- python3.5
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.wheelhouse/
|
||||
env:
|
||||
global:
|
||||
- TRAVIS_CACHE=$HOME/.travis_cache/
|
||||
- TRAVIS_NODE_VERSION="6.10.2"
|
||||
- TRAVIS_NODE_VERSION="7.10.0"
|
||||
matrix:
|
||||
- TOX_ENV=flake8
|
||||
- TOX_ENV=javascript
|
||||
- TOX_ENV=pylint
|
||||
- TOX_ENV=py34-postgres
|
||||
@@ -23,7 +20,7 @@ env:
|
||||
- TOX_ENV=py27-mysql
|
||||
- TOX_ENV=py27-sqlite
|
||||
before_install:
|
||||
- npm install -g npm@'>=4.5.0'
|
||||
- npm install -g npm@'>=5.4.1'
|
||||
before_script:
|
||||
- mysql -e 'drop database if exists superset; create database superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' -u root
|
||||
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
|
||||
@@ -34,5 +31,6 @@ before_script:
|
||||
install:
|
||||
- pip install --upgrade pip
|
||||
- pip install tox tox-travis
|
||||
- pip install --upgrade flake8
|
||||
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
|
||||
script: tox -e $TOX_ENV
|
||||
|
||||
496
CHANGELOG.md
@@ -1,5 +1,501 @@
|
||||
## Change Log
|
||||
|
||||
### 0.20.5 (2017/11/06 07:18 +00:00)
|
||||
- [#3776](https://github.com/apache/incubator-superset/pull/3776) [flake8] Enabling flake8 linting (#3776) (@john-bodley)
|
||||
- [#3774](https://github.com/apache/incubator-superset/pull/3774) [sql-lab] Fixing Run Query tooltip (#3774) (@john-bodley)
|
||||
- [#3773](https://github.com/apache/incubator-superset/pull/3773) Fix dashboard export download (#3773) (@michellethomas)
|
||||
- [#3767](https://github.com/apache/incubator-superset/pull/3767) [time table] add tooltip to sparkline (#3767) (@williaster)
|
||||
- [#3748](https://github.com/apache/incubator-superset/pull/3748) Update to reflect new version of cryptography (#3748) (@SpyderRivera)
|
||||
- [#3763](https://github.com/apache/incubator-superset/pull/3763) docs: reword the FAQ regarding table changes (#3763) (@xrmx)
|
||||
- [#3764](https://github.com/apache/incubator-superset/pull/3764) add stackoverflow tag (#3764) (@dmigo)
|
||||
- [#3759](https://github.com/apache/incubator-superset/pull/3759) Add dummy file to fix symlink (#3759) (@mistercrunch)
|
||||
- [#3751](https://github.com/apache/incubator-superset/pull/3751) fix https://github.com/apache/incubator-superset/pull/3726 (#3751) (@graceguo-supercat)
|
||||
- [#3750](https://github.com/apache/incubator-superset/pull/3750) Consolidate all translation config (#3750) (@alanmcruickshank)
|
||||
- [#3726](https://github.com/apache/incubator-superset/pull/3726) Bumping react-select to rc10 (#3726) (@mistercrunch)
|
||||
- [#3741](https://github.com/apache/incubator-superset/pull/3741) Fix has_table method (#3741) (@mxmzdlv)
|
||||
- [#3736](https://github.com/apache/incubator-superset/pull/3736) Escape columns names for time grains - postgres (#3736) (@Ryanthegiantlion)
|
||||
- [#3739](https://github.com/apache/incubator-superset/pull/3739) Fix 3657 (#3739) (@baldoalessandro)
|
||||
- [#3733](https://github.com/apache/incubator-superset/pull/3733) Using indexOf instead of includes for isXAxisString (#3733) (@michellethomas)
|
||||
- [#3723](https://github.com/apache/incubator-superset/pull/3723) bump react-bootstrap version (#3723) (@graceguo-supercat)
|
||||
- [#3721](https://github.com/apache/incubator-superset/pull/3721) Add CRUD action to refresh table metadata (#3721) (@mistercrunch)
|
||||
- [#3720](https://github.com/apache/incubator-superset/pull/3720) Validate JSON in slice's params on save (#3720) (@mistercrunch)
|
||||
- [#3722](https://github.com/apache/incubator-superset/pull/3722) Fix box_plot NaN issue (#3722) (@mistercrunch)
|
||||
- [#3715](https://github.com/apache/incubator-superset/pull/3715) Update messages.po (#3715) (@magicansk)
|
||||
- [#3686](https://github.com/apache/incubator-superset/pull/3686) Missing the data of one province and two regions of China (#3686) (@roganw)
|
||||
- [#3685](https://github.com/apache/incubator-superset/pull/3685) Fix the ISO code description of region/province/department (#3685) (@roganw)
|
||||
- [#3662](https://github.com/apache/incubator-superset/pull/3662) Set logging level to debug for DummyStatsLogger (#3662) (@mistercrunch)
|
||||
- [#3692](https://github.com/apache/incubator-superset/pull/3692) fixes for bugs in #3689 (#3692) (@Mogball)
|
||||
- [#3703](https://github.com/apache/incubator-superset/pull/3703) add VIPKID to the orgs. (#3703) (@killpanda)
|
||||
- [#3696](https://github.com/apache/incubator-superset/pull/3696) changed metric heading from h1 to h3 (#3696) (@Mogball)
|
||||
- [#3713](https://github.com/apache/incubator-superset/pull/3713) [translation] added japanese support (#3713) (@xiaoyugit)
|
||||
- [#3663](https://github.com/apache/incubator-superset/pull/3663) [minor] fix label showing description in time_table's URL (#3663) (@mistercrunch)
|
||||
- [#3711](https://github.com/apache/incubator-superset/pull/3711) fix the slice permission issue after user click-edit new slice title (#3711) (@graceguo-supercat)
|
||||
- [#3701](https://github.com/apache/incubator-superset/pull/3701) [form-data] Quoting form data (#3701) (@john-bodley)
|
||||
- [#3698](https://github.com/apache/incubator-superset/pull/3698) fixing the datasource inconsistence but in visualize flow (#3698) (@graceguo-supercat)
|
||||
- [#3683](https://github.com/apache/incubator-superset/pull/3683) [cleanup] removing print() artefacts (#3683) (@mistercrunch)
|
||||
- [#3702](https://github.com/apache/incubator-superset/pull/3702) Add support for IE 11 for markup slices (#3702) (@jaylindquist)
|
||||
- [#3693](https://github.com/apache/incubator-superset/pull/3693) defaultSort should be false when no sort is necessary (#3693) (@michellethomas)
|
||||
- [#3586](https://github.com/apache/incubator-superset/pull/3586) [Feature] Percentage columns in Table Viz (#3586) (@Mogball)
|
||||
- [#3652](https://github.com/apache/incubator-superset/pull/3652) DI-1113. Authentication: Enable user impersonation for Superset to HiveServer2 using hive.server2.proxy.user (a.fernandez) (#3652) (@afernandez)
|
||||
- [#3664](https://github.com/apache/incubator-superset/pull/3664) [minor] fix padding in Time Table (#3664) (@mistercrunch)
|
||||
- [#3678](https://github.com/apache/incubator-superset/pull/3678) unit tests for OptionDescription component (#3678) (@Mogball)
|
||||
- [#3679](https://github.com/apache/incubator-superset/pull/3679) Avoid dividing by zero for sparkline in time table viz (#3679) (@michellethomas)
|
||||
- [#3680](https://github.com/apache/incubator-superset/pull/3680) Sqllab error troubleshooting (#3680) (@timifasubaa)
|
||||
- [#3653](https://github.com/apache/incubator-superset/pull/3653) Add a ColorPickerControl (#3653) (@mistercrunch)
|
||||
- [#3642](https://github.com/apache/incubator-superset/pull/3642) [New Viz] Partition Diagram (#3642) (@Mogball)
|
||||
- [#3665](https://github.com/apache/incubator-superset/pull/3665) Add description for running specific test (#3665) (@timifasubaa)
|
||||
- [#3661](https://github.com/apache/incubator-superset/pull/3661) Making the sort order for metrics pull from fd for time table viz (#3661) (@michellethomas)
|
||||
- [#3417](https://github.com/apache/incubator-superset/pull/3417) Make columns that return an exception on click unsortable. (#3417) (@aliavni)
|
||||
- [#3651](https://github.com/apache/incubator-superset/pull/3651) Adding sort time table (#3651) (@michellethomas)
|
||||
- [#3647](https://github.com/apache/incubator-superset/pull/3647) added aihello as superset user. (#3647) (@ganeshkrishnan1)
|
||||
- [#3646](https://github.com/apache/incubator-superset/pull/3646) Fix #3612 - reverse sign in difference calculation (#3646) (@mistercrunch)
|
||||
- [#3648](https://github.com/apache/incubator-superset/pull/3648) Fixing some warnings during tests (#3648) (@dennybiasiolli)
|
||||
|
||||
### 0.20.4 (2017/10/12 04:04 +00:00)
|
||||
- [#3645](https://github.com/apache/incubator-superset/pull/3645) [Translations] Restored lost French translations (#3645) (@Mogball)
|
||||
- [#3644](https://github.com/apache/incubator-superset/pull/3644) [sql lab] fix impersonation + template issue (#3644) (@mistercrunch)
|
||||
- [#3641](https://github.com/apache/incubator-superset/pull/3641) Pin moment.js library since 2.19.0 creates problem (#3641) (@mistercrunch)
|
||||
- [#3600](https://github.com/apache/incubator-superset/pull/3600) [time_table] adding support for URLs / links (#3600) (@mistercrunch)
|
||||
- [#3626](https://github.com/apache/incubator-superset/pull/3626) Set tooltip to show extent of sparkData (#3626) (@michellethomas)
|
||||
- [#3631](https://github.com/apache/incubator-superset/pull/3631) add explicit message display for 'Fetching Annotation Layer' error (#3631) (@graceguo-supercat)
|
||||
- [#3637](https://github.com/apache/incubator-superset/pull/3637) [bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#3637) (@mistercrunch)
|
||||
- [#3638](https://github.com/apache/incubator-superset/pull/3638) fix long title text wrapping in editable-title component (#3638) (@graceguo-supercat)
|
||||
- [#3625](https://github.com/apache/incubator-superset/pull/3625) [minor] proper tooltip on ControlHeader's instant re-render trigger (#3625) (@mistercrunch)
|
||||
- [#3634](https://github.com/apache/incubator-superset/pull/3634) add annotation option and a linear color map for heatmap viz. (#3634) (@xiaoyugit)
|
||||
- [#3633](https://github.com/apache/incubator-superset/pull/3633) [bugfix] empty From date filter NoneType error (#3633) (@mistercrunch)
|
||||
- [#3621](https://github.com/apache/incubator-superset/pull/3621) remove unused imports (#3621) (@xrmx)
|
||||
- [#3611](https://github.com/apache/incubator-superset/pull/3611) fixing date/time filter keys (#3611) (@Mogball)
|
||||
|
||||
### 0.20.2 (2017/10/06 07:46 +00:00)
|
||||
- [#3606](https://github.com/apache/incubator-superset/pull/3606) [bugfix] #3593 'Chart Options' panel is missing (#3606) (@mistercrunch)
|
||||
- [#3601](https://github.com/apache/incubator-superset/pull/3601) Removing git artifact (#3601) (@mistercrunch)
|
||||
- [#3599](https://github.com/apache/incubator-superset/pull/3599) [hotfix] fixing issues around new time_table viz (#3599) (@mistercrunch)
|
||||
- [#3598](https://github.com/apache/incubator-superset/pull/3598) [hofix] work around circular deps (#3598) (@mistercrunch)
|
||||
- [#3597](https://github.com/apache/incubator-superset/pull/3597) [time table] fix reversed ratio (#3597) (@mistercrunch)
|
||||
- [#3508](https://github.com/apache/incubator-superset/pull/3508) [Feature/Bugfix] Datepicker and time granularity options to dashboard filters (#3508) (@Mogball)
|
||||
- [#3596](https://github.com/apache/incubator-superset/pull/3596) updating react-alert dependency to v2.3.0 (#3596) (@dennybiasiolli)
|
||||
- [#3577](https://github.com/apache/incubator-superset/pull/3577) [translations] generating missing strings (#3577) (@mistercrunch)
|
||||
- [#3478](https://github.com/apache/incubator-superset/pull/3478) [Bugfix/Feature] Fixed slice render staggering on dashboard first load (#3478) (@Mogball)
|
||||
- [#3543](https://github.com/apache/incubator-superset/pull/3543) New "Time Series - Table" visualization (#3543) (@mistercrunch)
|
||||
- [#3587](https://github.com/apache/incubator-superset/pull/3587) [sql lab] fix numeric sort in data table (#3587) (@mistercrunch)
|
||||
- [#3594](https://github.com/apache/incubator-superset/pull/3594) Fxing bug in label generation for multiple groupbys (#3594) (@fabianmenges)
|
||||
- [#3591](https://github.com/apache/incubator-superset/pull/3591) update immutable.js to v3.8.2 (MIT license) (#3591) (@naoyak)
|
||||
- [#3571](https://github.com/apache/incubator-superset/pull/3571) [Feature] Copy-to-clipboard button in View Query (#3571) (@Mogball)
|
||||
- [#3585](https://github.com/apache/incubator-superset/pull/3585) Allow users to see query string when query returns no data (#3585) (@Mogball)
|
||||
- [#3582](https://github.com/apache/incubator-superset/pull/3582) [Bugfix]: Explore view does not respect custom timeout. (#3582) (@fabianmenges)
|
||||
- [#3584](https://github.com/apache/incubator-superset/pull/3584) Fixed creating new filter options in FilterBox (#3584) (@Mogball)
|
||||
- [#3562](https://github.com/apache/incubator-superset/pull/3562) Added custom pasteSelect to handle paste events (#3562) (@Mogball)
|
||||
- [#3569](https://github.com/apache/incubator-superset/pull/3569) Bumping React to 15.6.2 (MIT license) (#3569) (@mistercrunch)
|
||||
|
||||
### 0.20.1 (2017/10/03 07:04 +00:00)
|
||||
- [#3576](https://github.com/apache/incubator-superset/pull/3576) v0.20.1 (#3576) (@mistercrunch)
|
||||
- [#3572](https://github.com/apache/incubator-superset/pull/3572) After saving slice fixing redirect (#3572) (@michellethomas)
|
||||
- [#3565](https://github.com/apache/incubator-superset/pull/3565) Added label+percent and label+value display options to pie chart (#3565) (@Mogball)
|
||||
- [#3567](https://github.com/apache/incubator-superset/pull/3567) Removing yarn warnings during install (#3567) (@dennybiasiolli)
|
||||
- [#3563](https://github.com/apache/incubator-superset/pull/3563) [nvd3] fix single metric showing up in legend (#3563) (@mistercrunch)
|
||||
- [#3558](https://github.com/apache/incubator-superset/pull/3558) Add Pronto Tools to user list (#3558) (@zkan)
|
||||
- [#3553](https://github.com/apache/incubator-superset/pull/3553) Minor documentation fix (#3553) (@gaborhermann)
|
||||
- [#3545](https://github.com/apache/incubator-superset/pull/3545) CHANGELOG for 0.20.0 (#3545) (@mistercrunch)
|
||||
- [#3534](https://github.com/apache/incubator-superset/pull/3534) Explore update button labels (#3534) (@timifasubaa)
|
||||
- [#3547](https://github.com/apache/incubator-superset/pull/3547) Fixing missing messages.json file (#3547) (@mistercrunch)
|
||||
|
||||
### 0.20.0 (2017/09/28 04:26 +00:00)
|
||||
- [#3528](https://github.com/apache/incubator-superset/pull/3528) try to fix problem that chrome window not opening after ajax requrest (#3528) (@graceguo-supercat)
|
||||
- [#3521](https://github.com/apache/incubator-superset/pull/3521) Time Series Annotation Layers (#3521) (@graceguo-supercat)
|
||||
- [#3526](https://github.com/apache/incubator-superset/pull/3526) [explore] fix cached tooltip (#3526) (@mistercrunch)
|
||||
- [#3544](https://github.com/apache/incubator-superset/pull/3544) v0.20.0 (#3544) (@mistercrunch)
|
||||
- [#3506](https://github.com/apache/incubator-superset/pull/3506) setup: bump pandas to 0.20.3 (#3506) (@xrmx)
|
||||
- [#3066](https://github.com/apache/incubator-superset/pull/3066) Add support for column specific fillna to viz (#3066) (@xrmx)
|
||||
- [#3537](https://github.com/apache/incubator-superset/pull/3537) docs: QUERY_TIMEOUT_THRESHOLD is gone (#3537) (@xrmx)
|
||||
- [#3531](https://github.com/apache/incubator-superset/pull/3531) [style] no bold on dashboard widget headers (#3531) (@mistercrunch)
|
||||
- [#3532](https://github.com/apache/incubator-superset/pull/3532) Break word on InfoTooltip (#3532) (@michellethomas)
|
||||
- [#3473](https://github.com/apache/incubator-superset/pull/3473) Feature: Paired t-test table visualization (#3473) (@Mogball)
|
||||
- [#3513](https://github.com/apache/incubator-superset/pull/3513) Feature: query string API endpoint (#3513) (@Mogball)
|
||||
- [#3504](https://github.com/apache/incubator-superset/pull/3504) Feature: Display the verbose name for metrics within Charts and legend. (#3504) (@fabianmenges)
|
||||
- [#3527](https://github.com/apache/incubator-superset/pull/3527) Druid refresh metadata performance improvements (#3527) (@Mogball)
|
||||
- [#3466](https://github.com/apache/incubator-superset/pull/3466) Allow user update slice title in visualize flow (#3466) (@graceguo-supercat)
|
||||
- [#3467](https://github.com/apache/incubator-superset/pull/3467) allow user update slice name in dashboard view (#3467) (@graceguo-supercat)
|
||||
- [#3509](https://github.com/apache/incubator-superset/pull/3509) Add Table performance improvements (#3509) (@Mogball)
|
||||
- [#3499](https://github.com/apache/incubator-superset/pull/3499) Add metric warning (#3499) (@michellethomas)
|
||||
- [#3390](https://github.com/apache/incubator-superset/pull/3390) js translation -- performance improvment (#3390) (@graceguo-supercat)
|
||||
- [#3491](https://github.com/apache/incubator-superset/pull/3491) Remove repeated line (#3491) (@timifasubaa)
|
||||
- [#3497](https://github.com/apache/incubator-superset/pull/3497) Fix idna requirement (#3497) (@timifasubaa)
|
||||
- [#3495](https://github.com/apache/incubator-superset/pull/3495) update contributing.md (#3495) (@timifasubaa)
|
||||
- [#3500](https://github.com/apache/incubator-superset/pull/3500) Removing super() call from refactor (#3500) (@mistercrunch)
|
||||
- [#3493](https://github.com/apache/incubator-superset/pull/3493) Adding missing future imports (#3493) (@mistercrunch)
|
||||
- [#3494](https://github.com/apache/incubator-superset/pull/3494) Removing dependency on pythrifthiveapi (#3494) (@mistercrunch)
|
||||
- [#3474](https://github.com/apache/incubator-superset/pull/3474) [heatmap] account for bounds = 0 (#3474) (@mistercrunch)
|
||||
- [#3480](https://github.com/apache/incubator-superset/pull/3480) Improve code quality (#3480) (@timifasubaa)
|
||||
- [#3434](https://github.com/apache/incubator-superset/pull/3434) Feature/Fix: Get a full times_series for your filter instead of Topn for each point in time (#3434) (@fabianmenges)
|
||||
- [#3486](https://github.com/apache/incubator-superset/pull/3486) Getting datatype with its dialect (#3486) (@datinho)
|
||||
- [#3404](https://github.com/apache/incubator-superset/pull/3404) Feature: "Impersonate user" setting on Datasource (#3404) (@dmigo)
|
||||
- [#3484](https://github.com/apache/incubator-superset/pull/3484) Create CsvResponse to manage csv exports encoding (#3484) (@JulieRossi)
|
||||
- [#3469](https://github.com/apache/incubator-superset/pull/3469) Better installation docs (#3469) (@mistercrunch)
|
||||
- [#3475](https://github.com/apache/incubator-superset/pull/3475) viz: fix reversed stats_logger label (#3475) (@xrmx)
|
||||
- [#3477](https://github.com/apache/incubator-superset/pull/3477) docs: athena can be installed from pypi (#3477) (@xrmx)
|
||||
- [#3476](https://github.com/apache/incubator-superset/pull/3476) Miscvizcleanups (#3476) (@xrmx)
|
||||
- [#3435](https://github.com/apache/incubator-superset/pull/3435) Adding hook for CSRF exempting flask views. (#3435) (@fabianmenges)
|
||||
- [#3409](https://github.com/apache/incubator-superset/pull/3409) bugfix/3321 Ensure text appears on buttons inside tables (#3409) (@jeffcarey)
|
||||
- [#3415](https://github.com/apache/incubator-superset/pull/3415) Simple grammar and update to link (#3415) (@SpyderRivera)
|
||||
- [#3441](https://github.com/apache/incubator-superset/pull/3441) config: allow changing default options for writting csv (#3441) (@JulieRossi)
|
||||
- [#3425](https://github.com/apache/incubator-superset/pull/3425) Add shopee to user list. (#3425) (@xiaohanyu)
|
||||
- [#3458](https://github.com/apache/incubator-superset/pull/3458) Fixed filter removal bug (#3458) (@Mogball)
|
||||
- [#3424](https://github.com/apache/incubator-superset/pull/3424) fix encoding error in sql lab logging (#3424) (@graceguo-supercat)
|
||||
- [#3459](https://github.com/apache/incubator-superset/pull/3459) Sqllab dont send empty queries to db (#3459) (@timifasubaa)
|
||||
- [#3461](https://github.com/apache/incubator-superset/pull/3461) Fixed dashboard filters carrying over to explore slice (#3461) (@Mogball)
|
||||
- [#3436](https://github.com/apache/incubator-superset/pull/3436) Adding hook for external password store for databases (#3436) (@fabianmenges)
|
||||
- [#3460](https://github.com/apache/incubator-superset/pull/3460) Allow specifying sort criteria on Table viz (#3460) (@mistercrunch)
|
||||
- [#3456](https://github.com/apache/incubator-superset/pull/3456) [heatmap] numerous improvements (#3456) (@mistercrunch)
|
||||
- [#3431](https://github.com/apache/incubator-superset/pull/3431) fix https://github.com/apache/incubator-superset/issues/3430 (#3431) (@graceguo-supercat)
|
||||
- [#3440](https://github.com/apache/incubator-superset/pull/3440) fix https://github.com/apache/incubator-superset/issues/3422 (#3440) (@graceguo-supercat)
|
||||
- [#3439](https://github.com/apache/incubator-superset/pull/3439) Adding order_desc flag to explore endpoint (#3439) (@fabianmenges)
|
||||
- [#2937](https://github.com/apache/incubator-superset/pull/2937) Handling pandas ExtensionDtypes (#2937) (@fabianmenges)
|
||||
- [#3444](https://github.com/apache/incubator-superset/pull/3444) [postgres] adding support to serialized timedelta (#3444) (@mistercrunch)
|
||||
- [#3453](https://github.com/apache/incubator-superset/pull/3453) [explore] show validation error on control panel header (#3453) (@mistercrunch)
|
||||
- [#3450](https://github.com/apache/incubator-superset/pull/3450) [heatmap] fix default sorting (#3450) (@mistercrunch)
|
||||
- [#3452](https://github.com/apache/incubator-superset/pull/3452) Fix off-by-one error with linear color scales (#3452) (@mistercrunch)
|
||||
- [#3454](https://github.com/apache/incubator-superset/pull/3454) [explore] checkbox control won't uncheck (#3454) (@mistercrunch)
|
||||
- [#3446](https://github.com/apache/incubator-superset/pull/3446) Ignore intellij files (#3446) (@fabianmenges)
|
||||
- [#3445](https://github.com/apache/incubator-superset/pull/3445) Fixing the build (#3445) (@mistercrunch)
|
||||
- [#3405](https://github.com/apache/incubator-superset/pull/3405) setup: Bump sqlalchemy-utils to 0.32.16 (#3405) (@xrmx)
|
||||
- [#3403](https://github.com/apache/incubator-superset/pull/3403) [hotfix] user dashboard says '150 weeks' (#3403) (@mistercrunch)
|
||||
- [#3401](https://github.com/apache/incubator-superset/pull/3401) [hotfix] fix slices where since/until = None (#3401) (@mistercrunch)
|
||||
- [#3391](https://github.com/apache/incubator-superset/pull/3391) [dashboard] adding an option to duplicate slices when "Saving AS" (#3391) (@mistercrunch)
|
||||
- [#3399](https://github.com/apache/incubator-superset/pull/3399) Fix copypasta control label error 'Until' -> 'Since' (#3399) (@mistercrunch)
|
||||
- [#3397](https://github.com/apache/incubator-superset/pull/3397) [line chart] add 'min_periods' control related to rolling windows (#3397) (@mistercrunch)
|
||||
- [#3394](https://github.com/apache/incubator-superset/pull/3394) [hive] fix date casting in explore view (#3394) (@mistercrunch)
|
||||
- [#3396](https://github.com/apache/incubator-superset/pull/3396) [hotfix] backward compatibility on date expressions (#3396) (@mistercrunch)
|
||||
- [#3395](https://github.com/apache/incubator-superset/pull/3395) Add Capital Service to organizations list (#3395) (@pkonarzewski)
|
||||
- [#3377](https://github.com/apache/incubator-superset/pull/3377) Fix datatable scroll height when using filter or pagination (#3377) (@mxmzdlv)
|
||||
- [#3392](https://github.com/apache/incubator-superset/pull/3392) fix date picker Select alignment (#3392) (@graceguo-supercat)
|
||||
- [#3378](https://github.com/apache/incubator-superset/pull/3378) Build optimizations (#3378) (@mistercrunch)
|
||||
- [#3379](https://github.com/apache/incubator-superset/pull/3379) [dashboard] load list of slices at modal enter time (#3379) (@mistercrunch)
|
||||
- [#3371](https://github.com/apache/incubator-superset/pull/3371) [explore] Improved time filters controls (#3371) (@mistercrunch)
|
||||
- [#3363](https://github.com/apache/incubator-superset/pull/3363) [sql lab] using react-split-pane (#3363) (@mistercrunch)
|
||||
|
||||
### 0.19.1 (2017/08/26 22:07 +00:00)
|
||||
- [#3376](https://github.com/apache/incubator-superset/pull/3376) v1.9.1 (#3376) (@mistercrunch)
|
||||
- [#3373](https://github.com/apache/incubator-superset/pull/3373) Apply advanced analytics processing to comparison time series (#3373) (@mxmzdlv)
|
||||
- [#3362](https://github.com/apache/incubator-superset/pull/3362) [webpack] add a 'npm run dev-fast' command that is much faster (#3362) (@mistercrunch)
|
||||
- [#3366](https://github.com/apache/incubator-superset/pull/3366) bugfix for addTotalValues with negative values (#3366) (@hajdbo)
|
||||
- [#3339](https://github.com/apache/incubator-superset/pull/3339) [explore] Fix and test slice id logging issue (#3339) (@timifasubaa)
|
||||
- [#3364](https://github.com/apache/incubator-superset/pull/3364) Bump fab to 1.9.4 (#3364) (@mistercrunch)
|
||||
- [#3242](https://github.com/apache/incubator-superset/pull/3242) Revert "[sql lab] Make sql editor resizable (#3242)" (#3360) (@mistercrunch)
|
||||
- [#3357](https://github.com/apache/incubator-superset/pull/3357) [dist_bar] break down control groups (#3357) (@mistercrunch)
|
||||
- [#3356](https://github.com/apache/incubator-superset/pull/3356) delete unused csv file (#3356) (@timifasubaa)
|
||||
- [#3358](https://github.com/apache/incubator-superset/pull/3358) [hotfix] react-select dropdown autocomplete are invisible (#3358) (@mistercrunch)
|
||||
- [#3354](https://github.com/apache/incubator-superset/pull/3354) Collapsible Control sections (#3354) (@mistercrunch)
|
||||
- [#3353](https://github.com/apache/incubator-superset/pull/3353) [bugfix] `Y bounds` in line chart (#3353) (@mistercrunch)
|
||||
- [#3351](https://github.com/apache/incubator-superset/pull/3351) [css] react-select only in theme (#3351) (@mistercrunch)
|
||||
- [#3352](https://github.com/apache/incubator-superset/pull/3352) fix multi-value react select style (#3352) (@graceguo-supercat)
|
||||
- [#3345](https://github.com/apache/incubator-superset/pull/3345) Better looking checkboxes (#3345) (@mistercrunch)
|
||||
- [#3338](https://github.com/apache/incubator-superset/pull/3338) [hotfix] self-immune filter_box fix (#3338) (@mistercrunch)
|
||||
- [#3242](https://github.com/apache/incubator-superset/pull/3242) [sql lab] Make sql editor resizable (#3242) (@dmigo)
|
||||
- [#3308](https://github.com/apache/incubator-superset/pull/3308) [sql lab] improve error messages (#3308) (@mistercrunch)
|
||||
- [#3329](https://github.com/apache/incubator-superset/pull/3329) Syncing the timeout param from backend (#3329) (@mistercrunch)
|
||||
- [#3335](https://github.com/apache/incubator-superset/pull/3335) [dashboard] re-enabling cascading filters (#3335) (@mistercrunch)
|
||||
- [#3332](https://github.com/apache/incubator-superset/pull/3332) [nvd3] fix bubble axis (#3332) (@mistercrunch)
|
||||
- [#3333](https://github.com/apache/incubator-superset/pull/3333) [hotfix] hotfixing the hotfix (#3333) (@mistercrunch)
|
||||
- [#3331](https://github.com/apache/incubator-superset/pull/3331) Unnecessary to specify order_columns for DatasourceModelView (#3331) (@RoganW)
|
||||
- [#3328](https://github.com/apache/incubator-superset/pull/3328) disable immediately re-render for color scheme change (#3328) (@graceguo-supercat)
|
||||
- [#3330](https://github.com/apache/incubator-superset/pull/3330) [hotfix] dashboard widget resize is broken (#3330) (@mistercrunch)
|
||||
- [#3322](https://github.com/apache/incubator-superset/pull/3322) docs: add references to Flask-Appbuilder Security documentation (#3322) (@xrmx)
|
||||
- [#3315](https://github.com/apache/incubator-superset/pull/3315) Use react-alert for backend message flashing (#3315) (@mistercrunch)
|
||||
- [#3295](https://github.com/apache/incubator-superset/pull/3295) Allow for multiple color schemes (#3295) (@graceguo-supercat)
|
||||
- [#3313](https://github.com/apache/incubator-superset/pull/3313) French translation (#3313) (@invenis-paris)
|
||||
- [#3305](https://github.com/apache/incubator-superset/pull/3305) [hive] improve error messages (#3305) (@mistercrunch)
|
||||
- [#3309](https://github.com/apache/incubator-superset/pull/3309) Fix styles in Separator widget (#3309) (@mistercrunch)
|
||||
- [#3310](https://github.com/apache/incubator-superset/pull/3310) [sql lab] run button shortcut tooltip (#3310) (@mistercrunch)
|
||||
- [#3291](https://github.com/apache/incubator-superset/pull/3291) [bugfix] Presto KeyError 'errorLocation' (#3291) (@mistercrunch)
|
||||
- [#3292](https://github.com/apache/incubator-superset/pull/3292) [sql lab] add pending to the list of searchable statuses (#3292) (@mistercrunch)
|
||||
- [#3293](https://github.com/apache/incubator-superset/pull/3293) [mapbox] fix viewport alterations (#3293) (@mistercrunch)
|
||||
- [#3298](https://github.com/apache/incubator-superset/pull/3298) Fix raise error when query datasource (#3298) (@RoganW)
|
||||
- [#3296](https://github.com/apache/incubator-superset/pull/3296) [docs] document how to compile/publish docs (#3296) (@mistercrunch)
|
||||
- [#3280](https://github.com/apache/incubator-superset/pull/3280) [dashboard] add link to export CSV from dashboard (#3280) (@mistercrunch)
|
||||
- [#3282](https://github.com/apache/incubator-superset/pull/3282) FAQ entry for backend support (#3282) (@mistercrunch)
|
||||
- [#3286](https://github.com/apache/incubator-superset/pull/3286) [sql lab] fix sluggish backspace in editor (#3286) (@mistercrunch)
|
||||
- [#3287](https://github.com/apache/incubator-superset/pull/3287) Fix Chart Error Message Display (#3287) (@graceguo-supercat)
|
||||
- [#3284](https://github.com/apache/incubator-superset/pull/3284) [dashboard] fix standalone mode that hides the navbar (#3284) (@mistercrunch)
|
||||
- [#3031](https://github.com/apache/incubator-superset/pull/3031) Improve superset list view content layout (#3031) (@graceguo-supercat)
|
||||
- [#3281](https://github.com/apache/incubator-superset/pull/3281) [markup] fix CSS, remove scrollbar (#3281) (@mistercrunch)
|
||||
- [#2033](https://github.com/apache/incubator-superset/pull/2033) Fix returned time parse_human_datetime (#2033) (@0x0ece)
|
||||
- [#3032](https://github.com/apache/incubator-superset/pull/3032) Add translatable columns in label_columns of the view (#3032) (@RoganW)
|
||||
- [#3211](https://github.com/apache/incubator-superset/pull/3211) [security] prevent XSS markup viz (#3211) (@mistercrunch)
|
||||
- [#3034](https://github.com/apache/incubator-superset/pull/3034) add `_()` to Exception messages (#3034) (@RoganW)
|
||||
- [#3275](https://github.com/apache/incubator-superset/pull/3275) display the verbose_name of columns in list view, just like in the metrics list (#3275) (@RoganW)
|
||||
- [#3274](https://github.com/apache/incubator-superset/pull/3274) add placeholder to Select components (#3274) (@RoganW)
|
||||
- [#3277](https://github.com/apache/incubator-superset/pull/3277) Added Konfio to 'Who uses Superset' list. (#3277) (@luis-rodriguez)
|
||||
- [#3278](https://github.com/apache/incubator-superset/pull/3278) Fix celery worker (#3278) (@saguziel)
|
||||
- [#3183](https://github.com/apache/incubator-superset/pull/3183) [add] Save filters to dashboard (#3183) (@RoganW)
|
||||
- [#3110](https://github.com/apache/incubator-superset/pull/3110) Explore view save modal spec (#3110) (@graceguo-supercat)
|
||||
- [#3279](https://github.com/apache/incubator-superset/pull/3279) [explore] fixed padding bug on filter section (#3279) (@timifasubaa)
|
||||
- [#3088](https://github.com/apache/incubator-superset/pull/3088) [explore] Split large reducer logic in ExploreViewContainer (#3088) (@graceguo-supercat)
|
||||
- [#3267](https://github.com/apache/incubator-superset/pull/3267) Use sane Celery defaults to prevent tasks from being delayed (#3267) (@saguziel)
|
||||
- [#3268](https://github.com/apache/incubator-superset/pull/3268) [bugfix] preserve order in groupby (#3268) (@mistercrunch)
|
||||
- [#3266](https://github.com/apache/incubator-superset/pull/3266) Set default ports Druid (#3266) (@Fokko)
|
||||
- [#3262](https://github.com/apache/incubator-superset/pull/3262) [webpack] break CSS and JS files while webpackin' (#3262) (@mistercrunch)
|
||||
- [#3241](https://github.com/apache/incubator-superset/pull/3241) Improve the chart type of Visualize in sqllab (#3241) (@eeve)
|
||||
- [#3256](https://github.com/apache/incubator-superset/pull/3256) Modernize SQLA pessimistic handling (#3256) (@mistercrunch)
|
||||
- [#3252](https://github.com/apache/incubator-superset/pull/3252) Explicitly add Flask as dependancy (#3252) (@Fokko)
|
||||
- [#3261](https://github.com/apache/incubator-superset/pull/3261) Relying on FAB for font-awesome.min.css (#3261) (@mistercrunch)
|
||||
- [#3264](https://github.com/apache/incubator-superset/pull/3264) import logging (#3264) (@cclauss)
|
||||
- [#3244](https://github.com/apache/incubator-superset/pull/3244) [explore] make edit datasource a basic link (#3244) (@mistercrunch)
|
||||
- [#3254](https://github.com/apache/incubator-superset/pull/3254) [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) (@mistercrunch)
|
||||
- [#3249](https://github.com/apache/incubator-superset/pull/3249) Fix Yahoo's website link (#3249) (@pedro-valentim)
|
||||
- [#3246](https://github.com/apache/incubator-superset/pull/3246) Fix typo (#3246) (@zeeshanu)
|
||||
- [#3235](https://github.com/apache/incubator-superset/pull/3235) docs: use yarn in making your own build (#3235) (@xrmx)
|
||||
- [#3067](https://github.com/apache/incubator-superset/pull/3067) explore: redraw chart on width change too (#3067) (@xrmx)
|
||||
- [#3225](https://github.com/apache/incubator-superset/pull/3225) Add basic Impala engine spec (#3225) (@mistercrunch)
|
||||
- [#3237](https://github.com/apache/incubator-superset/pull/3237) Treemap vis verbose metric name (#3237) (@RichRadics)
|
||||
- [#3240](https://github.com/apache/incubator-superset/pull/3240) [bug fix] Fix to #3137 and #3239 (#3240) (@FrederichCheng)
|
||||
- [#3238](https://github.com/apache/incubator-superset/pull/3238) SUPERSET_HOME enviroment variable (#3238) (@RichRadics)
|
||||
- [#3236](https://github.com/apache/incubator-superset/pull/3236) Handle Time at query_obj generation time (#3236) (@mistercrunch)
|
||||
- [#3230](https://github.com/apache/incubator-superset/pull/3230) [pivot] add support for in Pivot on Druid (#3230) (@mistercrunch)
|
||||
- [#3229](https://github.com/apache/incubator-superset/pull/3229) Allowing to integrate time as a groupby value (#3229) (@mistercrunch)
|
||||
- [#3227](https://github.com/apache/incubator-superset/pull/3227) 0.19.0 (#3227) (@mistercrunch)
|
||||
- [#2974](https://github.com/apache/incubator-superset/pull/2974) Allow 'refresh_immune_slices' (#2974) (@RichRadics)
|
||||
- [#3111](https://github.com/apache/incubator-superset/pull/3111) sql_lab: re-raise exception in get_sql_results (#3111) (@xrmx)
|
||||
|
||||
### 0.19.0 (2017/08/02 05:16 +00:00)
|
||||
- [#3210](https://github.com/apache/incubator-superset/pull/3210) [explore] DatasourceControl to pick datasource in modal (#3210) (@mistercrunch)
|
||||
- [#3214](https://github.com/apache/incubator-superset/pull/3214) [sqllab] fix UI shows 'The query returned no results' momentarily (#3214) (@mistercrunch)
|
||||
- [#3197](https://github.com/apache/incubator-superset/pull/3197) [explore] nvd3 sort values in rich tooltip (#3197) (@mistercrunch)
|
||||
- [#3222](https://github.com/apache/incubator-superset/pull/3222) [sqllab/cosmetics] add margin-top for labels in query history (#3222) (@mistercrunch)
|
||||
- [#3212](https://github.com/apache/incubator-superset/pull/3212) [docs] update url in CONTRIBUTING.md (#3212) (@diggzhang)
|
||||
- [#3213](https://github.com/apache/incubator-superset/pull/3213) [bugfix] capture Hive job_id pre-url transformation (#3213) (@mistercrunch)
|
||||
- [#3205](https://github.com/apache/incubator-superset/pull/3205) fix issue 3204 (#3205) (@diggzhang)
|
||||
- [#3203](https://github.com/apache/incubator-superset/pull/3203) Speed up JS build time (#3203) (@mistercrunch)
|
||||
- [#2929](https://github.com/apache/incubator-superset/pull/2929) Autofocus search input in VizTypeControl modal onEnter (#2929) (@pariser)
|
||||
- [#3086](https://github.com/apache/incubator-superset/pull/3086) add combine config for metrics in pivot table (#3086) (@RoganW)
|
||||
- [#3146](https://github.com/apache/incubator-superset/pull/3146) [druid] Allow custom druid postaggregators (#3146) (@brianwolfe)
|
||||
- [#3194](https://github.com/apache/incubator-superset/pull/3194) Adding 'apache' to docs (#3194) (@mistercrunch)
|
||||
- [#3196](https://github.com/apache/incubator-superset/pull/3196) [bugfix] fix merge conflict that broke Hive support (#3196) (@mistercrunch)
|
||||
- [#3193](https://github.com/apache/incubator-superset/pull/3193) Add BigQuery engine specifications (#3193) (@mistercrunch)
|
||||
- [#3187](https://github.com/apache/incubator-superset/pull/3187) [sqllab] improve Hive support (#3187) (@mistercrunch)
|
||||
- [#3186](https://github.com/apache/incubator-superset/pull/3186) Escaping the user's SQL in the explore view (#3186) (@mistercrunch)
|
||||
- [#3065](https://github.com/apache/incubator-superset/pull/3065) Bump cryptography to 1.9 (#3065) (@xrmx)
|
||||
- [#3174](https://github.com/apache/incubator-superset/pull/3174) Fix the segment interval for pulling metadata (#3174) (@Fokko)
|
||||
- [#3181](https://github.com/apache/incubator-superset/pull/3181) [bugfix] visualize flow error: 'Metric x is not valid' (#3181) (@mistercrunch)
|
||||
- [#3180](https://github.com/apache/incubator-superset/pull/3180) [bugfix] fix bar order (#3180) (@mistercrunch)
|
||||
- [#3169](https://github.com/apache/incubator-superset/pull/3169) docs: fixup installation examples code indentation (#3169) (@xrmx)
|
||||
- [#3171](https://github.com/apache/incubator-superset/pull/3171) add Zalando to the list of organizations (#3171) (@dmigo)
|
||||
- [#2968](https://github.com/apache/incubator-superset/pull/2968) fix hive.fetch_logs (#2968) (@timfeirg)
|
||||
- [#3036](https://github.com/apache/incubator-superset/pull/3036) [bugfix] numeric value for date fields in table viz (#3036) (@mistercrunch)
|
||||
- [#3101](https://github.com/apache/incubator-superset/pull/3101) Add 'show/hide totals' option to pivot table vis (#3101) (@RichRadics)
|
||||
- [#3045](https://github.com/apache/incubator-superset/pull/3045) add title description to model view (#3045) (@RoganW)
|
||||
- [#3035](https://github.com/apache/incubator-superset/pull/3035) Datasource cannot be empty (#3035) (@RoganW)
|
||||
- [#3105](https://github.com/apache/incubator-superset/pull/3105) [bugfix] only filterable columns should show up in FilterBox list (#3105) (@mistercrunch)
|
||||
- [#3179](https://github.com/apache/incubator-superset/pull/3179) Fixing the damn build (#3179) (@mistercrunch)
|
||||
- [#3102](https://github.com/apache/incubator-superset/pull/3102) Add event-flow visualization (#3102) (@williaster)
|
||||
- [#3163](https://github.com/apache/incubator-superset/pull/3163) Prevent people from deleting datasources that have associate slices (#3163) (@mistercrunch)
|
||||
- [#3164](https://github.com/apache/incubator-superset/pull/3164) More logging to csv endpoint (#3164) (@mistercrunch)
|
||||
- [#3159](https://github.com/apache/incubator-superset/pull/3159) [bugfix] SQLA instance has been deleted (#3159) (@mistercrunch)
|
||||
- [#3157](https://github.com/apache/incubator-superset/pull/3157) add douban to the orgs. (#3157) (@luchuan)
|
||||
- [#3150](https://github.com/apache/incubator-superset/pull/3150) [docs] use yarn in CONTRIBUTING.md (#3150) (@mistercrunch)
|
||||
- [#3155](https://github.com/apache/incubator-superset/pull/3155) [bugfix] fails on None view_menu (#3155) (@mistercrunch)
|
||||
- [#3112](https://github.com/apache/incubator-superset/pull/3112) allow user press Enter key to end editing title (#3112) (@graceguo-supercat)
|
||||
- [#3116](https://github.com/apache/incubator-superset/pull/3116) [minor] change tooltip on 'Edit slice properties' (#3116) (@mistercrunch)
|
||||
- [#3133](https://github.com/apache/incubator-superset/pull/3133) Prevent SQLA warning related to SQLALCHEMY_TRACK_MODIFICATION (#3133) (@mistercrunch)
|
||||
- [#3138](https://github.com/apache/incubator-superset/pull/3138) [#3137] Use state.datasource.type instead of state.datasource_type when rendering ControlPanelsContainer (#3138) (@FrederichCheng)
|
||||
- [#3119](https://github.com/apache/incubator-superset/pull/3119) [heatmap] basic non empty validation (#3119) (@mistercrunch)
|
||||
- [#3135](https://github.com/apache/incubator-superset/pull/3135) Fixes #3134 by correct response content-type of /testconn (#3135) (@shawnzhu)
|
||||
- [#3126](https://github.com/apache/incubator-superset/pull/3126) [Celery] fix the celery worker concurrency settings (#3126) (@dingguitao)
|
||||
- [#3118](https://github.com/apache/incubator-superset/pull/3118) [CLI] Improve the missing perm creation logic (#3118) (@mistercrunch)
|
||||
- [#3120](https://github.com/apache/incubator-superset/pull/3120) Using yarn instead of npm install (#3120) (@mistercrunch)
|
||||
- [#3044](https://github.com/apache/incubator-superset/pull/3044) clarify Superset different timeout config (#3044) (@graceguo-supercat)
|
||||
- [3d136aa](https://github.com/apache/incubator-superset/commit/3d136aa0a4d3c6ebb26821e1b308b6eff4c2fd8f) Update docs links on README (@mistercrunch)
|
||||
- [#3042](https://github.com/apache/incubator-superset/pull/3042) fix default checkbox alignment (#3042) (@graceguo-supercat)
|
||||
- [#3013](https://github.com/apache/incubator-superset/pull/3013) New chart type : Chord Diagrams (#3013) (@mistercrunch)
|
||||
- [#3041](https://github.com/apache/incubator-superset/pull/3041) [bugfix] issue creating separators & markup slices (#3041) (@mistercrunch)
|
||||
- [#3011](https://github.com/apache/incubator-superset/pull/3011) Bug fix: Datasource -> Slice relationship (#3011) (@fabianmenges)
|
||||
|
||||
### 0.18.5 (2017/06/22 22:46 +00:00)
|
||||
- [fdbb569](https://github.com/apache/incubator-superset/commit/fdbb569c3e2842fdfc80e0418f5817593e5c64fb) 0.18.5 (@mistercrunch)
|
||||
- [cc3e63f](https://github.com/apache/incubator-superset/commit/cc3e63f1de0a6e5c2fd68464297620ac878fe2a0) [docs] adding info on how to create new viz (@mistercrunch)
|
||||
- [#3022](https://github.com/apache/incubator-superset/pull/3022) add test coverage for sql lab components (#3022) (@graceguo-supercat)
|
||||
- [6eba6ca](https://github.com/apache/incubator-superset/commit/6eba6cac0b49a06172ba3dc817eb7aeef7cd310c) [hotfix] xAxis broken on time series viz (@mistercrunch)
|
||||
- [bd706eb](https://github.com/apache/incubator-superset/commit/bd706ebbd17e6d147962df5f20dabdf3af3a6730) Fixing image sizes for horizon and country_map (@mistercrunch)
|
||||
- [abbf138](https://github.com/apache/incubator-superset/commit/abbf138cfb6149277cbbfd1b38aa65a1e0170f3c) Bumping SQLLAB_ASYNC_TIME_LIMIT_SEC default config to 6 hours (@mistercrunch)
|
||||
- [#3021](https://github.com/apache/incubator-superset/pull/3021) CONTRIBUTING: add python unittes setup (#3021) (@graceguo-supercat)
|
||||
- [#3014](https://github.com/apache/incubator-superset/pull/3014) A set of minor fixes (#3014) (@mistercrunch)
|
||||
- [5344a80](https://github.com/apache/incubator-superset/commit/5344a805359fe6b72bcc7a4298b22f0dfb0cccfa) Bumping flask-appbuilder to 1.9.1 (@mistercrunch)
|
||||
- [0b09a74](https://github.com/apache/incubator-superset/commit/0b09a74d37874f9c6aa101c9566257873a6e41a0) Downgrading celery to 3.1.25 (@mistercrunch)
|
||||
- [#3017](https://github.com/apache/incubator-superset/pull/3017) CONTRIBUTING: ask to quote python stacktraces (#3017) (@xrmx)
|
||||
- [#3009](https://github.com/apache/incubator-superset/pull/3009) [bugfix] fix metrics/metric control default (#3009) (@mistercrunch)
|
||||
- [53dead9](https://github.com/apache/incubator-superset/commit/53dead9c2983ca9e3f940354e1fecb3d85f62b2b) Revert "Bumping FAB to 1.9.1" (@mistercrunch)
|
||||
- [f64e2ba](https://github.com/apache/incubator-superset/commit/f64e2ba7d52c442461b59ee1230476eae6b9ff22) Bumping FAB to 1.9.1 (@mistercrunch)
|
||||
- [#3012](https://github.com/apache/incubator-superset/pull/3012) Revert change in npm run build command (#3012) (@yolken)
|
||||
- [#3008](https://github.com/apache/incubator-superset/pull/3008) Adding missing dependency and linting webpack.js (#3008) (@mistercrunch)
|
||||
- [#2981](https://github.com/apache/incubator-superset/pull/2981) Stabilizing Celery / SQL Lab (#2981) (@mistercrunch)
|
||||
- [#2994](https://github.com/apache/incubator-superset/pull/2994) Misc. tweaks to improve webpack performance (#2994) (@yolken)
|
||||
- [#2990](https://github.com/apache/incubator-superset/pull/2990) translations extracted by pybabel (#2990) (@RoganW)
|
||||
- [#2983](https://github.com/apache/incubator-superset/pull/2983) Fix importing config from env var (#2983) (@andrewmchen)
|
||||
- [#2988](https://github.com/apache/incubator-superset/pull/2988) Improving TextAreaControl to support code and modal (#2988) (@mistercrunch)
|
||||
- [#2957](https://github.com/apache/incubator-superset/pull/2957) [pivot viz] fix formatting and verbose names (#2957) (@mistercrunch)
|
||||
- [#2927](https://github.com/apache/incubator-superset/pull/2927) [explore] improve bubble viz (#2927) (@mistercrunch)
|
||||
- [#2984](https://github.com/apache/incubator-superset/pull/2984) add test coverage for SqlEditorLeftBar (#2984) (@graceguo-supercat)
|
||||
- [#2985](https://github.com/apache/incubator-superset/pull/2985) fix is_owner check (#2985) (@graceguo-supercat)
|
||||
- [#2970](https://github.com/apache/incubator-superset/pull/2970) [FilterBox] use column verbose names (#2970) (@mistercrunch)
|
||||
- [1ce3b81](https://github.com/apache/incubator-superset/commit/1ce3b81d01e1453fb34469fa6ba66f9b7d09bcb2) Imporving the README (@mistercrunch)
|
||||
- [#2978](https://github.com/apache/incubator-superset/pull/2978) [bufix] superset views not getting from_dttm-to_dttm in template context (#2978) (@mistercrunch)
|
||||
- [#2963](https://github.com/apache/incubator-superset/pull/2963) [CLI] adding 'superset flower' command (flower is a UI for Celery) (#2963) (@mistercrunch)
|
||||
- [#2979](https://github.com/apache/incubator-superset/pull/2979) tests for saveQuery, fetchQueryResults, runQuery, postStopQuery (#2979) (@ascott)
|
||||
- [#2896](https://github.com/apache/incubator-superset/pull/2896) fix local state 'columns' (#2896) (@graceguo-supercat)
|
||||
- [#2977](https://github.com/apache/incubator-superset/pull/2977) test props on alert wrapper (#2977) (@ascott)
|
||||
- [#2972](https://github.com/apache/incubator-superset/pull/2972) add test coverage for ResultSet component (#2972) (@graceguo-supercat)
|
||||
- [#2976](https://github.com/apache/incubator-superset/pull/2976) [js-testing] add tests for explore actions (#2976) (@ascott)
|
||||
- [#2940](https://github.com/apache/incubator-superset/pull/2940) Edit Dashboard title and Slice title in place (#2940) (@graceguo-supercat)
|
||||
- [#2961](https://github.com/apache/incubator-superset/pull/2961) add test for ControlPanelSection (#2961) (@ascott)
|
||||
- [#2952](https://github.com/apache/incubator-superset/pull/2952) [js] remove unused npm dependencies (#2952) (@mistercrunch)
|
||||
- [#2939](https://github.com/apache/incubator-superset/pull/2939) add new slice test (#2939) (@ascott)
|
||||
- [#2951](https://github.com/apache/incubator-superset/pull/2951) [js] version js file names using webpack chunkhash (#2951) (@ascott)
|
||||
- [#2941](https://github.com/apache/incubator-superset/pull/2941) [dashboard] notify instead of modal onSave (#2941) (@mistercrunch)
|
||||
- [987cb99](https://github.com/apache/incubator-superset/commit/987cb9978dcd053ebac550c790a9d87d8d25aee6) [hotfix] bumping pandas version to 0.20.2 (@mistercrunch)
|
||||
- [#1742](https://github.com/apache/incubator-superset/pull/1742) Fix handling of Chunked requests (#1742) (@nishantmonu51)
|
||||
- [#2943](https://github.com/apache/incubator-superset/pull/2943) [table viz] get metrics to right-align (#2943) (@mistercrunch)
|
||||
- [#2945](https://github.com/apache/incubator-superset/pull/2945) Bumping some dependencies (#2945) (@mistercrunch)
|
||||
- [#2946](https://github.com/apache/incubator-superset/pull/2946) remove reference for CSRF_ENABLED, and use WTF_CSRF_ENABLED instead (#2946) (@timfeirg)
|
||||
- [#2921](https://github.com/apache/incubator-superset/pull/2921) [explore] improve metric(s) and groupby(s) controls (#2921) (@mistercrunch)
|
||||
- [34f381b](https://github.com/apache/incubator-superset/commit/34f381bc250cf7c74669b52d5cc5f9061c7184c5) v 0.18.5-alpha.3 (@ascott)
|
||||
- [#2928](https://github.com/apache/incubator-superset/pull/2928) add new slice form improvements (#2928) (@ascott)
|
||||
- [#2912](https://github.com/apache/incubator-superset/pull/2912) [big number] various improvements (#2912) (@mistercrunch)
|
||||
- [#2924](https://github.com/apache/incubator-superset/pull/2924) Fix #2814 - json serialization edge case (#2924) (@mistercrunch)
|
||||
- [fb85f00](https://github.com/apache/incubator-superset/commit/fb85f008fac2694bea7f6705cf21dc666490bcd0) v 0.18.5-alpha.2 (@ascott)
|
||||
- [85fb4a9](https://github.com/apache/incubator-superset/commit/85fb4a933d8ab7348082a6849ff96f199b8c02fa) [hotfix] only apply SQLAlchemy limit where needed (@mistercrunch)
|
||||
- [#2893](https://github.com/apache/incubator-superset/pull/2893) [js-testing] type checking for dates.js (#2893) (@ascott)
|
||||
- [#2889](https://github.com/apache/incubator-superset/pull/2889) add more tests for Timer (#2889) (@ascott)
|
||||
- [#2800](https://github.com/apache/incubator-superset/pull/2800) [slices] add simple new slice form (#2800) (@ascott)
|
||||
- [#2923](https://github.com/apache/incubator-superset/pull/2923) updating react-alert dependency to v2.0.1 (#2923) (@dennybiasiolli)
|
||||
- [#2906](https://github.com/apache/incubator-superset/pull/2906) Ignore pyenv files in .gitignore. (#2906) (@xiaohanyu)
|
||||
- [9aba77d](https://github.com/apache/incubator-superset/commit/9aba77db74f8c7e823fcba73fc4e0a1b7efbadd4) 0.18.5-alpha.1 (@mistercrunch)
|
||||
- [#2910](https://github.com/apache/incubator-superset/pull/2910) [dashboard]Add timeout message on Dashboard view (#2910) (@graceguo-supercat)
|
||||
- [#2908](https://github.com/apache/incubator-superset/pull/2908) [explore] fix IN filter on numeric field (#2908) (@mistercrunch)
|
||||
- [#2911](https://github.com/apache/incubator-superset/pull/2911) Removed time column from druid metadata refresh, added long and double schema support (#2911) (@joshwalters)
|
||||
- [#2897](https://github.com/apache/incubator-superset/pull/2897) fix visualize modal checkbox alignment (#2897) (@graceguo-supercat)
|
||||
- [#2902](https://github.com/apache/incubator-superset/pull/2902) update for the italian translation (#2902) (@napo)
|
||||
- [#2888](https://github.com/apache/incubator-superset/pull/2888) [docs faq] how do I add new columns to an existing table (#2888) (@mistercrunch)
|
||||
- [#2903](https://github.com/apache/incubator-superset/pull/2903) update contributing a bit re contributing code (#2903) (@xrmx)
|
||||
- [#2904](https://github.com/apache/incubator-superset/pull/2904) travis: no need to install python3.5 (#2904) (@xrmx)
|
||||
|
||||
### 0.18.4 (2017/06/05 00:54 +00:00)
|
||||
- [72291d6](https://github.com/apache/incubator-superset/commit/72291d65c929306792bc62aeaff51e083bc8c09f) 0.18.4 (@mistercrunch)
|
||||
- [#2895](https://github.com/apache/incubator-superset/pull/2895) fix a linting error (#2895) (@graceguo-supercat)
|
||||
- [#2894](https://github.com/apache/incubator-superset/pull/2894) fix js error on explore view (#2894) (@ascott)
|
||||
- [155fec0](https://github.com/apache/incubator-superset/commit/155fec0a6bcb9733c64301e9e8b86aa2c384673b) Updating CHANGELOG.md to 0.18.3 (@mistercrunch)
|
||||
|
||||
### 0.18.3 (2017/06/02 15:27 +00:00)
|
||||
- [d90044c](https://github.com/airbnb/superset/commit/d90044cd523253aa01b5cdf6509b43abeef34079) 0.18.3 (@mistercrunch)
|
||||
- [62bd4eb](https://github.com/airbnb/superset/commit/62bd4eb2118e4f1e771b58cd455b928be002a461) Converting filter argument to number if column is number (#2891) (@fabianmenges)
|
||||
- [677c427](https://github.com/airbnb/superset/commit/677c427b1615a2a9b9054932b5e07868d7d63e42) delete DataPreviewModal, it doesn't get used anywhere (#2882) (@ascott)
|
||||
- [52b0716](https://github.com/airbnb/superset/commit/52b0716571c5b68f65d08719e54343e0a6ec8c8e) [bugfix] allow database macro to work when CSRF is diabled (#2884) (@justinr1234)
|
||||
- [04b662e](https://github.com/airbnb/superset/commit/04b662ea1154b75e2c362aed97e33946251d1bed) Fix a type error in rst' sub list. (#2881) (@xiaohanyu)
|
||||
- [db052b1](https://github.com/airbnb/superset/commit/db052b17ea1782c472687095e1365d071e592dd0) Add visualize advise for long query (#2879) (@graceguo-supercat)
|
||||
- [e300273](https://github.com/airbnb/superset/commit/e300273e71f0b6ca8b63ae974cc13534d94c56de) [explore] adding y_axis_bounds to force Y axis bounds (#2878) (@mistercrunch)
|
||||
- [c5f2eaf](https://github.com/airbnb/superset/commit/c5f2eafc906bebf1d238e62ff5a8821cf549220c) [explore] 'Save as' -> 'Save' as it can be used to overwrite (#2875) (@mistercrunch)
|
||||
- [90e4d64](https://github.com/airbnb/superset/commit/90e4d6469d3d420cf839a4c9f3a2408ab0ff0a42) [js-testing] more tests for SelectControl (#2877) (@ascott)
|
||||
- [1e7773e](https://github.com/airbnb/superset/commit/1e7773eb169d29607991d0c4619ee930104e18de) Improve visualize modal test coverage (#2811) (@graceguo-supercat)
|
||||
- [3c89c8c](https://github.com/airbnb/superset/commit/3c89c8cc4613d938e4e8726c30142fa32b1249f7) 0.18.3-alpha.3 (@mistercrunch)
|
||||
- [74086da](https://github.com/airbnb/superset/commit/74086dae2ba66029917a7ed640cfcfc7555c0520) [bars] fix sort numeric bar on x axis (#2812) (@mistercrunch)
|
||||
- [66403f1](https://github.com/airbnb/superset/commit/66403f1876bb7bcf31eb8187517c116a2d5b6b96) [explore] viz type selector as modal (#2787) (@mistercrunch)
|
||||
- [3a4cd3a](https://github.com/airbnb/superset/commit/3a4cd3ae24c811e21fb76c5f9efecb2a6c4a6da2) Applying specified limit in bubble plot (#2815) (@mistercrunch)
|
||||
- [4ffc1f6](https://github.com/airbnb/superset/commit/4ffc1f613e1d2bf012dc5eb66751fea8c698804e) Fix filter values populating for views (#2816) (@mistercrunch)
|
||||
- [dfbba84](https://github.com/airbnb/superset/commit/dfbba84400986451f5068354a7626537e7b377a4) 0.18.3-alpha.2 (@mistercrunch)
|
||||
- [77864e6](https://github.com/airbnb/superset/commit/77864e6cf4d5394a5080300097ae21cf9abfcc53) reduce clientside timeout limit (#2820) (@graceguo-supercat)
|
||||
- [4d12251](https://github.com/airbnb/superset/commit/4d1225180618b4c4f05c67f6534bf273692a9243) [explore] include ControlHeader as part of Control interface (#2809) (@mistercrunch)
|
||||
- [0c9f9b6](https://github.com/airbnb/superset/commit/0c9f9b695b921c7e17cec83e1d51e4aa3cae7cc9) [clarity/consistency] rename /explorev2/ -> /explore/ (#2802) (@ascott)
|
||||
- [a4a2bf7](https://github.com/airbnb/superset/commit/a4a2bf7ae9cc1075a38cc980bb696d6512125f2b) filter_box: allow creatable entries (#2804) (@vavrusa)
|
||||
- [d0a04cd](https://github.com/airbnb/superset/commit/d0a04cde49c86185b779b16f1da05450b1ccf571) apply redux for VisualizeModal (#2795) (@graceguo-supercat)
|
||||
- [69685b9](https://github.com/airbnb/superset/commit/69685b9dcc0c26f819ff7edeedc10ee302e97f83) Fixing country maps (#2801) (@mistercrunch)
|
||||
- [b308a3e](https://github.com/airbnb/superset/commit/b308a3eb4eb08de39edbff6490c06a6bef7b7ce1) Added Country Map : New Visualization tools (#2708) (@ymatagne)
|
||||
- [bfa40bd](https://github.com/airbnb/superset/commit/bfa40bd360021874628477ee3eb2272033cd2d54) [hotfix] 'filter box from and to date filter #2649' (#2785) (@yamdraco)
|
||||
- [b0e2904](https://github.com/airbnb/superset/commit/b0e2904c245e5569473f425af2806271e33a5176) Updating permission when refreshing druid datasource (#2655) (@ShengyaoQian)
|
||||
- [ce506bd](https://github.com/airbnb/superset/commit/ce506bdf65b46f5bccee84ca8254417f63b124a5) Logging a few more actions (#2783) (@mistercrunch)
|
||||
- [922cc03](https://github.com/airbnb/superset/commit/922cc037bf859c935cc5eacbcd96bf6fa004c5fe) 0.18.3-alpha.1 (@mistercrunch)
|
||||
- [8252ada](https://github.com/airbnb/superset/commit/8252ada1f9ac94866b91eac55b77ed6d0ef7d02f) [docs] more details on how filters are applied (#2778) (@mistercrunch)
|
||||
- [a2d2f8b](https://github.com/airbnb/superset/commit/a2d2f8bb8c006adcf80bb2ac18b82f3b486f366a) Enable filter value autocomplete in examples (#2781) (@mistercrunch)
|
||||
- [7c5f61d](https://github.com/airbnb/superset/commit/7c5f61d6a61e1a3cb6d20d0918610abafa2cd326) Adding some STATSD logging (#2715) (@mistercrunch)
|
||||
- [841e18a](https://github.com/airbnb/superset/commit/841e18a08c4b375fdff5b846f5d9f108903a3eb6) [sql lab] make database ordering alphabetical in left panel (#2769) (@mistercrunch)
|
||||
- [dbc7fef](https://github.com/airbnb/superset/commit/dbc7fef7f501cd59ebd99524fa171d9e4dee0325) [sql lab] fix user timestamp is off (#2774) (@mistercrunch)
|
||||
|
||||
### 0.18.2 (2017/05/17 06:08 +00:00)
|
||||
- [cbfe3cb](https://github.com/airbnb/superset/commit/cbfe3cb2dcadedeedfcf55f2bb4883b76a484b36) 0.18.2 (@mistercrunch)
|
||||
- [5fcd25d](https://github.com/airbnb/superset/commit/5fcd25def15b5990c10b5045cb89b88f94ba8716) 0.18.1-alpha.2 (@mistercrunch)
|
||||
- [fe3f5f6](https://github.com/airbnb/superset/commit/fe3f5f69ae83eaf96415926661b272ebb460a4e0) [hotfix] 'No numeric types to aggregate' (@mistercrunch)
|
||||
- [2395fbb](https://github.com/airbnb/superset/commit/2395fbbdaaa5c81c3559f17cedf2e998b8341cb9) Adding `end_result_backend_time` to Query model (#2766) (@mistercrunch)
|
||||
- [960b26c](https://github.com/airbnb/superset/commit/960b26c7a2cad58b39c359f44c385980434dacb8) Show clear and actionable query timeout error message (#2763) (@graceguo-supercat)
|
||||
- [28ac350](https://github.com/airbnb/superset/commit/28ac3504d67f76c31aac23435dd15d76e0ca75bf) 0.18.1-alpha.1 (@mistercrunch)
|
||||
- [ecc00bd](https://github.com/airbnb/superset/commit/ecc00bdd26517a832a35529f0fdd7d17972e6f8f) [explore] a bit less margin in left panel (#2758) (@mistercrunch)
|
||||
- [e794645](https://github.com/airbnb/superset/commit/e7946451d6aa84229d0c70b7a683b29b784ca1a1) fixed 500 error when export dashboard (#2760) (@eeve)
|
||||
- [9b34600](https://github.com/airbnb/superset/commit/9b34600c8e8df72ecbdfaaf94bdf023c08e26701) Remove duplicate text (#2761) (@awbush)
|
||||
- [8846108](https://github.com/airbnb/superset/commit/884610861b8d39da91e4c1bce7934172d2486da9) 0.18.0 (@mistercrunch)
|
||||
- [d9bd3d6](https://github.com/airbnb/superset/commit/d9bd3d646006d9e6ddf2ccded21d7984935c98c8) fix percentage change viz (#2757) (@yileic)
|
||||
- [38375be](https://github.com/airbnb/superset/commit/38375be5c3062caf9f6cd4d6ac62109e1940bd10) Fix issues around % signs and Presto (#2755) (@mistercrunch)
|
||||
- [91d951a](https://github.com/airbnb/superset/commit/91d951ac422a6411e59b2ec195011ea4dc44b0b1) Change hardcoded references to 'User' security model to allow custom class override (#2728) (@RichRadics)
|
||||
|
||||
### 0.18.0 (2017/05/12 03:36 +00:00)
|
||||
- [d79a45f](https://github.com/airbnb/superset/commit/d79a45ff32ff8e2b5d601601507680dccf693bbc) add number format to pivot table (#2703) (@yileic)
|
||||
- [818251f](https://github.com/airbnb/superset/commit/818251fc8519167be7e0730083c4a694972fb06b) make margin consistent (#2753) (@yileic)
|
||||
- [75abd1f](https://github.com/airbnb/superset/commit/75abd1f44a12208fd54f28a1185d40ea8639396a) 0.18.0-alpha.4 (@mistercrunch)
|
||||
- [f55df3b](https://github.com/airbnb/superset/commit/f55df3b18b67ff58d5ad3f6f12f7fe76e9697084) [sql lab] fix responsivity of grid (#2742) (@mistercrunch)
|
||||
- [5dbfdef](https://github.com/airbnb/superset/commit/5dbfdefae82674d71ab1f1464622d199a6f72f30) [sql lab] fix partitionned table has no partitions (#2740) (@mistercrunch)
|
||||
- [e558444](https://github.com/airbnb/superset/commit/e5584440cecdb0d9a79ba6c4ff1050e73e774035) Speed up all CRUD list views (#2747) (@mistercrunch)
|
||||
- [d5e9d5d](https://github.com/airbnb/superset/commit/d5e9d5d045d342ef203c7d7cd480011626b6d7a1) fix auto select override pre-selected value bug (#2745) (@graceguo-supercat)
|
||||
- [3208a01](https://github.com/airbnb/superset/commit/3208a014ffccfe44238fb5982f6e391a1764d4b3) fix dual line chart margin (#2737) (@yileic)
|
||||
- [874c12a](https://github.com/airbnb/superset/commit/874c12ad2d99059b2f8f979bdd05e77d8768db03) 0.18.0-alpha.3 (@mistercrunch)
|
||||
- [22d8075](https://github.com/airbnb/superset/commit/22d8075c536bdfc1790b23381e0017720cc921a5) Making the stop button instantaneous (#2738) (@mistercrunch)
|
||||
- [baebba1](https://github.com/airbnb/superset/commit/baebba115930e95076e9252987fb4e107ddd23d5) 0.18.0-alpha.2 (@mistercrunch)
|
||||
- [04748b4](https://github.com/airbnb/superset/commit/04748b4cdac7a4fd53f5d7716a36ceebea7bf7ca) [SQL Lab] fix gamma metadata access (#2702) (@mistercrunch)
|
||||
- [a471afe](https://github.com/airbnb/superset/commit/a471afe206ca3357ea4c27c1accf94d44c8f5122) [sql lab] improvements to the left panel (#2709) (@mistercrunch)
|
||||
- [5d0a01d](https://github.com/airbnb/superset/commit/5d0a01d0d099a9d73ba04fded7cad223a10e86f2) Decimal is a valid numeric type (#2720) (@hajdbo)
|
||||
- [9e1272e](https://github.com/airbnb/superset/commit/9e1272e97c88a3ce2e8dfd15fa819de52e331342) 0.18.0-alpha.1 (@mistercrunch)
|
||||
- [aeebd88](https://github.com/airbnb/superset/commit/aeebd8840d0551a7cd9a2d43039dcd07648d66ed) [table] fixing CSS glitches on table view (#2725) (@mistercrunch)
|
||||
- [55d3b01](https://github.com/airbnb/superset/commit/55d3b012e504f788732488bf11a1ec7ef223a821) refactor: recentActions ajax call is redundant (#2722) (@S-YOU)
|
||||
- [a6e1e18](https://github.com/airbnb/superset/commit/a6e1e18244951b5bf68ac76e897a16713c7d279b) [sql lab] fix CREATE TABLE AS (#2719) (@mistercrunch)
|
||||
- [46d7a92](https://github.com/airbnb/superset/commit/46d7a925bb4be8891c89ac05d2f447e5ec750bf5) chore: remove unused methods with invalid models.Query usage (#2721) (@S-YOU)
|
||||
- [5929ab7](https://github.com/airbnb/superset/commit/5929ab76890232068bef5412f23a54226dbed0ec) [dashboard] fix missing datasource issue (#2718) (@mistercrunch)
|
||||
- [fffb7b5](https://github.com/airbnb/superset/commit/fffb7b500a313b9f9d76eecab18241bf0406c933) [sql lab]Add autoSelect (#2713) (@graceguo-supercat)
|
||||
- [cb14640](https://github.com/airbnb/superset/commit/cb14640a823c3c6cc768169391779064c2469a68) Removing uneeded results_backends.py (#2717) (@mistercrunch)
|
||||
- [d65054e](https://github.com/airbnb/superset/commit/d65054e01533f62e63e1c8788da4b97309f65cee) [sql lab] fix csv export where `%` in query (#2711) (@mistercrunch)
|
||||
- [5d5060e](https://github.com/airbnb/superset/commit/5d5060eca61ad1a7f6baf7adced2985088c82d95) Remove unecessary handling of %% (#2714) (@mistercrunch)
|
||||
- [9ff3515](https://github.com/airbnb/superset/commit/9ff351532ada993afc4da5060b9a942216e2a74b) Basic integration with ClickHouse (#1844) (@vavrusa)
|
||||
- [59a6f44](https://github.com/airbnb/superset/commit/59a6f447ec1e92a0319a617ecdf4e22847bf5d95) Fix missing curUserId from SliderAdder.jsx (#2705) (@songyanho)
|
||||
|
||||
### 0.17.6 (2017/05/01 20:13 +00:00)
|
||||
- [1887b5e](https://github.com/airbnb/superset/commit/1887b5e934b17864850a46d6e88a606b594e0634) 0.17.6 (@mistercrunch)
|
||||
- [33758bf](https://github.com/airbnb/superset/commit/33758bfff59b9cdc86b58973244ef0613942dc80) 0.17.6-alpha.2 (@mistercrunch)
|
||||
- [2d5beb1](https://github.com/airbnb/superset/commit/2d5beb1f91c304df948e943100cbfb66345a00e9) improve csrf expiration error handling (#2695) (@ascott)
|
||||
- [5fd0e7d](https://github.com/airbnb/superset/commit/5fd0e7d02828df4bb02b6a3b34779517fe637123) [vis] bar values should match y axis format (#2701) (@justinpark)
|
||||
- [ef0c4be](https://github.com/airbnb/superset/commit/ef0c4be06743083da5c33ed9ffbda7ff77b43e74) Fix for referring specific svg (#2612) (@songyanho)
|
||||
- [ac3aba7](https://github.com/airbnb/superset/commit/ac3aba7c7da905f0f4bfeb0f80efb87136812b90) [sql lab] visualization flow: fixing the groupby parameter (#2681) (@mistercrunch)
|
||||
- [0fdb57a](https://github.com/airbnb/superset/commit/0fdb57a18153912c2675b54a2c4e5e00691c7cc0) fix (#2696) (@yileic)
|
||||
- [3e7b5df](https://github.com/airbnb/superset/commit/3e7b5df2876d1014a8411a57cdd7bb18ce64e5d9) [explore] fix empty chart when changing viz type (#2698) (@mistercrunch)
|
||||
- [3cd16cf](https://github.com/airbnb/superset/commit/3cd16cf3680169dd17a542d83c84f94ca8220805) Fix test's warnings (#2697) (@dennybiasiolli)
|
||||
- [a58adc8](https://github.com/airbnb/superset/commit/a58adc862ec28842a3ac7f9f1f205fa1c173015e) Fix orm query in HiveEngineSpec.handle_cursor (#2699) (@xrmx)
|
||||
- [7d88f80](https://github.com/airbnb/superset/commit/7d88f80a9b2003f4529560160aea41c444283a9e) hack to dynamically adjust y axis left margin (#2689) (@yileic)
|
||||
- [09be02f](https://github.com/airbnb/superset/commit/09be02f70a716819332629144160360e21c8920b) fix x axis label (#2691) (@yileic)
|
||||
- [50fcdd3](https://github.com/airbnb/superset/commit/50fcdd3a34f3efe58435760ba0bf321d6767a3a5) Adding tails.com to inthewild (#2685) (@alanmcruickshank)
|
||||
- [dee3649](https://github.com/airbnb/superset/commit/dee36491c5e9394c19dfbc00def353675079aa83) Fix js warnings (#2693) (@dennybiasiolli)
|
||||
- [903612a](https://github.com/airbnb/superset/commit/903612ac6c802dd042417c1fa8a742812a2094bb) fix (#2692) (@yileic)
|
||||
- [ce70505](https://github.com/airbnb/superset/commit/ce705054fa2e738612d746c8f07b577f6941a6e3) fix a bug in 'getMaxLabelSize' and x axis label not shown problem (#2694) (@yileic)
|
||||
- [c589616](https://github.com/airbnb/superset/commit/c5896168830c0901a6488817d970a92ce3fa8f9a) [sql lab] Update event handler name (#2680) (@graceguo-supercat)
|
||||
- [58309f2](https://github.com/airbnb/superset/commit/58309f275f3b9d123f75e795fe3e42b918a66aab) Mark a few more string for translation (#2651) (@xrmx)
|
||||
- [edf4e4f](https://github.com/airbnb/superset/commit/edf4e4f24e9eeceb44e2b9a98d2cb02d8cefa6dd) Update README.md (#2676) (@aioue)
|
||||
- [b3e0b5b](https://github.com/airbnb/superset/commit/b3e0b5b586d530cdd1def10ef38550f680f1922b) Specifying cryptography version in install docs (@mistercrunch)
|
||||
- [6880298](https://github.com/airbnb/superset/commit/68802989bc8a13f76988eed004dc07fa06208733) Pinning cryptography lib to 1.7.2 (@mistercrunch)
|
||||
- [70887d7](https://github.com/airbnb/superset/commit/70887d72e2a54fdae2ba58ad8f408528bd694878) 0.17.6-alpha.1 (@ascott)
|
||||
- [1922225](https://github.com/airbnb/superset/commit/192222504292aed3ffa7368f85ca6cdc7f92aab5) Alternate fix for #2665 (#2671) (@mistercrunch)
|
||||
- [0bdc301](https://github.com/airbnb/superset/commit/0bdc3010d8da0789df99d588105d6e62cc6b3280) [vis] fix pivot table scrolling when using more than 1 groupy col (#2674) (@ascott)
|
||||
- [1df37e6](https://github.com/airbnb/superset/commit/1df37e6e4d609f7c0751faf2360a98a896e30f46) add option for pulling favourited dashboards by username (#2661) (@robert-digit)
|
||||
- [e9ed416](https://github.com/airbnb/superset/commit/e9ed4166549cb515f5c15357b2395c3858736df1) fix csrf error on import_dashboards (#2672) (@ascott)
|
||||
- [03c42b5](https://github.com/airbnb/superset/commit/03c42b5b87429f2a29ce1b5ef8c13e9a004b907e) Showing slices on datasource edit form (#2645) (@mistercrunch)
|
||||
- [e055e6d](https://github.com/airbnb/superset/commit/e055e6d2c22e6087bf7c906174c08d543617a514) Fixing PropTypes warning messages (#2670) (@mistercrunch)
|
||||
- [2978082](https://github.com/airbnb/superset/commit/29780821e8797fee3fbcbcfacbe3e0871750d19b) [druid] fixing the having clause in the explore view (#2648) (@mistercrunch)
|
||||
- [f10ee13](https://github.com/airbnb/superset/commit/f10ee139011767fd72e20ff0fb6a6411f6b06d6b) [druid] fix FilterBox viz gets timestamps as values if granularity != all (#2647) (@mistercrunch)
|
||||
- [cdfc4a3](https://github.com/airbnb/superset/commit/cdfc4a35b22e8b07bf2b0503214074761143e7d9) Optimizing the standalone view (#2663) (@mistercrunch)
|
||||
- [eb762c8](https://github.com/airbnb/superset/commit/eb762c8bfec56a0da664c4aa71baf2197f58042f) add the missing right bracket (#2662) (@yileic)
|
||||
- [83abfef](https://github.com/airbnb/superset/commit/83abfef8304a8fe83248d959136e7421ba0e04a8) superset: fix argument swap for SqliteEngineSpec.get_table_names (#2664) (@xrmx)
|
||||
- [54137ad](https://github.com/airbnb/superset/commit/54137ad023f046780bd0e2089ccc57620787f118) Updating CHANGELOG (@mistercrunch)
|
||||
|
||||
### 0.17.5 (2017/04/21 20:56 +00:00)
|
||||
- [4be6bfa](https://github.com/airbnb/superset/commit/4be6bfafaa07695cf47a9a27977855ab30ff87e4) 0.17.5 (@mistercrunch)
|
||||
- [9ba6d48](https://github.com/airbnb/superset/commit/9ba6d489f31d2aba38594dac3cb7d75fbabcdc78) v0.17.5-alpha.10 (#2654) (@ascott)
|
||||
|
||||
145
CONTRIBUTING.md
@@ -18,6 +18,9 @@ If you are reporting a bug, please include:
|
||||
troubleshooting.
|
||||
- Detailed steps to reproduce the bug.
|
||||
|
||||
When you post python stack traces please quote them using
|
||||
[markdown blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/).
|
||||
|
||||
### Fix Bugs
|
||||
|
||||
Look through the GitHub issues for bugs. Anything tagged with "bug" is
|
||||
@@ -26,7 +29,7 @@ open to whoever wants to implement it.
|
||||
### Implement Features
|
||||
|
||||
Look through the GitHub issues for features. Anything tagged with
|
||||
"feature" is open to whoever wants to implement it.
|
||||
"feature" or "starter_task" is open to whoever wants to implement it.
|
||||
|
||||
### Documentation
|
||||
|
||||
@@ -46,10 +49,32 @@ If you are proposing a feature:
|
||||
implement.
|
||||
- Remember that this is a volunteer-driven project, and that
|
||||
contributions are welcome :)
|
||||
|
||||
### Questions
|
||||
|
||||
There is a dedicated [tag](https://stackoverflow.com/questions/tagged/apache-superset) on [stackoverflow](https://stackoverflow.com/). Please use it when asking questions.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
Before you submit a pull request from your forked repo, check that it
|
||||
meets these guidelines:
|
||||
|
||||
1. The pull request should include tests, either as doctests,
|
||||
unit tests, or both.
|
||||
2. If the pull request adds functionality, the docs should be updated
|
||||
as part of the same PR. Doc string are often sufficient, make
|
||||
sure to follow the sphinx compatible standards.
|
||||
3. The pull request should work for Python 2.7, and ideally python 3.4+.
|
||||
``from __future__ import`` will be required in every `.py` file soon.
|
||||
4. Code will be reviewed by re running the unittests, flake8 and syntax
|
||||
should be as rigorous as the core Python project.
|
||||
5. Please rebase and resolve all conflicts before submitting.
|
||||
6. If you are asked to update your pull request with some changes there's
|
||||
no need to create a new one. Push your changes to the same branch.
|
||||
|
||||
## Documentation
|
||||
|
||||
The latest documentation and tutorial are available [here](http://airbnb.io/superset).
|
||||
The latest documentation and tutorial are available [here](https://superset.incubator.apache.org/).
|
||||
|
||||
Contributing to the official documentation is relatively easy, once you've setup
|
||||
your environment and done an edit end-to-end. The docs can be found in the
|
||||
@@ -64,7 +89,7 @@ Before you start changing the docs, you'll want to
|
||||
[fork the Superset project on Github](https://help.github.com/articles/fork-a-repo/).
|
||||
Once that new repository has been created, clone it on your local machine:
|
||||
|
||||
git clone git@github.com:your_username/superset.git
|
||||
git clone git@github.com:your_username/incubator-superset.git
|
||||
|
||||
At this point, you may also want to create a
|
||||
[Python virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/)
|
||||
@@ -76,7 +101,7 @@ to manage the Python packages you're about to install:
|
||||
Finally, to make changes to the rst files and build the docs using Sphinx,
|
||||
you'll need to install a handful of dependencies from the repo you cloned:
|
||||
|
||||
cd superset
|
||||
cd incubator-superset
|
||||
pip install -r dev-reqs-for-docs.txt
|
||||
|
||||
To get the feel for how to edit and build the docs, let's edit a file, build
|
||||
@@ -123,7 +148,7 @@ referenced in the rst, e.g.
|
||||
|
||||
aren't actually included in that directory. _Instead_, you'll want to add and commit
|
||||
images (and any other static assets) to the _superset/assets/images_ directory.
|
||||
When the docs are being pushed to [airbnb.io](http://airbnb.io/superset/), images
|
||||
When the docs are being pushed to [Apache Superset (incubating)](https://superset.incubator.apache.org/), images
|
||||
will be moved from there to the _\_static/img_ directory, just like they're referenced
|
||||
in the docs.
|
||||
|
||||
@@ -140,19 +165,19 @@ instead.
|
||||
|
||||
## Setting up a Python development environment
|
||||
|
||||
Check the [OS dependencies](http://airbnb.io/superset/installation.html#os-dependencies) before follows these steps.
|
||||
Check the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before follows these steps.
|
||||
|
||||
# fork the repo on GitHub and then clone it
|
||||
# alternatively you may want to clone the main repo but that won't work
|
||||
# so well if you are planning on sending PRs
|
||||
# git clone git@github.com:airbnb/superset.git
|
||||
# git clone git@github.com:apache/incubator-superset.git
|
||||
|
||||
# [optional] setup a virtual env and activate it
|
||||
virtualenv env
|
||||
source env/bin/activate
|
||||
|
||||
# install for development
|
||||
python setup.py develop
|
||||
pip install -e .
|
||||
|
||||
# Create an admin user
|
||||
fabmanager create-admin --app superset
|
||||
@@ -202,8 +227,13 @@ To install third party libraries defined in `package.json`, run the
|
||||
following within the `superset/assets/` directory which will install them in a
|
||||
new `node_modules/` folder within `assets/`.
|
||||
|
||||
```
|
||||
npm install
|
||||
```bash
|
||||
# from the root of the repository, move to where our JS package.json lives
|
||||
cd superset/assets/
|
||||
# install yarn, a replacement for `npm install` that is faster and more deterministic
|
||||
npm install -g yarn
|
||||
# run yarn to fetch all the dependencies
|
||||
yarn
|
||||
```
|
||||
|
||||
To parse and generate bundled files for superset, run either of the
|
||||
@@ -231,9 +261,20 @@ npm run dev
|
||||
|
||||
## Testing
|
||||
|
||||
Python tests can be run with:
|
||||
Before running python unit tests, please setup local testing environment:
|
||||
```
|
||||
pip install -r dev-reqs.txt
|
||||
```
|
||||
|
||||
All python tests can be run with:
|
||||
|
||||
./run_tests.sh
|
||||
|
||||
Alternatively, you can run a specific test with:
|
||||
|
||||
./run_specific_test.sh tests.core_tests:CoreTests.test_function_name
|
||||
|
||||
Note that before running specific tests, you have to both setup the local testing environment and run all tests.
|
||||
|
||||
We use [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
|
||||
|
||||
@@ -245,9 +286,8 @@ We use [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](ht
|
||||
|
||||
Lint the project with:
|
||||
|
||||
# for python changes
|
||||
flake8 changes tests
|
||||
flake8 changes superset
|
||||
# for python
|
||||
flake8
|
||||
|
||||
# for javascript
|
||||
npm run lint
|
||||
@@ -292,23 +332,6 @@ The `variables.less` and `bootswatch.less` files that ship with Superset are der
|
||||
[Bootswatch](https://bootswatch.com) and thus extend Bootstrap. Modify variables in these files directly, or
|
||||
swap them out entirely with the equivalent files from other Bootswatch (themes)[https://github.com/thomaspark/bootswatch.git]
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
Before you submit a pull request from your forked repo, check that it
|
||||
meets these guidelines:
|
||||
|
||||
1. The pull request should include tests, either as doctests,
|
||||
unit tests, or both.
|
||||
2. If the pull request adds functionality, the docs should be updated
|
||||
as part of the same PR. Doc string are often sufficient, make
|
||||
sure to follow the sphinx compatible standards.
|
||||
3. The pull request should work for Python 2.6, 2.7, and ideally python 3.3.
|
||||
``from __future__ import`` will be required in every `.py` file soon.
|
||||
4. Code will be reviewed by re running the unittests, flake8 and syntax
|
||||
should be as rigorous as the core Python project.
|
||||
5. Please rebase and resolve all conflicts before submitting.
|
||||
|
||||
|
||||
## Translations
|
||||
|
||||
We use [Babel](http://babel.pocoo.org/en/latest/) to translate Superset. The
|
||||
@@ -317,6 +340,8 @@ key is to instrument the strings that need translation using
|
||||
a module, all you have to do is to `_("Wrap your strings")` using the
|
||||
underscore `_` "function".
|
||||
|
||||
We use `import {t, tn, TCT} from locales;` in js, JSX file, locales is in `./superset/assets/javascripts/` directory.
|
||||
|
||||
To enable changing language in your environment, you can simply add the
|
||||
`LANGUAGES` parameter to your `superset_config.py`. Having more than one
|
||||
options here will add a language selection dropdown on the right side of the
|
||||
@@ -329,14 +354,15 @@ navigation bar.
|
||||
}
|
||||
|
||||
As per the [Flask AppBuilder documentation] about translation, to create a
|
||||
new language dictionary, run the following command:
|
||||
new language dictionary, run the following command (where `es` is replaced with
|
||||
the language code for your target language):
|
||||
|
||||
pybabel init -i ./babel/messages.pot -d superset/translations -l es
|
||||
pybabel init -i superset/translations/messages.pot -d superset/translations -l es
|
||||
|
||||
Then it's a matter of running the statement below to gather all stings that
|
||||
Then it's a matter of running the statement below to gather all strings that
|
||||
need translation
|
||||
|
||||
fabmanager babel-extract --target superset/translations/
|
||||
fabmanager 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
|
||||
`superset/translation`, where there's one per language. For the translations
|
||||
@@ -344,6 +370,19 @@ to take effect, they need to be compiled using this command:
|
||||
|
||||
fabmanager babel-compile --target superset/translations/
|
||||
|
||||
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.
|
||||
We need to be compiled using this command:
|
||||
|
||||
npm install po2json -g
|
||||
|
||||
Execute this command to 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
|
||||
|
||||
If you get errors running `po2json`, you might be running the ubuntu package with the same
|
||||
name rather than the nodejs package (they have a different format for the arguments). You
|
||||
need to be running the nodejs version, and so if there is a conflict you may need to point
|
||||
directly at `/usr/local/bin/po2json` rather than just `po2json`.
|
||||
|
||||
## Adding new datasources
|
||||
|
||||
@@ -360,3 +399,39 @@ to take effect, they need to be compiled using this command:
|
||||
`ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}`
|
||||
|
||||
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.
|
||||
|
||||
## Creating a new visualization type
|
||||
|
||||
Here's an example as a Github PR with comments that describe what the
|
||||
different sections of the code do:
|
||||
https://github.com/apache/incubator-superset/pull/3013
|
||||
|
||||
## Refresh documentation website
|
||||
|
||||
Every once in a while we want to compile the documentation and publish it.
|
||||
Here's how to do it.
|
||||
|
||||
.. code::
|
||||
|
||||
# install doc dependencies
|
||||
pip install -r dev-reqs-for-docs.txt
|
||||
|
||||
# build the docs
|
||||
python setup.py build_sphinx
|
||||
|
||||
# copy html files to temp folder
|
||||
cp -r docs/_build/html/ /tmp/tmp_superset_docs/
|
||||
|
||||
# clone the docs repo
|
||||
cd ~/
|
||||
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git
|
||||
|
||||
# copy
|
||||
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/
|
||||
|
||||
# commit and push to `asf-site` branch
|
||||
cd ~/incubator-superset-site.git/
|
||||
git checkout asf-site
|
||||
git add .
|
||||
git commit -a -m "New doc version"
|
||||
git push origin master
|
||||
|
||||
25
INTHEWILD.md
@@ -1,25 +0,0 @@
|
||||
Please use [pull requests](https://github.com/airbnb/superset/pull/new/master)
|
||||
to add your organization and/or project to this document!
|
||||
|
||||
Organizations
|
||||
----------
|
||||
- [Airbnb](https://github.com/airbnb)
|
||||
- [GfK Data Lab](http://datalab.gfk.com)
|
||||
- [Maieutical Labs](https://cloudschooling.it)
|
||||
- [Shopkick](https://www.shopkick.com)
|
||||
- [Amino](https://amino.com)
|
||||
- [Faasos](http://faasos.com/)
|
||||
- [Clark.de](http://clark.de/)
|
||||
- [Yahoo!](www.yahoo.com)
|
||||
- [Digit Game Studios](https://www.digitgaming.com/)
|
||||
- [Brilliant.org](https://brilliant.org/)
|
||||
- [Qunar](https://www.qunar.com/)
|
||||
- [Udemy](https://www.udemy.com/)
|
||||
- [Tooploox](https://www.tooploox.com/)
|
||||
- [Tobii](http://www.tobii.com/)
|
||||
- [Endress+Hauser](http://www.endress.com/)
|
||||
- [Tails.com](https://tails.com)
|
||||
|
||||
Projects
|
||||
----------
|
||||
- None we know of yet
|
||||
14
MANIFEST.in
@@ -1,9 +1,9 @@
|
||||
recursive-include superset/templates *
|
||||
recursive-include superset/static *
|
||||
recursive-exclude superset/static/assets/node_modules *
|
||||
recursive-include superset/static/assets/node_modules/font-awesome *
|
||||
recursive-exclude superset/static/docs *
|
||||
recursive-exclude superset/static/spec *
|
||||
recursive-exclude tests *
|
||||
recursive-include superset/data *
|
||||
recursive-include superset/migrations *
|
||||
recursive-include superset/static *
|
||||
recursive-exclude superset/static/docs *
|
||||
recursive-exclude superset/static/spec *
|
||||
recursive-exclude superset/static/assets/node_modules *
|
||||
recursive-include superset/templates *
|
||||
recursive-include superset/translations *
|
||||
recursive-exclude tests *
|
||||
|
||||
167
README.md
@@ -1,17 +1,14 @@
|
||||
Superset
|
||||
=========
|
||||
|
||||
[](https://travis-ci.org/airbnb/superset)
|
||||
[](https://travis-ci.org/apache/incubator-superset)
|
||||
[](https://badge.fury.io/py/superset)
|
||||
[](https://coveralls.io/github/airbnb/superset?branch=master)
|
||||
[](https://codeclimate.com/github/airbnb/superset/coverage)
|
||||
[](https://landscape.io/github/airbnb/superset/master)
|
||||
[](https://codeclimate.com/github/airbnb/superset)
|
||||
[](https://coveralls.io/github/apache/incubator-superset?branch=master)
|
||||
[](https://pypi.python.org/pypi/superset)
|
||||
[](https://requires.io/github/airbnb/superset/requirements/?branch=master)
|
||||
[](https://gitter.im/airbnb/superset?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](http://airbnb.io/superset/)
|
||||
[](https://david-dm.org/airbnb/superset?path=superset/assets)
|
||||
[](https://requires.io/github/apache/incubator-superset/requirements/?branch=master)
|
||||
[](https://gitter.im/apache/incubator-superset?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://superset.incubator.apache.org)
|
||||
[](https://david-dm.org/apache/incubator-superset?path=superset/assets)
|
||||
|
||||
<img
|
||||
src="https://cloud.githubusercontent.com/assets/130878/20946612/49a8a25c-bbc0-11e6-8314-10bef902af51.png"
|
||||
@@ -19,8 +16,8 @@ Superset
|
||||
width="500"
|
||||
/>
|
||||
|
||||
**Superset** is a data exploration platform designed to be visual, intuitive
|
||||
and interactive.
|
||||
**Apache Superset** (incubating) is a modern, enterprise-ready
|
||||
business intelligence web application
|
||||
|
||||
[this project used to be named **Caravel**, and **Panoramix** in the past]
|
||||
|
||||
@@ -52,24 +49,26 @@ Screenshots & Gifs
|
||||
|
||||

|
||||
|
||||
Superset
|
||||
---------
|
||||
Superset's main goal is to make it easy to slice, dice and visualize data.
|
||||
It empowers users to perform **analytics at the speed of thought**.
|
||||
Apache Superset
|
||||
---------------
|
||||
Apache Superset is a data exploration and visualization web application.
|
||||
|
||||
Superset provides:
|
||||
* A quick way to intuitively visualize datasets by allowing users to create
|
||||
and share interactive dashboards
|
||||
* A rich set of visualizations to analyze your data, as well as a flexible
|
||||
way to extend the capabilities
|
||||
* An intuitive interface to explore and visualize datasets, and
|
||||
create interactive dashboards.
|
||||
* A wide array of beautiful visualizations to showcase your data.
|
||||
* Easy, code-free, user flows to drill down and slice and dice the data
|
||||
underlying exposed dashboards. The dashboards and charts acts as a starting
|
||||
point for deeper analysis.
|
||||
* A state of the art SQL editor/IDE exposing a rich metadata browser, and
|
||||
an easy workflow to create visualizations out of any result set.
|
||||
* An extensible, high granularity security model allowing intricate rules
|
||||
on who can access which features, and integration with major
|
||||
authentication providers (database, OpenID, LDAP, OAuth & REMOTE_USER
|
||||
through Flask AppBuilder)
|
||||
* A simple semantic layer, allowing to control how data sources are
|
||||
displayed in the UI, by defining which fields should show up in
|
||||
which dropdown and which aggregation and function (metrics) are
|
||||
made available to the user
|
||||
on who can access which product features and datasets.
|
||||
Integration with major
|
||||
authentication backends (database, OpenID, LDAP, OAuth, REMOTE_USER, ...)
|
||||
* A lightweight semantic layer, allowing to control how data sources are
|
||||
exposed to the user by defining dimensions and metrics
|
||||
* Out of the box support for most SQL-speaking databases
|
||||
* Deep integration with Druid allows for Superset to stay blazing fast while
|
||||
slicing and dicing large, realtime datasets
|
||||
* Fast loading dashboards with configurable caching
|
||||
@@ -78,15 +77,41 @@ Superset provides:
|
||||
Database Support
|
||||
----------------
|
||||
|
||||
Superset was originally designed on top of Druid.io, but quickly broadened
|
||||
its scope to support other databases through the use of SQLAlchemy, a Python
|
||||
Superset speaks many SQL dialects through SQLAlchemy, a Python
|
||||
ORM that is compatible with
|
||||
[most common databases](http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html).
|
||||
|
||||
Superset can be used to visualize data out of most databases:
|
||||
* MySQL
|
||||
* Postgres
|
||||
* Vertica
|
||||
* Oracle
|
||||
* Microsoft SQL Server
|
||||
* SQLite
|
||||
* Greenplum
|
||||
* Firebird
|
||||
* MariaDB
|
||||
* Sybase
|
||||
* IBM DB2
|
||||
* Exasol
|
||||
* MonetDB
|
||||
* Snowflake
|
||||
* Redshift
|
||||
* **more!** look for the availability of a SQLAlchemy dialect for your database
|
||||
to find out whether it will work with Superset
|
||||
|
||||
What is Druid?
|
||||
-------------
|
||||
From their website at http://druid.io
|
||||
|
||||
Druid!
|
||||
------
|
||||
|
||||
On top of having the ability to query your relational databases,
|
||||
Superset has ships with deep integration with Druid (a real time distributed
|
||||
column-store). When querying Druid,
|
||||
Superset can query humongous amounts of data on top of real time dataset.
|
||||
Note that Superset does not require Druid in any way to function, it's simply
|
||||
another database backend that it can query.
|
||||
|
||||
Here's a description of Druid from the http://druid.io website:
|
||||
|
||||
*Druid is an open-source analytics data store designed for
|
||||
business intelligence (OLAP) queries on event data. Druid provides low
|
||||
@@ -99,7 +124,59 @@ power analytic dashboards and applications.*
|
||||
Installation & Configuration
|
||||
----------------------------
|
||||
|
||||
[See in the documentation](http://airbnb.io/superset/installation.html)
|
||||
[See in the documentation](https://superset.incubator.apache.org/installation.html)
|
||||
|
||||
|
||||
Resources
|
||||
-------------
|
||||
* [Mailing list](https://lists.apache.org/list.html?dev@superset.apache.org/)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/superset)
|
||||
* [Docker image](https://hub.docker.com/r/amancevice/superset/) (community contributed)
|
||||
* [Slides from Strata (March 2016)](https://drive.google.com/open?id=0B5PVE0gzO81oOVJkdF9aNkJMSmM)
|
||||
* [Stackoverflow tag](https://stackoverflow.com/questions/tagged/apache-superset)
|
||||
* [DEPRECATED Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Interested in contributing? Casual hacking? Check out
|
||||
[Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
|
||||
|
||||
|
||||
Who uses Apache Superset (incubating)?
|
||||
--------------------------------------
|
||||
|
||||
Here's a list of organizations who have taken the time to send a PR to let
|
||||
the world know they are using Superset. Join our growing community!
|
||||
|
||||
- [AiHello](https://www.aihello.com)
|
||||
- [Airbnb](https://github.com/airbnb)
|
||||
- [Amino](https://amino.com)
|
||||
- [Brilliant.org](https://brilliant.org/)
|
||||
- [Capital Service S.A.](http://capitalservice.pl)
|
||||
- [Clark.de](http://clark.de/)
|
||||
- [Digit Game Studios](https://www.digitgaming.com/)
|
||||
- [Douban](https://www.douban.com/)
|
||||
- [Endress+Hauser](http://www.endress.com/)
|
||||
- [FBK - ICT center](http://ict.fbk.eu)
|
||||
- [Faasos](http://faasos.com/)
|
||||
- [GfK Data Lab](http://datalab.gfk.com)
|
||||
- [Konfío](http://konfio.mx)
|
||||
- [Lyft](https://www.lyft.com/)
|
||||
- [Maieutical Labs](https://cloudschooling.it)
|
||||
- [Pronto Tools](http://www.prontotools.io)
|
||||
- [Qunar](https://www.qunar.com/)
|
||||
- [Shopee](https://shopee.sg)
|
||||
- [Shopkick](https://www.shopkick.com)
|
||||
- [Tails.com](https://tails.com)
|
||||
- [Tobii](http://www.tobii.com/)
|
||||
- [Tooploox](https://www.tooploox.com/)
|
||||
- [Twitter](https://twitter.com/)
|
||||
- [Udemy](https://www.udemy.com/)
|
||||
- [VIPKID](https://www.vipkid.com.cn/)
|
||||
- [Yahoo!](https://yahoo.com/)
|
||||
- [Zalando](https://www.zalando.com)
|
||||
|
||||
|
||||
More screenshots
|
||||
@@ -120,29 +197,3 @@ More screenshots
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
Resources
|
||||
-------------
|
||||
* [Superset Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/superset)
|
||||
* [Docker image](https://hub.docker.com/r/amancevice/superset/) (community contributed)
|
||||
* [Slides from Strata (March 2016)](https://drive.google.com/open?id=0B5PVE0gzO81oOVJkdF9aNkJMSmM)
|
||||
|
||||
|
||||
Tip of the Hat
|
||||
--------------
|
||||
|
||||
Superset would not be possible without these great frameworks / libs
|
||||
|
||||
* Flask App Builder - Allowing us to focus on building the app quickly while
|
||||
getting the foundation for free
|
||||
* The Flask ecosystem - Simply amazing. So much Plug, easy play.
|
||||
* NVD3 - One of the best charting libraries out there
|
||||
* Much more, check out the `install_requires` section in the [setup.py](https://github.com/airbnb/superset/blob/master/setup.py) file!
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[ignore: superset/assets/node_modules/**]
|
||||
[python: superset/**.py]
|
||||
[jinja2: superset/**/templates/**.html]
|
||||
encoding = utf-8
|
||||
@@ -1,722 +0,0 @@
|
||||
# Translations template for PROJECT.
|
||||
# Copyright (C) 2017 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2017-04-20 09:53+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.4.0\n"
|
||||
|
||||
#: superset/db_engine_specs.py:191 superset/db_engine_specs.py:222
|
||||
#: superset/db_engine_specs.py:266 superset/db_engine_specs.py:313
|
||||
#: superset/db_engine_specs.py:357 superset/db_engine_specs.py:763
|
||||
#: superset/db_engine_specs.py:799 superset/db_engine_specs.py:831
|
||||
msgid "Time Column"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:192 superset/db_engine_specs.py:223
|
||||
#: superset/db_engine_specs.py:314 superset/db_engine_specs.py:358
|
||||
#: superset/db_engine_specs.py:764 superset/db_engine_specs.py:832
|
||||
msgid "second"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:193 superset/db_engine_specs.py:226
|
||||
#: superset/db_engine_specs.py:317 superset/db_engine_specs.py:360
|
||||
#: superset/db_engine_specs.py:766 superset/db_engine_specs.py:800
|
||||
#: superset/db_engine_specs.py:834
|
||||
msgid "minute"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:194 superset/db_engine_specs.py:230
|
||||
#: superset/db_engine_specs.py:319 superset/db_engine_specs.py:362
|
||||
#: superset/db_engine_specs.py:772 superset/db_engine_specs.py:802
|
||||
#: superset/db_engine_specs.py:836
|
||||
msgid "hour"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:195 superset/db_engine_specs.py:235
|
||||
#: superset/db_engine_specs.py:267 superset/db_engine_specs.py:321
|
||||
#: superset/db_engine_specs.py:364 superset/db_engine_specs.py:774
|
||||
#: superset/db_engine_specs.py:804 superset/db_engine_specs.py:838
|
||||
msgid "day"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:196 superset/db_engine_specs.py:241
|
||||
#: superset/db_engine_specs.py:268 superset/db_engine_specs.py:322
|
||||
#: superset/db_engine_specs.py:366 superset/db_engine_specs.py:776
|
||||
#: superset/db_engine_specs.py:806 superset/db_engine_specs.py:840
|
||||
msgid "week"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:197 superset/db_engine_specs.py:243
|
||||
#: superset/db_engine_specs.py:270 superset/db_engine_specs.py:324
|
||||
#: superset/db_engine_specs.py:368 superset/db_engine_specs.py:778
|
||||
#: superset/db_engine_specs.py:808 superset/db_engine_specs.py:842
|
||||
msgid "month"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:198 superset/db_engine_specs.py:245
|
||||
#: superset/db_engine_specs.py:326 superset/db_engine_specs.py:370
|
||||
#: superset/db_engine_specs.py:780 superset/db_engine_specs.py:810
|
||||
#: superset/db_engine_specs.py:844
|
||||
msgid "quarter"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:199 superset/db_engine_specs.py:249
|
||||
#: superset/db_engine_specs.py:328 superset/db_engine_specs.py:782
|
||||
#: superset/db_engine_specs.py:812
|
||||
msgid "year"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:330
|
||||
msgid "week_start_monday"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:372 superset/db_engine_specs.py:846
|
||||
msgid "week_ending_saturday"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:375 superset/db_engine_specs.py:849
|
||||
msgid "week_start_sunday"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:768
|
||||
msgid "5 minute"
|
||||
msgstr ""
|
||||
|
||||
#: superset/db_engine_specs.py:770
|
||||
msgid "half hour"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:306
|
||||
msgid "Table View"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:359
|
||||
msgid "Pivot Table"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:408
|
||||
msgid "Markup"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:427
|
||||
msgid "Separator"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:443
|
||||
msgid "Word Cloud"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:466
|
||||
msgid "Treemap"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:492
|
||||
msgid "Calendar Heatmap"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:550
|
||||
msgid "Box Plot"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:639
|
||||
msgid "Bubble Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:687
|
||||
msgid "Bullet Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:736
|
||||
msgid "Big Number with Trendline"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:765
|
||||
msgid "Big Number"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:792
|
||||
msgid "Time Series - Line Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:919
|
||||
msgid "Time Series - Dual Axis Line Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:994
|
||||
msgid "Time Series - Bar Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1002
|
||||
msgid "Time Series - Percent Change"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1010
|
||||
msgid "Time Series - Stacked"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1019
|
||||
msgid "Distribution - NVD3 - Pie Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1037
|
||||
msgid "Histogram"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1062
|
||||
msgid "Distribution - Bar Chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1129
|
||||
msgid "Sunburst"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1162
|
||||
msgid "Sankey"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1211
|
||||
msgid "Directed Force Layout"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1232
|
||||
msgid "World Map"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1282
|
||||
msgid "Filters"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1317
|
||||
msgid "iFrame"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1334
|
||||
msgid "Parallel Coordinates"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1359
|
||||
msgid "Heatmap"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1410
|
||||
msgid "Horizon Charts"
|
||||
msgstr ""
|
||||
|
||||
#: superset/viz.py:1421
|
||||
msgid "Mapbox"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/models.py:926
|
||||
msgid "No data was returned."
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:37 superset/connectors/sqla/views.py:74
|
||||
msgid "Column"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:38 superset/connectors/druid/views.py:97
|
||||
#: superset/connectors/sqla/views.py:120
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:39 superset/views/core.py:299
|
||||
#: superset/views/core.py:345
|
||||
msgid "Datasource"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:40 superset/connectors/sqla/views.py:77
|
||||
msgid "Groupable"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:41 superset/connectors/sqla/views.py:78
|
||||
msgid "Filterable"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:42 superset/connectors/sqla/views.py:80
|
||||
msgid "Count Distinct"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:43 superset/connectors/sqla/views.py:81
|
||||
msgid "Sum"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:44 superset/connectors/sqla/views.py:82
|
||||
msgid "Min"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:45 superset/connectors/sqla/views.py:83
|
||||
msgid "Max"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:48 superset/connectors/sqla/views.py:43
|
||||
msgid ""
|
||||
"Whether this column is exposed in the `Filters` section of the explore "
|
||||
"view."
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:88 superset/connectors/sqla/views.py:102
|
||||
msgid ""
|
||||
"Whether the access to this metric is restricted to certain roles. Only "
|
||||
"roles with the permission 'metric access on XXX (the name of this "
|
||||
"metric)' are allowed to access this metric"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:94 superset/connectors/sqla/views.py:117
|
||||
msgid "Metric"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:95 superset/connectors/druid/views.py:190
|
||||
#: superset/connectors/sqla/views.py:76 superset/connectors/sqla/views.py:118
|
||||
#: superset/views/core.py:346
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:96 superset/connectors/sqla/views.py:75
|
||||
#: superset/connectors/sqla/views.py:119
|
||||
msgid "Verbose Name"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:98 superset/views/core.py:516
|
||||
msgid "JSON"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:99
|
||||
msgid "Druid Datasource"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:123
|
||||
#: superset/connectors/druid/views.py:189
|
||||
msgid "Cluster"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:124
|
||||
msgid "Coordinator Host"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:125
|
||||
msgid "Coordinator Port"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:126
|
||||
msgid "Coordinator Endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:127
|
||||
msgid "Broker Host"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:128
|
||||
msgid "Broker Port"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:129
|
||||
msgid "Broker Endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:167 superset/connectors/sqla/views.py:153
|
||||
msgid "Timezone offset (in hours) for this datasource"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:171
|
||||
msgid ""
|
||||
"Time expression to use as a predicate when retrieving distinct values to "
|
||||
"populate the filter component. Only applies when `Enable Filter Select` "
|
||||
"is on. If you enter `7 days ago`, the distinct list of values in the "
|
||||
"filter will be populated based on the distinct value over the past week"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:178 superset/connectors/sqla/views.py:175
|
||||
msgid ""
|
||||
"Whether to populate the filter's dropdown in the explore view's filter "
|
||||
"section with a list of distinct values fetched from the backend on the "
|
||||
"fly"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:182 superset/connectors/sqla/views.py:188
|
||||
msgid ""
|
||||
"Redirects to this endpoint when clicking on the datasource from the "
|
||||
"datasource list"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:188
|
||||
msgid "Data Source"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:191
|
||||
msgid "Owner"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:192
|
||||
msgid "Is Hidden"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:193 superset/connectors/sqla/views.py:186
|
||||
msgid "Enable Filter Select"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:194
|
||||
msgid "Default Endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:195
|
||||
msgid "Time Offset"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/druid/views.py:196 superset/connectors/sqla/views.py:192
|
||||
#: superset/views/core.py:237 superset/views/core.py:342
|
||||
msgid "Cache Timeout"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/models.py:371
|
||||
msgid ""
|
||||
"Datetime column not provided as part table configuration and is required "
|
||||
"by this type of chart"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/models.py:376
|
||||
msgid "Metric '{}' is not valid"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:39
|
||||
msgid ""
|
||||
"Whether to make this column available as a [Time Granularity] option, "
|
||||
"column has to be DATETIME or DATETIME-like"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:46
|
||||
msgid ""
|
||||
"The data type that was inferred by the database. It may be necessary to "
|
||||
"input a type manually for expression-defined columns in some cases. In "
|
||||
"most case users should not need to alter this."
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:79 superset/connectors/sqla/views.py:122
|
||||
#: superset/connectors/sqla/views.py:182 superset/views/core.py:352
|
||||
msgid "Table"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:84
|
||||
msgid "Expression"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:85
|
||||
msgid "Is temporal"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:86
|
||||
msgid "Datetime Format"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:87
|
||||
msgid "Database Expression"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:121
|
||||
msgid "SQL Expression"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:154
|
||||
msgid "Name of the table that exists in the source database"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:156
|
||||
msgid "Schema, as used only in some databases like Postgres, Redshift and DB2"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:162
|
||||
msgid ""
|
||||
"This fields acts a Superset view, meaning that Superset will run a query "
|
||||
"against this string as a subquery."
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:166
|
||||
msgid ""
|
||||
"Predicate applied when fetching distinct value to populate the filter "
|
||||
"control component. Supports jinja template syntax. Applies only when "
|
||||
"`Enable Filter Select` is on."
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:172
|
||||
msgid "Redirects to this endpoint when clicking on the table from the table list"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:183
|
||||
msgid "Changed By"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:184 superset/views/core.py:233
|
||||
msgid "Database"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:185 superset/views/core.py:235
|
||||
msgid "Last Changed"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:187
|
||||
msgid "Schema"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:191
|
||||
msgid "Offset"
|
||||
msgstr ""
|
||||
|
||||
#: superset/connectors/sqla/views.py:224
|
||||
msgid ""
|
||||
"The table was created. As part of this two phase configuration process, "
|
||||
"you should now click the edit button by the new table to configure it."
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/appbuilder/navbar_right.html:41
|
||||
msgid "Profile"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/appbuilder/navbar_right.html:42
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/appbuilder/navbar_right.html:47
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/import_dashboards.html:11
|
||||
msgid "Import"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/request_access.html:2
|
||||
msgid "No Access!"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/request_access.html:7
|
||||
#, python-format
|
||||
msgid "You do not have permissions to access the datasource(s): %(name)s."
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/request_access.html:13
|
||||
msgid "Request Permissions"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/request_access.html:16
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/welcome.html:10
|
||||
msgid "Welcome!"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/welcome.html:20 superset/views/core.py:344
|
||||
msgid "Dashboards"
|
||||
msgstr ""
|
||||
|
||||
#: superset/templates/superset/models/database/macros.html:4
|
||||
msgid "Test Connection"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:201
|
||||
msgid "Expose this DB in SQL Lab"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:202
|
||||
msgid ""
|
||||
"Allow users to run synchronous queries, this is the default and should "
|
||||
"work well for queries that can be executed within a web request scope "
|
||||
"(<~1 minute)"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:206
|
||||
msgid ""
|
||||
"Allow users to run queries, against an async backend. This assumes that "
|
||||
"you have a Celery worker setup as well as a results backend."
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:210
|
||||
msgid "Allow CREATE TABLE AS option in SQL Lab"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:211
|
||||
msgid ""
|
||||
"Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in"
|
||||
" SQL Lab"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:215
|
||||
msgid ""
|
||||
"When allowing CREATE TABLE AS option in SQL Lab, this option forces the "
|
||||
"table to be created in this schema"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:229
|
||||
msgid "Expose in SQL Lab"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:230
|
||||
msgid "Allow CREATE TABLE AS"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:231
|
||||
msgid "Allow DML"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:232
|
||||
msgid "CTAS Schema"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:234 superset/views/core.py:343
|
||||
#: superset/views/core.py:438 superset/views/core.py:500
|
||||
msgid "Creator"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:236
|
||||
msgid "SQLAlchemy URI"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:238
|
||||
msgid "Extra"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:296 superset/views/core.py:513
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:297
|
||||
msgid "User Roles"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:298
|
||||
msgid "Database URL"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:300
|
||||
msgid "Roles to grant"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:301
|
||||
msgid "Created On"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:331
|
||||
msgid ""
|
||||
"These parameters are generated dynamically when clicking the save or "
|
||||
"overwrite button in the explore view. This JSON object is exposed here "
|
||||
"for reference and for power users who may want to alter specific "
|
||||
"parameters."
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:336
|
||||
msgid "Duration (in seconds) of the caching timeout for this slice."
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:347
|
||||
msgid "Last Modified"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:348 superset/views/core.py:437
|
||||
msgid "Owners"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:349
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:350 superset/views/core.py:386
|
||||
msgid "Slice"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:351
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:353
|
||||
msgid "Visualization Type"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:410
|
||||
msgid ""
|
||||
"This json object describes the positioning of the widgets in the "
|
||||
"dashboard. It is dynamically generated when adjusting the widgets size "
|
||||
"and positions by using drag & drop in the dashboard view"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:415
|
||||
msgid ""
|
||||
"The css for individual dashboards can be altered here, or in the "
|
||||
"dashboard view where changes are immediately visible"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:419
|
||||
msgid "To get a readable URL for your dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:420
|
||||
msgid ""
|
||||
"This JSON object is generated dynamically when clicking the save or "
|
||||
"overwrite button in the dashboard view. It is exposed here for reference "
|
||||
"and for power users who may want to alter specific parameters."
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:425
|
||||
msgid "Owners is a list of users who can alter the dashboard."
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:433 superset/views/core.py:498
|
||||
msgid "Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:434 superset/views/core.py:499
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:435
|
||||
msgid "Slug"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:436
|
||||
msgid "Slices"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:439 superset/views/core.py:501
|
||||
msgid "Modified"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:440
|
||||
msgid "Position JSON"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:441
|
||||
msgid "CSS"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:442
|
||||
msgid "JSON Metadata"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:443
|
||||
msgid "Underlying Tables"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:514
|
||||
msgid "Action"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:515
|
||||
msgid "dttm"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:2241
|
||||
msgid "SQL Editor"
|
||||
msgstr ""
|
||||
|
||||
#: superset/views/core.py:2250
|
||||
msgid "Query Search"
|
||||
msgstr ""
|
||||
|
||||
@@ -7,7 +7,8 @@ mysqlclient
|
||||
nose
|
||||
psycopg2
|
||||
pylint
|
||||
pythrifthiveapi
|
||||
pyyaml
|
||||
redis
|
||||
statsd
|
||||
# Also install everything we need to build Sphinx docs
|
||||
-r dev-reqs-for-docs.txt
|
||||
|
||||
1
docs/_build/html/README.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Folder containing the sphinx-generated documentation
|
||||
@@ -51,7 +51,7 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = "Superset's documentation"
|
||||
project = "Apache Superset"
|
||||
copyright = None
|
||||
author = u'Maxime Beauchemin'
|
||||
|
||||
|
||||
136
docs/faq.rst
@@ -48,12 +48,21 @@ https://github.com/airbnb/superset/issues?q=label%3Aexample+is%3Aclosed
|
||||
Why are my queries timing out?
|
||||
------------------------------
|
||||
|
||||
If you are seeing timeouts (504 Gateway Time-out) when running queries,
|
||||
it's because the web server is timing out web requests. If you want to
|
||||
increase the default (50), you can specify the timeout when starting the
|
||||
web server with the ``-t`` flag, which is expressed in seconds.
|
||||
There are many reasons may cause long query timing out.
|
||||
|
||||
``superset runserver -t 300``
|
||||
|
||||
- For running long query from Sql Lab, by default Superset allows it run as long as 6 hours before it being killed by celery. If you want to increase the time for running query, you can specify the timeout in configuration. For example:
|
||||
|
||||
``SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6``
|
||||
|
||||
|
||||
- Superset is running on gunicorn web server, which may time out web requests. If you want to increase the default (50), you can specify the timeout when starting the web server with the ``-t`` flag, which is expressed in seconds.
|
||||
|
||||
``superset runserver -t 300``
|
||||
|
||||
- If you are seeing timeouts (504 Gateway Time-out) when loading dashboard or explore slice, you are probably behind gateway or proxy server (such as Nginx). If it did not receive a timely response from Superset server (which is processing long queries), these web servers will send 504 status code to clients directly. Superset has a client-side timeout limit to address this issue. If query didn't come back within clint-side timeout (60 seconds by default), Superset will display warning message to avoid gateway timeout message. If you have a longer gateway timeout limit, you can change the timeout settings in ``superset_config.py``:
|
||||
|
||||
``SUPERSET_WEBSERVER_TIMEOUT = 60``
|
||||
|
||||
|
||||
Why is the map not visible in the mapbox visualization?
|
||||
@@ -78,6 +87,11 @@ The widget also has a checkbox ``Date Filter``, which enables time filtering
|
||||
capabilities to your dashboard. After checking the box and refreshing, you'll
|
||||
see a ``from`` and a ``to`` dropdown show up.
|
||||
|
||||
By default, the filtering will be applied to all the slices that are built
|
||||
on top of a datasource that shares the column name that the filter is based
|
||||
on. It's also a requirement for that column to be checked as "filterable"
|
||||
in the column tab of the table editor.
|
||||
|
||||
But what about if you don't want certain widgets to get filtered on your
|
||||
dashboard? You can do that by editing your dashboard, and in the form,
|
||||
edit the ``JSON Metadata`` field, more specifically the
|
||||
@@ -93,7 +107,8 @@ never be affected by any dashboard level filtering.
|
||||
"filter_immune_slice_fields": {
|
||||
"177": ["country_name", "__from", "__to"],
|
||||
"32": ["__from", "__to"]
|
||||
}
|
||||
},
|
||||
"timed_refresh_immune_slices": [324]
|
||||
}
|
||||
|
||||
In the json blob above, slices 324, 65 and 92 won't be affected by any
|
||||
@@ -110,12 +125,115 @@ But what happens with filtering when dealing with slices coming from
|
||||
different tables or databases? If the column name is shared, the filter will
|
||||
be applied, it's as simple as that.
|
||||
|
||||
|
||||
How to limit the timed refresh on a dashboard?
|
||||
----------------------------------------------
|
||||
By default, the dashboard timed refresh feature allows you to automatically re-query every slice
|
||||
on a dashboard according to a set schedule. Sometimes, however, you won't want all of the slices
|
||||
to be refreshed - especially if some data is slow moving, or run heavy queries. To exclude specific
|
||||
slices from the timed refresh process, add the ``timed_refresh_immune_slices`` key to the dashboard
|
||||
``JSON Metadata`` field:
|
||||
|
||||
..code::
|
||||
|
||||
{
|
||||
"filter_immune_slices": [],
|
||||
"expanded_slices": {},
|
||||
"filter_immune_slice_fields": {},
|
||||
"timed_refresh_immune_slices": [324]
|
||||
}
|
||||
|
||||
In the example above, if a timed refresh is set for the dashboard, then every slice except 324 will
|
||||
be automatically re-queried on schedule.
|
||||
|
||||
Slice refresh will also be staggered over the specified period. You can turn off this staggering
|
||||
by setting the ``stagger_refresh`` to ``false`` and modify the stagger period by setting
|
||||
``stagger_time`` to a value in milliseconds in the ``JSON Metadata`` field:
|
||||
|
||||
..code::
|
||||
|
||||
{
|
||||
"stagger_refresh": false,
|
||||
"stagger_time": 2500
|
||||
}
|
||||
|
||||
Here, the entire dashboard will refresh at once if periodic refresh is on. The stagger time of
|
||||
2.5 seconds is ignored.
|
||||
|
||||
Why does fabmanager or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
|
||||
-----------------------------------------------------------------------------------------
|
||||
superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
|
||||
By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
|
||||
|
||||
__ https://www.sqlite.org/lockingv3.html
|
||||
|
||||
One work around is to create a symlink from ~/.superset to a directory located on a non-NFS partition.
|
||||
You can override this path using the ``SUPERSET_HOME`` environment variable.
|
||||
|
||||
Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/localtion/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
|
||||
Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/location/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
|
||||
|
||||
What if the table schema changed?
|
||||
---------------------------------
|
||||
|
||||
Table schemas evolve, and Superset needs to reflect that. It's pretty common
|
||||
in the life cycle of a dashboard to want to add a new dimension or metric.
|
||||
To get Superset to discover your new columns, all you have to do is to
|
||||
go to ``Menu -> Sources -> Tables``, click the ``edit`` icon next to the
|
||||
table who's schema has changed, and hit ``Save`` from the ``Detail`` tab.
|
||||
Behind the scene, the new columns will get merged it. Following this,
|
||||
you may want to
|
||||
re-edit the table afterwards to configure the ``Column`` tab, check the
|
||||
appropriate boxes and save again.
|
||||
|
||||
How do I go about developing a new visualization type?
|
||||
------------------------------------------------------
|
||||
Here's an example as a Github PR with comments that describe what the
|
||||
different sections of the code do:
|
||||
https://github.com/airbnb/superset/pull/3013
|
||||
|
||||
What database engine can I use as a backend for Superset?
|
||||
---------------------------------------------------------
|
||||
|
||||
To clarify, the *database backend* is an OLTP database used by Superset to store its internal
|
||||
information like your list of users, slices and dashboard definitions.
|
||||
|
||||
Superset is tested using Mysql, Postgresql and Sqlite for its backend. It's recommended you
|
||||
install Superset on one of these database server for production.
|
||||
|
||||
Using a column-store, non-OLTP databases like Vertica, Redshift or Presto as a database backend simply won't work as these databases are not designed for this type of workload. Installation on Oracle, Microsoft SQL Server, or other OLTP databases may work but isn't tested.
|
||||
|
||||
Please note that pretty much any databases that have a SqlAlchemy integration should work perfectly fine as a datasource for Superset, just not as the OLTP backend.
|
||||
|
||||
How can i configure OAuth authentication and authorization?
|
||||
-----------------------------------------------------------
|
||||
|
||||
You can take a look at this Flask-AppBuilder `configuration example
|
||||
<https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/oauth/config.py>`_.
|
||||
|
||||
How can I set a default filter on my dashboard?
|
||||
-----------------------------------------------
|
||||
|
||||
Easy. Simply apply the filter and save the dashboard while the filter
|
||||
is active.
|
||||
|
||||
How do I get Superset to refresh the schema of my table?
|
||||
--------------------------------------------------------
|
||||
|
||||
When adding columns to a table, you can have Superset detect and merge the
|
||||
new columns in by using the "Refresh Metadata" action in the
|
||||
``Source -> Tables`` page. Simply check the box next to the tables
|
||||
you want the schema refreshed, and click ``Actions -> Refresh Metadata``.
|
||||
|
||||
Is there a way to force the use specific colors?
|
||||
------------------------------------------------
|
||||
|
||||
It is possible on a per-dashboard basis by providing a mapping of
|
||||
labels to colors in the ``JSON Metadata`` attribute using the
|
||||
``label_colors`` key.
|
||||
|
||||
..code::
|
||||
|
||||
{
|
||||
"label_colors": {
|
||||
"Girls": "#FF69B4",
|
||||
"Boys": "#ADD8E6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
.. image:: _static/img/s.png
|
||||
|
||||
Superset's documentation
|
||||
''''''''''''''''''''''''
|
||||
Apache Superset (incubating)
|
||||
''''''''''''''''''''''''''''
|
||||
|
||||
Superset is a data exploration platform designed to be visual, intuitive
|
||||
and interactive.
|
||||
Apache Superset (incubating) is a modern, enterprise-ready business
|
||||
intelligence web application
|
||||
|
||||
|
||||
----------------
|
||||
@@ -12,25 +12,37 @@ and interactive.
|
||||
.. warning:: This project was originally named Panoramix, was renamed to
|
||||
Caravel in March 2016, and is currently named Superset as of November 2016
|
||||
|
||||
.. important::
|
||||
|
||||
**Disclaimer**: Apache Superset is an effort undergoing incubation at The
|
||||
Apache Software Foundation (ASF), sponsored by the Apache Incubator.
|
||||
Incubation is required of all newly accepted projects until a further
|
||||
review indicates that the infrastructure, communications, and
|
||||
decision making process have stabilized in a manner consistent with
|
||||
other successful ASF projects. While incubation status is not
|
||||
necessarily a reflection of the completeness or stability of
|
||||
the code, it does indicate that the project has yet to be fully
|
||||
endorsed by the ASF.
|
||||
|
||||
Overview
|
||||
=======================================
|
||||
|
||||
Features
|
||||
---------
|
||||
|
||||
- A rich set of data visualizations, integrated from some of the best
|
||||
visualization libraries
|
||||
- Create and share simple dashboards
|
||||
- An extensible, high-granularity security/permission model allowing
|
||||
intricate rules on who can access individual features and the dataset
|
||||
- A rich set of data visualizations
|
||||
- An easy-to-use interface for exploring and visualizing data
|
||||
- Create and share dashboards
|
||||
- Enterprise-ready authentication with integration with major authentication
|
||||
providers (database, OpenID, LDAP, OAuth & REMOTE_USER through
|
||||
Flask AppBuilder)
|
||||
- An extensible, high-granularity security/permission model allowing
|
||||
intricate rules on who can access individual features and the dataset
|
||||
- A simple semantic layer, allowing users to control how data sources are
|
||||
displayed in the UI by defining which fields should show up in which
|
||||
drop-down and which aggregation and function metrics are made available
|
||||
to the user
|
||||
- Integration with most RDBMS through SqlAlchemy
|
||||
- Integration with most SQL-speaking RDBMS through SQLAlchemy
|
||||
- Deep integration with Druid.io
|
||||
|
||||
------
|
||||
@@ -58,6 +70,7 @@ Contents
|
||||
tutorial
|
||||
security
|
||||
sqllab
|
||||
visualization
|
||||
videos
|
||||
gallery
|
||||
druid
|
||||
|
||||
@@ -8,6 +8,32 @@ Superset is tested against Python ``2.7`` and Python ``3.4``.
|
||||
Airbnb currently uses 2.7.* in production. We do not plan on supporting
|
||||
Python ``2.6``.
|
||||
|
||||
Cloud-native!
|
||||
-------------
|
||||
|
||||
Superset is designed to be highly available. It is
|
||||
"cloud-native" as it has been designed scale out in large,
|
||||
distributed environments, and works well inside containers.
|
||||
While you can easily
|
||||
test drive Superset on a modest setup or simply on your laptop,
|
||||
there's virtually no limit around scaling out the platform.
|
||||
Superset is also cloud-native in the sense that it is
|
||||
flexible and lets you choose your web server (Gunicorn, Nginx, Apache),
|
||||
your metadata database engine (MySQL, Postgres, MariaDB, ...),
|
||||
your message queue (Redis, RabbitMQ, SQS, ...),
|
||||
your results backend (S3, Redis, Memcached, ...), your caching layer
|
||||
(memcached, Redis, ...), works well with services like NewRelic, StatsD and
|
||||
DataDog, and has the ability to run analytic workloads against
|
||||
most popular database technologies.
|
||||
|
||||
Superset is battle tested in large environments with hundreds
|
||||
of concurrent users. Airbnb's production environment runs inside
|
||||
Kubernetes and serves 600+ daily active users viewing over 100K charts a
|
||||
day.
|
||||
|
||||
The Superset web server and the Superset Celery workers (optional)
|
||||
are stateless, so you can scale out by running on as many servers
|
||||
as needed.
|
||||
|
||||
OS dependencies
|
||||
---------------
|
||||
@@ -36,7 +62,7 @@ that the required dependencies are installed: ::
|
||||
**OSX**, system python is not recommended. brew's python also ships with pip ::
|
||||
|
||||
brew install pkg-config libffi openssl python
|
||||
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography==1.7.2
|
||||
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography==1.9
|
||||
|
||||
**Windows** isn't officially supported at this point, but if you want to
|
||||
attempt it, download `get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_, and run ``python get-pip.py`` which may need admin access. Then run the following: ::
|
||||
@@ -107,10 +133,40 @@ the credential you entered while creating the admin account, and navigate to
|
||||
your datasources for Superset to be aware of, and they should show up in
|
||||
`Menu -> Datasources`, from where you can start playing with your data!
|
||||
|
||||
Please note that *gunicorn*, Superset default application server, does not
|
||||
work on Windows so you need to use the development web server.
|
||||
The development web server though is not intended to be used on production systems
|
||||
so better use a supported platform that can run *gunicorn*.
|
||||
A proper WSGI HTTP Server
|
||||
-------------------------
|
||||
|
||||
While you can setup Superset to run on Nginx or Apache, many use
|
||||
Gunicorn, preferably in **async mode**, which allows for impressive
|
||||
concurrency even and is fairly easy to install and configure. Please
|
||||
refer to the
|
||||
documentation of your preferred technology to set up this Flask WSGI
|
||||
application in a way that works well in your environment.
|
||||
|
||||
While the `superset runserver` command act as an quick wrapper
|
||||
around `gunicorn`, it doesn't expose all the options you may need,
|
||||
so you'll want to craft your own `gunicorn` command in your production
|
||||
environment. Here's an **async** setup known to work well: ::
|
||||
|
||||
gunicorn \
|
||||
-w 10 \
|
||||
-k gevent \
|
||||
--timeout 120 \
|
||||
-b 0.0.0.0:6666 \
|
||||
--limit-request-line 0 \
|
||||
--limit-request-field_size 0 \
|
||||
--statsd-host localhost:8125 \
|
||||
superset:app
|
||||
|
||||
Refer to the
|
||||
[Gunicorn documentation](http://docs.gunicorn.org/en/stable/design.html)
|
||||
for more information.
|
||||
|
||||
Note that *gunicorn* does not
|
||||
work on Windows so the `superset runserver` command is not expected to work
|
||||
in that context. Also note that the development web
|
||||
server (`superset runserver -d`) is not intended for production use.
|
||||
|
||||
|
||||
Configuration behind a load balancer
|
||||
------------------------------------
|
||||
@@ -156,7 +212,9 @@ of the parameters you can copy / paste in that configuration module: ::
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db'
|
||||
|
||||
# Flask-WTF flag for CSRF
|
||||
CSRF_ENABLED = True
|
||||
WTF_CSRF_ENABLED = True
|
||||
# Add endpoints that need to be exempt from CSRF protection
|
||||
WTF_CSRF_EXEMPT_LIST = []
|
||||
|
||||
# Set this API key to enable Mapbox visualizations
|
||||
MAPBOX_API_KEY = ''
|
||||
@@ -172,6 +230,11 @@ Please make sure to change:
|
||||
* *SQLALCHEMY_DATABASE_URI*, by default it is stored at *~/.superset/superset.db*
|
||||
* *SECRET_KEY*, to a long random string
|
||||
|
||||
In case you need to exempt endpoints from CSRF, e.g. you are running a custom
|
||||
auth postback endpoint, you can add them to *WTF_CSRF_EXEMPT_LIST*
|
||||
|
||||
WTF_CSRF_EXEMPT_LIST = ['']
|
||||
|
||||
Database dependencies
|
||||
---------------------
|
||||
|
||||
@@ -223,10 +286,6 @@ database you want to connect to should get you to the right place.
|
||||
(AWS) Athena
|
||||
------------
|
||||
|
||||
This currently relies on an unreleased future version of `PyAthenaJDBC <https://github.com/laughingman7743/PyAthenaJDBC>`_. If you're adventurous or simply impatient, you can install directly from git: ::
|
||||
|
||||
pip install git+https://github.com/laughingman7743/PyAthenaJDBC@support_sqlalchemy
|
||||
|
||||
The connection string for Athena looks like this ::
|
||||
|
||||
awsathena+jdbc://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...
|
||||
@@ -284,6 +343,24 @@ on top of the **database**. For Superset to connect to a specific schema,
|
||||
there's a **schema** parameter you can set in the table form.
|
||||
|
||||
|
||||
External Password store for SQLAlchemy connections
|
||||
--------------------------------------------------
|
||||
It is possible to use an external store for you database passwords. This is
|
||||
useful if you a running a custom secret distribution framework and do not wish
|
||||
to store secrets in Superset's meta database.
|
||||
|
||||
Example:
|
||||
Write a function that takes a single argument of type ``sqla.engine.url`` and returns
|
||||
the password for the given connection string. Then set ``SQLALCHEMY_CUSTOM_PASSWORD_STORE``
|
||||
in your config file to point to that function. ::
|
||||
|
||||
def example_lookup_password(url):
|
||||
secret = <<get password from external framework>>
|
||||
return 'secret'
|
||||
|
||||
SQLALCHEMY_CUSTOM_PASSWORD_STORE = example_lookup_password
|
||||
|
||||
|
||||
SSL Access to databases
|
||||
-----------------------
|
||||
This example worked with a MySQL database that requires SSL. The configuration
|
||||
@@ -305,10 +382,10 @@ Druid
|
||||
-----
|
||||
|
||||
* From the UI, enter the information about your clusters in the
|
||||
``Admin->Clusters`` menu by hitting the + sign.
|
||||
`Sources -> Druid Clusters` menu by hitting the + sign.
|
||||
|
||||
* Once the Druid cluster connection information is entered, hit the
|
||||
``Admin->Refresh Metadata`` menu item to populate
|
||||
`Sources -> Refresh Druid Metadata` menu item to populate
|
||||
|
||||
* Navigate to your datasources
|
||||
|
||||
@@ -392,13 +469,13 @@ have the same configuration.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class CeleryConfig(object):
|
||||
BROKER_URL = 'redis://localhost:6379/0'
|
||||
CELERY_IMPORTS = ('superset.sql_lab', )
|
||||
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
||||
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
|
||||
class CeleryConfig(object):
|
||||
BROKER_URL = 'redis://localhost:6379/0'
|
||||
CELERY_IMPORTS = ('superset.sql_lab', )
|
||||
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
||||
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
|
||||
|
||||
CELERY_CONFIG = CeleryConfig
|
||||
CELERY_CONFIG = CeleryConfig
|
||||
|
||||
To setup a result backend, you need to pass an instance of a derivative
|
||||
of ``werkzeug.contrib.cache.BaseCache`` to the ``RESULTS_BACKEND``
|
||||
@@ -410,13 +487,13 @@ look something like:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# On S3
|
||||
from s3cache.s3cache import S3Cache
|
||||
S3_CACHE_BUCKET = 'foobar-superset'
|
||||
S3_CACHE_KEY_PREFIX = 'sql_lab_result'
|
||||
RESULTS_BACKEND = S3Cache(S3_CACHE_BUCKET, S3_CACHE_KEY_PREFIX)
|
||||
# On S3
|
||||
from s3cache.s3cache import S3Cache
|
||||
S3_CACHE_BUCKET = 'foobar-superset'
|
||||
S3_CACHE_KEY_PREFIX = 'sql_lab_result'
|
||||
RESULTS_BACKEND = S3Cache(S3_CACHE_BUCKET, S3_CACHE_KEY_PREFIX)
|
||||
|
||||
# On Redis
|
||||
# On Redis
|
||||
from werkzeug.contrib.cache import RedisCache
|
||||
RESULTS_BACKEND = RedisCache(
|
||||
host='localhost', port=6379, key_prefix='superset_results')
|
||||
@@ -444,8 +521,8 @@ your environment.::
|
||||
|
||||
# assuming $SUPERSET_HOME as the root of the repo
|
||||
cd $SUPERSET_HOME/superset/assets
|
||||
npm install
|
||||
npm run build
|
||||
yarn
|
||||
yarn run build
|
||||
cd $SUPERSET_HOME
|
||||
python setup.py install
|
||||
|
||||
@@ -455,7 +532,7 @@ Blueprints
|
||||
|
||||
`Blueprints are Flask's reusable apps <http://flask.pocoo.org/docs/0.12/blueprints/>`_.
|
||||
Superset allows you to specify an array of Blueprints
|
||||
an array of Blueprints in your ``superset_config`` module. Here's
|
||||
in your ``superset_config`` module. Here's
|
||||
an example on how this can work with a simple Blueprint. By doing
|
||||
so, you can expect Superset to serve a page that says "OK"
|
||||
at the ``/simple_page`` url. This can allow you to run other things such
|
||||
@@ -473,3 +550,20 @@ same server.
|
||||
return "Ok"
|
||||
|
||||
BLUEPRINTS = [simple_page]
|
||||
|
||||
StatsD logging
|
||||
--------------
|
||||
|
||||
Superset is instrumented to log events to StatsD if desired. Most endpoints hit
|
||||
are logged as well as key events like query start and end in SQL Lab.
|
||||
|
||||
To setup StatsD logging, it's a matter of configuring the logger in your
|
||||
``superset_config.py``.
|
||||
|
||||
..code ::
|
||||
|
||||
from superset.stats_logger import StatsdStatsLogger
|
||||
STATS_LOGGER = StatsdStatsLogger(host='localhost', port=8125, prefix='superset')
|
||||
|
||||
Note that it's also possible to implement you own logger by deriving
|
||||
``superset.stats_logger.BaseStatsLogger``.
|
||||
|
||||
@@ -3,7 +3,8 @@ Security
|
||||
Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
|
||||
"Simple and rapid application development framework, built on top of Flask.".
|
||||
FAB provides authentication, user management, permissions and roles.
|
||||
|
||||
Please read its `Security documentation
|
||||
<http://flask-appbuilder.readthedocs.io/en/latest/security.html>`_.
|
||||
|
||||
Provided Roles
|
||||
--------------
|
||||
@@ -35,7 +36,7 @@ own. Alpha users can add and alter data sources.
|
||||
Gamma
|
||||
"""""
|
||||
Gamma have limited access. They can only consume data coming from data sources
|
||||
they have been giving access to through another complementary role.
|
||||
they have been given access to through another complementary role.
|
||||
They only have access to view the slices and
|
||||
dashboards made from data sources that they have access to. Currently Gamma
|
||||
users are not able to alter or add data sources. We assume that they are
|
||||
|
||||
@@ -13,9 +13,11 @@ Feature Overview
|
||||
visualization capabilities
|
||||
- Browse database metadata: tables, columns, indexes, partitions
|
||||
- Support for long-running queries
|
||||
|
||||
- uses the `Celery distributed queue <http://www.python.org/>`_
|
||||
to dispatch query handling to workers
|
||||
- supports defining a "results backend" to persist query results
|
||||
|
||||
- A search engine to find queries executed in the past
|
||||
- Supports templating using the
|
||||
`Jinja templating language <http://jinja.pocoo.org/docs/dev/>`_
|
||||
|
||||
1765
docs/visualization.rst
Normal file
7
gen_changelog.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
# requires github-changes, run
|
||||
# `npm install -g github-changes`
|
||||
# requires $GITHUB_TOKEN to be set
|
||||
|
||||
# usage: ./github-changes 0.20.0 0.20.1
|
||||
# will overwrites the local CHANGELOG.md, somehow you need to merge it in
|
||||
github-changes -o apache -r incubator-superset --token $GITHUB_TOKEN --between-tags $1...$2
|
||||
@@ -9,4 +9,6 @@ set -e
|
||||
superset/bin/superset db upgrade
|
||||
superset/bin/superset version -v
|
||||
python setup.py nosetests
|
||||
coveralls
|
||||
if [ "$CI" = "true" ] ; then
|
||||
coveralls
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from superset import sm
|
||||
from collections import defaultdict
|
||||
|
||||
from superset import sm
|
||||
|
||||
|
||||
def cleanup_permissions():
|
||||
# 1. Clean up duplicates.
|
||||
|
||||
@@ -23,6 +23,3 @@ detailed-errors=1
|
||||
with-coverage=1
|
||||
nocapture=1
|
||||
cover-package=superset
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length=90
|
||||
|
||||
47
setup.py
@@ -1,10 +1,11 @@
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import json
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
PACKAGE_DIR = os.path.join(BASE_DIR, 'superset', 'static', 'assets')
|
||||
PACKAGE_DIR = os.path.join(BASE_DIR, 'superset', 'assets')
|
||||
PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json')
|
||||
with open(PACKAGE_FILE) as package_file:
|
||||
version_string = json.load(package_file)['version']
|
||||
@@ -14,18 +15,19 @@ def get_git_sha():
|
||||
try:
|
||||
s = str(subprocess.check_output(['git', 'rev-parse', 'HEAD']))
|
||||
return s.strip()
|
||||
except:
|
||||
return ""
|
||||
except Exception:
|
||||
return ''
|
||||
|
||||
|
||||
GIT_SHA = get_git_sha()
|
||||
version_info = {
|
||||
'GIT_SHA': GIT_SHA,
|
||||
'version': version_string,
|
||||
}
|
||||
print("-==-" * 15)
|
||||
print("VERSION: " + version_string)
|
||||
print("GIT SHA: " + GIT_SHA)
|
||||
print("-==-" * 15)
|
||||
print('-==-' * 15)
|
||||
print('VERSION: ' + version_string)
|
||||
print('GIT SHA: ' + GIT_SHA)
|
||||
print('-==-' * 15)
|
||||
|
||||
with open(os.path.join(PACKAGE_DIR, 'version_info.json'), 'w') as version_file:
|
||||
json.dump(version_info, version_file)
|
||||
@@ -34,38 +36,42 @@ with open(os.path.join(PACKAGE_DIR, 'version_info.json'), 'w') as version_file:
|
||||
setup(
|
||||
name='superset',
|
||||
description=(
|
||||
"A interactive data visualization platform build on SqlAlchemy "
|
||||
"and druid.io"),
|
||||
'A interactive data visualization platform build on SqlAlchemy '
|
||||
'and druid.io'),
|
||||
version=version_string,
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
scripts=['superset/bin/superset'],
|
||||
install_requires=[
|
||||
'boto3==1.4.4',
|
||||
'celery==3.1.23',
|
||||
'cryptography==1.7.2',
|
||||
'flask-appbuilder==1.8.1',
|
||||
'boto3>=1.4.6',
|
||||
'celery==4.1.0',
|
||||
'colorama==0.3.9',
|
||||
'cryptography==1.9',
|
||||
'flask==0.12.2',
|
||||
'flask-appbuilder==1.9.4',
|
||||
'flask-cache==0.13.1',
|
||||
'flask-migrate==2.0.3',
|
||||
'flask-script==2.0.5',
|
||||
'flask-sqlalchemy==2.0',
|
||||
'flask-sqlalchemy==2.1',
|
||||
'flask-testing==0.6.2',
|
||||
'flask-wtf==0.14.2',
|
||||
'flower==0.9.1',
|
||||
'future>=0.16.0, <0.17',
|
||||
'humanize==0.5.1',
|
||||
'gunicorn==19.7.1',
|
||||
'idna==2.5',
|
||||
'markdown==2.6.8',
|
||||
'pandas==0.19.2',
|
||||
'pandas==0.20.3',
|
||||
'parsedatetime==2.0.0',
|
||||
'pydruid==0.3.1',
|
||||
'PyHive>=0.2.1',
|
||||
'PyHive>=0.4.0',
|
||||
'python-dateutil==2.6.0',
|
||||
'requests==2.13.0',
|
||||
'requests==2.17.3',
|
||||
'simplejson==3.10.0',
|
||||
'six==1.10.0',
|
||||
'sqlalchemy==1.1.9',
|
||||
'sqlalchemy-utils==0.32.14',
|
||||
'sqlalchemy-utils==0.32.16',
|
||||
'sqlparse==0.2.3',
|
||||
'thrift>=0.9.3',
|
||||
'thrift-sasl>=0.2.1',
|
||||
@@ -78,6 +84,7 @@ setup(
|
||||
'coverage',
|
||||
'mock',
|
||||
'nose',
|
||||
'redis',
|
||||
],
|
||||
author='Maxime Beauchemin',
|
||||
author_email='maximebeauchemin@gmail.com',
|
||||
|
||||
@@ -4,14 +4,13 @@ from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
import logging
|
||||
from logging.handlers import TimedRotatingFileHandler
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
from flask import Flask, redirect
|
||||
from flask_appbuilder import SQLA, AppBuilder, IndexView
|
||||
from flask_appbuilder import AppBuilder, IndexView, SQLA
|
||||
from flask_appbuilder.baseviews import expose
|
||||
from flask_migrate import Migrate
|
||||
from flask_wtf.csrf import CSRFProtect
|
||||
@@ -20,24 +19,54 @@ from werkzeug.contrib.fixers import ProxyFix
|
||||
from superset.connectors.connector_registry import ConnectorRegistry
|
||||
from superset import utils, config # noqa
|
||||
|
||||
|
||||
APP_DIR = os.path.dirname(__file__)
|
||||
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
|
||||
|
||||
with open(APP_DIR + '/static/assets/backendSync.json', 'r') as f:
|
||||
frontend_config = json.load(f)
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(CONFIG_MODULE)
|
||||
conf = app.config
|
||||
|
||||
#################################################################
|
||||
# Handling manifest file logic at app start
|
||||
#################################################################
|
||||
MANIFEST_FILE = APP_DIR + '/static/assets/dist/manifest.json'
|
||||
manifest = {}
|
||||
|
||||
|
||||
def parse_manifest_json():
|
||||
global manifest
|
||||
try:
|
||||
with open(MANIFEST_FILE, 'r') as f:
|
||||
manifest = json.load(f)
|
||||
except Exception:
|
||||
print('no manifest file found at ' + MANIFEST_FILE)
|
||||
|
||||
|
||||
def get_manifest_file(filename):
|
||||
if app.debug:
|
||||
parse_manifest_json()
|
||||
return '/static/assets/dist/' + manifest.get(filename, '')
|
||||
|
||||
|
||||
parse_manifest_json()
|
||||
|
||||
|
||||
@app.context_processor
|
||||
def get_js_manifest():
|
||||
return dict(js_manifest=get_manifest_file)
|
||||
|
||||
|
||||
#################################################################
|
||||
|
||||
for bp in conf.get('BLUEPRINTS'):
|
||||
try:
|
||||
print("Registering blueprint: '{}'".format(bp.name))
|
||||
app.register_blueprint(bp)
|
||||
except Exception as e:
|
||||
print("blueprint registration failed")
|
||||
print('blueprint registration failed')
|
||||
logging.exception(e)
|
||||
|
||||
if conf.get('SILENCE_FAB'):
|
||||
@@ -53,13 +82,16 @@ db = SQLA(app)
|
||||
|
||||
if conf.get('WTF_CSRF_ENABLED'):
|
||||
csrf = CSRFProtect(app)
|
||||
csrf_exempt_list = conf.get('WTF_CSRF_EXEMPT_LIST', [])
|
||||
for ex in csrf_exempt_list:
|
||||
csrf.exempt(ex)
|
||||
|
||||
utils.pessimistic_connection_handling(db.engine.pool)
|
||||
utils.pessimistic_connection_handling(db.engine)
|
||||
|
||||
cache = utils.setup_cache(app, conf.get('CACHE_CONFIG'))
|
||||
tables_cache = utils.setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
|
||||
|
||||
migrate = Migrate(app, db, directory=APP_DIR + "/migrations")
|
||||
migrate = Migrate(app, db, directory=APP_DIR + '/migrations')
|
||||
|
||||
# Logging configuration
|
||||
logging.basicConfig(format=app.config.get('LOG_FORMAT'))
|
||||
@@ -67,10 +99,11 @@ logging.getLogger().setLevel(app.config.get('LOG_LEVEL'))
|
||||
|
||||
if app.config.get('ENABLE_TIME_ROTATE'):
|
||||
logging.getLogger().setLevel(app.config.get('TIME_ROTATE_LOG_LEVEL'))
|
||||
handler = TimedRotatingFileHandler(app.config.get('FILENAME'),
|
||||
when=app.config.get('ROLLOVER'),
|
||||
interval=app.config.get('INTERVAL'),
|
||||
backupCount=app.config.get('BACKUP_COUNT'))
|
||||
handler = TimedRotatingFileHandler(
|
||||
app.config.get('FILENAME'),
|
||||
when=app.config.get('ROLLOVER'),
|
||||
interval=app.config.get('INTERVAL'),
|
||||
backupCount=app.config.get('BACKUP_COUNT'))
|
||||
logging.getLogger().addHandler(handler)
|
||||
|
||||
if app.config.get('ENABLE_CORS'):
|
||||
@@ -80,6 +113,21 @@ if app.config.get('ENABLE_CORS'):
|
||||
if app.config.get('ENABLE_PROXY_FIX'):
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app)
|
||||
|
||||
if app.config.get('ENABLE_CHUNK_ENCODING'):
|
||||
|
||||
class ChunkedEncodingFix(object):
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
# Setting wsgi.input_terminated tells werkzeug.wsgi to ignore
|
||||
# content-length and read the stream till the end.
|
||||
if environ.get('HTTP_TRANSFER_ENCODING', '').lower() == u'chunked':
|
||||
environ['wsgi.input_terminated'] = True
|
||||
return self.app(environ, start_response)
|
||||
|
||||
app.wsgi_app = ChunkedEncodingFix(app.wsgi_app)
|
||||
|
||||
if app.config.get('UPLOAD_FOLDER'):
|
||||
try:
|
||||
os.makedirs(app.config.get('UPLOAD_FOLDER'))
|
||||
@@ -95,20 +143,21 @@ class MyIndexView(IndexView):
|
||||
def index(self):
|
||||
return redirect('/superset/welcome')
|
||||
|
||||
|
||||
appbuilder = AppBuilder(
|
||||
app, db.session,
|
||||
app,
|
||||
db.session,
|
||||
base_template='superset/base.html',
|
||||
indexview=MyIndexView,
|
||||
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
|
||||
security_manager_class=app.config.get('CUSTOM_SECURITY_MANAGER'))
|
||||
|
||||
sm = appbuilder.sm
|
||||
|
||||
get_session = appbuilder.get_session
|
||||
results_backend = app.config.get("RESULTS_BACKEND")
|
||||
results_backend = app.config.get('RESULTS_BACKEND')
|
||||
|
||||
# Registering sources
|
||||
module_datasource_map = app.config.get("DEFAULT_MODULE_DS_MAP")
|
||||
module_datasource_map.update(app.config.get("ADDITIONAL_MODULE_DS_MAP"))
|
||||
module_datasource_map = app.config.get('DEFAULT_MODULE_DS_MAP')
|
||||
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
|
||||
ConnectorRegistry.register_sources(module_datasource_map)
|
||||
|
||||
from superset import views # noqa
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"presets" : ["airbnb", "es2015", "react"],
|
||||
"presets" : ["airbnb"],
|
||||
}
|
||||
|
||||
@@ -129,6 +129,11 @@
|
||||
"Directed Force Layout",
|
||||
"/static/assets/images/viz_thumbnails/directed_force.png"
|
||||
],
|
||||
[
|
||||
"country_map",
|
||||
"Country Map",
|
||||
"/static/assets/images/viz_thumbnails/country_map.png"
|
||||
],
|
||||
[
|
||||
"world_map",
|
||||
"World Map",
|
||||
@@ -745,6 +750,12 @@
|
||||
"default": false,
|
||||
"description": "Sort bars by x labels."
|
||||
},
|
||||
"combine_metric": {
|
||||
"type": "CheckboxControl",
|
||||
"label": "Combine Metrics",
|
||||
"default": false,
|
||||
"description": "Display metrics side by side within each column, as opposed to each column being displayed side by side for each metric."
|
||||
},
|
||||
"show_controls": {
|
||||
"type": "CheckboxControl",
|
||||
"label": "Extra Controls",
|
||||
@@ -772,6 +783,74 @@
|
||||
"default": null,
|
||||
"description": "A metric to use for color"
|
||||
},
|
||||
"select_country": {
|
||||
"type": "SelectControl",
|
||||
"label": "Country Name Type",
|
||||
"default": "France",
|
||||
"choices": [
|
||||
[
|
||||
"Algeria",
|
||||
"Algeria"
|
||||
],
|
||||
[
|
||||
"Belgium",
|
||||
"Belgium"
|
||||
],
|
||||
[
|
||||
"Brasil",
|
||||
"Brasil"
|
||||
],
|
||||
[
|
||||
"China",
|
||||
"China"
|
||||
],
|
||||
[
|
||||
"Germany",
|
||||
"Germany"
|
||||
],
|
||||
[
|
||||
"Egypt",
|
||||
"Egypt"
|
||||
],
|
||||
[
|
||||
"France",
|
||||
"France"
|
||||
],
|
||||
[
|
||||
"Italy",
|
||||
"Italy"
|
||||
],
|
||||
[
|
||||
"Morocco",
|
||||
"Morocco"
|
||||
],
|
||||
[
|
||||
"Nederlanden",
|
||||
"Nederlanden"
|
||||
],
|
||||
[
|
||||
"Russia",
|
||||
"Russia"
|
||||
],
|
||||
[
|
||||
"Singapore",
|
||||
"Singapore"
|
||||
],
|
||||
[
|
||||
"Spain",
|
||||
"Spain"
|
||||
],
|
||||
[
|
||||
"Uk",
|
||||
"Uk"
|
||||
],
|
||||
[
|
||||
"Usa",
|
||||
"Usa"
|
||||
]
|
||||
],
|
||||
"description": "The name of country that Superset should display"
|
||||
},
|
||||
"country_fieldtype": {
|
||||
"type": "SelectControl",
|
||||
"label": "Country Field Type",
|
||||
@@ -2044,7 +2123,7 @@
|
||||
"type": "TextControl",
|
||||
"label": "Time Shift",
|
||||
"default": null,
|
||||
"description": "Overlay a timeseries from a relative time period. Expects relative time delta in natural language (example: 24 hours, 7 days, 56 weeks, 365 days"
|
||||
"description": "Overlay a timeseries from a relative time period. Expects relative time delta in natural language (example: 24 hours, 7 days, 56 weeks, 365 days)"
|
||||
},
|
||||
"subheader": {
|
||||
"type": "TextControl",
|
||||
@@ -2284,6 +2363,12 @@
|
||||
"label": "Slice ID",
|
||||
"hidden": true,
|
||||
"description": "The id of the active slice"
|
||||
},
|
||||
"cache_timeout": {
|
||||
"type": "HiddenControl",
|
||||
"label": "Cache Timeout (seconds)",
|
||||
"hidden": true,
|
||||
"description": "The number of seconds before expiring the cache"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
superset/assets/images/viz_thumbnails/chord.png
Normal file
|
After Width: | Height: | Size: 398 KiB |
BIN
superset/assets/images/viz_thumbnails/country_map.png
Normal file
|
After Width: | Height: | Size: 296 KiB |
BIN
superset/assets/images/viz_thumbnails/deck_grid.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
superset/assets/images/viz_thumbnails/deck_hex.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
superset/assets/images/viz_thumbnails/deck_scatter.png
Normal file
|
After Width: | Height: | Size: 777 KiB |
BIN
superset/assets/images/viz_thumbnails/deck_screengrid.png
Normal file
|
After Width: | Height: | Size: 578 KiB |
BIN
superset/assets/images/viz_thumbnails/event_flow.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 161 KiB |
BIN
superset/assets/images/viz_thumbnails/paired_ttest.png
Normal file
|
After Width: | Height: | Size: 230 KiB |
BIN
superset/assets/images/viz_thumbnails/partition.png
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
superset/assets/images/viz_thumbnails/time_table.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
@@ -1,6 +1,7 @@
|
||||
/* global notify */
|
||||
import shortid from 'shortid';
|
||||
import { now } from '../modules/dates';
|
||||
import { t } from '../locales';
|
||||
|
||||
const $ = require('jquery');
|
||||
|
||||
@@ -20,6 +21,8 @@ export const QUERY_EDITOR_SET_TITLE = 'QUERY_EDITOR_SET_TITLE';
|
||||
export const QUERY_EDITOR_SET_AUTORUN = 'QUERY_EDITOR_SET_AUTORUN';
|
||||
export const QUERY_EDITOR_SET_SQL = 'QUERY_EDITOR_SET_SQL';
|
||||
export const QUERY_EDITOR_SET_SELECTED_TEXT = 'QUERY_EDITOR_SET_SELECTED_TEXT';
|
||||
export const QUERY_EDITOR_PERSIST_HEIGHT = 'QUERY_EDITOR_PERSIST_HEIGHT';
|
||||
|
||||
export const SET_DATABASES = 'SET_DATABASES';
|
||||
export const SET_ACTIVE_QUERY_EDITOR = 'SET_ACTIVE_QUERY_EDITOR';
|
||||
export const SET_ACTIVE_SOUTHPANE_TAB = 'SET_ACTIVE_SOUTHPANE_TAB';
|
||||
@@ -37,6 +40,10 @@ export const REMOVE_DATA_PREVIEW = 'REMOVE_DATA_PREVIEW';
|
||||
export const CHANGE_DATA_PREVIEW_ID = 'CHANGE_DATA_PREVIEW_ID';
|
||||
export const SAVE_QUERY = 'SAVE_QUERY';
|
||||
|
||||
export const CREATE_DATASOURCE_STARTED = 'CREATE_DATASOURCE_STARTED';
|
||||
export const CREATE_DATASOURCE_SUCCESS = 'CREATE_DATASOURCE_SUCCESS';
|
||||
export const CREATE_DATASOURCE_FAILED = 'CREATE_DATASOURCE_FAILED';
|
||||
|
||||
export function resetState() {
|
||||
return { type: RESET_STATE };
|
||||
}
|
||||
@@ -47,8 +54,8 @@ export function saveQuery(query) {
|
||||
type: 'POST',
|
||||
url,
|
||||
data: query,
|
||||
success: () => notify.success('Your query was saved'),
|
||||
error: () => notify.error('Your query could not be saved'),
|
||||
success: () => notify.success(t('Your query was saved')),
|
||||
error: () => notify.error(t('Your query could not be saved')),
|
||||
dataType: 'json',
|
||||
});
|
||||
return { type: SAVE_QUERY };
|
||||
@@ -101,7 +108,7 @@ export function fetchQueryResults(query) {
|
||||
dispatch(querySuccess(query, results));
|
||||
},
|
||||
error(err) {
|
||||
let msg = 'Failed at retrieving results from the results backend';
|
||||
let msg = t('Failed at retrieving results from the results backend');
|
||||
if (err.responseJSON && err.responseJSON.error) {
|
||||
msg = err.responseJSON.error;
|
||||
}
|
||||
@@ -146,13 +153,15 @@ export function runQuery(query) {
|
||||
msg = err.responseText;
|
||||
}
|
||||
}
|
||||
if (textStatus === 'error' && errorThrown === '') {
|
||||
msg = 'Could not connect to server';
|
||||
} else if (msg === null) {
|
||||
msg = `[${textStatus}] ${errorThrown}`;
|
||||
if (msg === null) {
|
||||
if (errorThrown) {
|
||||
msg = `[${textStatus}] ${errorThrown}`;
|
||||
} else {
|
||||
msg = t('Unknown error');
|
||||
}
|
||||
}
|
||||
if (msg.indexOf('The CSRF token is missing') > 0) {
|
||||
msg = 'Your session timed out, please refresh your page and try again.';
|
||||
if (msg.indexOf('CSRF token') > 0) {
|
||||
msg = t('Your session timed out, please refresh your page and try again.');
|
||||
}
|
||||
dispatch(queryFailed(query, msg));
|
||||
},
|
||||
@@ -171,10 +180,10 @@ export function postStopQuery(query) {
|
||||
url: stopQueryUrl,
|
||||
data: stopQueryRequestData,
|
||||
success() {
|
||||
notify.success('Query was stopped.');
|
||||
notify.success(t('Query was stopped.'));
|
||||
},
|
||||
error() {
|
||||
notify.error('Failed at stopping query.');
|
||||
notify.error(t('Failed at stopping query.'));
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -287,7 +296,7 @@ export function addTable(query, tableName, schemaName) {
|
||||
isMetadataLoading: false,
|
||||
});
|
||||
dispatch(mergeTable(newTable));
|
||||
notify.error('Error occurred while fetching table metadata');
|
||||
notify.error(t('Error occurred while fetching table metadata'));
|
||||
});
|
||||
|
||||
url = `/superset/extra_table_metadata/${query.dbId}/${tableName}/${schemaName}/`;
|
||||
@@ -300,7 +309,7 @@ export function addTable(query, tableName, schemaName) {
|
||||
isExtraMetadataLoading: false,
|
||||
});
|
||||
dispatch(mergeTable(newTable));
|
||||
notify.error('Error occurred while fetching table metadata');
|
||||
notify.error(t('Error occurred while fetching table metadata'));
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -342,6 +351,10 @@ export function refreshQueries(alteredQueries) {
|
||||
return { type: REFRESH_QUERIES, alteredQueries };
|
||||
}
|
||||
|
||||
export function persistEditorHeight(queryEditor, currentHeight) {
|
||||
return { type: QUERY_EDITOR_PERSIST_HEIGHT, queryEditor, currentHeight };
|
||||
}
|
||||
|
||||
export function popStoredQuery(urlId) {
|
||||
return function (dispatch) {
|
||||
$.ajax({
|
||||
@@ -350,7 +363,7 @@ export function popStoredQuery(urlId) {
|
||||
success: (data) => {
|
||||
const newQuery = JSON.parse(data);
|
||||
const queryEditorProps = {
|
||||
title: newQuery.title ? newQuery.title : 'shared query',
|
||||
title: newQuery.title ? newQuery.title : t('shared query'),
|
||||
dbId: newQuery.dbId ? parseInt(newQuery.dbId, 10) : null,
|
||||
schema: newQuery.schema ? newQuery.schema : null,
|
||||
autorun: newQuery.autorun ? newQuery.autorun : false,
|
||||
@@ -358,7 +371,7 @@ export function popStoredQuery(urlId) {
|
||||
};
|
||||
dispatch(addQueryEditor(queryEditorProps));
|
||||
},
|
||||
error: () => notify.error("The query couldn't be loaded"),
|
||||
error: () => notify.error(t('The query couldn\'t be loaded')),
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -378,7 +391,42 @@ export function popSavedQuery(saveQueryId) {
|
||||
};
|
||||
dispatch(addQueryEditor(queryEditorProps));
|
||||
},
|
||||
error: () => notify.error("The query couldn't be loaded"),
|
||||
error: () => notify.error(t('The query couldn\'t be loaded')),
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function createDatasourceStarted() {
|
||||
return { type: CREATE_DATASOURCE_STARTED };
|
||||
}
|
||||
export function createDatasourceSuccess(response) {
|
||||
const data = JSON.parse(response);
|
||||
const datasource = `${data.table_id}__table`;
|
||||
return { type: CREATE_DATASOURCE_SUCCESS, datasource };
|
||||
}
|
||||
export function createDatasourceFailed(err) {
|
||||
return { type: CREATE_DATASOURCE_FAILED, err };
|
||||
}
|
||||
|
||||
export function createDatasource(vizOptions, context) {
|
||||
return (dispatch) => {
|
||||
dispatch(createDatasourceStarted());
|
||||
|
||||
return $.ajax({
|
||||
type: 'POST',
|
||||
url: '/superset/sqllab_viz/',
|
||||
async: false,
|
||||
data: {
|
||||
data: JSON.stringify(vizOptions),
|
||||
},
|
||||
context,
|
||||
dataType: 'json',
|
||||
success: (resp) => {
|
||||
dispatch(createDatasourceSuccess(resp));
|
||||
},
|
||||
error: () => {
|
||||
dispatch(createDatasourceFailed(t('An error occurred while creating the data source')));
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ const propTypes = {
|
||||
sql: PropTypes.string.isRequired,
|
||||
tables: PropTypes.array,
|
||||
queryEditor: PropTypes.object.isRequired,
|
||||
height: PropTypes.string,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
@@ -45,6 +46,7 @@ class AceEditorWrapper extends React.PureComponent {
|
||||
super(props);
|
||||
this.state = {
|
||||
sql: props.sql,
|
||||
selectedText: '',
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
@@ -77,8 +79,13 @@ class AceEditorWrapper extends React.PureComponent {
|
||||
});
|
||||
editor.$blockScrolling = Infinity; // eslint-disable-line no-param-reassign
|
||||
editor.selection.on('changeSelection', () => {
|
||||
this.props.actions.queryEditorSetSelectedText(
|
||||
this.props.queryEditor, editor.getSelectedText());
|
||||
const selectedText = editor.getSelectedText();
|
||||
// Backspace trigger 1 character selection, ignoring
|
||||
if (selectedText !== this.state.selectedText && selectedText.length !== 1) {
|
||||
this.setState({ selectedText });
|
||||
this.props.actions.queryEditorSetSelectedText(
|
||||
this.props.queryEditor, selectedText);
|
||||
}
|
||||
});
|
||||
}
|
||||
getCompletions(aceEditor, session, pos, prefix, callback) {
|
||||
@@ -119,8 +126,7 @@ class AceEditorWrapper extends React.PureComponent {
|
||||
theme="github"
|
||||
onLoad={this.onEditorLoad.bind(this)}
|
||||
onBlur={this.onBlur.bind(this)}
|
||||
minLines={12}
|
||||
maxLines={12}
|
||||
height={this.props.height}
|
||||
onChange={this.textChange.bind(this)}
|
||||
width="100%"
|
||||
editorProps={{ $blockScrolling: true }}
|
||||
|
||||
@@ -70,7 +70,7 @@ class App extends React.PureComponent {
|
||||
}
|
||||
return (
|
||||
<div className="App SqlLab">
|
||||
<AlertsWrapper />
|
||||
<AlertsWrapper initMessages={this.props.initMessages} />
|
||||
<div className="container-fluid">
|
||||
{content}
|
||||
</div>
|
||||
@@ -82,11 +82,13 @@ class App extends React.PureComponent {
|
||||
App.propTypes = {
|
||||
alerts: PropTypes.array,
|
||||
actions: PropTypes.object,
|
||||
initMessages: PropTypes.array,
|
||||
};
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
alerts: state.alerts,
|
||||
initMessages: state.flash_messages,
|
||||
};
|
||||
}
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import CopyToClipboard from '../../components/CopyToClipboard';
|
||||
import { storeQuery } from '../../../utils/common';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
queryEditor: PropTypes.object.isRequired,
|
||||
@@ -26,10 +27,10 @@ export default class CopyQueryTabUrl extends React.PureComponent {
|
||||
inMenu
|
||||
copyNode={(
|
||||
<div>
|
||||
<i className="fa fa-clipboard" /> <span>share query</span>
|
||||
<i className="fa fa-clipboard" /> <span>{t('share query')}</span>
|
||||
</div>
|
||||
)}
|
||||
tooltipText="copy URL to clipboard"
|
||||
tooltipText={t('copy URL to clipboard')}
|
||||
shouldShowText={false}
|
||||
getText={this.getUrl.bind(this)}
|
||||
/>
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import { Modal } from 'react-bootstrap';
|
||||
|
||||
import * as Actions from '../actions';
|
||||
import ResultSet from './ResultSet';
|
||||
|
||||
const propTypes = {
|
||||
queries: PropTypes.object,
|
||||
actions: PropTypes.object,
|
||||
showDataPreviewModal: PropTypes.bool,
|
||||
dataPreviewQueryId: PropTypes.string,
|
||||
};
|
||||
|
||||
class DataPreviewModal extends React.PureComponent {
|
||||
hide() {
|
||||
this.props.actions.hideDataPreview();
|
||||
}
|
||||
render() {
|
||||
if (this.props.showDataPreviewModal && this.props.dataPreviewQueryId) {
|
||||
const query = this.props.queries[this.props.dataPreviewQueryId];
|
||||
return (
|
||||
<Modal
|
||||
show={this.props.showDataPreviewModal}
|
||||
onHide={this.hide.bind(this)}
|
||||
bsStyle="lg"
|
||||
>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>
|
||||
Data preview for <strong>{query.tableName}</strong>
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<ResultSet
|
||||
query={query}
|
||||
visualize={false}
|
||||
csv={false}
|
||||
actions={this.props.actions}
|
||||
height={400}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
DataPreviewModal.propTypes = propTypes;
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
queries: state.queries,
|
||||
showDataPreviewModal: state.showDataPreviewModal,
|
||||
dataPreviewQueryId: state.dataPreviewQueryId,
|
||||
};
|
||||
}
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators(Actions, dispatch),
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DataPreviewModal);
|
||||
@@ -1,8 +1,14 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { github } from 'react-syntax-highlighter/dist/styles';
|
||||
|
||||
import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/dist/light';
|
||||
import sql from 'react-syntax-highlighter/dist/languages/sql';
|
||||
import github from 'react-syntax-highlighter/dist/styles/github';
|
||||
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
import { t } from '../../locales';
|
||||
|
||||
registerLanguage('sql', sql);
|
||||
|
||||
const defaultProps = {
|
||||
maxWidth: 50,
|
||||
@@ -26,8 +32,8 @@ class HighlightedSql extends React.Component {
|
||||
};
|
||||
}
|
||||
shrinkSql() {
|
||||
const sql = this.props.sql || '';
|
||||
let lines = sql.split('\n');
|
||||
const ssql = this.props.sql || '';
|
||||
let lines = ssql.split('\n');
|
||||
if (lines.length >= this.props.maxLines) {
|
||||
lines = lines.slice(0, this.props.maxLines);
|
||||
lines.push('{...}');
|
||||
@@ -52,7 +58,7 @@ class HighlightedSql extends React.Component {
|
||||
if (this.props.rawSql && this.props.rawSql !== this.props.sql) {
|
||||
rawSql = (
|
||||
<div>
|
||||
<h4>Raw SQL</h4>
|
||||
<h4>{t('Raw SQL')}</h4>
|
||||
<SyntaxHighlighter language="sql" style={github}>
|
||||
{this.props.rawSql}
|
||||
</SyntaxHighlighter>
|
||||
@@ -62,7 +68,7 @@ class HighlightedSql extends React.Component {
|
||||
this.setState({
|
||||
modalBody: (
|
||||
<div>
|
||||
<h4>Source SQL</h4>
|
||||
<h4>{t('Source SQL')}</h4>
|
||||
<SyntaxHighlighter language="sql" style={github}>
|
||||
{this.props.sql}
|
||||
</SyntaxHighlighter>
|
||||
@@ -74,7 +80,7 @@ class HighlightedSql extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<ModalTrigger
|
||||
modalTitle="SQL"
|
||||
modalTitle={t('SQL')}
|
||||
triggerNode={this.triggerNode()}
|
||||
modalBody={this.state.modalBody}
|
||||
beforeOpen={this.generateModal.bind(this)}
|
||||
|
||||
@@ -36,7 +36,7 @@ class QueryAutoRefresh extends React.PureComponent {
|
||||
stopwatch() {
|
||||
// only poll /superset/queries/ if there are started or running queries
|
||||
if (this.shouldCheckForQueries()) {
|
||||
const url = '/superset/queries/' + (this.props.queriesLastUpdate - QUERY_UPDATE_BUFFER_MS);
|
||||
const url = `/superset/queries/${this.props.queriesLastUpdate - QUERY_UPDATE_BUFFER_MS}`;
|
||||
$.getJSON(url, (data) => {
|
||||
if (Object.keys(data).length > 0) {
|
||||
this.props.actions.refreshQueries(data);
|
||||
|
||||
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import { Alert } from 'react-bootstrap';
|
||||
|
||||
import QueryTable from './QueryTable';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
queries: PropTypes.array.isRequired,
|
||||
@@ -24,7 +25,7 @@ const QueryHistory = (props) => {
|
||||
}
|
||||
return (
|
||||
<Alert bsStyle="info">
|
||||
No query history yet...
|
||||
{t('No query history yet...')}
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ import { now, epochTimeXHoursAgo,
|
||||
epochTimeXDaysAgo, epochTimeXYearsAgo } from '../../modules/dates';
|
||||
import { STATUS_OPTIONS, TIME_OPTIONS } from '../constants';
|
||||
import AsyncSelect from '../../components/AsyncSelect';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
@@ -102,7 +103,7 @@ class QuerySearch extends React.PureComponent {
|
||||
if (data.result.length === 0) {
|
||||
this.props.actions.addAlert({
|
||||
bsStyle: 'danger',
|
||||
msg: "It seems you don't have access to any database",
|
||||
msg: t('It seems you don\'t have access to any database'),
|
||||
});
|
||||
}
|
||||
return options;
|
||||
@@ -150,44 +151,43 @@ class QuerySearch extends React.PureComponent {
|
||||
type="text"
|
||||
onChange={this.changeSearch.bind(this)}
|
||||
className="form-control input-sm"
|
||||
placeholder="Search Results"
|
||||
placeholder={t('Search Results')}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-sm-1">
|
||||
<div className="col-sm-4 search-date-filter-container">
|
||||
<Select
|
||||
name="select-from"
|
||||
placeholder="[From]-"
|
||||
placeholder={t('[From]-')}
|
||||
options={TIME_OPTIONS
|
||||
.slice(1, TIME_OPTIONS.length).map(t => ({ value: t, label: t }))}
|
||||
.slice(1, TIME_OPTIONS.length).map(xt => ({ value: xt, label: xt }))}
|
||||
value={this.state.from}
|
||||
autosize={false}
|
||||
onChange={this.changeFrom.bind(this)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-sm-1">
|
||||
|
||||
<Select
|
||||
name="select-to"
|
||||
placeholder="[To]-"
|
||||
options={TIME_OPTIONS.map(t => ({ value: t, label: t }))}
|
||||
placeholder={t('[To]-')}
|
||||
options={TIME_OPTIONS.map(xt => ({ value: xt, label: xt }))}
|
||||
value={this.state.to}
|
||||
autosize={false}
|
||||
onChange={this.changeTo.bind(this)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-sm-1">
|
||||
|
||||
<Select
|
||||
name="select-status"
|
||||
placeholder="[Query Status]"
|
||||
placeholder={t('[Query Status]')}
|
||||
options={STATUS_OPTIONS.map(s => ({ value: s, label: s }))}
|
||||
value={this.state.status}
|
||||
isLoading={false}
|
||||
autosize={false}
|
||||
onChange={this.changeStatus.bind(this)}
|
||||
/>
|
||||
|
||||
<Button bsSize="small" bsStyle="success" onClick={this.refreshQueries.bind(this)}>
|
||||
{t('Search')}
|
||||
</Button>
|
||||
</div>
|
||||
<Button bsSize="small" bsStyle="success" onClick={this.refreshQueries.bind(this)}>
|
||||
Search
|
||||
</Button>
|
||||
</div>
|
||||
{this.state.queriesLoading ?
|
||||
(<img className="loading" alt="Loading..." src="/static/assets/images/loading.gif" />)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Label } from 'react-bootstrap';
|
||||
|
||||
import { STATE_BSSTYLE_MAP } from '../constants';
|
||||
|
||||
const propTypes = {
|
||||
query: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default function QueryStateLabel({ query }) {
|
||||
const bsStyle = STATE_BSSTYLE_MAP[query.state];
|
||||
return (
|
||||
<Label className="m-r-3" bsStyle={bsStyle}>
|
||||
{query.state}
|
||||
</Label>
|
||||
);
|
||||
}
|
||||
QueryStateLabel.propTypes = propTypes;
|
||||
@@ -9,9 +9,10 @@ import VisualizeModal from './VisualizeModal';
|
||||
import ResultSet from './ResultSet';
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
import HighlightedSql from './HighlightedSql';
|
||||
import { STATE_BSSTYLE_MAP } from '../constants';
|
||||
import { fDuration } from '../../modules/dates';
|
||||
import { storeQuery } from '../../../utils/common';
|
||||
import QueryStateLabel from './QueryStateLabel';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
columns: PropTypes.array,
|
||||
@@ -45,7 +46,7 @@ class QueryTable extends React.PureComponent {
|
||||
openQuery(dbId, schema, sql) {
|
||||
const newQuery = {
|
||||
dbId,
|
||||
title: 'Untitled Query',
|
||||
title: t('Untitled Query'),
|
||||
schema,
|
||||
sql,
|
||||
};
|
||||
@@ -110,7 +111,7 @@ class QueryTable extends React.PureComponent {
|
||||
className="btn btn-link btn-xs"
|
||||
onClick={this.openQuery.bind(this, q.dbId, q.schema, q.sql)}
|
||||
>
|
||||
<i className="fa fa-external-link" />Open in SQL Editor
|
||||
<i className="fa fa-external-link" />{t('Open in SQL Editor')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
@@ -129,10 +130,10 @@ class QueryTable extends React.PureComponent {
|
||||
bsStyle="info"
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
view results
|
||||
{t('view results')}
|
||||
</Label>
|
||||
)}
|
||||
modalTitle={'Data preview'}
|
||||
modalTitle={t('Data preview')}
|
||||
beforeOpen={this.openAsyncResults.bind(this, query)}
|
||||
onExit={this.clearQueryResults.bind(this, query)}
|
||||
modalBody={
|
||||
@@ -164,9 +165,7 @@ class QueryTable extends React.PureComponent {
|
||||
}
|
||||
q.state = (
|
||||
<div>
|
||||
<span className={'m-r-3 label label-' + STATE_BSSTYLE_MAP[q.state]}>
|
||||
{q.state}
|
||||
</span>
|
||||
<QueryStateLabel query={query} />
|
||||
{errorTooltip}
|
||||
</div>
|
||||
);
|
||||
@@ -174,24 +173,24 @@ class QueryTable extends React.PureComponent {
|
||||
<div style={{ width: '75px' }}>
|
||||
<Link
|
||||
className="fa fa-line-chart m-r-3"
|
||||
tooltip="Visualize the data out of this query"
|
||||
tooltip={t('Visualize the data out of this query')}
|
||||
onClick={this.showVisualizeModal.bind(this, query)}
|
||||
/>
|
||||
<Link
|
||||
className="fa fa-pencil m-r-3"
|
||||
onClick={this.restoreSql.bind(this, query)}
|
||||
tooltip="Overwrite text in editor with a query on this table"
|
||||
tooltip={t('Overwrite text in editor with a query on this table')}
|
||||
placement="top"
|
||||
/>
|
||||
<Link
|
||||
className="fa fa-plus-circle m-r-3"
|
||||
onClick={this.openQueryInNewTab.bind(this, query)}
|
||||
tooltip="Run query in a new tab"
|
||||
tooltip={t('Run query in a new tab')}
|
||||
placement="top"
|
||||
/>
|
||||
<Link
|
||||
className="fa fa-trash m-r-3"
|
||||
tooltip="Remove query from log"
|
||||
tooltip={t('Remove query from log')}
|
||||
onClick={this.removeQuery.bind(this, query)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,8 @@ import shortid from 'shortid';
|
||||
import VisualizeModal from './VisualizeModal';
|
||||
import HighlightedSql from './HighlightedSql';
|
||||
import FilterableTable from '../../components/FilterableTable/FilterableTable';
|
||||
import QueryStateLabel from './QueryStateLabel';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object,
|
||||
@@ -26,7 +28,7 @@ const defaultProps = {
|
||||
cache: false,
|
||||
};
|
||||
|
||||
const RESULT_SET_CONTROLS_HEIGHT = 46;
|
||||
const SEARCH_HEIGHT = 46;
|
||||
|
||||
export default class ResultSet extends React.PureComponent {
|
||||
constructor(props) {
|
||||
@@ -34,8 +36,7 @@ export default class ResultSet extends React.PureComponent {
|
||||
this.state = {
|
||||
searchText: '',
|
||||
showModal: false,
|
||||
data: [],
|
||||
height: props.search ? props.height - RESULT_SET_CONTROLS_HEIGHT : props.height,
|
||||
data: null,
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
@@ -63,7 +64,7 @@ export default class ResultSet extends React.PureComponent {
|
||||
if (this.props.csv) {
|
||||
csvButton = (
|
||||
<Button bsSize="small" href={'/superset/csv/' + this.props.query.id}>
|
||||
<i className="fa fa-file-text-o" /> .CSV
|
||||
<i className="fa fa-file-text-o" /> {t('.CSV')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -74,7 +75,7 @@ export default class ResultSet extends React.PureComponent {
|
||||
bsSize="small"
|
||||
onClick={this.showModal.bind(this)}
|
||||
>
|
||||
<i className="fa fa-line-chart m-l-1" /> Visualize
|
||||
<i className="fa fa-line-chart m-l-1" /> {t('Visualize')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -85,7 +86,7 @@ export default class ResultSet extends React.PureComponent {
|
||||
type="text"
|
||||
onChange={this.changeSearch.bind(this)}
|
||||
className="form-control input-sm"
|
||||
placeholder="Search Results"
|
||||
placeholder={t('Search Results')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -143,58 +144,41 @@ export default class ResultSet extends React.PureComponent {
|
||||
}
|
||||
render() {
|
||||
const query = this.props.query;
|
||||
const results = query.results;
|
||||
let data;
|
||||
if (this.props.cache && query.cached) {
|
||||
data = this.state.data;
|
||||
} else {
|
||||
data = results ? results.data : [];
|
||||
}
|
||||
|
||||
const height = this.props.search ? this.props.height - SEARCH_HEIGHT : this.props.height;
|
||||
let sql;
|
||||
|
||||
if (query.state === 'stopped') {
|
||||
return <Alert bsStyle="warning">Query was stopped</Alert>;
|
||||
}
|
||||
|
||||
if (this.props.showSql) {
|
||||
sql = <HighlightedSql sql={query.sql} />;
|
||||
}
|
||||
if (['running', 'pending', 'fetching'].indexOf(query.state) > -1) {
|
||||
let progressBar;
|
||||
if (query.progress > 0 && query.state === 'running') {
|
||||
progressBar = (
|
||||
<ProgressBar
|
||||
striped
|
||||
now={query.progress}
|
||||
label={`${query.progress}%`}
|
||||
/>);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<img className="loading" alt="Loading..." src="/static/assets/images/loading.gif" />
|
||||
{progressBar}
|
||||
</div>
|
||||
);
|
||||
|
||||
if (query.state === 'stopped') {
|
||||
return <Alert bsStyle="warning">Query was stopped</Alert>;
|
||||
} else if (query.state === 'failed') {
|
||||
return <Alert bsStyle="danger">{query.errorMessage}</Alert>;
|
||||
} else if (query.state === 'success' && query.ctas) {
|
||||
return (
|
||||
<div>
|
||||
<Alert bsStyle="info">
|
||||
Table [<strong>{query.tempTable}</strong>] was
|
||||
created
|
||||
{t('Table')} [<strong>{query.tempTable}</strong>] {t('was ' +
|
||||
'created')}
|
||||
<Button
|
||||
bsSize="small"
|
||||
className="m-r-5"
|
||||
onClick={this.popSelectStar.bind(this)}
|
||||
>
|
||||
Query in a new tab
|
||||
{t('Query in a new tab')}
|
||||
</Button>
|
||||
</Alert>
|
||||
</div>);
|
||||
} else if (query.state === 'success') {
|
||||
if (results && data && data.length > 0) {
|
||||
const results = query.results;
|
||||
let data;
|
||||
if (this.props.cache && query.cached) {
|
||||
data = this.state.data;
|
||||
} else if (results && results.data) {
|
||||
data = results.data;
|
||||
}
|
||||
if (data && data.length > 0) {
|
||||
return (
|
||||
<div>
|
||||
<VisualizeModal
|
||||
@@ -207,11 +191,13 @@ export default class ResultSet extends React.PureComponent {
|
||||
<FilterableTable
|
||||
data={data}
|
||||
orderedColumnKeys={results.columns.map(col => col.name)}
|
||||
height={this.state.height}
|
||||
height={height}
|
||||
filterText={this.state.searchText}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
} else if (data && data.length === 0) {
|
||||
return <Alert bsStyle="warning">The query returned no data</Alert>;
|
||||
}
|
||||
}
|
||||
if (query.cached) {
|
||||
@@ -221,11 +207,40 @@ export default class ResultSet extends React.PureComponent {
|
||||
bsStyle="primary"
|
||||
onClick={this.reFetchQueryResults.bind(this, query)}
|
||||
>
|
||||
Fetch data preview
|
||||
{t('Fetch data preview')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
return <Alert bsStyle="warning">The query returned no data</Alert>;
|
||||
let progressBar;
|
||||
let trackingUrl;
|
||||
if (query.progress > 0 && query.state === 'running') {
|
||||
progressBar = (
|
||||
<ProgressBar
|
||||
striped
|
||||
now={query.progress}
|
||||
label={`${query.progress}%`}
|
||||
/>);
|
||||
}
|
||||
if (query.trackingUrl) {
|
||||
trackingUrl = (
|
||||
<Button
|
||||
bsSize="small"
|
||||
onClick={() => { window.open(query.trackingUrl); }}
|
||||
>
|
||||
{t('Track Job')}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<img className="loading" alt={t('Loading...')} src="/static/assets/images/loading.gif" />
|
||||
<QueryStateLabel query={query} />
|
||||
{progressBar}
|
||||
<div>
|
||||
{trackingUrl}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
ResultSet.propTypes = propTypes;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Button from '../../components/Button';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
allowAsync: PropTypes.bool.isRequired,
|
||||
dbId: PropTypes.number,
|
||||
queryState: PropTypes.string.isRequired,
|
||||
queryState: PropTypes.string,
|
||||
runQuery: PropTypes.func.isRequired,
|
||||
selectedText: PropTypes.string,
|
||||
stopQuery: PropTypes.func.isRequired,
|
||||
@@ -15,10 +16,9 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
export default function RunQueryActionButton(props) {
|
||||
const runBtnText = props.selectedText ? 'Run Selected Query' : 'Run Query';
|
||||
const runBtnText = props.selectedText ? t('Run Selected Query') : t('Run Query');
|
||||
const btnStyle = props.selectedText ? 'warning' : 'primary';
|
||||
const shouldShowStopBtn = ['running', 'pending'].indexOf(props.queryState) > -1;
|
||||
const asyncToolTip = 'Run query asynchronously';
|
||||
|
||||
const commonBtnProps = {
|
||||
bsSize: 'small',
|
||||
@@ -31,6 +31,7 @@ export default function RunQueryActionButton(props) {
|
||||
{...commonBtnProps}
|
||||
onClick={() => props.runQuery(false)}
|
||||
key="run-btn"
|
||||
tooltip={t('Run query synchronously')}
|
||||
>
|
||||
<i className="fa fa-refresh" /> {runBtnText}
|
||||
</Button>
|
||||
@@ -41,7 +42,7 @@ export default function RunQueryActionButton(props) {
|
||||
{...commonBtnProps}
|
||||
onClick={() => props.runQuery(true)}
|
||||
key="run-async-btn"
|
||||
tooltip={asyncToolTip}
|
||||
tooltip={t('Run query asynchronously')}
|
||||
>
|
||||
<i className="fa fa-table" /> {runBtnText}
|
||||
</Button>
|
||||
@@ -52,7 +53,7 @@ export default function RunQueryActionButton(props) {
|
||||
{...commonBtnProps}
|
||||
onClick={props.stopQuery}
|
||||
>
|
||||
<i className="fa fa-stop" /> Stop
|
||||
<i className="fa fa-stop" /> {t('Stop')}
|
||||
</Button>
|
||||
);
|
||||
|
||||
@@ -64,12 +65,7 @@ export default function RunQueryActionButton(props) {
|
||||
} else {
|
||||
button = syncBtn;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="inline m-r-5 pull-left">
|
||||
{button}
|
||||
</div>
|
||||
);
|
||||
return button;
|
||||
}
|
||||
|
||||
RunQueryActionButton.propTypes = propTypes;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* global notify */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormControl, FormGroup, Overlay, Popover, Row, Col } from 'react-bootstrap';
|
||||
import Button from '../../components/Button';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
defaultLabel: PropTypes.string,
|
||||
@@ -13,7 +13,7 @@ const propTypes = {
|
||||
onSave: PropTypes.func,
|
||||
};
|
||||
const defaultProps = {
|
||||
defaultLabel: 'Undefined',
|
||||
defaultLabel: t('Undefined'),
|
||||
animation: true,
|
||||
onSave: () => {},
|
||||
};
|
||||
@@ -63,12 +63,12 @@ class SaveQuery extends React.PureComponent {
|
||||
<Col md={12}>
|
||||
<small>
|
||||
<label className="control-label" htmlFor="embed-height">
|
||||
Label
|
||||
{t('Label')}
|
||||
</label>
|
||||
</small>
|
||||
<FormControl
|
||||
type="text"
|
||||
placeholder="Label for your query"
|
||||
placeholder={t('Label for your query')}
|
||||
value={this.state.label}
|
||||
onChange={this.onLabelChange}
|
||||
/>
|
||||
@@ -78,11 +78,11 @@ class SaveQuery extends React.PureComponent {
|
||||
<Row>
|
||||
<Col md={12}>
|
||||
<small>
|
||||
<label className="control-label" htmlFor="embed-height">Description</label>
|
||||
<label className="control-label" htmlFor="embed-height">{t('Description')}</label>
|
||||
</small>
|
||||
<FormControl
|
||||
componentClass="textarea"
|
||||
placeholder="Write a description for your query"
|
||||
placeholder={t('Write a description for your query')}
|
||||
value={this.state.description}
|
||||
onChange={this.onDescriptionChange}
|
||||
/>
|
||||
@@ -96,10 +96,10 @@ class SaveQuery extends React.PureComponent {
|
||||
onClick={this.onSave}
|
||||
className="m-r-3"
|
||||
>
|
||||
Save
|
||||
{t('Save')}
|
||||
</Button>
|
||||
<Button onClick={this.onCancel} className="cancelQuery">
|
||||
Cancel
|
||||
{t('Cancel')}
|
||||
</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -112,7 +112,6 @@ class SaveQuery extends React.PureComponent {
|
||||
<span className="SaveQuery">
|
||||
<Overlay
|
||||
trigger="click"
|
||||
target={this.state.target}
|
||||
show={this.state.showSave}
|
||||
placement="bottom"
|
||||
animation={this.props.animation}
|
||||
@@ -120,7 +119,7 @@ class SaveQuery extends React.PureComponent {
|
||||
{this.renderPopover()}
|
||||
</Overlay>
|
||||
<Button bsSize="small" className="toggleSave" onClick={this.toggleSave}>
|
||||
<i className="fa fa-save" /> Save Query
|
||||
<i className="fa fa-save" /> {t('Save Query')}
|
||||
</Button>
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@ import { bindActionCreators } from 'redux';
|
||||
import * as Actions from '../actions';
|
||||
import QueryHistory from './QueryHistory';
|
||||
import ResultSet from './ResultSet';
|
||||
import { t } from '../../locales';
|
||||
|
||||
/*
|
||||
editorQueries are queries executed by users passed from SqlEditor component
|
||||
@@ -18,6 +19,7 @@ const propTypes = {
|
||||
dataPreviewQueries: PropTypes.array.isRequired,
|
||||
actions: PropTypes.object.isRequired,
|
||||
activeSouthPaneTab: PropTypes.string,
|
||||
height: PropTypes.number,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
@@ -25,40 +27,11 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
class SouthPane extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
innerTabHeight: this.getInnerTabHeight(),
|
||||
};
|
||||
}
|
||||
getInnerTabHeight() {
|
||||
// hack to get height the tab container so it can be fixed and scroll in place
|
||||
// calculate inner tab height
|
||||
|
||||
// document.getElementById('brace-editor').getBoundingClientRect().height;
|
||||
const sqlEditorHeight = 192;
|
||||
|
||||
// document.getElementById('js-sql-toolbar').getBoundingClientRect().height;
|
||||
const sqlToolbar = 30;
|
||||
|
||||
// document.getElementsByClassName('nav-tabs')[0].getBoundingClientRect().height * 2;
|
||||
const tabsHeight = 88;
|
||||
|
||||
// document.getElementsByTagName('header')[0].getBoundingClientRect().height;
|
||||
const headerHeight = 59;
|
||||
|
||||
const sum =
|
||||
sqlEditorHeight +
|
||||
sqlToolbar +
|
||||
tabsHeight +
|
||||
headerHeight;
|
||||
|
||||
return window.innerHeight - sum - 95;
|
||||
}
|
||||
switchTab(id) {
|
||||
this.props.actions.setActiveSouthPaneTab(id);
|
||||
}
|
||||
render() {
|
||||
const innerTabHeight = this.props.height - 55;
|
||||
let latestQuery;
|
||||
const props = this.props;
|
||||
if (props.editorQueries.length > 0) {
|
||||
@@ -72,16 +45,16 @@ class SouthPane extends React.PureComponent {
|
||||
search
|
||||
query={latestQuery}
|
||||
actions={props.actions}
|
||||
height={this.state.innerTabHeight}
|
||||
height={innerTabHeight}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
results = <Alert bsStyle="info">Run a query to display results here</Alert>;
|
||||
results = <Alert bsStyle="info">{t('Run a query to display results here')}</Alert>;
|
||||
}
|
||||
|
||||
const dataPreviewTabs = props.dataPreviewQueries.map(query => (
|
||||
<Tab
|
||||
title={`Preview for ${query.tableName}`}
|
||||
title={t('Preview for %s', query.tableName)}
|
||||
eventKey={query.id}
|
||||
key={query.id}
|
||||
>
|
||||
@@ -91,7 +64,7 @@ class SouthPane extends React.PureComponent {
|
||||
csv={false}
|
||||
actions={props.actions}
|
||||
cache
|
||||
height={this.state.innerTabHeight}
|
||||
height={innerTabHeight}
|
||||
/>
|
||||
</Tab>
|
||||
));
|
||||
@@ -105,16 +78,16 @@ class SouthPane extends React.PureComponent {
|
||||
onSelect={this.switchTab.bind(this)}
|
||||
>
|
||||
<Tab
|
||||
title="Results"
|
||||
title={t('Results')}
|
||||
eventKey="Results"
|
||||
>
|
||||
{results}
|
||||
</Tab>
|
||||
<Tab
|
||||
title="Query History"
|
||||
title={t('Query History')}
|
||||
eventKey="History"
|
||||
>
|
||||
<div style={{ height: `${this.state.innerTabHeight}px`, overflow: 'scroll' }}>
|
||||
<div style={{ height: `${innerTabHeight}px`, overflow: 'scroll' }}>
|
||||
<QueryHistory queries={props.editorQueries} actions={props.actions} />
|
||||
</div>
|
||||
</Tab>
|
||||
|
||||
@@ -12,9 +12,9 @@ import {
|
||||
Tooltip,
|
||||
Collapse,
|
||||
} from 'react-bootstrap';
|
||||
import SplitPane from 'react-split-pane';
|
||||
|
||||
import Button from '../../components/Button';
|
||||
|
||||
import SouthPane from './SouthPane';
|
||||
import SaveQuery from './SaveQuery';
|
||||
import Timer from '../../components/Timer';
|
||||
@@ -22,6 +22,7 @@ import SqlEditorLeftBar from './SqlEditorLeftBar';
|
||||
import AceEditorWrapper from './AceEditorWrapper';
|
||||
import { STATE_BSSTYLE_MAP } from '../constants';
|
||||
import RunQueryActionButton from './RunQueryActionButton';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object.isRequired,
|
||||
@@ -50,20 +51,35 @@ class SqlEditor extends React.PureComponent {
|
||||
ctas: '',
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
this.onMount();
|
||||
}
|
||||
onMount() {
|
||||
componentWillMount() {
|
||||
if (this.state.autorun) {
|
||||
this.setState({ autorun: false });
|
||||
this.props.actions.queryEditorSetAutorun(this.props.queryEditor, false);
|
||||
this.startQuery();
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
this.onResize();
|
||||
}
|
||||
onResize() {
|
||||
const height = this.sqlEditorHeight();
|
||||
this.setState({
|
||||
editorPaneHeight: this.refs.ace.clientHeight,
|
||||
southPaneHeight: height - this.refs.ace.clientHeight,
|
||||
height,
|
||||
});
|
||||
|
||||
if (this.refs.ace.clientHeight) {
|
||||
this.props.actions.persistEditorHeight(this.props.queryEditor, this.refs.ace.clientHeight);
|
||||
}
|
||||
}
|
||||
setQueryEditorSql(sql) {
|
||||
this.props.actions.queryEditorSetSql(this.props.queryEditor, sql);
|
||||
}
|
||||
runQuery(runAsync = false) {
|
||||
if (!this.props.queryEditor.sql) {
|
||||
return;
|
||||
}
|
||||
let effectiveRunAsync = runAsync;
|
||||
if (!this.props.database.allow_run_sync) {
|
||||
effectiveRunAsync = true;
|
||||
@@ -101,27 +117,10 @@ class SqlEditor extends React.PureComponent {
|
||||
const mysteryVerticalHeight = 50;
|
||||
return window.innerHeight - tabNavHeight - navBarHeight - mysteryVerticalHeight;
|
||||
}
|
||||
|
||||
render() {
|
||||
const qe = this.props.queryEditor;
|
||||
let limitWarning = null;
|
||||
if (this.props.latestQuery && this.props.latestQuery.limit_reached) {
|
||||
const tooltip = (
|
||||
<Tooltip id="tooltip">
|
||||
It appears that the number of rows in the query results displayed
|
||||
was limited on the server side to
|
||||
the {this.props.latestQuery.rows} limit.
|
||||
</Tooltip>
|
||||
);
|
||||
limitWarning = (
|
||||
<OverlayTrigger placement="left" overlay={tooltip}>
|
||||
<Label bsStyle="warning" className="m-r-5">LIMIT</Label>
|
||||
</OverlayTrigger>
|
||||
);
|
||||
}
|
||||
renderEditorBottomBar() {
|
||||
let ctasControls;
|
||||
if (this.props.database && this.props.database.allow_ctas) {
|
||||
const ctasToolTip = 'Create table as with query results';
|
||||
const ctasToolTip = t('Create table as with query results');
|
||||
ctasControls = (
|
||||
<FormGroup>
|
||||
<InputGroup>
|
||||
@@ -129,7 +128,7 @@ class SqlEditor extends React.PureComponent {
|
||||
type="text"
|
||||
bsSize="small"
|
||||
className="input-sm"
|
||||
placeholder="new table name"
|
||||
placeholder={t('new table name')}
|
||||
onChange={this.ctasChanged.bind(this)}
|
||||
/>
|
||||
<InputGroup.Button>
|
||||
@@ -146,25 +145,46 @@ class SqlEditor extends React.PureComponent {
|
||||
</FormGroup>
|
||||
);
|
||||
}
|
||||
const editorBottomBar = (
|
||||
const qe = this.props.queryEditor;
|
||||
let limitWarning = null;
|
||||
if (this.props.latestQuery && this.props.latestQuery.limit_reached) {
|
||||
const tooltip = (
|
||||
<Tooltip id="tooltip">
|
||||
It appears that the number of rows in the query results displayed
|
||||
was limited on the server side to
|
||||
the {this.props.latestQuery.rows} limit.
|
||||
</Tooltip>
|
||||
);
|
||||
limitWarning = (
|
||||
<OverlayTrigger placement="left" overlay={tooltip}>
|
||||
<Label bsStyle="warning" className="m-r-5">LIMIT</Label>
|
||||
</OverlayTrigger>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className="sql-toolbar clearfix" id="js-sql-toolbar">
|
||||
<div className="pull-left">
|
||||
<Form inline>
|
||||
<RunQueryActionButton
|
||||
allowAsync={this.props.database ? this.props.database.allow_run_async : false}
|
||||
dbId={qe.dbId}
|
||||
queryState={this.props.latestQuery && this.props.latestQuery.state}
|
||||
runQuery={this.runQuery.bind(this)}
|
||||
selectedText={qe.selectedText}
|
||||
stopQuery={this.stopQuery.bind(this)}
|
||||
/>
|
||||
<SaveQuery
|
||||
defaultLabel={qe.title}
|
||||
sql={qe.sql}
|
||||
onSave={this.props.actions.saveQuery}
|
||||
schema={qe.schema}
|
||||
dbId={qe.dbId}
|
||||
/>
|
||||
<span className="m-r-5">
|
||||
<RunQueryActionButton
|
||||
allowAsync={this.props.database ? this.props.database.allow_run_async : false}
|
||||
dbId={qe.dbId}
|
||||
queryState={this.props.latestQuery && this.props.latestQuery.state}
|
||||
runQuery={this.runQuery.bind(this)}
|
||||
selectedText={qe.selectedText}
|
||||
stopQuery={this.stopQuery.bind(this)}
|
||||
/>
|
||||
</span>
|
||||
<span className="m-r-5">
|
||||
<SaveQuery
|
||||
defaultLabel={qe.title}
|
||||
sql={qe.sql}
|
||||
className="m-r-5"
|
||||
onSave={this.props.actions.saveQuery}
|
||||
schema={qe.schema}
|
||||
dbId={qe.dbId}
|
||||
/>
|
||||
</span>
|
||||
{ctasControls}
|
||||
</Form>
|
||||
</div>
|
||||
@@ -181,11 +201,15 @@ class SqlEditor extends React.PureComponent {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const height = this.sqlEditorHeight();
|
||||
const defaultNorthHeight = this.props.queryEditor.height || 200;
|
||||
return (
|
||||
<div
|
||||
className="SqlEditor"
|
||||
style={{
|
||||
minHeight: this.sqlEditorHeight(),
|
||||
minHeight: height,
|
||||
height: this.props.height,
|
||||
}}
|
||||
>
|
||||
@@ -200,7 +224,7 @@ class SqlEditor extends React.PureComponent {
|
||||
lg={3}
|
||||
>
|
||||
<SqlEditorLeftBar
|
||||
height={this.sqlEditorHeight()}
|
||||
height={height}
|
||||
queryEditor={this.props.queryEditor}
|
||||
tables={this.props.tables}
|
||||
actions={this.props.actions}
|
||||
@@ -212,22 +236,37 @@ class SqlEditor extends React.PureComponent {
|
||||
sm={this.props.hideLeftBar ? 12 : 7}
|
||||
md={this.props.hideLeftBar ? 12 : 8}
|
||||
lg={this.props.hideLeftBar ? 12 : 9}
|
||||
style={{ height: this.state.height }}
|
||||
>
|
||||
<AceEditorWrapper
|
||||
actions={this.props.actions}
|
||||
onBlur={this.setQueryEditorSql.bind(this)}
|
||||
queryEditor={this.props.queryEditor}
|
||||
onAltEnter={this.runQuery.bind(this)}
|
||||
sql={this.props.queryEditor.sql}
|
||||
tables={this.props.tables}
|
||||
/>
|
||||
{editorBottomBar}
|
||||
<br />
|
||||
<SouthPane
|
||||
editorQueries={this.props.editorQueries}
|
||||
dataPreviewQueries={this.props.dataPreviewQueries}
|
||||
actions={this.props.actions}
|
||||
/>
|
||||
<SplitPane
|
||||
split="horizontal"
|
||||
defaultSize={defaultNorthHeight}
|
||||
minSize={100}
|
||||
onChange={this.onResize.bind(this)}
|
||||
>
|
||||
<div ref="ace" style={{ width: '100%' }}>
|
||||
<div>
|
||||
<AceEditorWrapper
|
||||
actions={this.props.actions}
|
||||
onBlur={this.setQueryEditorSql.bind(this)}
|
||||
queryEditor={this.props.queryEditor}
|
||||
onAltEnter={this.runQuery.bind(this)}
|
||||
sql={this.props.queryEditor.sql}
|
||||
tables={this.props.tables}
|
||||
height={((this.state.editorPaneHeight || defaultNorthHeight) - 50).toString()}
|
||||
/>
|
||||
{this.renderEditorBottomBar()}
|
||||
</div>
|
||||
</div>
|
||||
<div ref="south">
|
||||
<SouthPane
|
||||
editorQueries={this.props.editorQueries}
|
||||
dataPreviewQueries={this.props.dataPreviewQueries}
|
||||
actions={this.props.actions}
|
||||
height={this.state.southPaneHeight}
|
||||
/>
|
||||
</div>
|
||||
</SplitPane>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import createFilterOptions from 'react-select-fast-filter-options';
|
||||
|
||||
import TableElement from './TableElement';
|
||||
import AsyncSelect from '../../components/AsyncSelect';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
@@ -62,7 +63,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
if (data.result.length === 0) {
|
||||
this.props.actions.addAlert({
|
||||
bsStyle: 'danger',
|
||||
msg: "It seems you don't have access to any database",
|
||||
msg: t('It seems you don\'t have access to any database'),
|
||||
});
|
||||
}
|
||||
return options;
|
||||
@@ -75,7 +76,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
if (dbId && schema) {
|
||||
this.setState({ tableLoading: true, tableOptions: [] });
|
||||
const url = `/superset/tables/${dbId}/${schema}/${substr}/`;
|
||||
$.get(url, (data) => {
|
||||
$.get(url).done((data) => {
|
||||
const filterOptions = createFilterOptions({ options: data.options });
|
||||
this.setState({
|
||||
filterOptions,
|
||||
@@ -86,7 +87,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
})
|
||||
.fail(() => {
|
||||
this.setState({ tableLoading: false, tableOptions: [], tableLength: 0 });
|
||||
notify.error('Error while fetching table list');
|
||||
notify.error(t('Error while fetching table list'));
|
||||
});
|
||||
} else {
|
||||
this.setState({ tableLoading: false, tableOptions: [], filterOptions: null });
|
||||
@@ -121,13 +122,13 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
if (actualDbId) {
|
||||
this.setState({ schemaLoading: true });
|
||||
const url = `/superset/schemas/${actualDbId}/`;
|
||||
$.get(url, (data) => {
|
||||
$.get(url).done((data) => {
|
||||
const schemaOptions = data.schemas.map(s => ({ value: s, label: s }));
|
||||
this.setState({ schemaOptions, schemaLoading: false });
|
||||
})
|
||||
.fail(() => {
|
||||
this.setState({ schemaLoading: false, schemaOptions: [] });
|
||||
notify.error('Error while fetching schema list');
|
||||
notify.error(t('Error while fetching schema list'));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -145,33 +146,33 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
dataEndpoint={
|
||||
'/databaseasync/api/' +
|
||||
'read?_flt_0_expose_in_sqllab=1&' +
|
||||
'_oc_DatabaseView=database_name&' +
|
||||
'_od_DatabaseView=asc'
|
||||
'_oc_DatabaseAsync=database_name&' +
|
||||
'_od_DatabaseAsync=asc'
|
||||
}
|
||||
onChange={this.onDatabaseChange.bind(this)}
|
||||
onAsyncError={() => notify.error('Error while fetching database list')}
|
||||
onAsyncError={() => notify.error(t('Error while fetching database list'))}
|
||||
value={this.props.queryEditor.dbId}
|
||||
databaseId={this.props.queryEditor.dbId}
|
||||
actions={this.props.actions}
|
||||
valueRenderer={o => (
|
||||
<div>
|
||||
<span className="text-muted">Database:</span> {o.label}
|
||||
<span className="text-muted">{t('Database:')}</span> {o.label}
|
||||
</div>
|
||||
)}
|
||||
mutator={this.dbMutator.bind(this)}
|
||||
placeholder="Select a database"
|
||||
placeholder={t('Select a database')}
|
||||
autoSelect
|
||||
/>
|
||||
</div>
|
||||
<div className="m-t-5">
|
||||
<Select
|
||||
name="select-schema"
|
||||
placeholder={`Select a schema (${this.state.schemaOptions.length})`}
|
||||
placeholder={t('Select a schema (%s)', this.state.schemaOptions.length)}
|
||||
options={this.state.schemaOptions}
|
||||
value={this.props.queryEditor.schema}
|
||||
valueRenderer={o => (
|
||||
<div>
|
||||
<span className="text-muted">Schema:</span> {o.label}
|
||||
<span className="text-muted">{t('Schema:')}</span> {o.label}
|
||||
</div>
|
||||
)}
|
||||
isLoading={this.state.schemaLoading}
|
||||
@@ -186,7 +187,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
ref="selectTable"
|
||||
isLoading={this.state.tableLoading}
|
||||
value={this.state.tableName}
|
||||
placeholder={`Add a table (${this.state.tableOptions.length})`}
|
||||
placeholder={t('Add a table (%s)', this.state.tableOptions.length)}
|
||||
autosize={false}
|
||||
onChange={this.changeTable.bind(this)}
|
||||
filterOptions={this.state.filterOptions}
|
||||
@@ -199,7 +200,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
name="async-select-table"
|
||||
ref="selectTable"
|
||||
value={this.state.tableName}
|
||||
placeholder={'Type to search ...'}
|
||||
placeholder={t('Type to search ...')}
|
||||
autosize={false}
|
||||
onChange={this.changeTable.bind(this)}
|
||||
loadOptions={this.getTableNamesBySubStr.bind(this)}
|
||||
@@ -222,7 +223,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
</div>
|
||||
{shouldShowReset &&
|
||||
<Button bsSize="small" bsStyle="danger" onClick={this.resetState.bind(this)}>
|
||||
<i className="fa fa-bomb" /> Reset State
|
||||
<i className="fa fa-bomb" /> {t('Reset State')}
|
||||
</Button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ import * as Actions from '../actions';
|
||||
import SqlEditor from './SqlEditor';
|
||||
import CopyQueryTabUrl from './CopyQueryTabUrl';
|
||||
import { areArraysShallowEqual } from '../../reduxUtils';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object.isRequired,
|
||||
@@ -101,7 +102,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
}
|
||||
renameTab(qe) {
|
||||
/* eslint no-alert: 0 */
|
||||
const newTitle = prompt('Enter a new title for the tab');
|
||||
const newTitle = prompt(t('Enter a new title for the tab'));
|
||||
if (newTitle) {
|
||||
this.props.actions.queryEditorSetTitle(qe, newTitle);
|
||||
}
|
||||
@@ -120,7 +121,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
queryCount++;
|
||||
const activeQueryEditor = this.activeQueryEditor();
|
||||
const qe = {
|
||||
title: `Untitled Query ${queryCount}`,
|
||||
title: t('Untitled Query %s', queryCount),
|
||||
dbId: (activeQueryEditor && activeQueryEditor.dbId) ?
|
||||
activeQueryEditor.dbId :
|
||||
this.props.defaultDbId,
|
||||
@@ -166,10 +167,10 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
title=""
|
||||
>
|
||||
<MenuItem eventKey="1" onClick={this.removeQueryEditor.bind(this, qe)}>
|
||||
<i className="fa fa-close" /> close tab
|
||||
<i className="fa fa-close" /> {t('close tab')}
|
||||
</MenuItem>
|
||||
<MenuItem eventKey="2" onClick={this.renameTab.bind(this, qe)}>
|
||||
<i className="fa fa-i-cursor" /> rename tab
|
||||
<i className="fa fa-i-cursor" /> {t('rename tab')}
|
||||
</MenuItem>
|
||||
{qe &&
|
||||
<CopyQueryTabUrl queryEditor={qe} />
|
||||
@@ -177,7 +178,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
<MenuItem eventKey="4" onClick={this.toggleLeftBar.bind(this)}>
|
||||
<i className="fa fa-cogs" />
|
||||
|
||||
{this.state.hideLeftBar ? 'expand tool bar' : 'hide tool bar'}
|
||||
{this.state.hideLeftBar ? t('expand tool bar') : t('hide tool bar')}
|
||||
</MenuItem>
|
||||
</DropdownButton>
|
||||
</div>
|
||||
@@ -193,7 +194,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
||||
{isSelected &&
|
||||
<SqlEditor
|
||||
height={this.props.editorHeight}
|
||||
tables={this.props.tables.filter(t => (t.queryEditorId === qe.id))}
|
||||
tables={this.props.tables.filter(xt => (xt.queryEditorId === qe.id))}
|
||||
queryEditor={qe}
|
||||
editorQueries={this.state.queriesArray}
|
||||
dataPreviewQueries={this.state.dataPreviewQueries}
|
||||
|
||||
@@ -9,6 +9,7 @@ import Link from './Link';
|
||||
import ColumnElement from './ColumnElement';
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
import Loading from '../../components/Loading';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const propTypes = {
|
||||
table: PropTypes.object,
|
||||
@@ -71,7 +72,7 @@ class TableElement extends React.PureComponent {
|
||||
let partitionClipBoard;
|
||||
if (table.partitions.partitionQuery) {
|
||||
partitionQuery = table.partitions.partitionQuery;
|
||||
const tt = 'Copy partition query to clipboard';
|
||||
const tt = t('Copy partition query to clipboard');
|
||||
partitionClipBoard = (
|
||||
<CopyToClipboard
|
||||
text={partitionQuery}
|
||||
@@ -90,7 +91,7 @@ class TableElement extends React.PureComponent {
|
||||
<Well bsSize="small">
|
||||
<div>
|
||||
<small>
|
||||
latest partition: {latest}
|
||||
{t('latest partition:')} {latest}
|
||||
</small> {partitionClipBoard}
|
||||
</div>
|
||||
</Well>
|
||||
@@ -106,7 +107,7 @@ class TableElement extends React.PureComponent {
|
||||
<ModalTrigger
|
||||
modalTitle={
|
||||
<div>
|
||||
Keys for table <strong>{table.name}</strong>
|
||||
{t('Keys for table')} <strong>{table.name}</strong>
|
||||
</div>
|
||||
}
|
||||
modalBody={table.indexes.map((ix, i) => (
|
||||
@@ -115,7 +116,7 @@ class TableElement extends React.PureComponent {
|
||||
triggerNode={
|
||||
<Link
|
||||
className="fa fa-key pull-left m-l-2"
|
||||
tooltip={`View keys & indexes (${table.indexes.length})`}
|
||||
tooltip={t('View keys & indexes (%s)', table.indexes.length)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@@ -131,8 +132,8 @@ class TableElement extends React.PureComponent {
|
||||
onClick={this.toggleSortColumns.bind(this)}
|
||||
tooltip={
|
||||
!this.state.sortColumns ?
|
||||
'Sort columns alphabetically' :
|
||||
'Original table column order'}
|
||||
t('Sort columns alphabetically') :
|
||||
t('Original table column order')}
|
||||
href="#"
|
||||
/>
|
||||
{table.selectStar &&
|
||||
@@ -142,13 +143,13 @@ class TableElement extends React.PureComponent {
|
||||
}
|
||||
text={table.selectStar}
|
||||
shouldShowText={false}
|
||||
tooltipText="Copy SELECT statement to clipboard"
|
||||
tooltipText={t('Copy SELECT statement to clipboard')}
|
||||
/>
|
||||
}
|
||||
<Link
|
||||
className="fa fa-times table-remove pull-left m-l-2"
|
||||
onClick={this.removeTable.bind(this)}
|
||||
tooltip="Remove table preview"
|
||||
tooltip={t('Remove table preview')}
|
||||
href="#"
|
||||
/>
|
||||
</ButtonGroup>
|
||||
|
||||
@@ -1,25 +1,39 @@
|
||||
/* global notify */
|
||||
import moment from 'moment';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import { Alert, Button, Col, Modal } from 'react-bootstrap';
|
||||
|
||||
import Select from 'react-select';
|
||||
import { Table } from 'reactable';
|
||||
import shortid from 'shortid';
|
||||
import $ from 'jquery';
|
||||
import { getExploreUrl } from '../../explorev2/exploreUtils';
|
||||
import { getExploreUrl } from '../../explore/exploreUtils';
|
||||
import * as actions from '../actions';
|
||||
import { VISUALIZE_VALIDATION_ERRORS } from '../constants';
|
||||
import visTypes from '../../explore/stores/visTypes';
|
||||
import { t } from '../../locales';
|
||||
|
||||
const CHART_TYPES = [
|
||||
{ value: 'dist_bar', label: 'Distribution - Bar Chart', requiresTime: false },
|
||||
{ value: 'pie', label: 'Pie Chart', requiresTime: false },
|
||||
{ value: 'line', label: 'Time Series - Line Chart', requiresTime: true },
|
||||
{ value: 'bar', label: 'Time Series - Bar Chart', requiresTime: true },
|
||||
];
|
||||
const CHART_TYPES = Object.keys(visTypes)
|
||||
.filter(typeName => !!visTypes[typeName].showOnExplore)
|
||||
.map((typeName) => {
|
||||
const vis = visTypes[typeName];
|
||||
return {
|
||||
value: typeName,
|
||||
label: vis.label,
|
||||
requiresTime: !!vis.requiresTime,
|
||||
};
|
||||
});
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object.isRequired,
|
||||
onHide: PropTypes.func,
|
||||
query: PropTypes.object,
|
||||
show: PropTypes.bool,
|
||||
datasource: PropTypes.string,
|
||||
errorMessage: PropTypes.string,
|
||||
timeout: PropTypes.number,
|
||||
};
|
||||
const defaultProps = {
|
||||
show: false,
|
||||
@@ -33,28 +47,26 @@ class VisualizeModal extends React.PureComponent {
|
||||
this.state = {
|
||||
chartType: CHART_TYPES[0],
|
||||
datasourceName: this.datasourceName(),
|
||||
columns: {},
|
||||
columns: this.getColumnFromProps(),
|
||||
hints: [],
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
this.validate();
|
||||
}
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.setStateFromProps(nextProps);
|
||||
}
|
||||
setStateFromProps(props) {
|
||||
if (
|
||||
getColumnFromProps() {
|
||||
const props = this.props;
|
||||
if (!props ||
|
||||
!props.query ||
|
||||
!props.query.results ||
|
||||
!props.query.results.columns) {
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
const columns = {};
|
||||
props.query.results.columns.forEach((col) => {
|
||||
columns[col.name] = col;
|
||||
});
|
||||
this.setState({ columns });
|
||||
return columns;
|
||||
}
|
||||
datasourceName() {
|
||||
const { query } = this.props;
|
||||
@@ -75,14 +87,14 @@ class VisualizeModal extends React.PureComponent {
|
||||
if (!re.test(colName)) {
|
||||
hints.push(
|
||||
<div>
|
||||
"{colName}" is not right as a column name, please alias it
|
||||
(as in SELECT count(*) <strong>AS my_alias</strong>) using only
|
||||
alphanumeric characters and underscores
|
||||
{t('%s is not right as a column name, please alias it ' +
|
||||
'(as in SELECT count(*) ', colName)} <strong>{t('AS my_alias')}</strong>) {t('using only ' +
|
||||
'alphanumeric characters and underscores')}
|
||||
</div>);
|
||||
}
|
||||
});
|
||||
if (this.state.chartType === null) {
|
||||
hints.push('Pick a chart type!');
|
||||
hints.push(VISUALIZE_VALIDATION_ERRORS.REQUIRE_CHART_TYPE);
|
||||
} else if (this.state.chartType.requiresTime) {
|
||||
let hasTime = false;
|
||||
for (const colName in cols) {
|
||||
@@ -92,9 +104,7 @@ class VisualizeModal extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
if (!hasTime) {
|
||||
hints.push(
|
||||
'To use this chart type you need at least one column ' +
|
||||
'flagged as a date');
|
||||
hints.push(VISUALIZE_VALIDATION_ERRORS.REQUIRE_TIME);
|
||||
}
|
||||
}
|
||||
this.setState({ hints });
|
||||
@@ -113,27 +123,37 @@ class VisualizeModal extends React.PureComponent {
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
visualize() {
|
||||
const vizOptions = {
|
||||
buildVizOptions() {
|
||||
return {
|
||||
chartType: this.state.chartType.value,
|
||||
datasourceName: this.state.datasourceName,
|
||||
columns: this.state.columns,
|
||||
sql: this.props.query.sql,
|
||||
dbId: this.props.query.dbId,
|
||||
};
|
||||
notify.info('Creating a data source and popping a new tab');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/superset/sqllab_viz/',
|
||||
async: false,
|
||||
data: {
|
||||
data: JSON.stringify(vizOptions),
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (resp) => {
|
||||
}
|
||||
buildVisualizeAdvise() {
|
||||
let advise;
|
||||
const timeout = this.props.timeout;
|
||||
const queryDuration = moment.duration(this.props.query.endDttm - this.props.query.startDttm);
|
||||
if (Math.round(queryDuration.asMilliseconds()) > timeout * 1000) {
|
||||
advise = (
|
||||
<Alert bsStyle="warning">
|
||||
This query took {Math.round(queryDuration.asSeconds())} seconds to run,
|
||||
and the explore view times out at {timeout} seconds,
|
||||
following this flow will most likely lead to your query timing out.
|
||||
We recommend your summarize your data further before following that flow.
|
||||
If activated you can use the <strong>CREATE TABLE AS</strong> feature
|
||||
to store a summarized data set that you can then explore.
|
||||
</Alert>);
|
||||
}
|
||||
return advise;
|
||||
}
|
||||
visualize() {
|
||||
this.props.actions.createDatasource(this.buildVizOptions(), this)
|
||||
.done((resp) => {
|
||||
const columns = Object.keys(this.state.columns).map(k => this.state.columns[k]);
|
||||
const data = JSON.parse(resp);
|
||||
const mainMetric = columns.filter(d => d.agg)[0];
|
||||
const mainGroupBy = columns.filter(d => d.is_dim)[0];
|
||||
const formData = {
|
||||
datasource: `${data.table_id}__table`,
|
||||
@@ -141,21 +161,19 @@ class VisualizeModal extends React.PureComponent {
|
||||
since: '100 years ago',
|
||||
limit: '0',
|
||||
};
|
||||
if (mainMetric) {
|
||||
formData.metrics = [mainMetric.name];
|
||||
formData.metric = mainMetric.name;
|
||||
}
|
||||
if (mainGroupBy) {
|
||||
formData.groupby = [mainGroupBy.name];
|
||||
}
|
||||
notify.info(t('Creating a data source and popping a new tab'));
|
||||
|
||||
window.open(getExploreUrl(formData));
|
||||
},
|
||||
error: () => notify('An error occurred while creating the data source'),
|
||||
});
|
||||
})
|
||||
.fail(() => {
|
||||
notify.error(this.props.errorMessage);
|
||||
});
|
||||
}
|
||||
changeDatasourceName(event) {
|
||||
this.setState({ datasourceName: event.target.value });
|
||||
this.validate();
|
||||
this.setState({ datasourceName: event.target.value }, this.validate);
|
||||
}
|
||||
changeCheckbox(attr, columnName, event) {
|
||||
let columns = this.mergedColumns();
|
||||
@@ -176,7 +194,7 @@ class VisualizeModal extends React.PureComponent {
|
||||
<div className="VisualizeModal">
|
||||
<Modal show={this.props.show} onHide={this.props.onHide}>
|
||||
<Modal.Body>
|
||||
No results available for this query
|
||||
{t('No results available for this query')}
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
</div>
|
||||
@@ -221,16 +239,17 @@ class VisualizeModal extends React.PureComponent {
|
||||
<div className="VisualizeModal">
|
||||
<Modal show={this.props.show} onHide={this.props.onHide}>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>Visualize</Modal.Title>
|
||||
<Modal.Title>{t('Visualize')}</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
{alerts}
|
||||
{this.buildVisualizeAdvise()}
|
||||
<div className="row">
|
||||
<Col md={6}>
|
||||
Chart Type
|
||||
{t('Chart Type')}
|
||||
<Select
|
||||
name="select-chart-type"
|
||||
placeholder="[Chart Type]"
|
||||
placeholder={t('[Chart Type]')}
|
||||
options={CHART_TYPES}
|
||||
value={(this.state.chartType) ? this.state.chartType.value : null}
|
||||
autosize={false}
|
||||
@@ -238,11 +257,11 @@ class VisualizeModal extends React.PureComponent {
|
||||
/>
|
||||
</Col>
|
||||
<Col md={6}>
|
||||
Datasource Name
|
||||
{t('Datasource Name')}
|
||||
<input
|
||||
type="text"
|
||||
className="form-control input-sm"
|
||||
placeholder="datasource name"
|
||||
placeholder={t('datasource name')}
|
||||
onChange={this.changeDatasourceName.bind(this)}
|
||||
value={this.state.datasourceName}
|
||||
/>
|
||||
@@ -259,7 +278,7 @@ class VisualizeModal extends React.PureComponent {
|
||||
bsStyle="primary"
|
||||
disabled={(this.state.hints.length > 0)}
|
||||
>
|
||||
Visualize
|
||||
{t('Visualize')}
|
||||
</Button>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
@@ -271,4 +290,19 @@ class VisualizeModal extends React.PureComponent {
|
||||
VisualizeModal.propTypes = propTypes;
|
||||
VisualizeModal.defaultProps = defaultProps;
|
||||
|
||||
export default VisualizeModal;
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
datasource: state.datasource,
|
||||
errorMessage: state.errorMessage,
|
||||
timeout: state.common ? state.common.SUPERSET_WEBSERVER_TIMEOUT : null,
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators(actions, dispatch),
|
||||
};
|
||||
}
|
||||
|
||||
export { VisualizeModal };
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(VisualizeModal);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { t } from '../locales';
|
||||
|
||||
export const STATE_BSSTYLE_MAP = {
|
||||
failed: 'danger',
|
||||
pending: 'info',
|
||||
@@ -11,6 +13,7 @@ export const STATUS_OPTIONS = [
|
||||
'success',
|
||||
'failed',
|
||||
'running',
|
||||
'pending',
|
||||
];
|
||||
|
||||
export const TIME_OPTIONS = [
|
||||
@@ -22,3 +25,10 @@ export const TIME_OPTIONS = [
|
||||
'90 days ago',
|
||||
'1 year ago',
|
||||
];
|
||||
|
||||
export const VISUALIZE_VALIDATION_ERRORS = {
|
||||
REQUIRE_CHART_TYPE: t('Pick a chart type!'),
|
||||
REQUIRE_TIME: t('To use this chart type you need at least one column flagged as a date'),
|
||||
REQUIRE_DIMENSION: t('To use this chart type you need at least one dimension'),
|
||||
REQUIRE_AGGREGATION_FUNCTION: t('To use this chart type you need at least one aggregation function'),
|
||||
};
|
||||
|
||||
@@ -6,16 +6,16 @@ import thunkMiddleware from 'redux-thunk';
|
||||
|
||||
import { getInitialState, sqlLabReducer } from './reducers';
|
||||
import { initEnhancer } from '../reduxUtils';
|
||||
import { initJQueryAjaxCSRF } from '../modules/utils';
|
||||
import { initJQueryAjax } from '../modules/utils';
|
||||
import App from './components/App';
|
||||
import { appSetup } from '../common';
|
||||
|
||||
import './main.css';
|
||||
import './reactable-pagination.css';
|
||||
import './main.less';
|
||||
import '../../stylesheets/reactable-pagination.css';
|
||||
import '../components/FilterableTable/FilterableTableStyles.css';
|
||||
|
||||
appSetup();
|
||||
initJQueryAjaxCSRF();
|
||||
initJQueryAjax();
|
||||
|
||||
const appContainer = document.getElementById('app');
|
||||
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
|
||||
|
||||
@@ -130,9 +130,6 @@ div.Workspace {
|
||||
display: inline-block;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.Pane2 {
|
||||
width: 0;
|
||||
}
|
||||
.running {
|
||||
background-color: lime;
|
||||
color: black;
|
||||
@@ -161,7 +158,6 @@ div.Workspace {
|
||||
margin: 0px;
|
||||
border: none;
|
||||
font-size: 12px;
|
||||
line-height: @line-height-base;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
@@ -265,7 +261,7 @@ div.tablePopover:hover {
|
||||
}
|
||||
|
||||
.QueryTable .label {
|
||||
margin-top: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ResultsModal .modal-body {
|
||||
@@ -293,3 +289,13 @@ a.Link {
|
||||
.tooltip-inner {
|
||||
max-width: 500px;
|
||||
}
|
||||
.SouthPane {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.search-date-filter-container {
|
||||
display: flex;
|
||||
|
||||
.Select {
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,12 @@ import * as actions from './actions';
|
||||
import { now } from '../modules/dates';
|
||||
import { addToObject, alterInObject, alterInArr, removeFromArr, getFromArr, addToArr }
|
||||
from '../reduxUtils';
|
||||
import { t } from '../locales';
|
||||
|
||||
export function getInitialState(defaultDbId) {
|
||||
const defaultQueryEditor = {
|
||||
id: shortid.generate(),
|
||||
title: 'Untitled Query',
|
||||
title: t('Untitled Query'),
|
||||
sql: 'SELECT *\nFROM\nWHERE',
|
||||
selectedText: null,
|
||||
latestQueryId: null,
|
||||
@@ -40,7 +41,7 @@ export const sqlLabReducer = function (state, action) {
|
||||
qe.id === state.tabHistory[state.tabHistory.length - 1]);
|
||||
const qe = {
|
||||
id: shortid.generate(),
|
||||
title: `Copy of ${progenitor.title}`,
|
||||
title: t('Copy of %s', progenitor.title),
|
||||
dbId: (action.query.dbId) ? action.query.dbId : null,
|
||||
schema: (action.query.schema) ? action.query.schema : null,
|
||||
autorun: true,
|
||||
@@ -76,13 +77,13 @@ export const sqlLabReducer = function (state, action) {
|
||||
[actions.MERGE_TABLE]() {
|
||||
const at = Object.assign({}, action.table);
|
||||
let existingTable;
|
||||
state.tables.forEach((t) => {
|
||||
state.tables.forEach((xt) => {
|
||||
if (
|
||||
t.dbId === at.dbId &&
|
||||
t.queryEditorId === at.queryEditorId &&
|
||||
t.schema === at.schema &&
|
||||
t.name === at.name) {
|
||||
existingTable = t;
|
||||
xt.dbId === at.dbId &&
|
||||
xt.queryEditorId === at.queryEditorId &&
|
||||
xt.schema === at.schema &&
|
||||
xt.name === at.name) {
|
||||
existingTable = xt;
|
||||
}
|
||||
});
|
||||
if (existingTable) {
|
||||
@@ -115,11 +116,11 @@ export const sqlLabReducer = function (state, action) {
|
||||
delete queries[action.oldQueryId];
|
||||
|
||||
const newTables = [];
|
||||
state.tables.forEach((t) => {
|
||||
if (t.dataPreviewQueryId === action.oldQueryId) {
|
||||
newTables.push(Object.assign({}, t, { dataPreviewQueryId: action.newQuery.id }));
|
||||
state.tables.forEach((xt) => {
|
||||
if (xt.dataPreviewQueryId === action.oldQueryId) {
|
||||
newTables.push(Object.assign({}, xt, { dataPreviewQueryId: action.newQuery.id }));
|
||||
} else {
|
||||
newTables.push(t);
|
||||
newTables.push(xt);
|
||||
}
|
||||
});
|
||||
return Object.assign(
|
||||
@@ -216,6 +217,9 @@ export const sqlLabReducer = function (state, action) {
|
||||
[actions.QUERY_EDITOR_SET_AUTORUN]() {
|
||||
return alterInArr(state, 'queryEditors', action.queryEditor, { autorun: action.autorun });
|
||||
},
|
||||
[actions.QUERY_EDITOR_PERSIST_HEIGHT]() {
|
||||
return alterInArr(state, 'queryEditors', action.queryEditor, { height: action.currentHeight });
|
||||
},
|
||||
[actions.ADD_ALERT]() {
|
||||
return addToArr(state, 'alerts', action.alert);
|
||||
},
|
||||
@@ -233,11 +237,14 @@ export const sqlLabReducer = function (state, action) {
|
||||
let newQueries = Object.assign({}, state.queries);
|
||||
// Fetch the updates to the queries present in the store.
|
||||
let change = false;
|
||||
let queriesLastUpdate = state.queriesLastUpdate;
|
||||
for (const id in action.alteredQueries) {
|
||||
const changedQuery = action.alteredQueries[id];
|
||||
if (!state.queries.hasOwnProperty(id) ||
|
||||
(state.queries[id].changedOn !== changedQuery.changedOn &&
|
||||
state.queries[id].state !== 'stopped')) {
|
||||
state.queries[id].state !== 'stopped') {
|
||||
if (changedQuery.changedOn > queriesLastUpdate) {
|
||||
queriesLastUpdate = changedQuery.changedOn;
|
||||
}
|
||||
newQueries[id] = Object.assign({}, state.queries[id], changedQuery);
|
||||
change = true;
|
||||
}
|
||||
@@ -245,9 +252,27 @@ export const sqlLabReducer = function (state, action) {
|
||||
if (!change) {
|
||||
newQueries = state.queries;
|
||||
}
|
||||
const queriesLastUpdate = now();
|
||||
return Object.assign({}, state, { queries: newQueries, queriesLastUpdate });
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_STARTED]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: true,
|
||||
errorMessage: null,
|
||||
});
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_SUCCESS]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: false,
|
||||
errorMessage: null,
|
||||
datasource: action.datasource,
|
||||
});
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_FAILED]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: false,
|
||||
errorMessage: action.err,
|
||||
});
|
||||
},
|
||||
};
|
||||
if (action.type in actionHandlers) {
|
||||
return actionHandlers[action.type]();
|
||||
|
||||
99
superset/assets/javascripts/addSlice/AddSliceContainer.jsx
Normal file
@@ -0,0 +1,99 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button, Panel, Grid, Row, Col } from 'react-bootstrap';
|
||||
import Select from 'react-virtualized-select';
|
||||
import visTypes from '../explore/stores/visTypes';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
datasources: PropTypes.arrayOf(PropTypes.shape({
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
})).isRequired,
|
||||
};
|
||||
|
||||
export default class AddSliceContainer extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const visTypeKeys = Object.keys(visTypes);
|
||||
this.vizTypeOptions = visTypeKeys.map(vt => ({ label: visTypes[vt].label, value: vt }));
|
||||
this.state = {
|
||||
visType: 'table',
|
||||
};
|
||||
}
|
||||
|
||||
exploreUrl() {
|
||||
const baseUrl = `/superset/explore/${this.state.datasourceType}/${this.state.datasourceId}`;
|
||||
const formData = encodeURIComponent(JSON.stringify({ viz_type: this.state.visType }));
|
||||
return `${baseUrl}?form_data=${formData}`;
|
||||
}
|
||||
|
||||
gotoSlice() {
|
||||
window.location.href = this.exploreUrl();
|
||||
}
|
||||
|
||||
changeDatasource(e) {
|
||||
this.setState({
|
||||
datasourceValue: e.value,
|
||||
datasourceId: e.value.split('__')[0],
|
||||
datasourceType: e.value.split('__')[1],
|
||||
});
|
||||
}
|
||||
|
||||
changeVisType(e) {
|
||||
this.setState({ visType: e.value });
|
||||
}
|
||||
|
||||
isBtnDisabled() {
|
||||
return !(this.state.datasourceId && this.state.visType);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="container">
|
||||
<Panel header={<h3>{t('Create a new slice')}</h3>}>
|
||||
<Grid>
|
||||
<Row>
|
||||
<Col xs={12} sm={6}>
|
||||
<div>
|
||||
<p>{t('Choose a datasource')}</p>
|
||||
<Select
|
||||
clearable={false}
|
||||
name="select-datasource"
|
||||
onChange={this.changeDatasource.bind(this)}
|
||||
options={this.props.datasources}
|
||||
placeholder={t('Choose a datasource')}
|
||||
value={this.state.datasourceValue}
|
||||
/>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<p>{t('Choose a visualization type')}</p>
|
||||
<Select
|
||||
clearable={false}
|
||||
name="select-vis-type"
|
||||
onChange={this.changeVisType.bind(this)}
|
||||
options={this.vizTypeOptions}
|
||||
placeholder={t('Choose a visualization type')}
|
||||
value={this.state.visType}
|
||||
/>
|
||||
</div>
|
||||
<br />
|
||||
<Button
|
||||
bsStyle="primary"
|
||||
disabled={this.isBtnDisabled()}
|
||||
onClick={this.gotoSlice.bind(this)}
|
||||
>
|
||||
{t('Create new slice')}
|
||||
</Button>
|
||||
<br /><br />
|
||||
</Col>
|
||||
</Row>
|
||||
</Grid>
|
||||
</Panel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
AddSliceContainer.propTypes = propTypes;
|
||||
14
superset/assets/javascripts/addSlice/index.jsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { appSetup } from '../common';
|
||||
import AddSliceContainer from './AddSliceContainer';
|
||||
|
||||
appSetup();
|
||||
|
||||
const addSliceContainer = document.getElementById('js-add-slice-container');
|
||||
const bootstrapData = JSON.parse(addSliceContainer.getAttribute('data-bootstrap'));
|
||||
|
||||
ReactDOM.render(
|
||||
<AddSliceContainer datasources={bootstrapData.datasources} />,
|
||||
addSliceContainer,
|
||||
);
|
||||
182
superset/assets/javascripts/chart/Chart.jsx
Normal file
@@ -0,0 +1,182 @@
|
||||
/* eslint camelcase: 0 */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Mustache from 'mustache';
|
||||
|
||||
import { d3format } from '../modules/utils';
|
||||
import ChartBody from './ChartBody';
|
||||
import Loading from '../components/Loading';
|
||||
import StackTraceMessage from '../components/StackTraceMessage';
|
||||
import visMap from '../../visualizations/main';
|
||||
|
||||
const propTypes = {
|
||||
actions: PropTypes.object,
|
||||
chartKey: PropTypes.string.isRequired,
|
||||
containerId: PropTypes.string.isRequired,
|
||||
datasource: PropTypes.object.isRequired,
|
||||
formData: PropTypes.object.isRequired,
|
||||
height: PropTypes.number,
|
||||
width: PropTypes.number,
|
||||
setControlValue: PropTypes.func,
|
||||
timeout: PropTypes.number,
|
||||
vizType: PropTypes.string.isRequired,
|
||||
// state
|
||||
chartAlert: PropTypes.string,
|
||||
chartStatus: PropTypes.string,
|
||||
chartUpdateEndTime: PropTypes.number,
|
||||
chartUpdateStartTime: PropTypes.number,
|
||||
latestQueryFormData: PropTypes.object,
|
||||
queryRequest: PropTypes.object,
|
||||
queryResponse: PropTypes.object,
|
||||
lastRendered: PropTypes.number,
|
||||
triggerQuery: PropTypes.bool,
|
||||
// dashboard callbacks
|
||||
addFilter: PropTypes.func,
|
||||
getFilters: PropTypes.func,
|
||||
clearFilter: PropTypes.func,
|
||||
removeFilter: PropTypes.func,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
addFilter: () => ({}),
|
||||
getFilters: () => ({}),
|
||||
clearFilter: () => ({}),
|
||||
removeFilter: () => ({}),
|
||||
};
|
||||
|
||||
class Chart extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
// these properties are used by visualizations
|
||||
this.containerId = props.containerId;
|
||||
this.selector = `#${this.containerId}`;
|
||||
this.formData = props.formData;
|
||||
this.datasource = props.datasource;
|
||||
this.addFilter = this.addFilter.bind(this);
|
||||
this.getFilters = this.getFilters.bind(this);
|
||||
this.clearFilter = this.clearFilter.bind(this);
|
||||
this.removeFilter = this.removeFilter.bind(this);
|
||||
this.height = this.height.bind(this);
|
||||
this.width = this.width.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.triggerQuery) {
|
||||
this.props.actions.runQuery(this.props.formData, false,
|
||||
this.props.timeout,
|
||||
this.props.chartKey,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.containerId = nextProps.containerId;
|
||||
this.selector = `#${this.containerId}`;
|
||||
this.formData = nextProps.formData;
|
||||
this.datasource = nextProps.datasource;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (
|
||||
this.props.queryResponse &&
|
||||
this.props.chartStatus === 'success' &&
|
||||
!this.props.queryResponse.error && (
|
||||
prevProps.queryResponse !== this.props.queryResponse ||
|
||||
prevProps.height !== this.props.height ||
|
||||
prevProps.width !== this.props.width ||
|
||||
prevProps.lastRendered !== this.props.lastRendered)
|
||||
) {
|
||||
this.renderViz();
|
||||
}
|
||||
}
|
||||
|
||||
getFilters() {
|
||||
return this.props.getFilters();
|
||||
}
|
||||
|
||||
addFilter(col, vals, merge = true, refresh = true) {
|
||||
this.props.addFilter(col, vals, merge, refresh);
|
||||
}
|
||||
|
||||
clearFilter() {
|
||||
this.props.clearFilter();
|
||||
}
|
||||
|
||||
removeFilter(col, vals) {
|
||||
this.props.removeFilter(col, vals);
|
||||
}
|
||||
|
||||
clearError() {
|
||||
this.setState({
|
||||
errorMsg: null,
|
||||
});
|
||||
}
|
||||
|
||||
width() {
|
||||
return this.props.width || this.container.el.offsetWidth;
|
||||
}
|
||||
|
||||
height() {
|
||||
return this.props.height || this.container.el.offsetHeight;
|
||||
}
|
||||
|
||||
d3format(col, number) {
|
||||
const { datasource } = this.props;
|
||||
const format = (datasource.column_formats && datasource.column_formats[col]) || '0.3s';
|
||||
|
||||
return d3format(format, number);
|
||||
}
|
||||
|
||||
render_template(s) {
|
||||
const context = {
|
||||
width: this.width(),
|
||||
height: this.height(),
|
||||
};
|
||||
return Mustache.render(s, context);
|
||||
}
|
||||
|
||||
renderViz() {
|
||||
const viz = visMap[this.props.vizType];
|
||||
try {
|
||||
viz(this, this.props.queryResponse, this.props.actions.setControlValue);
|
||||
} catch (e) {
|
||||
this.props.actions.chartRenderingFailed(e, this.props.chartKey);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const isLoading = this.props.chartStatus === 'loading';
|
||||
return (
|
||||
<div className={`token col-md-12 ${isLoading ? 'is-loading' : ''}`}>
|
||||
{isLoading &&
|
||||
<Loading size={25} />
|
||||
}
|
||||
|
||||
{this.props.chartAlert &&
|
||||
<StackTraceMessage
|
||||
message={this.props.chartAlert}
|
||||
queryResponse={this.props.queryResponse}
|
||||
/>
|
||||
}
|
||||
|
||||
{!this.props.chartAlert &&
|
||||
<ChartBody
|
||||
containerId={this.containerId}
|
||||
vizType={this.props.formData.viz_type}
|
||||
height={this.height}
|
||||
width={this.width}
|
||||
ref={(inner) => {
|
||||
this.container = inner;
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Chart.propTypes = propTypes;
|
||||
Chart.defaultProps = defaultProps;
|
||||
|
||||
export default Chart;
|
||||
54
superset/assets/javascripts/chart/ChartBody.jsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import $ from 'jquery';
|
||||
|
||||
const propTypes = {
|
||||
containerId: PropTypes.string.isRequired,
|
||||
vizType: PropTypes.string.isRequired,
|
||||
height: PropTypes.func.isRequired,
|
||||
width: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class ChartBody extends React.PureComponent {
|
||||
html(data) {
|
||||
this.el.innerHTML = data;
|
||||
}
|
||||
|
||||
css(property, value) {
|
||||
this.el.style[property] = value;
|
||||
}
|
||||
|
||||
get(n) {
|
||||
return $(this.el).get(n);
|
||||
}
|
||||
|
||||
find(classname) {
|
||||
return $(this.el).find(classname);
|
||||
}
|
||||
|
||||
show() {
|
||||
return $(this.el).show();
|
||||
}
|
||||
|
||||
height() {
|
||||
return this.props.height();
|
||||
}
|
||||
|
||||
width() {
|
||||
return this.props.width();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div
|
||||
id={this.props.containerId}
|
||||
className={`slice_container ${this.props.vizType}`}
|
||||
ref={(el) => { this.el = el; }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ChartBody.propTypes = propTypes;
|
||||
|
||||
export default ChartBody;
|
||||
28
superset/assets/javascripts/chart/ChartContainer.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
||||
import * as Actions from './chartAction';
|
||||
import Chart from './Chart';
|
||||
|
||||
function mapStateToProps({ charts }, ownProps) {
|
||||
const chart = charts[ownProps.chartKey];
|
||||
return {
|
||||
chartAlert: chart.chartAlert,
|
||||
chartStatus: chart.chartStatus,
|
||||
chartUpdateEndTime: chart.chartUpdateEndTime,
|
||||
chartUpdateStartTime: chart.chartUpdateStartTime,
|
||||
latestQueryFormData: chart.latestQueryFormData,
|
||||
lastRendered: chart.lastRendered,
|
||||
queryResponse: chart.queryResponse,
|
||||
queryRequest: chart.queryRequest,
|
||||
triggerQuery: chart.triggerQuery,
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators(Actions, dispatch),
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Chart);
|
||||
91
superset/assets/javascripts/chart/chartAction.js
Normal file
@@ -0,0 +1,91 @@
|
||||
import { getExploreUrl } from '../explore/exploreUtils';
|
||||
import { t } from '../locales';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
|
||||
export function chartUpdateStarted(queryRequest, key) {
|
||||
return { type: CHART_UPDATE_STARTED, queryRequest, key };
|
||||
}
|
||||
|
||||
export const CHART_UPDATE_SUCCEEDED = 'CHART_UPDATE_SUCCEEDED';
|
||||
export function chartUpdateSucceeded(queryResponse, key) {
|
||||
return { type: CHART_UPDATE_SUCCEEDED, queryResponse, key };
|
||||
}
|
||||
|
||||
export const CHART_UPDATE_STOPPED = 'CHART_UPDATE_STOPPED';
|
||||
export function chartUpdateStopped(queryRequest, key) {
|
||||
if (queryRequest) {
|
||||
queryRequest.abort();
|
||||
}
|
||||
return { type: CHART_UPDATE_STOPPED, key };
|
||||
}
|
||||
|
||||
export const CHART_UPDATE_TIMEOUT = 'CHART_UPDATE_TIMEOUT';
|
||||
export function chartUpdateTimeout(statusText, timeout, key) {
|
||||
return { type: CHART_UPDATE_TIMEOUT, statusText, timeout, key };
|
||||
}
|
||||
|
||||
export const CHART_UPDATE_FAILED = 'CHART_UPDATE_FAILED';
|
||||
export function chartUpdateFailed(queryResponse, key) {
|
||||
return { type: CHART_UPDATE_FAILED, queryResponse, key };
|
||||
}
|
||||
|
||||
export const CHART_RENDERING_FAILED = 'CHART_RENDERING_FAILED';
|
||||
export function chartRenderingFailed(error, key) {
|
||||
return { type: CHART_RENDERING_FAILED, error, key };
|
||||
}
|
||||
|
||||
export const REMOVE_CHART = 'REMOVE_CHART';
|
||||
export function removeChart(key) {
|
||||
return { type: REMOVE_CHART, key };
|
||||
}
|
||||
|
||||
export const TRIGGER_QUERY = 'TRIGGER_QUERY';
|
||||
export function triggerQuery(value = true, key) {
|
||||
return { type: TRIGGER_QUERY, value, key };
|
||||
}
|
||||
|
||||
// this action is used for forced re-render without fetch data
|
||||
export const RENDER_TRIGGERED = 'RENDER_TRIGGERED';
|
||||
export function renderTriggered(value, key) {
|
||||
return { type: RENDER_TRIGGERED, value, key };
|
||||
}
|
||||
|
||||
export const RUN_QUERY = 'RUN_QUERY';
|
||||
export function runQuery(formData, force = false, timeout = 60, key) {
|
||||
return (dispatch) => {
|
||||
const url = getExploreUrl(formData, 'json', force);
|
||||
const queryRequest = $.ajax({
|
||||
url,
|
||||
dataType: 'json',
|
||||
timeout: timeout * 1000,
|
||||
success: (queryResponse =>
|
||||
dispatch(chartUpdateSucceeded(queryResponse, key))
|
||||
),
|
||||
error: ((xhr) => {
|
||||
if (xhr.statusText === 'timeout') {
|
||||
dispatch(chartUpdateTimeout(xhr.statusText, timeout, key));
|
||||
} else {
|
||||
let error = '';
|
||||
if (!xhr.responseText) {
|
||||
const status = xhr.status;
|
||||
if (status === 0) {
|
||||
// This may happen when the worker in gunicorn times out
|
||||
error += (
|
||||
t('The server could not be reached. You may want to ' +
|
||||
'verify your connection and try again.'));
|
||||
} else {
|
||||
error += (t('An unknown error occurred. (Status: %s )', status));
|
||||
}
|
||||
}
|
||||
const errorResponse = Object.assign({}, xhr.responseJSON, error);
|
||||
dispatch(chartUpdateFailed(errorResponse, key));
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
dispatch(chartUpdateStarted(queryRequest, key));
|
||||
dispatch(triggerQuery(false, key));
|
||||
};
|
||||
}
|
||||
103
superset/assets/javascripts/chart/chartReducer.js
Normal file
@@ -0,0 +1,103 @@
|
||||
/* eslint camelcase: 0 */
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { now } from '../modules/dates';
|
||||
import * as actions from './chartAction';
|
||||
import { t } from '../locales';
|
||||
|
||||
export const chartPropType = {
|
||||
chartKey: PropTypes.string.isRequired,
|
||||
chartAlert: PropTypes.string,
|
||||
chartStatus: PropTypes.string,
|
||||
chartUpdateEndTime: PropTypes.number,
|
||||
chartUpdateStartTime: PropTypes.number,
|
||||
latestQueryFormData: PropTypes.object,
|
||||
queryRequest: PropTypes.object,
|
||||
queryResponse: PropTypes.object,
|
||||
triggerQuery: PropTypes.bool,
|
||||
lastRendered: PropTypes.number,
|
||||
};
|
||||
|
||||
export const chart = {
|
||||
chartKey: '',
|
||||
chartAlert: null,
|
||||
chartStatus: 'loading',
|
||||
chartUpdateEndTime: null,
|
||||
chartUpdateStartTime: now(),
|
||||
latestQueryFormData: null,
|
||||
queryRequest: null,
|
||||
queryResponse: null,
|
||||
triggerQuery: true,
|
||||
lastRendered: 0,
|
||||
};
|
||||
|
||||
export default function chartReducer(charts = {}, action) {
|
||||
const actionHandlers = {
|
||||
[actions.CHART_UPDATE_SUCCEEDED](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'success',
|
||||
queryResponse: action.queryResponse,
|
||||
chartUpdateEndTime: now(),
|
||||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_STARTED](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'loading',
|
||||
chartAlert: null,
|
||||
chartUpdateEndTime: null,
|
||||
chartUpdateStartTime: now(),
|
||||
queryRequest: action.queryRequest,
|
||||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_STOPPED](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'stopped',
|
||||
chartAlert: t('Updating chart was stopped'),
|
||||
};
|
||||
},
|
||||
[actions.CHART_RENDERING_FAILED](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'failed',
|
||||
chartAlert: t('An error occurred while rendering the visualization: %s', action.error),
|
||||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_TIMEOUT](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'failed',
|
||||
chartAlert: (
|
||||
`<strong>${t('Query timeout')}</strong> - ` +
|
||||
t(`visualization queries are set to timeout at ${action.timeout} seconds. `) +
|
||||
t('Perhaps your data has grown, your database is under unusual load, ' +
|
||||
'or you are simply querying a data source that is too large ' +
|
||||
'to be processed within the timeout range. ' +
|
||||
'If that is the case, we recommend that you summarize your data further.')),
|
||||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_FAILED](state) {
|
||||
return { ...state,
|
||||
chartStatus: 'failed',
|
||||
chartAlert: action.queryResponse ? action.queryResponse.error : t('Network error.'),
|
||||
chartUpdateEndTime: now(),
|
||||
queryResponse: action.queryResponse,
|
||||
};
|
||||
},
|
||||
[actions.TRIGGER_QUERY](state) {
|
||||
return { ...state, triggerQuery: action.value };
|
||||
},
|
||||
[actions.RENDER_TRIGGERED](state) {
|
||||
return { ...state, lastRendered: action.value };
|
||||
},
|
||||
};
|
||||
|
||||
/* eslint-disable no-param-reassign */
|
||||
if (action.type === actions.REMOVE_CHART) {
|
||||
delete charts[action.key];
|
||||
return charts;
|
||||
}
|
||||
|
||||
if (action.type in actionHandlers) {
|
||||
return { ...charts, [action.key]: actionHandlers[action.type](charts[action.key], action) };
|
||||
}
|
||||
|
||||
return charts;
|
||||
}
|
||||
@@ -10,6 +10,17 @@ $(document).ready(function () {
|
||||
const id = $this.attr('id');
|
||||
utils.toggleCheckbox(prefix, '#' + id);
|
||||
});
|
||||
|
||||
// for language picker dropdown
|
||||
$('#language-picker a').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
const targetUrl = ev.currentTarget.href;
|
||||
$.ajax(targetUrl)
|
||||
.then(() => {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
export function appSetup() {
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
/* global notify */
|
||||
import React from 'react';
|
||||
import AlertContainer from 'react-alert';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const propTypes = {
|
||||
initMessages: PropTypes.array,
|
||||
};
|
||||
const defaultProps = {
|
||||
initMessages: [],
|
||||
};
|
||||
|
||||
export default class AlertsWrapper extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
this.props.initMessages.forEach((msg) => {
|
||||
if (['info', 'error', 'success'].indexOf(msg[0]) >= 0) {
|
||||
notify[msg[0]](msg[1]);
|
||||
} else {
|
||||
notify.show(msg[1]);
|
||||
}
|
||||
});
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<AlertContainer
|
||||
@@ -16,3 +34,5 @@ export default class AlertsWrapper extends React.PureComponent {
|
||||
/>);
|
||||
}
|
||||
}
|
||||
AlertsWrapper.propTypes = propTypes;
|
||||
AlertsWrapper.defaultProps = defaultProps;
|
||||
|
||||
145
superset/assets/javascripts/components/AlteredSliceTag.jsx
Normal file
@@ -0,0 +1,145 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Table, Tr, Td, Thead, Th } from 'reactable';
|
||||
import { isEqual, isEmpty } from 'underscore';
|
||||
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
import { controls } from '../explore/stores/controls';
|
||||
import ModalTrigger from './ModalTrigger';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
origFormData: PropTypes.object.isRequired,
|
||||
currentFormData: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default class AlteredSliceTag extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const diffs = this.getDiffs(props);
|
||||
this.state = { diffs, hasDiffs: !isEmpty(diffs) };
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
// Update differences if need be
|
||||
if (isEqual(this.props, newProps)) {
|
||||
return;
|
||||
}
|
||||
const diffs = this.getDiffs(newProps);
|
||||
this.setState({ diffs, hasDiffs: !isEmpty(diffs) });
|
||||
}
|
||||
|
||||
getDiffs(props) {
|
||||
// Returns all properties that differ in the
|
||||
// current form data and the saved form data
|
||||
const ofd = props.origFormData;
|
||||
const cfd = props.currentFormData;
|
||||
const fdKeys = Object.keys(cfd);
|
||||
const diffs = {};
|
||||
for (const fdKey of fdKeys) {
|
||||
// Ignore values that are undefined/nonexisting in either
|
||||
if (!ofd[fdKey] && !cfd[fdKey]) {
|
||||
continue;
|
||||
}
|
||||
if (!isEqual(ofd[fdKey], cfd[fdKey])) {
|
||||
diffs[fdKey] = { before: ofd[fdKey], after: cfd[fdKey] };
|
||||
}
|
||||
}
|
||||
return diffs;
|
||||
}
|
||||
|
||||
formatValue(value, key) {
|
||||
// Format display value based on the control type
|
||||
// or the value type
|
||||
if (value === undefined) {
|
||||
return 'N/A';
|
||||
} else if (value === null) {
|
||||
return 'null';
|
||||
} else if (controls[key] && controls[key].type === 'FilterControl') {
|
||||
if (!value.length) {
|
||||
return '[]';
|
||||
}
|
||||
return value.map((v) => {
|
||||
const filterVal = v.val.constructor === Array ? `[${v.val.join(', ')}]` : v.val;
|
||||
return `${v.col} ${v.op} ${filterVal}`;
|
||||
}).join(', ');
|
||||
} else if (controls[key] && controls[key].type === 'BoundsControl') {
|
||||
return `Min: ${value[0]}, Max: ${value[1]}`;
|
||||
} else if (controls[key] && controls[key].type === 'CollectionControl') {
|
||||
return value.map(v => JSON.stringify(v)).join(', ');
|
||||
} else if (typeof value === 'boolean') {
|
||||
return value ? 'true' : 'false';
|
||||
} else if (value.constructor === Array) {
|
||||
return value.length ? value.join(', ') : '[]';
|
||||
} else if (typeof value === 'string' || typeof value === 'number') {
|
||||
return value;
|
||||
}
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
|
||||
renderRows() {
|
||||
const diffs = this.state.diffs;
|
||||
const rows = [];
|
||||
for (const key in diffs) {
|
||||
rows.push(
|
||||
<Tr key={key}>
|
||||
<Td column="control" data={(controls[key] && controls[key].label) || key} />
|
||||
<Td column="before">{this.formatValue(diffs[key].before, key)}</Td>
|
||||
<Td column="after">{this.formatValue(diffs[key].after, key)}</Td>
|
||||
</Tr>,
|
||||
);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
renderModalBody() {
|
||||
return (
|
||||
<Table className="table" sortable>
|
||||
<Thead>
|
||||
<Th column="control">Control</Th>
|
||||
<Th column="before">Before</Th>
|
||||
<Th column="after">After</Th>
|
||||
</Thead>
|
||||
{this.renderRows()}
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
|
||||
renderTriggerNode() {
|
||||
return (
|
||||
<TooltipWrapper
|
||||
label="difference"
|
||||
tooltip={t('Click to see difference')}
|
||||
>
|
||||
<span
|
||||
className="label label-warning m-l-5"
|
||||
style={{ fontSize: '12px' }}
|
||||
>
|
||||
{t('Altered')}
|
||||
</span>
|
||||
</TooltipWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
// Return nothing if there are no differences
|
||||
if (!this.state.hasDiffs) {
|
||||
return null;
|
||||
}
|
||||
// Render the label-warning 'Altered' tag which the user may
|
||||
// click to open a modal containing a table summarizing the
|
||||
// differences in the slice
|
||||
return (
|
||||
<ModalTrigger
|
||||
animation
|
||||
triggerNode={this.renderTriggerNode()}
|
||||
modalTitle={t('Slice changes')}
|
||||
bsSize="large"
|
||||
modalBody={this.renderModalBody()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
AlteredSliceTag.propTypes = propTypes;
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Select from 'react-select';
|
||||
import { t } from '../locales';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
@@ -9,14 +10,17 @@ const propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
mutator: PropTypes.func.isRequired,
|
||||
onAsyncError: PropTypes.func,
|
||||
value: PropTypes.number,
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.number,
|
||||
PropTypes.arrayOf(PropTypes.number),
|
||||
]),
|
||||
valueRenderer: PropTypes.func,
|
||||
placeholder: PropTypes.string,
|
||||
autoSelect: PropTypes.bool,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
placeholder: 'Select ...',
|
||||
placeholder: t('Select ...'),
|
||||
valueRenderer: o => (<div>{o.label}</div>),
|
||||
onAsyncError: () => {},
|
||||
};
|
||||
@@ -38,19 +42,20 @@ class AsyncSelect extends React.PureComponent {
|
||||
fetchOptions() {
|
||||
this.setState({ isLoading: true });
|
||||
const mutator = this.props.mutator;
|
||||
$.get(this.props.dataEndpoint, (data) => {
|
||||
this.setState({ options: mutator ? mutator(data) : data, isLoading: false });
|
||||
$.get(this.props.dataEndpoint)
|
||||
.done((data) => {
|
||||
this.setState({ options: mutator ? mutator(data) : data, isLoading: false });
|
||||
|
||||
if (!this.props.value && this.props.autoSelect && this.state.options.length) {
|
||||
this.onChange(this.state.options[0]);
|
||||
}
|
||||
})
|
||||
.fail(() => {
|
||||
this.props.onAsyncError();
|
||||
})
|
||||
.always(() => {
|
||||
this.setState({ isLoading: false });
|
||||
});
|
||||
if (!this.props.value && this.props.autoSelect && this.state.options.length) {
|
||||
this.onChange(this.state.options[0]);
|
||||
}
|
||||
})
|
||||
.fail((xhr) => {
|
||||
this.props.onAsyncError(xhr.responseText);
|
||||
})
|
||||
.always(() => {
|
||||
this.setState({ isLoading: false });
|
||||
});
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
@@ -62,6 +67,7 @@ class AsyncSelect extends React.PureComponent {
|
||||
isLoading={this.state.isLoading}
|
||||
onChange={this.onChange.bind(this)}
|
||||
valueRenderer={this.props.valueRenderer}
|
||||
{...this.props}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import { Label } from 'react-bootstrap';
|
||||
import moment from 'moment';
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
onClick: PropTypes.func,
|
||||
@@ -22,14 +23,14 @@ class CacheLabel extends React.PureComponent {
|
||||
updateTooltipContent() {
|
||||
const cachedText = this.props.cachedTimestamp ? (
|
||||
<span>
|
||||
Loaded data cached <b>{moment.utc(this.props.cachedTimestamp).fromNow()}</b>
|
||||
{t('Loaded data cached')}
|
||||
<b> {moment.utc(this.props.cachedTimestamp).fromNow()}</b>
|
||||
</span>) :
|
||||
'Loaded from cache';
|
||||
t('Loaded from cache');
|
||||
|
||||
const tooltipContent = (
|
||||
<span>
|
||||
{cachedText}.
|
||||
Click to force-refresh
|
||||
{cachedText}. {t('Click to force-refresh')}
|
||||
</span>
|
||||
);
|
||||
this.setState({ tooltipContent });
|
||||
|
||||
24
superset/assets/javascripts/components/Checkbox.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const propTypes = {
|
||||
checked: PropTypes.bool.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
style: PropTypes.object,
|
||||
};
|
||||
|
||||
export default function Checkbox({ checked, onChange, style }) {
|
||||
return (
|
||||
<span style={style}>
|
||||
<i
|
||||
className={`fa fa-check ${checked ? 'text-primary' : 'text-transparent'}`}
|
||||
onClick={onChange.bind(!checked)}
|
||||
style={{
|
||||
border: '1px solid #aaa',
|
||||
borderRadius: '2px',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
/>
|
||||
</span>);
|
||||
}
|
||||
Checkbox.propTypes = propTypes;
|
||||
34
superset/assets/javascripts/components/ColumnOption.jsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
|
||||
|
||||
const propTypes = {
|
||||
column: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default function ColumnOption({ column }) {
|
||||
return (
|
||||
<span>
|
||||
<span className="m-r-5 option-label">
|
||||
{column.verbose_name || column.column_name}
|
||||
</span>
|
||||
{column.description &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="info"
|
||||
tooltip={column.description}
|
||||
label={`descr-${column.column_name}`}
|
||||
/>
|
||||
}
|
||||
{column.expression && column.expression !== column.column_name &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="question-circle-o"
|
||||
tooltip={column.expression}
|
||||
label={`expr-${column.column_name}`}
|
||||
/>
|
||||
}
|
||||
</span>);
|
||||
}
|
||||
ColumnOption.propTypes = propTypes;
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tooltip, OverlayTrigger, MenuItem } from 'react-bootstrap';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
copyNode: PropTypes.node,
|
||||
@@ -17,7 +18,7 @@ const defaultProps = {
|
||||
onCopyEnd: () => {},
|
||||
shouldShowText: true,
|
||||
inMenu: false,
|
||||
tooltipText: 'Copy to clipboard',
|
||||
tooltipText: t('Copy to clipboard'),
|
||||
};
|
||||
|
||||
export default class CopyToClipboard extends React.Component {
|
||||
@@ -51,6 +52,10 @@ export default class CopyToClipboard extends React.Component {
|
||||
}
|
||||
|
||||
copyToClipboard(textToCopy) {
|
||||
const selection = document.getSelection();
|
||||
selection.removeAllRanges();
|
||||
document.activeElement.blur();
|
||||
const range = document.createRange();
|
||||
const textArea = document.createElement('textarea');
|
||||
|
||||
textArea.style.position = 'fixed';
|
||||
@@ -58,16 +63,22 @@ export default class CopyToClipboard extends React.Component {
|
||||
textArea.value = textToCopy;
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
range.selectNode(textArea);
|
||||
selection.addRange(range);
|
||||
try {
|
||||
if (!document.execCommand('copy')) {
|
||||
throw new Error('Not successful');
|
||||
throw new Error(t('Not successful'));
|
||||
}
|
||||
} catch (err) {
|
||||
window.alert('Sorry, your browser does not support copying. Use Ctrl / Cmd + C!'); // eslint-disable-line
|
||||
window.alert(t('Sorry, your browser does not support copying. Use Ctrl / Cmd + C!')); // eslint-disable-line
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
if (selection.removeRange) {
|
||||
selection.removeRange(range);
|
||||
} else {
|
||||
selection.removeAllRanges();
|
||||
}
|
||||
|
||||
this.setState({ hasCopied: true });
|
||||
this.props.onCopyEnd();
|
||||
@@ -75,7 +86,7 @@ export default class CopyToClipboard extends React.Component {
|
||||
|
||||
tooltipText() {
|
||||
if (this.state.hasCopied) {
|
||||
return 'Copied!';
|
||||
return t('Copied!');
|
||||
}
|
||||
return this.props.tooltipText;
|
||||
}
|
||||
|
||||
112
superset/assets/javascripts/components/EditableTitle.jsx
Normal file
@@ -0,0 +1,112 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
title: PropTypes.string,
|
||||
canEdit: PropTypes.bool,
|
||||
onSaveTitle: PropTypes.func,
|
||||
noPermitTooltip: PropTypes.string,
|
||||
};
|
||||
const defaultProps = {
|
||||
title: t('Title'),
|
||||
canEdit: false,
|
||||
};
|
||||
|
||||
class EditableTitle extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isEditing: false,
|
||||
title: this.props.title,
|
||||
lastTitle: this.props.title,
|
||||
};
|
||||
this.handleClick = this.handleClick.bind(this);
|
||||
this.handleBlur = this.handleBlur.bind(this);
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
this.handleKeyPress = this.handleKeyPress.bind(this);
|
||||
}
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.title !== this.state.title) {
|
||||
this.setState({
|
||||
lastTitle: this.state.title,
|
||||
title: nextProps.title,
|
||||
});
|
||||
}
|
||||
}
|
||||
handleClick() {
|
||||
if (!this.props.canEdit) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
isEditing: true,
|
||||
});
|
||||
}
|
||||
handleBlur() {
|
||||
if (!this.props.canEdit) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
isEditing: false,
|
||||
});
|
||||
|
||||
if (!this.state.title.length) {
|
||||
this.setState({
|
||||
title: this.state.lastTitle,
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.state.lastTitle !== this.state.title) {
|
||||
this.setState({
|
||||
lastTitle: this.state.title,
|
||||
});
|
||||
this.props.onSaveTitle(this.state.title);
|
||||
}
|
||||
}
|
||||
handleChange(ev) {
|
||||
if (!this.props.canEdit) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
title: ev.target.value,
|
||||
});
|
||||
}
|
||||
handleKeyPress(ev) {
|
||||
if (ev.key === 'Enter') {
|
||||
ev.preventDefault();
|
||||
|
||||
this.handleBlur();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<span className="editable-title">
|
||||
<TooltipWrapper
|
||||
label="title"
|
||||
tooltip={this.props.canEdit ? t('click to edit title') :
|
||||
this.props.noPermitTooltip || t('You don\'t have the rights to alter this title.')}
|
||||
>
|
||||
<input
|
||||
required
|
||||
type={this.state.isEditing ? 'text' : 'button'}
|
||||
value={this.state.title}
|
||||
onChange={this.handleChange}
|
||||
onBlur={this.handleBlur}
|
||||
onClick={this.handleClick}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
EditableTitle.propTypes = propTypes;
|
||||
EditableTitle.defaultProps = defaultProps;
|
||||
|
||||
export default EditableTitle;
|
||||
@@ -2,21 +2,23 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cx from 'classnames';
|
||||
import TooltipWrapper from './TooltipWrapper';
|
||||
import { t } from '../locales';
|
||||
|
||||
const propTypes = {
|
||||
sliceId: PropTypes.number.isRequired,
|
||||
actions: PropTypes.object.isRequired,
|
||||
itemId: PropTypes.number.isRequired,
|
||||
fetchFaveStar: PropTypes.func,
|
||||
saveFaveStar: PropTypes.func,
|
||||
isStarred: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default class FaveStar extends React.Component {
|
||||
componentDidMount() {
|
||||
this.props.actions.fetchFaveStar(this.props.sliceId);
|
||||
this.props.fetchFaveStar(this.props.itemId);
|
||||
}
|
||||
|
||||
onClick(e) {
|
||||
e.preventDefault();
|
||||
this.props.actions.saveFaveStar(this.props.sliceId, this.props.isStarred);
|
||||
this.props.saveFaveStar(this.props.itemId, this.props.isStarred);
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -28,7 +30,7 @@ export default class FaveStar extends React.Component {
|
||||
return (
|
||||
<TooltipWrapper
|
||||
label="fave-unfave"
|
||||
tooltip="Click to favorite/unfavorite"
|
||||
tooltip={t('Click to favorite/unfavorite')}
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
|
||||
@@ -82,7 +82,7 @@ export default class FilterableTable extends PureComponent {
|
||||
const newRow = {};
|
||||
for (const k in row) {
|
||||
const val = row[k];
|
||||
if (typeof (val) === 'string') {
|
||||
if (['string', 'number'].indexOf(typeof (val)) >= 0) {
|
||||
newRow[k] = val;
|
||||
} else {
|
||||
newRow[k] = JSON.stringify(val);
|
||||
@@ -150,7 +150,6 @@ export default class FilterableTable extends PureComponent {
|
||||
}
|
||||
|
||||
const rowGetter = ({ index }) => this.getDatum(sortedAndFilteredList, index);
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{ height }}
|
||||
|
||||
@@ -5,18 +5,46 @@ import { slugify } from '../modules/utils';
|
||||
|
||||
const propTypes = {
|
||||
label: PropTypes.string.isRequired,
|
||||
tooltip: PropTypes.string.isRequired,
|
||||
tooltip: PropTypes.string,
|
||||
icon: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
placement: PropTypes.string,
|
||||
bsStyle: PropTypes.string,
|
||||
};
|
||||
const defaultProps = {
|
||||
icon: 'info-circle',
|
||||
className: 'text-muted',
|
||||
placement: 'right',
|
||||
};
|
||||
const tooltipStyle = { wordWrap: 'break-word' };
|
||||
|
||||
export default function InfoTooltipWithTrigger({ label, tooltip }) {
|
||||
export default function InfoTooltipWithTrigger({
|
||||
label, tooltip, icon, className, onClick, placement, bsStyle }) {
|
||||
const iconClass = `fa fa-${icon} ${className} ${bsStyle ? 'text-' + bsStyle : ''}`;
|
||||
const iconEl = (
|
||||
<i
|
||||
className={iconClass}
|
||||
onClick={onClick}
|
||||
style={{ cursor: onClick ? 'pointer' : null }}
|
||||
/>
|
||||
);
|
||||
if (!tooltip) {
|
||||
return iconEl;
|
||||
}
|
||||
return (
|
||||
<OverlayTrigger
|
||||
placement="right"
|
||||
overlay={<Tooltip id={`${slugify(label)}-tooltip`}>{tooltip}</Tooltip>}
|
||||
placement={placement}
|
||||
overlay={
|
||||
<Tooltip id={`${slugify(label)}-tooltip`} style={tooltipStyle}>
|
||||
{tooltip}
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<i className="fa fa-question-circle-o" />
|
||||
{iconEl}
|
||||
</OverlayTrigger>
|
||||
);
|
||||
}
|
||||
|
||||
InfoTooltipWithTrigger.propTypes = propTypes;
|
||||
InfoTooltipWithTrigger.defaultProps = defaultProps;
|
||||
|
||||
49
superset/assets/javascripts/components/MetricOption.jsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
|
||||
|
||||
const propTypes = {
|
||||
metric: PropTypes.object.isRequired,
|
||||
openInNewWindow: PropTypes.bool,
|
||||
showFormula: PropTypes.bool,
|
||||
url: PropTypes.string,
|
||||
};
|
||||
const defaultProps = {
|
||||
showFormula: true,
|
||||
};
|
||||
|
||||
export default function MetricOption({ metric, openInNewWindow, showFormula, url }) {
|
||||
const verbose = metric.verbose_name || metric.metric_name;
|
||||
const link = url ? <a href={url} target={openInNewWindow ? '_blank' : null}>{verbose}</a> : verbose;
|
||||
return (
|
||||
<div>
|
||||
<span className="m-r-5 option-label">{link}</span>
|
||||
{metric.description &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="info"
|
||||
tooltip={metric.description}
|
||||
label={`descr-${metric.metric_name}`}
|
||||
/>
|
||||
}
|
||||
{showFormula &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="question-circle-o"
|
||||
tooltip={metric.expression}
|
||||
label={`expr-${metric.metric_name}`}
|
||||
/>
|
||||
}
|
||||
{metric.warning_text &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-danger"
|
||||
icon="warning"
|
||||
tooltip={metric.warning_text}
|
||||
label={`warn-${metric.metric_name}`}
|
||||
/>
|
||||
}
|
||||
</div>);
|
||||
}
|
||||
MetricOption.propTypes = propTypes;
|
||||
MetricOption.defaultProps = defaultProps;
|
||||
@@ -87,6 +87,7 @@ export default class ModalTrigger extends React.Component {
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
/* eslint-disable jsx-a11y/interactive-supports-focus */
|
||||
return (
|
||||
<span className={classNames} onClick={this.open} role="button">
|
||||
{this.props.triggerNode}
|
||||
|
||||
87
superset/assets/javascripts/components/OnPasteSelect.jsx
Normal file
@@ -0,0 +1,87 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Select from 'react-select';
|
||||
|
||||
export default class OnPasteSelect extends React.Component {
|
||||
onPaste(evt) {
|
||||
if (!this.props.multi) {
|
||||
return;
|
||||
}
|
||||
evt.preventDefault();
|
||||
const clipboard = evt.clipboardData.getData('Text');
|
||||
if (!clipboard) {
|
||||
return;
|
||||
}
|
||||
const regex = `[${this.props.separator}]+`;
|
||||
const values = clipboard.split(new RegExp(regex)).map(v => v.trim());
|
||||
const validator = this.props.isValidNewOption;
|
||||
const selected = this.props.value || [];
|
||||
const existingOptions = {};
|
||||
const existing = {};
|
||||
this.props.options.forEach((v) => {
|
||||
existingOptions[v[this.props.valueKey]] = 1;
|
||||
});
|
||||
let options = [];
|
||||
selected.forEach((v) => {
|
||||
options.push({ [this.props.labelKey]: v, [this.props.valueKey]: v });
|
||||
existing[v] = 1;
|
||||
});
|
||||
options = options.concat(values
|
||||
.filter((v) => {
|
||||
const notExists = !existing[v];
|
||||
existing[v] = 1;
|
||||
return notExists && (validator ? validator({ [this.props.labelKey]: v }) : !!v);
|
||||
})
|
||||
.map((v) => {
|
||||
const opt = { [this.props.labelKey]: v, [this.props.valueKey]: v };
|
||||
if (!existingOptions[v]) {
|
||||
this.props.options.unshift(opt);
|
||||
}
|
||||
return opt;
|
||||
}),
|
||||
);
|
||||
if (options.length) {
|
||||
if (this.props.onChange) {
|
||||
this.props.onChange(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const SelectComponent = this.props.selectWrap;
|
||||
const refFunc = (ref) => {
|
||||
if (this.props.ref) {
|
||||
this.props.ref(ref);
|
||||
}
|
||||
this.pasteInput = ref;
|
||||
};
|
||||
const inputProps = { onPaste: this.onPaste.bind(this) };
|
||||
return (
|
||||
<SelectComponent
|
||||
{...this.props}
|
||||
ref={refFunc}
|
||||
inputProps={inputProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
OnPasteSelect.propTypes = {
|
||||
separator: PropTypes.string.isRequired,
|
||||
selectWrap: PropTypes.func.isRequired,
|
||||
ref: PropTypes.func,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
valueKey: PropTypes.string.isRequired,
|
||||
labelKey: PropTypes.string.isRequired,
|
||||
options: PropTypes.array,
|
||||
multi: PropTypes.bool.isRequired,
|
||||
value: PropTypes.any,
|
||||
isValidNewOption: PropTypes.func,
|
||||
};
|
||||
OnPasteSelect.defaultProps = {
|
||||
separator: ',',
|
||||
selectWrap: Select,
|
||||
valueKey: 'value',
|
||||
labelKey: 'label',
|
||||
options: [],
|
||||
multi: false,
|
||||
};
|
||||
28
superset/assets/javascripts/components/OptionDescription.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
|
||||
|
||||
const propTypes = {
|
||||
option: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
// This component provides a general tooltip for options
|
||||
// in a SelectControl
|
||||
export default function OptionDescription({ option }) {
|
||||
return (
|
||||
<span>
|
||||
<span className="m-r-5 option-label">
|
||||
{option.label}
|
||||
</span>
|
||||
{option.description &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="question-circle-o"
|
||||
tooltip={option.description}
|
||||
label={`descr-${option.label}`}
|
||||
/>
|
||||
}
|
||||
</span>);
|
||||
}
|
||||
OptionDescription.propTypes = propTypes;
|
||||
31
superset/assets/javascripts/components/PopoverSection.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
|
||||
|
||||
const propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
isSelected: PropTypes.bool.isRequired,
|
||||
onSelect: PropTypes.func.isRequired,
|
||||
info: PropTypes.string,
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
export default function PopoverSection({ title, isSelected, children, onSelect, info }) {
|
||||
return (
|
||||
<div className={'PopoverSection ' + (!isSelected ? 'dimmed' : '')}>
|
||||
<div onClick={onSelect} className="pointer">
|
||||
<strong>{title}</strong>
|
||||
{info &&
|
||||
<InfoTooltipWithTrigger
|
||||
tooltip={info}
|
||||
label="date-free-tooltip"
|
||||
/>}
|
||||
|
||||
<i className={isSelected ? 'fa fa-check text-primary' : ''} />
|
||||
</div>
|
||||
<div>
|
||||
{children}
|
||||
</div>
|
||||
</div>);
|
||||
}
|
||||
PopoverSection.propTypes = propTypes;
|
||||
59
superset/assets/javascripts/components/StackTraceMessage.jsx
Normal file
@@ -0,0 +1,59 @@
|
||||
/* eslint-disable react/no-danger */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Alert, Collapse } from 'react-bootstrap';
|
||||
|
||||
const propTypes = {
|
||||
message: PropTypes.string,
|
||||
queryResponse: PropTypes.object,
|
||||
showStackTrace: PropTypes.bool,
|
||||
};
|
||||
const defaultProps = {
|
||||
showStackTrace: false,
|
||||
};
|
||||
|
||||
class StackTraceMessage extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
showStackTrace: props.showStackTrace,
|
||||
};
|
||||
}
|
||||
|
||||
hasTrace() {
|
||||
return this.props.queryResponse && this.props.queryResponse.stacktrace;
|
||||
}
|
||||
|
||||
render() {
|
||||
const msg = (
|
||||
<div>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{ __html: this.props.message }}
|
||||
/>
|
||||
</div>);
|
||||
|
||||
return (
|
||||
<div className={`stack-trace-container${this.hasTrace() ? ' has-trace' : ''}`}>
|
||||
<Alert
|
||||
bsStyle="warning"
|
||||
onClick={() => this.setState({ showStackTrace: !this.state.showStackTrace })}
|
||||
>
|
||||
{msg}
|
||||
</Alert>
|
||||
{this.hasTrace() &&
|
||||
<Collapse in={this.state.showStackTrace}>
|
||||
<pre>
|
||||
{this.props.queryResponse.stacktrace}
|
||||
</pre>
|
||||
</Collapse>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
StackTraceMessage.propTypes = propTypes;
|
||||
StackTraceMessage.defaultProps = defaultProps;
|
||||
|
||||
export default StackTraceMessage;
|
||||
@@ -2,12 +2,28 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { now, fDuration } from '../modules/dates';
|
||||
|
||||
class Timer extends React.PureComponent {
|
||||
const propTypes = {
|
||||
endTime: PropTypes.number,
|
||||
isRunning: PropTypes.bool.isRequired,
|
||||
startTime: PropTypes.number,
|
||||
status: PropTypes.string,
|
||||
style: PropTypes.object,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
status: 'success',
|
||||
style: null,
|
||||
};
|
||||
|
||||
export default class Timer extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
clockStr: '',
|
||||
};
|
||||
this.stopwatch = this.stopwatch.bind(this);
|
||||
}
|
||||
componentWillMount() {
|
||||
this.startTimer();
|
||||
@@ -16,13 +32,12 @@ class Timer extends React.PureComponent {
|
||||
this.stopTimer();
|
||||
}
|
||||
startTimer() {
|
||||
if (!(this.timer)) {
|
||||
this.timer = setInterval(this.stopwatch.bind(this), 30);
|
||||
if (!this.timer) {
|
||||
this.timer = setInterval(this.stopwatch, 30);
|
||||
}
|
||||
}
|
||||
stopTimer() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
this.timer = clearInterval(this.timer);
|
||||
}
|
||||
stopwatch() {
|
||||
if (this.props && this.props.startTime) {
|
||||
@@ -54,19 +69,6 @@ class Timer extends React.PureComponent {
|
||||
return timerSpan;
|
||||
}
|
||||
}
|
||||
Timer.propTypes = {
|
||||
startTime: PropTypes.number,
|
||||
endTime: PropTypes.number,
|
||||
isRunning: PropTypes.bool.isRequired,
|
||||
status: PropTypes.string,
|
||||
style: PropTypes.object,
|
||||
};
|
||||
|
||||
Timer.defaultProps = {
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: 'success',
|
||||
style: null,
|
||||
};
|
||||
|
||||
export default Timer;
|
||||
Timer.propTypes = propTypes;
|
||||
Timer.defaultProps = defaultProps;
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default function VirtualizedRendererWrap(renderer) {
|
||||
function WrapperRenderer({
|
||||
focusedOption,
|
||||
focusOption,
|
||||
key,
|
||||
option,
|
||||
selectValue,
|
||||
style,
|
||||
valueArray,
|
||||
}) {
|
||||
if (!option) {
|
||||
return null;
|
||||
}
|
||||
const className = ['VirtualizedSelectOption'];
|
||||
if (option === focusedOption) {
|
||||
className.push('VirtualizedSelectFocusedOption');
|
||||
}
|
||||
if (option.disabled) {
|
||||
className.push('VirtualizedSelectDisabledOption');
|
||||
}
|
||||
if (valueArray && valueArray.indexOf(option) >= 0) {
|
||||
className.push('VirtualizedSelectSelectedOption');
|
||||
}
|
||||
if (option.className) {
|
||||
className.push(option.className);
|
||||
}
|
||||
const events = option.disabled ? {} : {
|
||||
onClick: () => selectValue(option),
|
||||
onMouseEnter: () => focusOption(option),
|
||||
};
|
||||
return (
|
||||
<div
|
||||
className={className.join(' ')}
|
||||
key={key}
|
||||
style={Object.assign(option.style || {}, style)}
|
||||
title={option.title}
|
||||
{...events}
|
||||
>
|
||||
{renderer(option)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
WrapperRenderer.propTypes = {
|
||||
focusedOption: PropTypes.object.isRequired,
|
||||
focusOption: PropTypes.func.isRequired,
|
||||
key: PropTypes.string,
|
||||
option: PropTypes.object,
|
||||
selectValue: PropTypes.func.isRequired,
|
||||
style: PropTypes.object,
|
||||
valueArray: PropTypes.array,
|
||||
};
|
||||
return WrapperRenderer;
|
||||
}
|
||||