Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pull from upstream #3

Merged
merged 206 commits into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
563e34a
Fixed public dashboard footer (#3703)
ranbena Apr 14, 2019
63e052c
Support LDAP servers where one doesn't first have to bind to the LDAP…
Jakdaw Apr 14, 2019
af168c6
Fix search ordered by best match (#3706)
Jakdaw Apr 14, 2019
3ab46bb
BigQuery: support for NaN values. (#3701)
arikfr Apr 14, 2019
01e64db
Fix Decimal128 error (#3684)
aidarbek Apr 14, 2019
1f43537
Update CardsList to use visual-card styling (#3679)
gabrieldutra Apr 14, 2019
b96094b
add a test to make sure reset password form are displayed correctly (…
Apr 14, 2019
5b30d08
Dynamic query time limits (#3702)
Apr 15, 2019
e485c96
Add rate limits to user creation/update (#3709)
arikfr Apr 15, 2019
9b3dd82
Sync PyAthena/botocore versions with requirements_all_ds.txt. (#3713)
arikfr Apr 17, 2019
18761cf
Dashboard auto-saving (#3653)
ranbena Apr 17, 2019
97492d7
Fix: update default CSP policy to allow KB iframe. (#3714)
arikfr Apr 17, 2019
aa9d246
Split redash/__init__.py to prevent import time side-effects. (#3601)
jezdez Apr 18, 2019
fea082e
Update Percy network idle timeout (#3724)
gabrieldutra Apr 19, 2019
10a6ccb
Dashboard save fail indication (#3715)
ranbena Apr 19, 2019
fb48bc3
Refactored dashboard drag/resize testing (#3726)
ranbena Apr 22, 2019
a1e75d2
feature: add couchbase query runner (#3658)
AntonZarutsky Apr 24, 2019
c93a905
Fix Ability to save with Multiple Dropdown Parameters (#3717)
Apr 28, 2019
99bb24d
Make creating the BigQuery job data pluggable. (#3742)
jezdez Apr 29, 2019
8758279
Use REDASH_BASE_PATH everywhere instead of hardcoded path (#3740)
arikfr Apr 29, 2019
24a5748
Dashboard grid markings (#3656)
ranbena Apr 29, 2019
48955b5
Use monospace font in query output log (#3743)
otsaloma Apr 29, 2019
c9bf412
Update npm run to fix hpe_header_overflow (#3732)
guwenqing Apr 29, 2019
f3a653c
Fix query based parameter has value null when created (#3707)
gabrieldutra Apr 29, 2019
21e22a2
add get_by_id to Organization (#3712)
Apr 29, 2019
d0b2151
Fix query page height (#3744)
ranbena Apr 29, 2019
9a4433b
Migrate visualizations registry/renderer/editor to React (#3493)
kravets-levko Apr 30, 2019
47cd05b
Cypress: Fix Stuck E2E test - create_query_spec (#3748)
gabrieldutra Apr 30, 2019
30f725f
Add missing parameter to new BigQuery query runner method. (#3747)
jezdez Apr 30, 2019
fbff4f9
Convert query control dropdown button to React (#3698)
openjck May 1, 2019
33930a5
Remove unused import statements (#3751)
ariarijp May 1, 2019
da2d6bc
Move is_url_key method to function for testability. (#3750)
ariarijp May 1, 2019
5b077ab
Support for Presto password (#3619)
aidarbek May 1, 2019
72d0031
[Code style] Add semi-colons (#3755)
taminif May 2, 2019
2cd1b07
Add: organization setting for time format (#3754)
yusukegoto May 5, 2019
17aba39
Fix: default value for Presto password should be None (#3757)
arikfr May 5, 2019
ee29cf9
Fix: pie chart not rendering when series doesn't exist in options. (#…
arikfr May 5, 2019
9fec3ca
Poll for results in parameterized embeds (#3752)
May 6, 2019
81bc4ef
[Feature] Add direction option in Pie Chart (#3762)
kyoshidajp May 6, 2019
c85e097
[Bug fix] Fix dashboard filters to collect options too (#3759)
yoavbls May 6, 2019
3eddea6
Show non relative timestamp when printing an embed. (#3773)
arikfr May 6, 2019
0b22aa5
DynamoDB: safe implementation of schema loading (#3774)
arikfr May 6, 2019
b7b345d
[Feature] Choropleth customize (added new map: Japanese Prefectures) …
deecay May 7, 2019
feafbbe
Avoid error with duplicate log lines (#3777)
otsaw May 7, 2019
d751556
Fix: Filter empty tags (#3780)
taminif May 10, 2019
0ee2079
Fix embeds without parameters (#3775)
May 12, 2019
50a6f72
Fix Ability to Add Query-based Parameters to Existing Queries (#3716)
May 12, 2019
76bd2e3
Migrate Organization Settings to React (#3728)
gabrieldutra May 12, 2019
3159410
Restrict markdown image dimensions (#3789)
ranbena May 12, 2019
6bf764b
Update query to bring only name to make sure screenshots are consiste…
arikfr May 12, 2019
50f1106
Presto: ignore blank passwords (#3791)
arikfr May 13, 2019
0cda036
[BigQuery] Fix: in some queries there is no mode field (#3786)
arikfr May 13, 2019
b09ae46
filtered tag remove empty name at edit query (#3784)
taminif May 13, 2019
ad6f710
Fix support for calling MySQL Stored Procedures and allow queries to …
Jakdaw May 13, 2019
95f11e6
Loading indicator till app inits (#3788)
ranbena May 13, 2019
c74d469
resize-event: take into account transformations and transitions (#3794)
kravets-levko May 13, 2019
b9b30a3
[Bug fix] Edit parameter mapping: error when trying to change mapping…
kravets-levko May 14, 2019
733b601
Fixed visual-card alignment (#3795)
ranbena May 14, 2019
4f40237
Migrate Embed Query Dialog to React (#3783)
gabrieldutra May 15, 2019
c76955b
Refresh query when parameters update (#3737)
gabrieldutra May 15, 2019
4508975
[Bug fix] Plotly modebar appears above modals (#3799)
kravets-levko May 15, 2019
606cf12
Dashboard grid React migration #1 (#3722)
ranbena May 16, 2019
b263bb7
[Bug fix] Fix "Now" in DateTime parameter not working (#3808)
gabrieldutra May 16, 2019
d97ce15
refactor format semi-colon (#3812)
taminif May 22, 2019
29875e6
Plug custom Celery tasks via dynamic settings (#3819)
May 22, 2019
d7b03ba
Add CircleCI env vars to Cypress docker (#3827)
gabrieldutra May 23, 2019
020dc35
Create SECURITY.md (#3823)
arikfr May 26, 2019
4143bd3
when authenticated, the query shouldn't be sent over to the /jobs end…
May 26, 2019
aecd0bf
include bigquery_gce.png in db-logos (#3825)
rueian May 26, 2019
07c9530
Decouple extensions from Flask app. (#3569)
jezdez May 26, 2019
7679df6
Fix for Mac browser’s scrollbar obscuring content (#3830)
ranbena May 27, 2019
28e9740
Update Data Source Lifecycle Events (#3828)
gabrieldutra May 27, 2019
5dff5b9
Unsupported browser redirect script outputted to file (#3832)
ranbena May 27, 2019
9480d89
[Feature] Migrate CreateDashboardDialog to React (#3826)
kravets-levko May 27, 2019
9292ae8
CSV: correctly serialize booleans and dates. (#3841)
arikfr May 29, 2019
816f4d9
Capitalize "elsewhere" (#3844)
arikfr May 29, 2019
c2e31f0
Fix table isn't displayed with date filter (#3842)
gabrieldutra May 29, 2019
2e96e2f
getredash/redash#3849 Fix initialization of dashboard-level parameter…
kravets-levko May 30, 2019
a0c76d7
getredash/redash#3851 Disable filter which does not have values (#3852)
kravets-levko May 30, 2019
b27df21
Cypress tests for query parameters (#3810)
gabrieldutra May 30, 2019
0445340
Fix widget autoHeight related exception (#3858)
ranbena May 31, 2019
10b62eb
Beautify autoheight code a bit (#3865)
ranbena May 31, 2019
6f290dd
Use more specific CSS for public dashboard page to avoid conflicts wi…
kravets-levko May 31, 2019
10b3b50
getredash/redash#3862 Widget menu should not be available on public d…
kravets-levko Jun 2, 2019
be8dec5
Add Collapse component (#3867)
arikfr Jun 2, 2019
3f8c733
Use the debian flavor of the redash/base image (#3240)
arikfr Jun 2, 2019
60b12e3
Update PromiseRejectionError to show error message from API response …
arikfr Jun 2, 2019
090b570
Rearrange README badges.
arikfr Jun 2, 2019
a9588ea
Update version to 8.0.0-beta. (#3869)
arikfr Jun 2, 2019
e433efe
Bump flask from 0.11.1 to 0.12.3 (#3871)
dependabot[bot] Jun 3, 2019
05f6ef0
Remove legacy session identifier support (#3866)
Jun 3, 2019
0e3e2ea
Restrict dynamic-table internal scroll only when pagination appears (…
ranbena Jun 4, 2019
a82fd0c
Cypress: Fix date parameters false positive (#3873)
gabrieldutra Jun 4, 2019
c0e8ef3
Upgrade gspread 3.1.0 for supporting team drive (#3838)
koooge Jun 6, 2019
5b780ac
Refresh Public Dashboards (#3881)
Jun 6, 2019
dda75cc
Drawer menu with recreated close button (#3889)
ranbena Jun 9, 2019
ed2ac40
Remove schema after deleting data source (#3894)
Jun 10, 2019
6605f62
add api_key to embed download urls (#3896)
Jun 11, 2019
e33ad3b
Query Results: querying a column with a dictionary or array fails (#3…
Jun 11, 2019
e45f49b
Bump cryptography from 2.0.2 to 2.3 (#3870)
dependabot[bot] Jun 12, 2019
3faed0f
Bump pyopenssl from 16.2.0 to 17.5.0 (#3872)
dependabot[bot] Jun 12, 2019
2af8b39
Authorize according to API key (if given) over cookies (#3877)
Jun 12, 2019
f8d05dd
getredash/redash#3879 Plotly legent overlaps plot on small screens (F…
kravets-levko Jun 12, 2019
1630cbb
Google Sheets: friendlier error message in case of an API error and m…
arikfr Jun 12, 2019
7a9f4b0
Force a Choose account step for Google OAuth (#3884)
kravets-levko Jun 12, 2019
4e0a251
Add support ssl connections to redis (#3848)
nason Jun 12, 2019
2bab144
Celery task to clear schedule was added (#3801)
aidarbek Jun 12, 2019
8e38dcd
Support regenerating Query API Key (#3764)
kyoshidajp Jun 12, 2019
ac293c7
Add alert deletion confirmation dialog (#3902)
kyoshidajp Jun 15, 2019
21a27ee
Fix OverflowError on celery worker (#3899)
guyco33 Jun 16, 2019
d617f57
Increase celery job timeout (#3903)
ranbena Jun 17, 2019
99bf6d1
Custom Map Markers (#3840)
deecay Jun 18, 2019
27c64b4
Add keyboard shortcut for format query (Ctrl/Cmd+Shift+F) (#3911)
arikfr Jun 18, 2019
6dd321b
Rockset: handle query errors (#3910)
arikfr Jun 18, 2019
a6960c5
Fix: time format option was wrong (#3916)
arikfr Jun 19, 2019
be580b2
Expose celery job timeout setting to env var (#3912)
deecay Jun 19, 2019
cfafa97
Fixed boolean filter (#3915)
ranbena Jun 19, 2019
9ee393e
Fix schedule dialog needless confirm saves (#3919)
ranbena Jun 20, 2019
27259b5
Add support for int/float values in guess_type (#3913)
arikfr Jun 20, 2019
a696fa5
Set unique class name for Query Control Dropdown (#3922)
openjck Jun 23, 2019
a00c5a8
Dockerfile front end stage copies client side files only (#3924)
ktmud Jun 23, 2019
1743800
[Bug fix] Adding widget from query page is broken (#3921)
kravets-levko Jun 25, 2019
92391e3
[Bug fix] Toggling Use Dashboard Level Filter cause widgets to show r…
kravets-levko Jun 28, 2019
3c1d1e3
Explicitly mark default visualization (#3944)
kravets-levko Jun 30, 2019
7ceb68a
Visualization: details view (#3778)
arikfr Jun 30, 2019
6748e9a
Add option to hide Pivot Table totals (#3943)
arikfr Jun 30, 2019
2e4a69c
Parameter spec fixes (#3932)
Jul 1, 2019
300f3f6
Fix: waiting tasks are not shown in admin view (#3942)
arikfr Jul 3, 2019
cc48de0
Migrate Word Cloud visualization to React (#3930)
kravets-levko Jul 3, 2019
45a3b72
Update fsevents to v1.2.9 (#3950)
arikfr Jul 4, 2019
5e5b56e
Fix: render date/time values as strings and not epoch time (#3951)
arikfr Jul 4, 2019
1f4325b
Migrate Box Plot visualization to React (#3948)
kravets-levko Jul 4, 2019
baec5d5
Remove time from Date column in filters (#3953)
gabrieldutra Jul 5, 2019
addecbd
Allow calling query results endpoint without parameters. (#3958)
arikfr Jul 7, 2019
47fc8a9
Add options to hide different parts of embed UI (parameters, title, l…
arikfr Jul 7, 2019
1878e8b
Add additional Celery config options (#3961)
arikfr Jul 8, 2019
261062d
Support multi-byte search for query names and descriptions (#3908)
sekiyama58 Jul 8, 2019
de0a44e
Migrate Query Snippets to React (#3627)
gabrieldutra Jul 9, 2019
df57d22
Add explicit route for dashboards to allow embedding in iframes. (#3957)
arikfr Jul 10, 2019
93449db
Improvements to Query Result serialization code (#3960)
arikfr Jul 10, 2019
5149bf6
[Bug fix] Archiving a dashboard cause widgets to show reload spinner …
kravets-levko Jul 10, 2019
7bf84e8
Workaround fixes for datepicker display bug in Cypress tests (#3967)
ranbena Jul 10, 2019
a8ff250
Build custom alert message (#3137)
k-tomoyasu Jul 11, 2019
15a8eec
JSON Data Source (#3805)
arikfr Jul 11, 2019
4e9da3f
[Bug fix] Plotly legend overlaps plot on small screens (when legend c…
kravets-levko Jul 13, 2019
c793b5d
Remove explicit kombu dependency (#3978)
arikfr Jul 14, 2019
51d8131
Allow Parameters on Public Dashboards (#3659)
Jul 15, 2019
9f00699
mattermost needs whitespace to use h4 heading (#3981)
ygrishaev Jul 15, 2019
bce0832
Show error in case of failing to load a dashboard (#3983)
arikfr Jul 15, 2019
66794ac
Added loading indicator to public dashboard (#3984)
ranbena Jul 16, 2019
5929139
A couple of parameters-on-public-dashboards loose ends (#3988)
Jul 16, 2019
c3cc65a
Viz embed logo alignment (#3956)
ranbena Jul 16, 2019
c83e40b
Celery doesn't auto reload in development (#3898)
Jul 17, 2019
01da8c1
Parameter “Apply Changes” button (#3907)
ranbena Jul 17, 2019
f20a020
Use AceEditor for Query Snippets (#3973)
gabrieldutra Jul 17, 2019
4989bfa
Remove custom Redis connection code in favor of redis.from_url (#3992)
arikfr Jul 18, 2019
d1edd3d
Query Result API response shouldn't include query information for non…
Jul 18, 2019
c054ae8
Fixed filter style issue (#3996)
ranbena Jul 18, 2019
c1f4147
Avoid committing `it.only` (#3995)
Jul 19, 2019
ad4a760
Search dropdown parameters (#3796)
fmy Jul 20, 2019
9bdb341
Move query runners/destinations import from redash.app to redash. (#3…
arikfr Jul 21, 2019
ea0e411
Return unsafe sharing error from backend (#3990)
Jul 21, 2019
b229519
Added publish notification to query rename (#3998)
ranbena Jul 21, 2019
dd89bd8
Add "deprecated" flag to query runners (and alert destinations) (#3972)
Jul 22, 2019
64f274f
Disable execute when params are dirty (#4001)
ranbena Jul 22, 2019
6f6c68b
Cypress: Separate dashboard spec (#4003)
gabrieldutra Jul 22, 2019
8c2f51d
Percy: Fix shared dashboard inconsistent snapshots (#4002)
gabrieldutra Jul 23, 2019
c518c7a
Modified PagerDuty destination to avoid an error for multi-byte chara…
katty0324 Jul 24, 2019
78cae47
Cypress: Specify widgets position on sharing spec (#4009)
gabrieldutra Jul 26, 2019
cd4daf8
Add Dynamic Values to Date and Date Range Parameters (#3904)
gabrieldutra Jul 26, 2019
86b0608
Fix Apply Changes is lost when query is edited (#4010)
gabrieldutra Jul 27, 2019
f165168
recycle gunicorn workers (#4013)
Jul 28, 2019
7fb33e3
Failed Scheduled Queries Report (#3798)
Jul 28, 2019
6f811f1
Added widget header refresh indicator (#3970)
ranbena Jul 29, 2019
5ddad86
Updated timeago strings (#4012)
ranbena Jul 29, 2019
4f742ae
Fix: support for unicode in DynamoDB queries (#4015)
arikfr Jul 30, 2019
eae1fb7
Force readonly inputs click (#4016)
gabrieldutra Jul 30, 2019
db89c4f
Turned off max asset size warning (#4023)
ranbena Jul 31, 2019
9b29091
Migrate Table visualization to React Part 1: Renderer (#3963)
kravets-levko Jul 31, 2019
4640c33
Bug fix: error when trying to collect dashboard-level filters for a t…
kravets-levko Jul 31, 2019
ef31d0d
Fix: don't update dashboard's version when adding a widget (#4026)
kravets-levko Jul 31, 2019
8ad08a5
Revert "Revoked widget refresh button spinners" (#4027)
ranbena Aug 1, 2019
11cc274
Update Snowflake connector version to latest (#4029)
arikfr Aug 4, 2019
9eabf89
getredash/redash#4031 Counter visualization: formatting not applied t…
kravets-levko Aug 4, 2019
f0576a3
Support multi-select in parameters (#3952)
gabrieldutra Aug 4, 2019
6fc4d5b
Focus DatePicker after selecting dynamic values (#4033)
gabrieldutra Aug 5, 2019
e41d40b
getredash/redash#4036 Visualisation editor crashes out when changing …
kravets-levko Aug 5, 2019
8e23f93
Allow dynamic values dropdown to scroll with the page (#4040)
gabrieldutra Aug 6, 2019
a167c59
Added arrow to multi-select component (#4044)
ranbena Aug 6, 2019
c4dcf01
avoid variable shadowing (#4050)
Aug 7, 2019
77625b2
Remove duplicate base_url function. (#4043)
jezdez Aug 8, 2019
cf7aef1
Make sure there is an event for any query execution (#4051)
Aug 9, 2019
76fbe85
refresh_queries requires Request Context (#4045)
Aug 9, 2019
4e5f55a
Align content vertically in restricted widget type (#4056)
osule Aug 11, 2019
a7b14bf
Fix according to pycodestyle format (#4011)
yoshiken Aug 11, 2019
aa2bd00
check float if scale > 0 in snowflake query result (#3876)
wudi-ayuan Aug 11, 2019
8abaf89
Add tag management commands (#3168)
ariarijp Aug 11, 2019
c5a9087
Add Cassandra to the list of default enabled query runners (#4058)
arikfr Aug 11, 2019
7c2acc3
Dont send password reset link to disabled users (#2631)
oldPadavan Aug 11, 2019
7dd62ef
Add option to control whether to format target value. (#4063)
arikfr Aug 12, 2019
685b536
Prevent CSP violations by not having script URLs (#4062)
arikfr Aug 12, 2019
aceea65
Change the required Docker Compose version to 3.2 (#4059)
arikfr Aug 12, 2019
be142d6
Add assume role as a credential source for AWS Athena Query runner (…
ialeinikov Aug 12, 2019
4698408
Cypress: Fix cy.clock not freezing time (#4060)
gabrieldutra Aug 13, 2019
7b5696d
Fix loading of periodic tasks and clean up extension loading. (#4064)
jezdez Aug 13, 2019
69ba165
[Data Sources] Initial commit for adding Dgraph support (#3987)
The-Alchemist Aug 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Copy Test Results
command: |
mkdir -p /tmp/test-results/unit-tests
docker cp tests:/app/coverage.xml ./coverage.xml
docker cp tests:/app/coverage.xml ./coverage.xml
docker cp tests:/app/junit.xml /tmp/test-results/unit-tests/results.xml
- store_test_results:
path: /tmp/test-results
Expand All @@ -61,6 +61,7 @@ jobs:
steps:
- checkout
- run: sudo apt install python-pip
- run: sudo pip install -r requirements_bundles.txt
- run: npm install
- run: npm run bundle
- run: npm test
Expand Down Expand Up @@ -95,6 +96,7 @@ jobs:
steps:
- checkout
- run: sudo apt install python-pip
- run: sudo pip install -r requirements_bundles.txt
- run: npm install
- run: .circleci/update_version
- run: npm run bundle
Expand All @@ -105,11 +107,14 @@ jobs:
path: /tmp/artifacts/
build-docker-image:
docker:
- image: circleci/buildpack-deps:xenial
- image: circleci/node:8
steps:
- setup_remote_docker
- checkout
- run: sudo apt install python-pip
- run: sudo pip install -r requirements_bundles.txt
- run: .circleci/update_version
- run: npm run bundle
- run: .circleci/docker_build
workflows:
version: 2
Expand Down
4 changes: 4 additions & 0 deletions .circleci/docker-compose.cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ services:
PERCY_BRANCH: ${CIRCLE_BRANCH}
PERCY_COMMIT: ${CIRCLE_SHA1}
PERCY_PULL_REQUEST: ${CIRCLE_PR_NUMBER}
COMMIT_INFO_BRANCH: ${CIRCLE_BRANCH}
COMMIT_INFO_AUTHOR: ${CIRCLE_USERNAME}
COMMIT_INFO_SHA: ${CIRCLE_SHA1}
COMMIT_INFO_REMOTE: ${CIRCLE_REPOSITORY_URL}
CYPRESS_PROJECT_ID: ${CYPRESS_PROJECT_ID}
CYPRESS_RECORD_KEY: ${CYPRESS_RECORD_KEY}
redis:
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{js,css,html}]
[*.{js,jsx,css,less,html}]
indent_style = space
indent_size = 2
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ WORKDIR /frontend
COPY package.json package-lock.json /frontend/
RUN npm install

COPY . /frontend
COPY client /frontend/client
COPY webpack.config.js /frontend/
RUN npm run build

FROM redash/base:latest
FROM redash/base:debian

# Controls whether to install extra dependencies needed for all data sources.
ARG skip_ds_deps

# We first copy only the requirements file, to avoid rebuilding on every file
# change.
COPY requirements.txt requirements_dev.txt requirements_all_ds.txt ./
COPY requirements.txt requirements_bundles.txt requirements_dev.txt requirements_all_ds.txt ./
RUN pip install -r requirements.txt -r requirements_dev.txt
RUN if [ "x$skip_ds_deps" = "x" ] ; then pip install -r requirements_all_ds.txt ; else echo "Skipping pip install -r requirements_all_ds.txt" ; fi

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<p align="center">
<img title="Redash" src='https://redash.io/assets/images/logo.png' width="200px"/>
</p>
<p align="center">
<img title="Build Status" src='https://circleci.com/gh/getredash/redash.png?circle-token=8a695aa5ec2cbfa89b48c275aea298318016f040'/>
</p>

[![Documentation](https://img.shields.io/badge/docs-redash.io/help-brightgreen.svg)](https://redash.io/help/)
[![Datree](https://s3.amazonaws.com/catalog.static.datree.io/datree-badge-20px.svg)](https://datree.io/?src=badge)
![Build Status](https://circleci.com/gh/getredash/redash.png?circle-token=8a695aa5ec2cbfa89b48c275aea298318016f040)

**_Redash_** is our take on freeing the data within our company in a way that will better fit our culture and usage patterns.

Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

Please email [email protected] to report any security vulnerabilities. We will acknowledge receipt of your vulnerability and strive to send you regular updates about our progress. If you're curious about the status of your disclosure please feel free to email us again. If you want to encrypt your disclosure email, you can use [this PGP key](https://keybase.io/arikfr/key.asc).
135 changes: 107 additions & 28 deletions bin/bundle-extensions
Original file line number Diff line number Diff line change
@@ -1,39 +1,118 @@
#!/usr/bin/env python

# -*- coding: utf-8 -*-
"""Copy bundle extension files to the client/app/extension directory"""
import logging
import os
from subprocess import call
from distutils.dir_util import copy_tree
from pathlib2 import Path
from shutil import copy
from collections import OrderedDict as odict

from importlib_metadata import entry_points
from importlib_resources import contents, is_resource, path

from pkg_resources import iter_entry_points, resource_filename, resource_isdir
# Name of the subdirectory
BUNDLE_DIRECTORY = "bundle"

logger = logging.getLogger(__name__)


# Make a directory for extensions and set it as an environment variable
# to be picked up by webpack.
EXTENSIONS_RELATIVE_PATH = os.path.join('client', 'app', 'extensions')
EXTENSIONS_DIRECTORY = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
EXTENSIONS_RELATIVE_PATH)

if not os.path.exists(EXTENSIONS_DIRECTORY):
os.makedirs(EXTENSIONS_DIRECTORY)
os.environ["EXTENSIONS_DIRECTORY"] = EXTENSIONS_RELATIVE_PATH

for entry_point in iter_entry_points('redash.extensions'):
# This is where the frontend code for an extension lives
# inside of its package.
content_folder_relative = os.path.join(
entry_point.name, 'bundle')
(root_module, _) = os.path.splitext(entry_point.module_name)

if not resource_isdir(root_module, content_folder_relative):
continue
extensions_relative_path = Path('client', 'app', 'extensions')
extensions_directory = Path(__file__).parent.parent / extensions_relative_path

if not extensions_directory.exists():
extensions_directory.mkdir()
os.environ["EXTENSIONS_DIRECTORY"] = str(extensions_relative_path)


def resource_isdir(module, resource):
"""Whether a given resource is a directory in the given module

https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-isdir
"""
try:
return resource in contents(module) and not is_resource(module, resource)
except (ImportError, TypeError):
# module isn't a package, so can't have a subdirectory/-package
return False


def entry_point_module(entry_point):
"""Returns the dotted module path for the given entry point"""
return entry_point.pattern.match(entry_point.value).group("module")


def load_bundles():
""""Load bundles as defined in Redash extensions.

content_folder = resource_filename(root_module, content_folder_relative)
The bundle entry point can be defined as a dotted path to a module
or a callable, but it won't be called but just used as a means
to find the files under its file system path.

The name of the directory it looks for files in is "bundle".

So a Python package with an extension bundle could look like this::

my_extensions/
├── __init__.py
└── wide_footer
├── __init__.py
└── bundle
├── extension.js
└── styles.css

and would then need to register the bundle with an entry point
under the "redash.bundles" group, e.g. in your setup.py::

setup(
# ...
entry_points={
"redash.bundles": [
"wide_footer = my_extensions.wide_footer",
]
# ...
},
# ...
)

"""
bundles = odict()
for entry_point in entry_points().get("redash.bundles", []):
logger.info('Loading Redash bundle "%s".', entry_point.name)
module = entry_point_module(entry_point)
# Try to get a list of bundle files
if not resource_isdir(module, BUNDLE_DIRECTORY):
logger.error(
'Redash bundle directory "%s" could not be found.', entry_point.name
)
continue
with path(module, BUNDLE_DIRECTORY) as bundle_dir:
bundles[entry_point.name] = list(bundle_dir.rglob("*"))

return bundles


bundles = load_bundles().items()
if bundles:
print('Number of extension bundles found: {}'.format(len(bundles)))
else:
print('No extension bundles found.')

for bundle_name, paths in bundles:
# Shortcut in case not paths were found for the bundle
if not paths:
print('No paths found for bundle "{}".'.format(bundle_name))
continue

# This is where we place our extensions folder.
destination = os.path.join(
EXTENSIONS_DIRECTORY,
entry_point.name)
# The destination for the bundle files with the entry point name as the subdirectory
destination = Path(extensions_directory, bundle_name)
if not destination.exists():
destination.mkdir()

copy_tree(content_folder, destination)
# Copy the bundle directory from the module to its destination.
print('Copying "{}" bundle to {}:'.format(bundle_name, destination.resolve()))
for src_path in paths:
dest_path = destination / src_path.name
print(" - {} -> {}".format(src_path, dest_path))
copy(str(src_path), str(dest_path))
20 changes: 19 additions & 1 deletion bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ scheduler() {
exec /usr/local/bin/celery worker --app=redash.worker --beat -s$SCHEDULE_DB -c$WORKERS_COUNT -Q$QUEUES -linfo --max-tasks-per-child=10 -Ofair
}

dev_worker() {
WORKERS_COUNT=${WORKERS_COUNT:-2}
QUEUES=${QUEUES:-queries,scheduled_queries,celery,schemas}
SCHEDULE_DB=${SCHEDULE_DB:-celerybeat-schedule}

echo "Starting dev scheduler and $WORKERS_COUNT workers for queues: $QUEUES..."

exec watchmedo auto-restart --directory=./redash/ --pattern=*.py --recursive -- /usr/local/bin/celery worker --app=redash.worker --beat -s$SCHEDULE_DB -c$WORKERS_COUNT -Q$QUEUES -linfo --max-tasks-per-child=10 -Ofair
}

server() {
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w${REDASH_WEB_WORKERS:-4} redash.wsgi:app
# Recycle gunicorn workers every n-th request. See http://docs.gunicorn.org/en/stable/settings.html#max-requests for more details.
MAX_REQUESTS=${MAX_REQUESTS:-1000}
MAX_REQUESTS_JITTER=${MAX_REQUESTS_JITTER:-100}
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w${REDASH_WEB_WORKERS:-4} redash.wsgi:app --max-requests $MAX_REQUESTS --max-requests-jitter $MAX_REQUESTS_JITTER
}

create_db() {
Expand All @@ -41,6 +54,7 @@ help() {
echo "server -- start Redash server (with gunicorn)"
echo "worker -- start Celery worker"
echo "scheduler -- start Celery worker with a beat (scheduler) process"
echo "dev_worker -- start Celery worker with a beat (scheduler) process which picks up code changes and reloads"
echo "celery_healthcheck -- runs a Celery healthcheck. Useful for Docker's HEALTHCHECK mechanism."
echo ""
echo "shell -- open shell"
Expand Down Expand Up @@ -75,6 +89,10 @@ case "$1" in
shift
scheduler
;;
dev_worker)
shift
dev_worker
;;
dev_server)
export FLASK_DEBUG=1
exec /app/manage.py runserver --debugger --reload -h 0.0.0.0
Expand Down
4 changes: 2 additions & 2 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
extends: ["airbnb", "plugin:compat/recommended"],
plugins: ["jest", "compat"],
plugins: ["jest", "compat", "no-only-tests"],
settings: {
"import/resolver": "webpack"
},
Expand All @@ -26,7 +26,7 @@ module.exports = {
"consistent-return": "off",
"no-control-regex": "off",
"no-multiple-empty-lines": "warn",
"no-script-url": "off", // some <a> tags should have href="javascript:void(0)"
"no-only-tests/no-only-tests": "error",
"operator-linebreak": "off",
"react/destructuring-assignment": "off",
"react/jsx-filename-extension": "off",
Expand Down
3 changes: 3 additions & 0 deletions client/app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ module.exports = {
env: {
"jest/globals": true,
},
rules: {
"jest/no-focused-tests": "off",
},
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/db-logos/couchbase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/db-logos/dgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/db-logos/json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading