Skip to content

Commit 8ffc271

Browse files
author
atharvai
committed
Merge remote-tracking branch 'upstream/master'
2 parents 7ff0c35 + d38d3b6 commit 8ffc271

File tree

377 files changed

+16381
-1504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+16381
-1504
lines changed

.circleci/config.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2.0
22

33
build-docker-image-job: &build-docker-image-job
44
docker:
5-
- image: circleci/node:8
5+
- image: circleci/node:12
66
steps:
77
- setup_remote_docker
88
- checkout
@@ -33,7 +33,7 @@ jobs:
3333
name: Build Docker Images
3434
command: |
3535
set -x
36-
docker-compose build --build-arg skip_ds_deps=true
36+
docker-compose build --build-arg skip_ds_deps=true --build-arg skip_frontend_build=true
3737
docker-compose up -d
3838
sleep 10
3939
- run:
@@ -58,7 +58,7 @@ jobs:
5858
path: coverage.xml
5959
frontend-lint:
6060
docker:
61-
- image: circleci/node:8
61+
- image: circleci/node:12
6262
steps:
6363
- checkout
6464
- run: mkdir -p /tmp/test-results/eslint
@@ -68,15 +68,20 @@ jobs:
6868
path: /tmp/test-results
6969
frontend-unit-tests:
7070
docker:
71-
- image: circleci/node:8
71+
- image: circleci/node:12
7272
steps:
7373
- checkout
7474
- run: sudo apt update
7575
- run: sudo apt install python3-pip
7676
- run: sudo pip3 install -r requirements_bundles.txt
7777
- run: npm ci
7878
- run: npm run bundle
79-
- run: npm test
79+
- run:
80+
name: Run App Tests
81+
command: npm test
82+
- run:
83+
name: Run Visualizations Tests
84+
command: (cd viz-lib && npm test)
8085
- run: npm run lint
8186
frontend-e2e-tests:
8287
environment:
@@ -86,7 +91,7 @@ jobs:
8691
CYPRESS_PROJECT_ID_ENCODED: OTI0Y2th
8792
CYPRESS_RECORD_KEY_ENCODED: YzA1OTIxMTUtYTA1Yy00NzQ2LWEyMDMtZmZjMDgwZGI2ODgx
8893
docker:
89-
- image: circleci/node:8
94+
- image: circleci/node:12
9095
steps:
9196
- setup_remote_docker
9297
- checkout

.circleci/docker_build

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ docker login -u $DOCKER_USER -p $DOCKER_PASS
66

77
if [ $CIRCLE_BRANCH = master ] || [ $CIRCLE_BRANCH = preview-image ]
88
then
9-
docker build -t redash/redash:preview -t redash/preview:$VERSION_TAG .
9+
docker build --build-arg skip_dev_deps=true -t redash/redash:preview -t redash/preview:$VERSION_TAG .
1010
docker push redash/redash:preview
1111
docker push redash/preview:$VERSION_TAG
1212
else
13-
docker build -t redash/redash:$VERSION_TAG .
13+
docker build --build-arg skip_dev_deps=true -t redash/redash:$VERSION_TAG .
1414
docker push redash/redash:$VERSION_TAG
1515
fi
1616

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
client/.tmp/
22
client/dist/
33
node_modules/
4+
viz-lib/node_modules/
45
.tmp/
56
.venv/
67
venv/

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ venv/
99
coverage.xml
1010
client/dist
1111
.DS_Store
12-
celerybeat-schedule*
1312
.#*
1413
\#*#
1514
*~

.restyled.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ labels: ["Skip CI"]
5050
# Restylers to run, and how
5151
restylers:
5252
- name: black
53+
image: restyled/restyler-black:v19.10b0
5354
include:
5455
- redash
5556
- tests
5657
- migrations/versions
5758
- name: prettier
59+
image: restyled/restyler-prettier:v1.19.1-2
5860
include:
5961
- client/app/**/*.js
6062
- client/app/**/*.jsx
61-
- client/cypress/**/*.js
63+
- client/cypress/**/*.js

Dockerfile

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
FROM node:12 as frontend-builder
22

3+
# Controls whether to build the frontend assets
4+
ARG skip_frontend_build
5+
36
WORKDIR /frontend
47
COPY package.json package-lock.json /frontend/
5-
RUN npm ci
8+
COPY viz-lib /frontend/viz-lib
9+
RUN if [ "x$skip_frontend_build" = "x" ] ; then npm ci --unsafe-perm; fi
610

711
COPY client /frontend/client
812
COPY webpack.config.js /frontend/
9-
RUN npm run build
13+
RUN if [ "x$skip_frontend_build" = "x" ] ; then npm run build; else mkdir /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi
1014

1115
FROM python:3.7-slim
1216

1317
EXPOSE 5000
1418

1519
# Controls whether to install extra dependencies needed for all data sources.
1620
ARG skip_ds_deps
21+
# Controls whether to install dev dependencies.
22+
ARG skip_dev_deps
1723

1824
RUN useradd --create-home redash
1925

@@ -38,15 +44,25 @@ RUN apt-get update && \
3844
libssl-dev \
3945
default-libmysqlclient-dev \
4046
freetds-dev \
41-
libsasl2-dev && \
42-
# MSSQL ODBC Driver:
47+
libsasl2-dev \
48+
unzip \
49+
libsasl2-modules-gssapi-mit && \
50+
# MSSQL ODBC Driver:
4351
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
4452
curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
4553
apt-get update && \
4654
ACCEPT_EULA=Y apt-get install -y msodbcsql17 && \
4755
apt-get clean && \
4856
rm -rf /var/lib/apt/lists/*
4957

58+
ARG databricks_odbc_driver_url=https://databricks.com/wp-content/uploads/2.6.10.1010-2/SimbaSparkODBC-2.6.10.1010-2-Debian-64bit.zip
59+
ADD $databricks_odbc_driver_url /tmp/simba_odbc.zip
60+
RUN unzip /tmp/simba_odbc.zip -d /tmp/ \
61+
&& dpkg -i /tmp/SimbaSparkODBC-2.6.10.1010-2-Debian-64bit/simbaspark_2.6.10.1010-2_amd64.deb \
62+
&& echo "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \
63+
&& rm /tmp/simba_odbc.zip \
64+
&& rm -rf /tmp/SimbaSparkODBC*
65+
5066
WORKDIR /app
5167

5268
# Disalbe PIP Cache and Version Check
@@ -56,7 +72,7 @@ ENV PIP_NO_CACHE_DIR=1
5672
# We first copy only the requirements file, to avoid rebuilding on every file
5773
# change.
5874
COPY requirements.txt requirements_bundles.txt requirements_dev.txt requirements_all_ds.txt ./
59-
RUN pip install -r requirements.txt -r requirements_dev.txt
75+
RUN if [ "x$skip_dev_deps" = "x" ] ; then pip install -r requirements.txt -r requirements_dev.txt; else pip install -r requirements.txt; fi
6076
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
6177

6278
COPY . /app

README.md

+61-12
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,77 @@
66
[![Datree](https://s3.amazonaws.com/catalog.static.datree.io/datree-badge-20px.svg)](https://datree.io/?src=badge)
77
[![Build Status](https://circleci.com/gh/getredash/redash.png?style=shield&circle-token=8a695aa5ec2cbfa89b48c275aea298318016f040)](https://circleci.com/gh/getredash/redash/tree/master)
88

9-
**_Redash_** is our take on freeing the data within our company in a way that will better fit our culture and usage patterns.
9+
Redash is designed to enable anyone, regardless of the level of technical sophistication, to harness the power of data big and small. SQL users leverage Redash to explore, query, visualize, and share data from any data sources. Their work in turn enables anybody in their organization to use the data. Every day, millions of users at thousands of organizations around the world use Redash to develop insights and make data-driven decisions.
1010

11-
Prior to **_Redash_**, we tried to use traditional BI suites and discovered a set of bloated, technically challenged and slow tools/flows. What we were looking for was a more hacker'ish way to look at data, so we built one.
11+
Redash features:
1212

13-
**_Redash_** was built to allow fast and easy access to billions of records, that we process and collect using Amazon Redshift ("petabyte scale data warehouse" that "speaks" PostgreSQL).
14-
Today **_Redash_** has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
15-
16-
**_Redash_** consists of two parts:
17-
18-
1. **Query Editor**: think of [JS Fiddle](https://jsfiddle.net) for SQL queries. It's your way to share data in the organization in an open way, by sharing both the dataset and the query that generated it. This way everyone can peer review not only the resulting dataset but also the process that generated it. Also it's possible to fork it and generate new datasets and reach new insights.
19-
2. **Visualizations and Dashboards**: once you have a dataset, you can create different visualizations out of it, and then combine several visualizations into a single dashboard. Currently Redash supports charts, pivot table, cohorts and [more](https://redash.io/help/user-guide/visualizations/visualization-types).
13+
1. **Browser-based**: Everything in your browser, with a shareable URL.
14+
2. **Ease-of-use**: Become immediately productive with data without the need to master complex software.
15+
3. **Query editor**: Quickly compose SQL and NoSQL queries with a schema browser and auto-complete.
16+
4. **Visualization and dashboards**: Create [beautiful visualizations](https://redash.io/help/user-guide/visualizations/visualization-types) with drag and drop, and combine them into a single dashboard.
17+
5. **Sharing**: Collaborate easily by sharing visualizations and their associated queries, enabling peer review of reports and queries.
18+
6. **Schedule refreshes**: Automatically update your charts and dashboards at regular intervals you define.
19+
7. **Alerts**: Define conditions and be alerted instantly when your data changes.
20+
8. **REST API**: Everything that can be done in the UI is also available through REST API.
21+
9. **Broad support for data sources**: Extensible data source API with native support for a long list of common databases and platforms.
2022

2123
<img src="https://raw.githubusercontent.com/getredash/website/8e820cd02c73a8ddf4f946a9d293c54fd3fb08b9/website/_assets/images/redash-anim.gif" width="80%"/>
2224

2325
## Getting Started
2426

25-
* [Setting up Redash instance](https://redash.io/help/open-source/setup) (includes links to ready made AWS/GCE images).
27+
* [Setting up Redash instance](https://redash.io/help/open-source/setup) (includes links to ready-made AWS/GCE images).
2628
* [Documentation](https://redash.io/help/).
2729

2830
## Supported Data Sources
2931

30-
Redash supports more than 35 [data sources](https://redash.io/help/data-sources/supported-data-sources).
32+
Redash supports more than 35 SQL and NoSQL [data sources](https://redash.io/help/data-sources/supported-data-sources). It can also be extended to support more. Below is a list of built-in sources:
33+
34+
- Amazon Athena
35+
- Amazon DynamoDB
36+
- Amazon Redshift
37+
- Axibase Time Series Database
38+
- Cassandra
39+
- ClickHouse
40+
- CockroachDB
41+
- CSV
42+
- Databricks (Apache Spark)
43+
- DB2 by IBM
44+
- Druid
45+
- Elasticsearch
46+
- Google Analytics
47+
- Google BigQuery
48+
- Google Spreadsheets
49+
- Graphite
50+
- Greenplum
51+
- Hive
52+
- Impala
53+
- InfluxDB
54+
- JIRA
55+
- JSON
56+
- Apache Kylin
57+
- OmniSciDB (Formerly MapD)
58+
- MemSQL
59+
- Microsoft Azure Data Warehouse / Synapse
60+
- Microsoft Azure SQL Database
61+
- Microsoft SQL Server
62+
- MongoDB
63+
- MySQL
64+
- Oracle
65+
- PostgreSQL
66+
- Presto
67+
- Prometheus
68+
- Python
69+
- Qubole
70+
- Rockset
71+
- Salesforce
72+
- ScyllaDB
73+
- Shell Scripts
74+
- Snowflake
75+
- SQLite
76+
- TreasureData
77+
- Vertica
78+
- Yandex AppMetrrica
79+
- Yandex Metrica
3180

3281
## Getting Help
3382

@@ -37,7 +86,7 @@ Redash supports more than 35 [data sources](https://redash.io/help/data-sources/
3786
## Reporting Bugs and Contributing Code
3887

3988
* Want to report a bug or request a feature? Please open [an issue](https://github.com/getredash/redash/issues/new).
40-
* Want to help us build **_Redash_**? Fork the project, edit in a [dev environment](https://redash.io/help-onpremise/dev/guide.html), and make a pull request. We need all the help we can get!
89+
* Want to help us build **_Redash_**? Fork the project, edit in a [dev environment](https://redash.io/help-onpremise/dev/guide.html) and make a pull request. We need all the help we can get!
4190

4291
## Security
4392

bin/pre_compile

-18
This file was deleted.
-14.3 KB
Loading
5.32 KB
Loading

client/app/assets/less/ant.less

+36-35
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
@import '~antd/lib/style/core/iconfont';
2-
@import '~antd/lib/style/core/motion';
3-
@import '~antd/lib/alert/style/index';
4-
@import '~antd/lib/input/style/index';
5-
@import '~antd/lib/input-number/style/index';
6-
@import '~antd/lib/date-picker/style/index';
7-
@import '~antd/lib/modal/style/index';
8-
@import '~antd/lib/tooltip/style/index';
9-
@import '~antd/lib/select/style/index';
10-
@import '~antd/lib/checkbox/style/index';
11-
@import '~antd/lib/upload/style/index';
12-
@import '~antd/lib/form/style/index';
13-
@import '~antd/lib/button/style/index';
14-
@import '~antd/lib/radio/style/index';
15-
@import '~antd/lib/time-picker/style/index';
16-
@import '~antd/lib/pagination/style/index';
17-
@import '~antd/lib/table/style/index';
18-
@import '~antd/lib/popover/style/index';
19-
@import '~antd/lib/icon/style/index';
20-
@import '~antd/lib/tag/style/index';
21-
@import '~antd/lib/grid/style/index';
22-
@import '~antd/lib/switch/style/index';
23-
@import '~antd/lib/empty/style/index';
24-
@import '~antd/lib/drawer/style/index';
25-
@import '~antd/lib/card/style/index';
26-
@import '~antd/lib/steps/style/index';
27-
@import '~antd/lib/divider/style/index';
28-
@import '~antd/lib/dropdown/style/index';
29-
@import '~antd/lib/menu/style/index';
30-
@import '~antd/lib/list/style/index';
1+
@import "~antd/lib/style/core/iconfont";
2+
@import "~antd/lib/style/core/motion";
3+
@import "~antd/lib/alert/style/index";
4+
@import "~antd/lib/input/style/index";
5+
@import "~antd/lib/input-number/style/index";
6+
@import "~antd/lib/date-picker/style/index";
7+
@import "~antd/lib/modal/style/index";
8+
@import "~antd/lib/tooltip/style/index";
9+
@import "~antd/lib/select/style/index";
10+
@import "~antd/lib/checkbox/style/index";
11+
@import "~antd/lib/upload/style/index";
12+
@import "~antd/lib/form/style/index";
13+
@import "~antd/lib/button/style/index";
14+
@import "~antd/lib/radio/style/index";
15+
@import "~antd/lib/time-picker/style/index";
16+
@import "~antd/lib/pagination/style/index";
17+
@import "~antd/lib/table/style/index";
18+
@import "~antd/lib/popover/style/index";
19+
@import "~antd/lib/icon/style/index";
20+
@import "~antd/lib/tag/style/index";
21+
@import "~antd/lib/grid/style/index";
22+
@import "~antd/lib/switch/style/index";
23+
@import "~antd/lib/empty/style/index";
24+
@import "~antd/lib/drawer/style/index";
25+
@import "~antd/lib/card/style/index";
26+
@import "~antd/lib/steps/style/index";
27+
@import "~antd/lib/divider/style/index";
28+
@import "~antd/lib/dropdown/style/index";
29+
@import "~antd/lib/menu/style/index";
30+
@import "~antd/lib/list/style/index";
3131
@import "~antd/lib/badge/style/index";
3232
@import "~antd/lib/card/style/index";
3333
@import "~antd/lib/spin/style/index";
@@ -36,7 +36,8 @@
3636
@import "~antd/lib/collapse/style/index";
3737
@import "~antd/lib/progress/style/index";
3838
@import "~antd/lib/typography/style/index";
39-
@import 'inc/ant-variables';
39+
@import "~antd/lib/descriptions/style/index";
40+
@import "inc/ant-variables";
4041

4142
// Increase z-indexes to avoid conflicts with some other libraries (e.g. Plotly)
4243
@zindex-modal: 2000;
@@ -237,11 +238,11 @@
237238
&-item {
238239
// custom rule
239240
&.selected {
240-
background-color: #F6F8F9;
241+
background-color: #f6f8f9;
241242
}
242243

243244
&.disabled {
244-
background-color: fade(#F6F8F9, 40%);
245+
background-color: fade(#f6f8f9, 40%);
245246

246247
& > * {
247248
opacity: 0.4;
@@ -367,7 +368,7 @@
367368
top: auto !important;
368369
bottom: 8px;
369370

370-
// makes the icon white instead of see-through
371+
// makes the icon white instead of see-through
371372
& svg {
372373
background: white;
373374
border-radius: 50%;
@@ -394,7 +395,7 @@
394395
}
395396

396397
// overrides for checkbox
397-
@checkbox-prefix-cls: ~'@{ant-prefix}-checkbox';
398+
@checkbox-prefix-cls: ~"@{ant-prefix}-checkbox";
398399

399400
.@{checkbox-prefix-cls}-wrapper + span,
400401
.@{checkbox-prefix-cls} + span {

0 commit comments

Comments
 (0)