Compare commits
1 Commits
24.05.0-de
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a978bada3 |
12
.circleci/Dockerfile.cypress
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM cypress/browsers:chrome67
|
||||
|
||||
ENV APP /usr/src/app
|
||||
WORKDIR $APP
|
||||
|
||||
COPY package.json $APP/package.json
|
||||
RUN npm run cypress:install > /dev/null
|
||||
|
||||
COPY cypress $APP/cypress
|
||||
COPY cypress.json $APP/cypress.json
|
||||
|
||||
RUN ./node_modules/.bin/cypress verify
|
||||
129
.circleci/config.yml
Normal file
@@ -0,0 +1,129 @@
|
||||
version: 2.0
|
||||
|
||||
flake8-steps: &steps
|
||||
- checkout
|
||||
- run: sudo pip install flake8
|
||||
- run: ./bin/flake8_tests.sh
|
||||
jobs:
|
||||
python-flake8-tests:
|
||||
docker:
|
||||
- image: circleci/python:3.7.0
|
||||
steps: *steps
|
||||
legacy-python-flake8-tests:
|
||||
docker:
|
||||
- image: circleci/python:2.7.15
|
||||
steps: *steps
|
||||
backend-unit-tests:
|
||||
environment:
|
||||
COMPOSE_FILE: .circleci/docker-compose.circle.yml
|
||||
COMPOSE_PROJECT_NAME: redash
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:xenial
|
||||
steps:
|
||||
- setup_remote_docker
|
||||
- checkout
|
||||
- run:
|
||||
name: Build Docker Images
|
||||
command: |
|
||||
set -x
|
||||
docker-compose build --build-arg skip_ds_deps=true
|
||||
docker-compose up -d
|
||||
sleep 10
|
||||
- run:
|
||||
name: Create Test Database
|
||||
command: docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests;"
|
||||
- run:
|
||||
name: Run Tests
|
||||
command: docker-compose run --name tests redash tests --junitxml=junit.xml --cov-report xml --cov=redash --cov-config .coveragerc tests/
|
||||
- run:
|
||||
name: Copy Test Results
|
||||
command: |
|
||||
mkdir -p /tmp/test-results/unit-tests
|
||||
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
|
||||
- store_artifacts:
|
||||
path: coverage.xml
|
||||
frontend-unit-tests:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo apt install python-pip
|
||||
- run: npm install
|
||||
- run: npm run bundle
|
||||
- run: npm test
|
||||
frontend-e2e-tests:
|
||||
environment:
|
||||
COMPOSE_FILE: .circleci/docker-compose.cypress.yml
|
||||
COMPOSE_PROJECT_NAME: cypress
|
||||
PERCY_TOKEN_ENCODED: ZGRiY2ZmZDQ0OTdjMzM5ZWE0ZGQzNTZiOWNkMDRjOTk4Zjg0ZjMxMWRmMDZiM2RjOTYxNDZhOGExMjI4ZDE3MA==
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- setup_remote_docker
|
||||
- checkout
|
||||
- run:
|
||||
name: Install npm dependencies
|
||||
command: |
|
||||
npm install
|
||||
- run:
|
||||
name: Setup Redash server
|
||||
command: |
|
||||
npm run cypress start
|
||||
docker-compose run cypress node ./cypress/cypress.js db-seed
|
||||
- run:
|
||||
name: Execute Cypress tests
|
||||
command: npm run cypress run-ci
|
||||
build-tarball:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo apt install python-pip
|
||||
- run: npm install
|
||||
- run: .circleci/update_version
|
||||
- run: npm run bundle
|
||||
- run: npm run build
|
||||
- run: .circleci/pack
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts/
|
||||
build-docker-image:
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:xenial
|
||||
steps:
|
||||
- setup_remote_docker
|
||||
- checkout
|
||||
- run: .circleci/update_version
|
||||
- run: .circleci/docker_build
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- python-flake8-tests
|
||||
- legacy-python-flake8-tests
|
||||
- backend-unit-tests
|
||||
- frontend-unit-tests
|
||||
- frontend-e2e-tests
|
||||
- build-tarball:
|
||||
requires:
|
||||
- backend-unit-tests
|
||||
- frontend-unit-tests
|
||||
- frontend-e2e-tests
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /release\/.*/
|
||||
- build-docker-image:
|
||||
requires:
|
||||
- backend-unit-tests
|
||||
- frontend-unit-tests
|
||||
- frontend-e2e-tests
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- preview-image
|
||||
- /release\/.*/
|
||||
22
.circleci/docker-compose.circle.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: '3'
|
||||
services:
|
||||
redash:
|
||||
build: ../
|
||||
command: manage version
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 0
|
||||
REDASH_LOG_LEVEL: "INFO"
|
||||
REDASH_REDIS_URL: "redis://redis:6379/0"
|
||||
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
||||
redis:
|
||||
image: redis:3.0-alpine
|
||||
restart: unless-stopped
|
||||
postgres:
|
||||
image: postgres:9.5.6-alpine
|
||||
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF"
|
||||
restart: unless-stopped
|
||||
47
.circleci/docker-compose.cypress.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
version: '3'
|
||||
services:
|
||||
server:
|
||||
build: ../
|
||||
command: dev_server
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 0
|
||||
REDASH_LOG_LEVEL: "INFO"
|
||||
REDASH_REDIS_URL: "redis://redis:6379/0"
|
||||
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
||||
worker:
|
||||
build: ../
|
||||
command: scheduler
|
||||
depends_on:
|
||||
- server
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 0
|
||||
REDASH_LOG_LEVEL: "INFO"
|
||||
REDASH_REDIS_URL: "redis://redis:6379/0"
|
||||
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
|
||||
QUEUES: "queries,scheduled_queries,celery,schemas"
|
||||
WORKERS_COUNT: 2
|
||||
cypress:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: .circleci/Dockerfile.cypress
|
||||
depends_on:
|
||||
- server
|
||||
- worker
|
||||
environment:
|
||||
CYPRESS_baseUrl: "http://server:5000"
|
||||
PERCY_TOKEN: ${PERCY_TOKEN}
|
||||
PERCY_BRANCH: ${CIRCLE_BRANCH}
|
||||
PERCY_COMMIT: ${CIRCLE_SHA1}
|
||||
PERCY_PULL_REQUEST: ${CIRCLE_PR_NUMBER}
|
||||
redis:
|
||||
image: redis:3.0-alpine
|
||||
restart: unless-stopped
|
||||
postgres:
|
||||
image: postgres:9.5.6-alpine
|
||||
command: "postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=OFF"
|
||||
restart: unless-stopped
|
||||
17
.circleci/docker_build
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
VERSION=$(jq -r .version package.json)
|
||||
VERSION_TAG=$VERSION.b$CIRCLE_BUILD_NUM
|
||||
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
|
||||
if [ $CIRCLE_BRANCH = master ] || [ $CIRCLE_BRANCH = preview-image ]
|
||||
then
|
||||
docker build -t redash/redash:preview -t redash/preview:$VERSION_TAG .
|
||||
docker push redash/redash:preview
|
||||
docker push redash/preview:$VERSION_TAG
|
||||
else
|
||||
docker build -t redash/redash:$VERSION_TAG .
|
||||
docker push redash/redash:$VERSION_TAG
|
||||
fi
|
||||
|
||||
echo "Built: $VERSION_TAG"
|
||||
9
.circleci/pack
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
NAME=redash
|
||||
VERSION=$(jq -r .version package.json)
|
||||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM
|
||||
FILENAME=$NAME.$FULL_VERSION.tar.gz
|
||||
|
||||
mkdir -p /tmp/artifacts/
|
||||
|
||||
tar -zcv -f /tmp/artifacts/$FILENAME --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" *
|
||||
6
.circleci/update_version
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
VERSION=$(jq -r .version package.json)
|
||||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM
|
||||
|
||||
sed -ri "s/^__version__ = '([A-Za-z0-9.-]*)'/__version__ = '$FULL_VERSION'/" redash/__init__.py
|
||||
sed -i "s/dev/$CIRCLE_SHA1/" client/app/version.json
|
||||
40
.codeclimate.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
version: "2"
|
||||
checks:
|
||||
complex-logic:
|
||||
enabled: false
|
||||
file-lines:
|
||||
enabled: false
|
||||
method-complexity:
|
||||
enabled: false
|
||||
method-count:
|
||||
enabled: false
|
||||
method-lines:
|
||||
config:
|
||||
threshold: 100
|
||||
nested-control-flow:
|
||||
enabled: false
|
||||
identical-code:
|
||||
enabled: false
|
||||
similar-code:
|
||||
enabled: false
|
||||
plugins:
|
||||
pep8:
|
||||
enabled: true
|
||||
eslint:
|
||||
enabled: true
|
||||
channel: "eslint-5"
|
||||
config:
|
||||
config: client/.eslintrc.js
|
||||
checks:
|
||||
import/no-unresolved:
|
||||
enabled: false
|
||||
no-multiple-empty-lines: # TODO: Enable
|
||||
enabled: false
|
||||
exclude_patterns:
|
||||
- "tests/**/*.py"
|
||||
- "migrations/**/*.py"
|
||||
- "setup/**/*"
|
||||
- "bin/**/*"
|
||||
- "**/node_modules/"
|
||||
- "client/dist/"
|
||||
- "**/*.pyc"
|
||||
@@ -1,6 +1,6 @@
|
||||
client/.tmp/
|
||||
client/dist/
|
||||
node_modules/
|
||||
viz-lib/node_modules/
|
||||
.tmp/
|
||||
.venv/
|
||||
venv/
|
||||
|
||||
@@ -9,6 +9,6 @@ trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{js,jsx,css,less,html}]
|
||||
[*.{js,css,html}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/---bug_report.md
vendored
@@ -7,10 +7,10 @@ about: Report reproducible software issues so we can improve
|
||||
|
||||
We use GitHub only for bug reports 🐛
|
||||
|
||||
Anything else should be a discussion: https://github.com/getredash/redash/discussions/ 👫
|
||||
Anything else should be posted to https://discuss.redash.io 👫
|
||||
|
||||
🚨For support, help & questions use https://github.com/getredash/redash/discussions/categories/q-a
|
||||
💡For feature requests & ideas use https://github.com/getredash/redash/discussions/categories/ideas
|
||||
🚨For support, help & questions use https://discuss.redash.io/c/support
|
||||
💡For feature requests & ideas use https://discuss.redash.io/c/feature-requests
|
||||
|
||||
**Found a security vulnerability?** Please email security@redash.io 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.
|
||||
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/--anything_else.md
vendored
@@ -1,17 +1,17 @@
|
||||
---
|
||||
name: "\U0001F4A1Anything else"
|
||||
about: "For help, support, features & ideas - please use Discussions \U0001F46B "
|
||||
about: "For help, support, features & ideas - please use https://discuss.redash.io \U0001F46B "
|
||||
labels: "Support Question"
|
||||
---
|
||||
|
||||
We use GitHub only for bug reports 🐛
|
||||
|
||||
Anything else should be a discussion: https://github.com/getredash/redash/discussions/ 👫
|
||||
Anything else should be posted to https://discuss.redash.io 👫
|
||||
|
||||
🚨For support, help & questions use https://github.com/getredash/redash/discussions/categories/q-a
|
||||
💡For feature requests & ideas use https://github.com/getredash/redash/discussions/categories/ideas
|
||||
🚨For support, help & questions use https://discuss.redash.io/c/support
|
||||
💡For feature requests & ideas use https://discuss.redash.io/c/feature-requests
|
||||
|
||||
Alternatively, check out these resources below. Thanks! 😁.
|
||||
|
||||
- [Discussions](https://github.com/getredash/redash/discussions/)
|
||||
- [Forum](https://disucss.redash.io)
|
||||
- [Knowledge Base](https://redash.io/help)
|
||||
|
||||
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,26 +1,15 @@
|
||||
## What type of PR is this?
|
||||
<!-- Check all that apply, delete what doesn't apply. -->
|
||||
## What type of PR is this? (check all applicable)
|
||||
<!-- Please leave only what's applicable -->
|
||||
|
||||
- [ ] Refactor
|
||||
- [ ] Feature
|
||||
- [ ] Bug Fix
|
||||
- [ ] New Query Runner (Data Source)
|
||||
- [ ] New Query Runner (Data Source)
|
||||
- [ ] New Alert Destination
|
||||
- [ ] Other
|
||||
|
||||
## Description
|
||||
<!-- In case of adding / modifying a query runner, please specify which version(s) you expect are compatible. -->
|
||||
|
||||
## How is this tested?
|
||||
|
||||
- [ ] Unit tests (pytest, jest)
|
||||
- [ ] E2E Tests (Cypress)
|
||||
- [ ] Manually
|
||||
- [ ] N/A
|
||||
|
||||
<!-- If Manually, please describe. -->
|
||||
|
||||
## Related Tickets & Documents
|
||||
<!-- If applicable, please include a link to your documentation PR against getredash/website -->
|
||||
|
||||
## Mobile & Desktop Screenshots/Recordings (if there are UI changes)
|
||||
|
||||
23
.github/support.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Configuration for Support Requests - https://github.com/dessant/support-requests
|
||||
|
||||
# Label used to mark issues as support requests
|
||||
supportLabel: Support Question
|
||||
|
||||
# Comment to post on issues marked as support requests, `{issue-author}` is an
|
||||
# optional placeholder. Set to `false` to disable
|
||||
supportComment: >
|
||||
:wave: @{issue-author}, we use the issue tracker exclusively for bug reports
|
||||
and planned work. However, this issue appears to be a support request.
|
||||
Please use [our forum](https://discuss.redash.io) to get help.
|
||||
|
||||
# Close issues marked as support requests
|
||||
close: true
|
||||
|
||||
# Lock issues marked as support requests
|
||||
lock: false
|
||||
|
||||
# Assign `off-topic` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
||||
200
.github/workflows/ci.yml
vendored
@@ -1,200 +0,0 @@
|
||||
name: Tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
pull_request_target:
|
||||
branches:
|
||||
- master
|
||||
env:
|
||||
CYPRESS_COVERAGE: "true"
|
||||
NODE_VERSION: 18
|
||||
YARN_VERSION: 1.22.22
|
||||
REDASH_COOKIE_SECRET: 2H9gNG9obnAQ9qnR9BDTQUph6CbXKCzF
|
||||
REDASH_SECRET_KEY: 2H9gNG9obnAQ9qnR9BDTQUph6CbXKCzF
|
||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||
DOCKER_BUILDKIT: 1
|
||||
FRONTEND_BUILD_MODE: 1
|
||||
INSTALL_GROUPS: main,all_ds,dev
|
||||
PERCY_BRANCH: ${{github.head_ref || github.ref_name}}
|
||||
PERCY_COMMIT: ${{github.sha}}
|
||||
PERCY_PULL_REQUEST: ${{github.event.number}}
|
||||
COMMIT_INFO_BRANCH: ${{github.head_ref || github.ref_name}}
|
||||
COMMIT_INFO_MESSAGE: ${{github.event.head_commit.message}}
|
||||
COMMIT_INFO_AUTHOR: ${{github.event.pull_request.user.login}}
|
||||
COMMIT_INFO_SHA: ${{github.sha}}
|
||||
COMMIT_INFO_REMOTE: ${{github.server_url}}/${{github.repository}}
|
||||
jobs:
|
||||
backend-lint:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- if: github.event.pull_request.mergeable == 'false'
|
||||
name: Exit if PR is not mergeable
|
||||
run: exit 1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- run: sudo pip install black==24.3.0 ruff==0.1.9
|
||||
- run: ruff check .
|
||||
- run: black --check .
|
||||
|
||||
backend-unit-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: backend-lint
|
||||
env:
|
||||
FRONTEND_BUILD_MODE: 0
|
||||
steps:
|
||||
- if: github.event.pull_request.mergeable == 'false'
|
||||
name: Exit if PR is not mergeable
|
||||
run: exit 1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Build Docker Images
|
||||
run: |
|
||||
set -x
|
||||
touch .env
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
- name: Create Test Database
|
||||
run: docker compose run --rm postgres psql -h postgres -U postgres -c "create database tests;"
|
||||
- name: List Enabled Query Runners
|
||||
run: docker compose run --rm server manage ds list_types
|
||||
- name: Run Tests
|
||||
run: docker compose run --name tests server tests --junitxml=junit.xml --cov-report=xml --cov=redash --cov-config=.coveragerc tests/
|
||||
- name: Copy Test Results
|
||||
run: |
|
||||
mkdir -p /tmp/test-results/unit-tests
|
||||
docker cp tests:/app/coverage.xml ./coverage.xml
|
||||
docker cp tests:/app/junit.xml /tmp/test-results/unit-tests/results.xml
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
- name: Store Test Results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend-test-results
|
||||
path: /tmp/test-results
|
||||
- name: Store Coverage Results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend-coverage
|
||||
path: coverage.xml
|
||||
|
||||
frontend-lint:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- if: github.event.pull_request.mergeable == 'false'
|
||||
name: Exit if PR is not mergeable
|
||||
run: exit 1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'yarn'
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
npm install --global --force yarn@$YARN_VERSION
|
||||
yarn cache clean
|
||||
yarn --frozen-lockfile --network-concurrency 1
|
||||
- name: Run Lint
|
||||
run: yarn lint:ci
|
||||
- name: Store Test Results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-test-results
|
||||
path: /tmp/test-results
|
||||
|
||||
frontend-unit-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: frontend-lint
|
||||
steps:
|
||||
- if: github.event.pull_request.mergeable == 'false'
|
||||
name: Exit if PR is not mergeable
|
||||
run: exit 1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'yarn'
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
npm install --global --force yarn@$YARN_VERSION
|
||||
yarn cache clean
|
||||
yarn --frozen-lockfile --network-concurrency 1
|
||||
- name: Run App Tests
|
||||
run: yarn test
|
||||
- name: Run Visualizations Tests
|
||||
run: |
|
||||
cd viz-lib
|
||||
yarn test
|
||||
- run: yarn lint
|
||||
|
||||
frontend-e2e-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: frontend-lint
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
|
||||
INSTALL_GROUPS: main
|
||||
COMPOSE_PROFILES: e2e
|
||||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
||||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
steps:
|
||||
- if: github.event.pull_request.mergeable == 'false'
|
||||
name: Exit if PR is not mergeable
|
||||
run: exit 1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'yarn'
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
npm install --global --force yarn@$YARN_VERSION
|
||||
yarn cache clean
|
||||
yarn --frozen-lockfile --network-concurrency 1
|
||||
- name: Setup Redash Server
|
||||
run: |
|
||||
set -x
|
||||
touch .env
|
||||
yarn build
|
||||
yarn cypress build
|
||||
yarn cypress start -- --skip-db-seed
|
||||
docker compose run cypress yarn cypress db-seed
|
||||
- name: Execute Cypress Tests
|
||||
run: yarn cypress run-ci
|
||||
- name: "Failure: output container logs to console"
|
||||
if: failure()
|
||||
run: docker compose logs
|
||||
- name: Copy Code Coverage Results
|
||||
run: docker cp cypress:/usr/src/app/coverage ./coverage || true
|
||||
- name: Store Coverage Results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-coverage
|
||||
path: coverage
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend
|
||||
path: client/dist
|
||||
retention-days: 1
|
||||
28
.github/workflows/periodic-snapshot.yml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Periodic Snapshot
|
||||
|
||||
# 10 minutes after midnight on the first of every month
|
||||
on:
|
||||
schedule:
|
||||
- cron: "10 0 1 * *"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bump-version-and-tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ssh-key: ${{secrets.ACTION_PUSH_KEY}}
|
||||
- run: |
|
||||
date="$(date +%y.%m).0-dev"
|
||||
gawk -i inplace -F: -v q=\" -v tag=$date '/^ "version": / { print $1 FS, q tag q ","; next} { print }' package.json
|
||||
gawk -i inplace -F= -v q=\" -v tag=$date '/^__version__ =/ { print $1 FS, q tag q; next} { print }' redash/__init__.py
|
||||
gawk -i inplace -F= -v q=\" -v tag=$date '/^version =/ { print $1 FS, q tag q; next} { print }' pyproject.toml
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
git add package.json redash/__init__.py pyproject.toml
|
||||
git commit -m "Snapshot: ${date}"
|
||||
git tag $date
|
||||
git push --atomic origin master refs/tags/$date
|
||||
154
.github/workflows/preview-image.yml
vendored
@@ -1,154 +0,0 @@
|
||||
name: Preview Image
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Tests
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
DOCKER_REPO: redash
|
||||
|
||||
jobs:
|
||||
build-skip-check:
|
||||
runs-on: ubuntu-22.04
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
outputs:
|
||||
skip: ${{ steps.skip-check.outputs.skip }}
|
||||
steps:
|
||||
- name: Skip?
|
||||
id: skip-check
|
||||
run: |
|
||||
if [[ "${{ vars.DOCKER_USER }}" == '' ]]; then
|
||||
echo 'Docker user is empty. Skipping build+push'
|
||||
echo skip=true >> "$GITHUB_OUTPUT"
|
||||
elif [[ "${{ secrets.DOCKER_PASS }}" == '' ]]; then
|
||||
echo 'Docker password is empty. Skipping build+push'
|
||||
echo skip=true >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo 'Docker user and password are set and branch is `master`.'
|
||||
echo 'Building + pushing `preview` image.'
|
||||
echo skip=false >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
build-docker-image:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- build-skip-check
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.VERSION_TAG }}
|
||||
repo: ${{ steps.version.outputs.DOCKER_REPO }}
|
||||
if: needs.build-skip-check.outputs.skip == 'false'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.push.after }}
|
||||
- uses: dawidd6/action-download-artifact@v3
|
||||
with:
|
||||
name: frontend
|
||||
workflow: ci.yml
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
path: client/dist
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ vars.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Set version
|
||||
id: version
|
||||
run: |
|
||||
set -x
|
||||
VERSION=$(jq -r .version package.json)
|
||||
FULL_VERSION=${VERSION}-b${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER}
|
||||
sed -ri "s/^__version__ = ([A-Za-z0-9.-]*)'/__version__ = '${FULL_VERSION}'/" redash/__init__.py
|
||||
sed -i "s/dev/${GITHUB_SHA}/" client/app/version.json
|
||||
echo "VERSION_TAG=$FULL_VERSION" >> "$GITHUB_OUTPUT"
|
||||
platform=${{ matrix.platform }}
|
||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||
echo "SCOPE=${platform//\//-}" >> $GITHUB_ENV
|
||||
if [[ "${{ vars.DOCKER_REPO }}" != "" ]]; then
|
||||
echo "DOCKER_REPO=${{ vars.DOCKER_REPO }}" >> $GITHUB_ENV
|
||||
echo "DOCKER_REPO=${{ vars.DOCKER_REPO }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "DOCKER_REPO=${DOCKER_REPO}" >> $GITHUB_ENV
|
||||
echo "DOCKER_REPO=${DOCKER_REPO}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Build and push preview image to Docker Hub
|
||||
uses: docker/build-push-action@v5
|
||||
id: build
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
cache-from: type=gha,scope=${{ env.SCOPE }}
|
||||
cache-to: type=gha,mode=max,scope=${{ env.SCOPE }}
|
||||
platforms: ${{ matrix.platform }}
|
||||
outputs: type=image,name=${{ env.DOCKER_REPO }}/redash,push-by-digest=true,name-canonical=true,push=true
|
||||
build-args: |
|
||||
FRONTEND_BUILD_MODE=1
|
||||
env:
|
||||
DOCKER_CONTENT_TRUST: true
|
||||
- name: Export digest
|
||||
run: |
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digests-${{ env.PLATFORM_PAIR }}
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
publish-docker-manifest:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- build-skip-check
|
||||
- build-docker-image
|
||||
if: needs.build-skip-check.outputs.skip == 'false'
|
||||
steps:
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: digests-*
|
||||
path: /tmp/digests
|
||||
merge-multiple: true
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ needs.build-docker-image.outputs.repo }}/redash
|
||||
tags: preview
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ vars.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ needs.build-docker-image.outputs.repo }}/redash@sha256:%s ' *)
|
||||
- name: Inspect image
|
||||
run: |
|
||||
REDASH_IMAGE="${{ needs.build-docker-image.outputs.repo }}/redash:${{ steps.meta.outputs.version }}"
|
||||
docker buildx imagetools inspect $REDASH_IMAGE
|
||||
- name: Push image ${{ needs.build-docker-image.outputs.repo }}/preview image
|
||||
run: |
|
||||
REDASH_IMAGE="${{ needs.build-docker-image.outputs.repo }}/redash:preview"
|
||||
PREVIEW_IMAGE="${{ needs.build-docker-image.outputs.repo }}/preview:${{ needs.build-docker-image.outputs.version }}"
|
||||
docker buildx imagetools create --tag $PREVIEW_IMAGE $REDASH_IMAGE
|
||||
7
.gitignore
vendored
@@ -5,12 +5,11 @@ venv/
|
||||
.coveralls.yml
|
||||
.idea
|
||||
*.pyc
|
||||
.nyc_output
|
||||
coverage
|
||||
.coverage
|
||||
coverage.xml
|
||||
client/dist
|
||||
.DS_Store
|
||||
celerybeat-schedule*
|
||||
.#*
|
||||
\#*#
|
||||
*~
|
||||
@@ -25,5 +24,5 @@ node_modules
|
||||
.sass-cache
|
||||
npm-debug.log
|
||||
|
||||
client/cypress/screenshots
|
||||
client/cypress/videos
|
||||
cypress/screenshots
|
||||
cypress/videos
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: "v0.0.287"
|
||||
hooks:
|
||||
- id: ruff
|
||||
@@ -1,66 +0,0 @@
|
||||
enabled: true
|
||||
|
||||
auto: false
|
||||
|
||||
# Open Restyle PRs?
|
||||
pull_requests: true
|
||||
|
||||
# Leave comments on the original PR linking to the Restyle PR?
|
||||
comments: true
|
||||
|
||||
# Set commit statuses on the original PR?
|
||||
statuses:
|
||||
# Red status in the case of differences found
|
||||
differences: true
|
||||
# Green status in the case of no differences found
|
||||
no_differences: true
|
||||
# Red status if we encounter errors restyling
|
||||
error: true
|
||||
|
||||
# Request review on the Restyle PR?
|
||||
#
|
||||
# Possible values:
|
||||
#
|
||||
# author: From the author of the original PR
|
||||
# owner: From the owner of the repository
|
||||
# none: Don't
|
||||
#
|
||||
# One value will apply to both origin and forked PRs, but you can also specify
|
||||
# separate values.
|
||||
#
|
||||
# request_review:
|
||||
# origin: author
|
||||
# forked: owner
|
||||
#
|
||||
request_review: author
|
||||
|
||||
# Add labels to any created Restyle PRs
|
||||
#
|
||||
# These can be used to tell other automation to avoid our PRs.
|
||||
#
|
||||
labels: ["Skip CI"]
|
||||
|
||||
# Labels to ignore
|
||||
#
|
||||
# PRs with any of these labels will be ignored by Restyled.
|
||||
#
|
||||
# ignore_labels:
|
||||
# - restyled-ignore
|
||||
|
||||
# Restylers to run, and how
|
||||
restylers:
|
||||
- name: black
|
||||
image: restyled/restyler-black:v19.10b0
|
||||
include:
|
||||
- redash
|
||||
- tests
|
||||
- migrations/versions
|
||||
- name: prettier
|
||||
image: restyled/restyler-prettier:v1.19.1-2
|
||||
command:
|
||||
- prettier
|
||||
- --write
|
||||
include:
|
||||
- client/app/**/*.js
|
||||
- client/app/**/*.jsx
|
||||
- client/cypress/**/*.js
|
||||
2
.yarn/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
407
CHANGELOG.md
@@ -1,412 +1,5 @@
|
||||
# Change Log
|
||||
|
||||
## V10.1.0 - 2021-11-23
|
||||
|
||||
This release includes patches for three security vulnerabilities:
|
||||
|
||||
- Insecure default configuration affects installations where REDASH_COOKIE_SECRET is not set explicitly (CVE-2021-41192)
|
||||
- SSRF vulnerability affects installations that enabled URL-loading data sources (CVE-2021-43780)
|
||||
- Incorrect usage of state parameter in OAuth client code affects installations where Google Login is enabled (CVE-2021-43777)
|
||||
|
||||
And a couple features that didn't merge in time for 10.0.0
|
||||
|
||||
- Big Query: Speed up schema loading (#5632)
|
||||
- Add support for Firebolt data source (#5606)
|
||||
- Fix: Loading schema for Sqlite DB with "Order" column name fails (#5623)
|
||||
|
||||
## v10.0.0 - 2021-10-01
|
||||
|
||||
A few changes were merged during the V10 beta period.
|
||||
|
||||
- New Data Source: CSV/Excel Files
|
||||
- Fix: Edit Source button disappeared for users without CanEdit permissions
|
||||
- We pinned our docker base image to Python3.7-slim-buster to avoid build issues
|
||||
- Fix: dashboard list pagination didn't work
|
||||
|
||||
## v10.0.0-beta - 2021-06-16
|
||||
|
||||
Just over a year since our last release, the V10 beta is ready. Since we never made a non-beta release of V9, we expect many users will upgrade directly from V8 -> V10. This will bring a lot of exciting features. Please check out the V9 beta release notes below to learn more.
|
||||
|
||||
This V10 beta incorporates fixes for the feedback we received on the V9 beta along with a few long-requested features (horizontal bar charts!) and other changes to improve UX and reliability.
|
||||
|
||||
This release was made possible by contributions from 35+ people (the Github API didn't let us pull handles this time around): Alex Kovar, Alexander Rusanov, Arik Fraimovich, Ben Amor, Christopher Grant, Đặng Minh Dũng, Daniel Lang, deecay, Elad Ossadon, Gabriel Dutra, iwakiriK, Jannis Leidel, Jerry, Jesse Whitehouse, Jiajie Zhong, Jim Sparkman, Jonathan Hult, Josh Bohde, Justin Talbot, koooge, Lei Ni, Levko Kravets, Lingkai Kong, max-voronov, Mike Nason, Nolan Nichols, Omer Lachish, Patrick Yang, peterlee, Rafael Wendel, Sebastian Tramp, simonschneider-db, Tim Gates, Tobias Macey, Vipul Mathur, and Vladislav Denisov
|
||||
|
||||
Our special thanks to [Sohail Ahmed](https://pk.linkedin.com/in/sohail-ahmed-755776184) for reporting a vulnerability in our "forgot password" page (#5425)
|
||||
|
||||
### Upgrading
|
||||
|
||||
(This section is duplicated from the previous release - since many users will upgrade directly from V8 -> V10)
|
||||
|
||||
Typically, if you are running your own instance of Redash and wish to upgrade, you would simply modify the Docker tag in your `docker-compose.yml` file. Since RQ has replaced Celery in this version, there are a couple extra modifications that need to be done in your `docker-compose.yml`:
|
||||
|
||||
1. Under `services/scheduler/environment`, omit `QUEUES` and `WORKERS_COUNT` (and omit `environment` altogether if it is empty).
|
||||
2. Under `services`, add a new service for general RQ jobs:
|
||||
|
||||
```yaml
|
||||
worker:
|
||||
<<: *redash-service
|
||||
command: worker
|
||||
environment:
|
||||
QUEUES: "periodic emails default"
|
||||
WORKERS_COUNT: 1
|
||||
```
|
||||
|
||||
Following that, force a recreation of your containers with `docker-compose up --force-recreate --build` and you should be good to go.
|
||||
### UX
|
||||
- Redash now uses a vertical navbar
|
||||
- Dashboard list now includes “My Dashboards” filter
|
||||
- Dashboard parameters can now be re-ordered
|
||||
- Queries can now be executed with Shift + Enter on all platforms.
|
||||
- Added New Dashboard/Query/Alert buttons to corresponding list pages
|
||||
- Dashboard text widgets now prompt to confirm before closing the text editor
|
||||
- A plus sign is now shown between tags used for search
|
||||
- On the queries list view “My Queries” has moved above “Archived”
|
||||
- Improved behavior for filtering by tags in list views
|
||||
- When a user’s session expires for inactivity, they are prompted to log-in with a pop-up so they don’t lose their place in the app
|
||||
- Numerous accessibility changes towards the a11y standard
|
||||
- Hide the “Create” menu button if current user doesn’t have permission to any data sources
|
||||
|
||||
### Visualizations
|
||||
- Feature: Added support for horizontal box plots
|
||||
- Feature: Added support for horizontal bar charts
|
||||
- Feature: Added “Reverse” option for Chart visualization legend
|
||||
- Feature: Added option to align Chart Y-axes at zero
|
||||
- Feature: The table visualization header is now fixed when scrolling
|
||||
- Feature: Added USA map to choropleth visualization
|
||||
- Fix: Selected filters were reset when switching visualizations
|
||||
- Fix: Stacked bar chart showed the wrong Y-axis range in some cases
|
||||
- Fix: Bar chart with second y axis overlapped data series
|
||||
- Fix: Y-axis autoscale failed when min or max was set
|
||||
- Fix: Custom JS visualization was broken because of a typo
|
||||
- Fix: Too large visualization caused filters block to collapse
|
||||
- Fix: Sankey visualization looked inconsistent if the data source returned VARCHAR instead of numeric types
|
||||
|
||||
### Structural Updates
|
||||
- Redash now prevents CSRF attacks
|
||||
- Migration to TypeScript
|
||||
- Upgrade to Antd version 4
|
||||
### Data Sources
|
||||
- New Data Sources: SPARQL Endpoint, Eccenca Corporate Memory, TrinoDB
|
||||
- Databricks
|
||||
- Custom Schema Browser that allows switching between databases
|
||||
- Option added to truncate large results
|
||||
- Support for multiple-statement queries
|
||||
- Schema browser can now use eventlet instead of RQ
|
||||
- MongoDB:
|
||||
- Moved Username and Password out of the connection string so that password can be stored secretly
|
||||
- Oracle:
|
||||
- Fix: Annotated queries always failed. Annotation is now disabled
|
||||
- Postgres/CockroachDB:
|
||||
- SSL certfile/keyfile fields are now handled as secret
|
||||
- Python:
|
||||
- Feature: Custom built-ins are now supported
|
||||
- Fix: Query runner was not compatible with Python 3
|
||||
- Snowflake:
|
||||
- Data source now accepts a custom host address (for use with proxies)
|
||||
- TreasureData:
|
||||
- API key field is now handled as secret
|
||||
- Yandex:
|
||||
- OAuth token field is now handled as secret
|
||||
|
||||
### Alerts
|
||||
- Feature: Added ability to mute alerts without deleting them
|
||||
- Change: Non-email alert destination details are now obfuscated to avoid leaking sensitive information (webhook URLs, tokens etc.)
|
||||
- Fix: numerical comparisons failed if value from query was a string
|
||||
|
||||
### Parameters
|
||||
- Added “Last 12 months” option for dynamic date ranges
|
||||
|
||||
### Bug Fixes
|
||||
- Fix: Private addresses were not allowed even when enforcing was disabled
|
||||
- Fix: Python query runner wasn’t updated for Python 3
|
||||
- Fix: Sorting queries by schedule returned the wrong order
|
||||
- Fix: Counter visualization was enormous in some cases
|
||||
- Fix: Dashboard URL will now change when the dashboard title changes
|
||||
- Fix: URL parameters were removed when forking a query
|
||||
- Fix: Create link on data sources page was broken
|
||||
- Fix: Queries could be reassigned to read-only data sources
|
||||
- Fix: Multi-select dropdown was very slow if there were 1k+ options
|
||||
- Fix: Search Input couldn’t be focused or updated while editing a dashboard
|
||||
- Fix: The CLI command for “status” did not work
|
||||
- Fix: The dashboard list screen displayed too few items under certain pagination configurations
|
||||
|
||||
### Other
|
||||
- Added an environment variable to disable public sharing links for queries and dashboards
|
||||
- Alert destinations are now encrypted at the database
|
||||
- The base query runner now has stubs to implement result truncating for other data sources
|
||||
- Static SAML configuration and assertion encryption are now supported
|
||||
- Adds new component for adding extra actions to the query and dashboard pages
|
||||
- Non-admins with at least view_only permission on a dashboard can now make GET requests to the data source resource
|
||||
- Added a BLOCKED_DOMAINS setting to prevent sign-ups from emails at specific domains
|
||||
- Added a rate limit to the “forgot password” page
|
||||
- RQ workers will now shutdown gracefully for known error codes
|
||||
- Scheduled execution failure counter now resets following a successful ad hoc execution
|
||||
- Redash now deletes locks for cancelled queries
|
||||
- Upgraded Ace Editor from v6 to v9
|
||||
- Added a periodic job to remove ghost locks
|
||||
- Removed content width limit on all pages
|
||||
- Introduce a <Link> React component
|
||||
|
||||
## v9.0.0-beta - 2020-06-11
|
||||
|
||||
This release was long time in the making and has several major changes:
|
||||
|
||||
- Our backend code was updated to support Python 3 and we no longer support Python 2. If you're using our Docker images, this should be a transparent change for you.
|
||||
- We replaced Celery with RQ for background jobs processing. This will require some setup updates -- see instructions below.
|
||||
- The frontend code is now 100% React and we removed all the Angular dependencies.
|
||||
|
||||
This release was made possible by contributions from over 50 people: @ari-e, @ariarijp, @arihantsurana, @arikfr, @atharvai, @cemremengu, @chulucninh09, @citrin, @daniellangnet, @DavidHernandez, @deecay, @dmudro, @erans, @erels, @ezkl, @gabrieldutra, @gstaykov, @ialeinikov, @ikenji, @Jakdaw, @jezdez, @juanvasquezreyes, @koooge, @kravets-levko, @kykrueger, @leibowitz, @leosunmo, @lihan, @loganprice, @mickeey2525, @mnoorenberghe, @monicagangwar, @NicolasLM, @p-yang, @Ralnoc, @ranbena, @randyzwitch, @rauchy, @rxin, @saravananselvamohan, @satyamkrishna, @shinsuke-nara, @stefan-mees, @stevebuckingham, @susodapop, @taminif, @thewarpaint, @tsuyoshizawa, @uncletimmy3, @wengkham.
|
||||
|
||||
### Upgrading
|
||||
|
||||
Typically, if you are running your own instance of Redash and wish to upgrade, you would simply modify the Docker tag in your `docker-compose.yml` file. Since RQ has replaced Celery in this version, there are a couple extra modifications that need to be done in your `docker-compose.yml`:
|
||||
|
||||
1. Under `services/scheduler/environment`, omit `QUEUES` and `WORKERS_COUNT` (and omit `environment` altogether if it is empty).
|
||||
2. Under `services`, add a new service for general RQ jobs:
|
||||
|
||||
```yaml
|
||||
worker:
|
||||
<<: *redash-service
|
||||
command: worker
|
||||
environment:
|
||||
QUEUES: "periodic emails default"
|
||||
WORKERS_COUNT: 1
|
||||
```
|
||||
|
||||
Following that, force a recreation of your containers with `docker-compose up --force-recreate --build` and you should be good to go.
|
||||
|
||||
### UX
|
||||
|
||||
- Redesigned Query Results page:
|
||||
- Completely new layout is easier to read for non-technical Redash users.
|
||||
- Empty query results are clearly displayed. User is now prompted to edit or execute the query.
|
||||
- Mobile Experience Improvements:
|
||||
- UI element spacing has been redesigned for clarity
|
||||
- Admin pages now honor max-width. Tables scroll independent of the top menu.
|
||||
- Large legends no longer shrink the visualization on small screens.
|
||||
- Fix: it was sometimes impossible to scroll pages with dashboards because the visualizations captured every touch event.
|
||||
- Fix: Visualizations on small screens would not always show horizontal scroll bars.
|
||||
- Dashboards can now be un-archived using the API.
|
||||
- Dashboard UI performance was improved.
|
||||
- List pages were changed to show a user's name instead of avatar.
|
||||
- Search-enabled tables now show a prompt for which columns will be searched.
|
||||
- In the visualization editor, the settings pane now scrolls independent of the visualization preview.
|
||||
- Tokens in the schema viewer now sort alphabetically.
|
||||
- Links to settings panes that require Admin privileges are now hidden from non-Admins.
|
||||
- The Admin page now remembers which tab you were viewing after a page reload.
|
||||
|
||||
### Visualizations
|
||||
|
||||
- Feature: Allow bubble size control with either coefficient or sizemode.
|
||||
- Feature: Table visualization now treats Unix timestamps in query results as timestamps.
|
||||
- Feature: It's now possible to provide a description to each Table column, appearing in UI as a tooltip.
|
||||
- Feature: Added tooltip and popover templating to the map with markers visualization.
|
||||
- Feature: Added an organization setting to hide the Plotly mode bar on all visualizations.
|
||||
- Feature: Cohort visualization now has appearance settings.
|
||||
- Feature: Add option to explicitly set Chart legend position.
|
||||
- Change: Deprecated visualizations are now hidden.
|
||||
- Change: Table settings editor now extends vertically instead of horizontally.
|
||||
- Change: The maximum table pagination is now 500.
|
||||
- Change: Pie chart labels maintain contrast against lighter slices.
|
||||
- Fix: Chart series switched places when picking Y axis.
|
||||
- Fix: Third column was not selectable for Bubble and Heatmap charts.
|
||||
- Fix: On the counter visualizations, the “count rows” option showed an empty string instead of 0.
|
||||
- Fix: Table visualization with column named "children" rendered +/- buttons.
|
||||
- Fix: Sankey visualization now correctly occupies all available area even with fewer stages.
|
||||
- Fix: Pie chart ignores series labels.
|
||||
|
||||
### Data Sources
|
||||
|
||||
- New Data Sources: Amazon Cloudwatch, Amazon CloudWatch Logs Insights, Azure Kusto, Exasol.
|
||||
- Athena:
|
||||
- Added the option to specify a base cost in settings, displaying a price for each query when executed.
|
||||
- BigQuery:
|
||||
- Fix: large jobs continued running after the user clicked “Cancel” query execution.
|
||||
- Cassandra:
|
||||
- Updated driver to 3.21.0 which dramatically reduces Docker build times.
|
||||
- SSL options are now available.
|
||||
- Clickhouse:
|
||||
- You can now choose whether to verify the SSL certificate.
|
||||
- Databricks:
|
||||
- Databricks now use an ODBC-based connector.
|
||||
- Fix: Date column was coerced to DateTime in the front-end.
|
||||
- Druid:
|
||||
- Added username and password authentication option.
|
||||
- Microsoft SQL Server
|
||||
- Added support for ODBC connections via pyodbc. There are now two MSSQL data source types. One using TDS. The other is using ODBC.
|
||||
- MongoDB:
|
||||
- Added support for running queries on secondary in replicaset mode.
|
||||
- Fix: Connection test always succeeded.
|
||||
- Oracle:
|
||||
- Fix: Connection would fail if username or password contained special characters.
|
||||
- Fix: Comparisons would fail if scale was None.
|
||||
- RDS:
|
||||
- Updated rds-combined-ca-bundle.pem to the latest CA.
|
||||
- Redshift:
|
||||
- Added the ability to use IAM Roles and Users.
|
||||
- Fix: Redshift was unable to have its schema refreshed.
|
||||
- Rockset:
|
||||
- Fix: Allow Redash to load collections in all workspaces.
|
||||
- Snowflake:
|
||||
- You can now refresh the snowflake schema without waking the cluster.
|
||||
- Added support for all of Snowflake’s datetime types. Otherwise certain timestamps would only appear as strings in the front-end.
|
||||
- TreasureData:
|
||||
- Fix: API calls would fail when setting a non-default region.
|
||||
|
||||
### Alerts
|
||||
|
||||
- Feature: Added ability to mute alerts without deleting them.
|
||||
- Fix: numerical comparisons failed if value from query was a string.
|
||||
|
||||
### Parameters
|
||||
|
||||
- Added Last x Days options for date range parameters.
|
||||
- Fix: Parameters added in empty queries were always added as text parameters
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix: Alembic migration schema was preventing v4 users from upgrading. In v5 we started encrypting data source credentials in the database.
|
||||
- Fix: System admin dashboard would not show correct database size if non-default name was used.
|
||||
- Fix: refresh_queries job would break if any query had a bad schedule object.
|
||||
- Fix: Orgs with LDAP enabled couldn’t disable password login.
|
||||
- Fix: SSL mode was sometimes sent as an empty string to the database instead of omitted entirely.
|
||||
- Fix: When creating new Map visualization with clustering disabled, map would crash on save.
|
||||
- Fix: It was possible on the New Query page to click “Save” multiple times, causing multiple new query records to be created.
|
||||
- Fix: Visualization render errors on a dashboard would crash the entire page.
|
||||
- Fix: A scheduled execution failure would modify the query’s “updated_at” timestamp.
|
||||
- Fix: Parameter UI would wrap awkwardly during some drag operations.
|
||||
- Fix: In dashboard edit mode, users couldn’t modify widgets.
|
||||
- Fix: Frontend error when parsing a NaN float.
|
||||
|
||||
### Other
|
||||
|
||||
- Added TSV as a download format (in addition to CSV and Excel).
|
||||
- Added maildev settings (helps with automated settings).
|
||||
- Refine permissions usage in Redash to allow for guest users
|
||||
- The query results API now explicitly handles 404 errors.
|
||||
- Forked queries now retain the tags of the original query.
|
||||
- We now allow setting custom Sentry environments.
|
||||
- Started using Black linter for our Python source code
|
||||
- Added CLI command to re-encrypt data source details with new secret key.
|
||||
- Favorites list is now loaded on menu click instead of on page load.
|
||||
- Administrators can now allow connections to private IP addresses.
|
||||
|
||||
## v8.0.0 - 2019-10-27
|
||||
|
||||
There were no changes in this release since `v8.0.0-beta.2`. This is just to mark a stable release.
|
||||
|
||||
## v8.0.0-beta.2 - 2019-09-16
|
||||
|
||||
This is an update to the previous beta release, which includes:
|
||||
|
||||
- Add options for users to share anonymous usage information with us (see [docs](https://redash.io/help/open-source/admin-guide/usage-data) for details).
|
||||
- Visualizations:
|
||||
- Allow the user to decide how to handle null values in charts.
|
||||
- Upgrade Sentry-SDK to latest version.
|
||||
- Make horizontal table scroll visible in dashboard widgets without scrolling.
|
||||
- Data Sources:
|
||||
- Add support for Azure Data Explorer (Kusto).
|
||||
- MySQL: fix connections without SSL configuration failing.
|
||||
- Amazon Redshift: option to set query group for adhoc/scheduled queries.
|
||||
- Hive: make error message more friendly.
|
||||
- Qubole: add support to run Quantum queries.
|
||||
- Display data source icon in query editor.
|
||||
- Fix: allow users with view only acces to use the queries in Query Results
|
||||
- Dashboard: when updating parameters refersh only widgets that use those parameters.
|
||||
|
||||
This release had contributions from 12 people: @arikfr, @cclauss, @gabrieldutra, @justinclift, @kravets-levko, @ranbena, @rauchy, @sandeepV2, @shinsuke-nara, @spacentropy, @sphenlee, @swfz.
|
||||
|
||||
## v8.0.0-beta - 2019-08-18
|
||||
|
||||
After months of being heads down with hard work, it's finally time to wrap up the V8 release 🤩 This release includes many long awaited improvements to parameters, UX improvements, further React migration and other changes, fixes and improvements.
|
||||
|
||||
While this version is already running on the hosted platform to make sure it's stable, we're excited to put this in the hands of our Open Source users.
|
||||
|
||||
Starting from this release we will no longer build a tarball distribution of the codebase and recommend everyone to switch over to using our Docker images. We're planning on dropping Python 2 support towards its EOL this year and switching over to the Docker image will make this transition much simpler.
|
||||
|
||||
This release was made possible by contributions from over 40 people: @aidarbek, @AntonZarutsky, @ariarijp, @arikfr, @combineads, @deecay, @fmy, @gabrieldutra, @guwenqing, @guyco33, @ialeinikov, @Jakdaw, @jezdez, @justinclift, @k-tomoyasu, @katty0324, @koooge, @kravets-levko, @ktmud, @KumanoTanaka, @kyoshidajp, @nason, @oldPadavan, @openjck, @osule, @otsaloma, @ranbena, @rauchy, @rueian, @sekiyama58, @shinsuke-nara, @taminif, @The-Alchemist, @vv-p, @washort, @wudi-ayuan, @ygrishaev, @yoavbls, @yoshiken, @yusukegoto and the support of over 500 organizations who subscribed to our hosted version and by that sponsor the team's work.
|
||||
|
||||
### Parameters
|
||||
|
||||
- Parameter UI improvements:
|
||||
- Support for multi-select in dropdown (and query dropdown) parameters.
|
||||
- Support for dynamic values in date and date-range parameters.
|
||||
- Search dropdown parameter values.
|
||||
- New UX for applying parameter changes in queries and dashboards.
|
||||
- Allow using Safe Parameters in visualization embeds and public dashboards. Safe Parameters are any parameter type except for the a text parameter (dropdowns are safe).
|
||||
|
||||
### Data Sources
|
||||
|
||||
- New Data Sources: Couchbase, Phoenix and Dgraph.
|
||||
- New JSON data source (and deprecated old URL data source).
|
||||
- Snowflake: update connector to latest version.
|
||||
- PostgreSQL: show only accessible tables in schema.
|
||||
- BigQuery:
|
||||
- Correctly handle NaN values.
|
||||
- Treat repeated fields as rrays.
|
||||
- [BigQuery] Fix: in some queries there is no mode field
|
||||
- DynamoDB:
|
||||
- Support for Unicode in queries.
|
||||
- Safe loading of schema.
|
||||
- Rockset: better handling of query errors.
|
||||
- Google Sheets:
|
||||
- Support for Team Drive.
|
||||
- Friendlier error message in case of an API error and more reliable test connection.
|
||||
- MySQL:
|
||||
- Support for calling Stored Procedures and better handling of query cancellation.
|
||||
- Switch to using `mysqlclient` (a maintained fork of `Python-MySQL`).
|
||||
- MongoDB: Support serializing Decimal128 values.
|
||||
- Presto: support for passwords in connection settings.
|
||||
- Amazon Athena: allow to specify custom work group.
|
||||
- Query Results: querying a column with a dictionary or array fails
|
||||
- Clickhouse: make sure we don't show password in error messages.
|
||||
- Enable Cassandra support by default.
|
||||
|
||||
### Visualizations
|
||||
|
||||
- Charts:
|
||||
- Fix: legend overlapping chart on small screens.
|
||||
- Fix: Pie chart not rendering when series doesn't exist in options.
|
||||
- Pie Chart: add option to set direction of slices.
|
||||
- WordCloud: rewritten to support new options (provide frequency in query, limits), scale when resizing, handle long words and more.
|
||||
- Pivot Table: support hiding totals.
|
||||
- Counters: apply formatting to target value.
|
||||
- Maps:
|
||||
- Ability to customize marker icon and color.
|
||||
- Customization options for Choropleth maps.
|
||||
- New Visualization: Details View.
|
||||
|
||||
### **UX**
|
||||
|
||||
- Replace blank screen with a loading indicator when the application is doing its first load.
|
||||
- Multiple improvements to dashboards editing: auto-save, grid markings and better refresh indicator.
|
||||
- Admin can now edit user's groups from the user page.
|
||||
- Add keyboard shortcut (Ctrl/Cmd+Shift+F) to trigger query formatting.
|
||||
|
||||
### API
|
||||
|
||||
- Query Result API response minimized to only required fields when called with a non user API key.
|
||||
- Prefer API key over cookies in authentication.
|
||||
- User can now regenerate Query API Key.
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Sends CSP headers to prevent various kinds of security attacks via the browser. Might break unusual usages and embeds of Redash.
|
||||
- New Failed Scheduled Queries email report (can be enabled from organization settings screen).
|
||||
- Deprecated HipChat Alert Destination.
|
||||
- Add options to hide different parts of a Visualization embed UI (parameters, title, link to query).
|
||||
- Support multi-byte search for query names and descriptions (needs to be enabled in Organization settings screen).
|
||||
- CSV query results download: correctly serialize booleans and date values.
|
||||
- Dashboard filters now collect values from all widgets with the same filter.
|
||||
- Support for custom message and description in alert notifications (currently disabled behind a feature flag until we improve the alert UX).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix: adding widget to dashboard from a query page is broken.
|
||||
- Fix: default time format option was wrong.
|
||||
- Fix: when too many errors of a scheduled queries occur it causes an OverflowError.
|
||||
- Fix: when forking a query maintain the same visualizations order.
|
||||
|
||||
## v7.0.0 - 2019-03-17
|
||||
|
||||
We're trying a new format for the CHANGELOG in this release. Focusing on the bigger changes, but for whoever interested, you can see all the changes [here](https://github.com/getredash/redash/compare/v6.0.0...master).
|
||||
|
||||
@@ -4,7 +4,19 @@ Thank you for taking the time to contribute! :tada::+1:
|
||||
|
||||
The following is a set of guidelines for contributing to Redash. These are guidelines, not rules, please use your best judgement and feel free to propose changes to this document in a pull request.
|
||||
|
||||
:star: If you're already here and love the project, please make sure to press the Star button. :star:
|
||||
## Quick Links:
|
||||
|
||||
- [Feature Requests](https://discuss.redash.io/c/feature-requests)
|
||||
- [Documentation](https://redash.io/help/)
|
||||
- [Blog](https://blog.redash.io/)
|
||||
- [Twitter](https://twitter.com/getredash)
|
||||
|
||||
---
|
||||
:star: If you already here and love the project, please make sure to press the Star button. :star:
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
[How can I contribute?](#how-can-i-contribute)
|
||||
@@ -20,13 +32,6 @@ The following is a set of guidelines for contributing to Redash. These are guide
|
||||
- [Release Method](#release-method)
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
|
||||
## Quick Links:
|
||||
|
||||
- [User Forum](https://github.com/getredash/redash/discussions)
|
||||
- [Documentation](https://redash.io/help/)
|
||||
|
||||
|
||||
---
|
||||
## How can I contribute?
|
||||
|
||||
### Reporting Bugs
|
||||
@@ -34,53 +39,24 @@ The following is a set of guidelines for contributing to Redash. These are guide
|
||||
When creating a new bug report, please make sure to:
|
||||
|
||||
- Search for existing issues first. If you find a previous report of your issue, please update the existing issue with additional information instead of creating a new one.
|
||||
- If you are not sure if your issue is really a bug or just some configuration/setup problem, please start a [Q&A discussion](https://github.com/getredash/redash/discussions/new?category=q-a) first. Unless you can provide clear steps to reproduce, it's probably better to start with a discussion and later to open an issue.
|
||||
- If you are not sure if your issue is really a bug or just some configuration/setup problem, please start a discussion in [the support forum](https://discuss.redash.io/c/support) first. Unless you can provide clear steps to reproduce, it's probably better to start with a thread in the forum and later to open an issue.
|
||||
- If you still decide to open an issue, please review the template and guidelines and include as much details as possible.
|
||||
|
||||
### Suggesting Enhancements / Feature Requests
|
||||
|
||||
If you would like to suggest an enhancement or ask for a new feature:
|
||||
|
||||
- Please check [the Ideas discussions](https://github.com/getredash/redash/discussions/categories/ideas) for existing threads about what you want to suggest/ask. If there is, feel free to upvote it to signal interest or add your comments.
|
||||
- If there is no open thread, you're welcome to start one to have a discussion about what you want to suggest. Try to provide as much details and context as possible and include information about *the problem you want to solve* rather only *your proposed solution*.
|
||||
- Please check [the roadmap](https://trello.com/b/b2LUHU7A/redash-roadmap) for existing Trello card for what you want to suggest/ask. If there is, feel free to upvote it to signal interest or add your comments.
|
||||
- If there is no existing card, open a thread in [the forum](https://discuss.redash.io/c/feature-requests) to start a discussion about what you want to suggest. Try to provide as much details and context as possible and include information about *the problem you want to solve* rather only *your proposed solution*.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
**Code contributions are welcomed**. For big changes or significant features, it's usually better to reach out first and discuss what you want to implement and how (we recommend reading: [Pull Request First](https://medium.com/practical-blend/pull-request-first-f6bb667a9b6#.ozlqxvj36)). This is to make sure that what you want to implement is aligned with our goals for the project and that no one else is already working on it.
|
||||
|
||||
#### Criteria for Review / Merging
|
||||
|
||||
When you open your pull request, please follow this repository’s PR template carefully:
|
||||
|
||||
- Indicate the type of change
|
||||
- If you implement multiple unrelated features, bug fixes, or refactors please split them into individual pull requests.
|
||||
- Describe the change
|
||||
- If fixing a bug, please describe the bug or link to an existing github issue / forum discussion
|
||||
- Include UI screenshots / GIFs whenever possible
|
||||
- **Code contributions are welcomed**. For big changes or significant features, it's usually better to reach out first and discuss what you want to implement and how (we recommend reading: [Pull Request First](https://medium.com/practical-blend/pull-request-first-f6bb667a9b6#.ozlqxvj36)). This to make sure that what you want to implement is aligned with our goals for the project and that no one else is already working on it.
|
||||
- Include screenshots and animated GIFs in your pull request whenever possible.
|
||||
- Please add [documentation](#documentation) for new features or changes in functionality along with the code.
|
||||
- Please follow existing code style:
|
||||
- Python: we use [Black](https://github.com/psf/black) to auto format the code.
|
||||
- Javascript: we use [Prettier](https://github.com/prettier/prettier) to auto-format the code.
|
||||
|
||||
#### Initial Review (1 week)
|
||||
|
||||
During this phase, a team member will apply the “Team Review” label if a pull request meets our criteria or a “Needs More Information” label if not. If more information is required, the team member will comment which criteria have not been met.
|
||||
|
||||
If your pull request receives the “Needs More Information” label, please make the requested changes and then remove the label. This resets the 1 week timer for an initial review.
|
||||
|
||||
Stale pull requests that remain untouched in “Needs More Information” for more than 4 weeks will be closed.
|
||||
|
||||
If a team member closes your pull request, you may reopen it after you have made the changes requested during initial review. After you make these changes, remove the “Needs More Information” label. This again resets the timer for another initial review.
|
||||
|
||||
#### Full Review (2 weeks)
|
||||
|
||||
After the “Team Review” label is applied, a member of the core team will review the PR within 2 weeks.
|
||||
|
||||
Reviews will approve, request changes, or ask questions to discuss areas of uncertainty. After you’ve responded, a member of the team will re-review within one week.
|
||||
|
||||
#### Merging (1 week)
|
||||
|
||||
After your pull request has been approved, a member of the core team will merge the pull request within a week.
|
||||
- Python: we use PEP8 for Python.
|
||||
- Javascript: we use Airbnb's style guides for [JavaScript](https://github.com/airbnb/javascript#naming-conventions) and [React](https://github.com/airbnb/javascript/blob/master/react) (currently we don't follow Airbnb's convention for naming files, but we're gradually fixing this). To make it automatic and easy, we recommend using [Prettier](https://github.com/prettier/prettier).
|
||||
|
||||
### Documentation
|
||||
|
||||
@@ -90,9 +66,9 @@ The project's documentation can be found at [https://redash.io/help/](https://re
|
||||
|
||||
### Release Method
|
||||
|
||||
We publish a stable release every ~3-4 months, although the goal is to get to a stable release every month.
|
||||
We publish a stable release every ~2 months, although the goal is to get to a stable release every month. You can see the change log on [GitHub releases page](https://github.com/getredash/redash/releases).
|
||||
|
||||
Every build of the master branch updates the *redash/redash:preview* Docker Image. These releases are usually stable, but might contain regressions and therefore recommended for "advanced users" only.
|
||||
Every build of the master branch updates the latest *RC release*. These releases are usually stable, but might contain regressions and therefore recommended for "advanced users" only.
|
||||
|
||||
When we release a new stable release, we also update the *latest* Docker image tag, the EC2 AMIs and GCE images.
|
||||
|
||||
|
||||
114
Dockerfile
@@ -1,108 +1,26 @@
|
||||
# Controls whether to build the frontend assets
|
||||
ARG FRONTEND_BUILD_MODE=0
|
||||
FROM node:10 as frontend-builder
|
||||
|
||||
# MODE 0: create empty files. useful for backend tests
|
||||
FROM alpine:3.19 as frontend-builder-0
|
||||
RUN \
|
||||
mkdir -p /frontend/client/dist && \
|
||||
touch /frontend/client/dist/multi_org.html && \
|
||||
touch /frontend/client/dist/index.html
|
||||
|
||||
# MODE 1: copy static frontend from host, useful for CI to ignore building static content multiple times
|
||||
FROM alpine:3.19 as frontend-builder-1
|
||||
COPY client/dist /frontend/client/dist
|
||||
|
||||
# MODE 2: build static content in docker, can be used for a local development
|
||||
FROM node:18-bookworm as frontend-builder-2
|
||||
RUN npm install --global --force yarn@1.22.22
|
||||
ENV CYPRESS_INSTALL_BINARY=0
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
||||
RUN useradd -m -d /frontend redash
|
||||
USER redash
|
||||
WORKDIR /frontend
|
||||
COPY --chown=redash package.json yarn.lock .yarnrc /frontend/
|
||||
COPY --chown=redash viz-lib /frontend/viz-lib
|
||||
COPY --chown=redash scripts /frontend/scripts
|
||||
COPY package.json package-lock.json /frontend/
|
||||
RUN npm install
|
||||
|
||||
RUN yarn --frozen-lockfile --network-concurrency 1;
|
||||
COPY --chown=redash client /frontend/client
|
||||
COPY --chown=redash webpack.config.js /frontend/
|
||||
RUN yarn build
|
||||
COPY . /frontend
|
||||
RUN npm run build
|
||||
|
||||
FROM frontend-builder-${FRONTEND_BUILD_MODE} as frontend-builder
|
||||
FROM redash/base:latest
|
||||
|
||||
FROM python:3.8-slim-bookworm
|
||||
# Controls whether to install extra dependencies needed for all data sources.
|
||||
ARG skip_ds_deps
|
||||
|
||||
EXPOSE 5000
|
||||
# We first copy only the requirements file, to avoid rebuilding on every file
|
||||
# change.
|
||||
COPY requirements.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
|
||||
|
||||
RUN useradd --create-home redash
|
||||
|
||||
# Ubuntu packages
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
pkg-config \
|
||||
curl \
|
||||
gnupg \
|
||||
build-essential \
|
||||
pwgen \
|
||||
libffi-dev \
|
||||
sudo \
|
||||
git-core \
|
||||
# Kerberos, needed for MS SQL Python driver to compile on arm64
|
||||
libkrb5-dev \
|
||||
# Postgres client
|
||||
libpq-dev \
|
||||
# ODBC support:
|
||||
g++ unixodbc-dev \
|
||||
# for SAML
|
||||
xmlsec1 \
|
||||
# Additional packages required for data sources:
|
||||
libssl-dev \
|
||||
default-libmysqlclient-dev \
|
||||
freetds-dev \
|
||||
libsasl2-dev \
|
||||
unzip \
|
||||
libsasl2-modules-gssapi-mit && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN \
|
||||
curl https://packages.microsoft.com/config/debian/12/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg && \
|
||||
apt update && \
|
||||
ACCEPT_EULA=Y apt install -y --no-install-recommends msodbcsql18 && \
|
||||
apt clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG databricks_odbc_driver_url=https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/odbc/2.6.26/SimbaSparkODBC-2.6.26.1045-Debian-64bit.zip
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
curl "$databricks_odbc_driver_url" --location --output /tmp/simba_odbc.zip \
|
||||
&& chmod 600 /tmp/simba_odbc.zip \
|
||||
&& unzip /tmp/simba_odbc.zip -d /tmp/simba \
|
||||
&& dpkg -i /tmp/simba/*.deb \
|
||||
&& printf "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \
|
||||
&& rm /tmp/simba_odbc.zip \
|
||||
&& rm -rf /tmp/simba; fi
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV POETRY_VERSION=1.6.1
|
||||
ENV POETRY_HOME=/etc/poetry
|
||||
ENV POETRY_VIRTUALENVS_CREATE=false
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
ARG POETRY_OPTIONS="--no-root --no-interaction --no-ansi"
|
||||
# for LDAP authentication, install with `ldap3` group
|
||||
# disabled by default due to GPL license conflict
|
||||
ARG INSTALL_GROUPS="main,all_ds,dev"
|
||||
RUN /etc/poetry/bin/poetry install --only $INSTALL_GROUPS $POETRY_OPTIONS
|
||||
|
||||
COPY --chown=redash . /app
|
||||
COPY --from=frontend-builder --chown=redash /frontend/client/dist /app/client/dist
|
||||
RUN chown redash /app
|
||||
COPY . /app
|
||||
COPY --from=frontend-builder /frontend/client/dist /app/client/dist
|
||||
RUN chown -R redash /app
|
||||
USER redash
|
||||
|
||||
ENTRYPOINT ["/app/bin/docker-entrypoint"]
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM cypress/browsers:node18.12.0-chrome106-ff106
|
||||
|
||||
ENV APP /usr/src/app
|
||||
WORKDIR $APP
|
||||
|
||||
COPY package.json yarn.lock .yarnrc $APP/
|
||||
COPY viz-lib $APP/viz-lib
|
||||
RUN npm install yarn@1.22.22 -g && yarn --frozen-lockfile --network-concurrency 1 > /dev/null
|
||||
|
||||
COPY . $APP
|
||||
|
||||
RUN ./node_modules/.bin/cypress verify
|
||||
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2013-2020, Arik Fraimovich.
|
||||
Copyright (c) 2013-2019, Arik Fraimovich.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
The Bahrain map data used in Redash was downloaded from
|
||||
https://cartographyvectors.com/map/857-bahrain-detailed-boundary in PR #6192.
|
||||
* Free for personal and commercial purpose with attribution.
|
||||
91
Makefile
@@ -1,92 +1,57 @@
|
||||
.PHONY: compose_build up test_db create_database create_db clean clean-all down tests lint backend-unit-tests frontend-unit-tests pydeps test build watch start redis-cli bash
|
||||
.PHONY: compose_build up test_db create_database clean down bundle tests lint backend-unit-tests frontend-unit-tests test build watch start redis-cli bash
|
||||
|
||||
export COMPOSE_DOCKER_CLI_BUILD=1
|
||||
export DOCKER_BUILDKIT=1
|
||||
export COMPOSE_PROFILES=local
|
||||
|
||||
compose_build: .env
|
||||
docker compose build
|
||||
compose_build:
|
||||
docker-compose build
|
||||
|
||||
up:
|
||||
docker compose up -d redis postgres
|
||||
docker compose exec -u postgres postgres psql postgres --csv \
|
||||
-1tqc "SELECT table_name FROM information_schema.tables WHERE table_name = 'organizations'" 2> /dev/null \
|
||||
| grep -q "organizations" || make create_database
|
||||
docker compose up -d --build
|
||||
docker-compose up -d --build
|
||||
|
||||
test_db:
|
||||
@for i in `seq 1 5`; do \
|
||||
if (docker compose exec postgres sh -c 'psql -U postgres -c "select 1;"' 2>&1 > /dev/null) then break; \
|
||||
if (docker-compose exec postgres sh -c 'psql -U postgres -c "select 1;"' 2>&1 > /dev/null) then break; \
|
||||
else echo "postgres initializing..."; sleep 5; fi \
|
||||
done
|
||||
docker compose exec postgres sh -c 'psql -U postgres -c "drop database if exists tests;" && psql -U postgres -c "create database tests;"'
|
||||
docker-compose exec postgres sh -c 'psql -U postgres -c "drop database if exists tests;" && psql -U postgres -c "create database tests;"'
|
||||
|
||||
create_db: .env
|
||||
docker compose run server create_db
|
||||
|
||||
create_database: create_db
|
||||
create_database:
|
||||
docker-compose run server create_db
|
||||
|
||||
clean:
|
||||
docker compose down
|
||||
docker compose --project-name cypress down
|
||||
docker compose rm --stop --force
|
||||
docker compose --project-name cypress rm --stop --force
|
||||
docker image rm --force \
|
||||
cypress-server:latest cypress-worker:latest cypress-scheduler:latest \
|
||||
redash-server:latest redash-worker:latest redash-scheduler:latest
|
||||
docker container prune --force
|
||||
docker image prune --force
|
||||
docker volume prune --force
|
||||
|
||||
clean-all: clean
|
||||
docker image rm --force \
|
||||
redash/redash:10.1.0.b50633 redis:7-alpine maildev/maildev:latest \
|
||||
pgautoupgrade/pgautoupgrade:15-alpine3.8 pgautoupgrade/pgautoupgrade:latest
|
||||
docker-compose down && docker-compose rm
|
||||
|
||||
down:
|
||||
docker compose down
|
||||
docker-compose down
|
||||
|
||||
.env:
|
||||
printf "REDASH_COOKIE_SECRET=`pwgen -1s 32`\nREDASH_SECRET_KEY=`pwgen -1s 32`\n" >> .env
|
||||
|
||||
env: .env
|
||||
|
||||
format:
|
||||
pre-commit run --all-files
|
||||
|
||||
pydeps:
|
||||
pip3 install wheel
|
||||
pip3 install --upgrade black ruff launchpadlib pip setuptools
|
||||
pip3 install poetry
|
||||
poetry install --only main,all_ds,dev
|
||||
bundle:
|
||||
docker-compose run server bin/bundle-extensions
|
||||
|
||||
tests:
|
||||
docker compose run server tests
|
||||
docker-compose run server tests
|
||||
|
||||
lint:
|
||||
ruff check .
|
||||
black --check . --diff
|
||||
./bin/flake8_tests.sh
|
||||
|
||||
backend-unit-tests: up test_db
|
||||
docker compose run --rm --name tests server tests
|
||||
docker-compose run --rm --name tests server tests
|
||||
|
||||
frontend-unit-tests:
|
||||
CYPRESS_INSTALL_BINARY=0 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 yarn --frozen-lockfile
|
||||
yarn test
|
||||
frontend-unit-tests: bundle
|
||||
npm install
|
||||
npm run bundle
|
||||
npm test
|
||||
|
||||
test: backend-unit-tests frontend-unit-tests lint
|
||||
test: lint backend-unit-tests frontend-unit-tests
|
||||
|
||||
build:
|
||||
yarn build
|
||||
build: bundle
|
||||
npm run build
|
||||
|
||||
watch:
|
||||
yarn watch
|
||||
watch: bundle
|
||||
npm run watch
|
||||
|
||||
start:
|
||||
yarn start
|
||||
start: bundle
|
||||
npm run start
|
||||
|
||||
redis-cli:
|
||||
docker compose run --rm redis redis-cli -h redis
|
||||
docker-compose run --rm redis redis-cli -h redis
|
||||
|
||||
bash:
|
||||
docker compose run --rm server bash
|
||||
docker-compose run --rm server bash
|
||||
|
||||
103
README.md
@@ -1,115 +1,44 @@
|
||||
<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>
|
||||
|
||||
[](https://redash.io/help/)
|
||||
[](https://github.com/getredash/redash/actions)
|
||||
|
||||
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.
|
||||
**_Redash_** is our take on freeing the data within our company in a way that will better fit our culture and usage patterns.
|
||||
|
||||
Redash features:
|
||||
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.
|
||||
|
||||
1. **Browser-based**: Everything in your browser, with a shareable URL.
|
||||
2. **Ease-of-use**: Become immediately productive with data without the need to master complex software.
|
||||
3. **Query editor**: Quickly compose SQL and NoSQL queries with a schema browser and auto-complete.
|
||||
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.
|
||||
5. **Sharing**: Collaborate easily by sharing visualizations and their associated queries, enabling peer review of reports and queries.
|
||||
6. **Schedule refreshes**: Automatically update your charts and dashboards at regular intervals you define.
|
||||
7. **Alerts**: Define conditions and be alerted instantly when your data changes.
|
||||
8. **REST API**: Everything that can be done in the UI is also available through REST API.
|
||||
9. **Broad support for data sources**: Extensible data source API with native support for a long list of common databases and platforms.
|
||||
**_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).
|
||||
Today **_Redash_** has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
|
||||
|
||||
**_Redash_** consists of two parts:
|
||||
|
||||
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.
|
||||
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).
|
||||
|
||||
<img src="https://raw.githubusercontent.com/getredash/website/8e820cd02c73a8ddf4f946a9d293c54fd3fb08b9/website/_assets/images/redash-anim.gif" width="80%"/>
|
||||
|
||||
## Getting Started
|
||||
|
||||
* [Setting up Redash instance](https://redash.io/help/open-source/setup) (includes links to ready-made AWS/GCE images).
|
||||
* [Setting up Redash instance](https://redash.io/help/open-source/setup) (includes links to ready made AWS/GCE images).
|
||||
* [Documentation](https://redash.io/help/).
|
||||
|
||||
## Supported Data Sources
|
||||
|
||||
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:
|
||||
|
||||
- Amazon Athena
|
||||
- Amazon CloudWatch / Insights
|
||||
- Amazon DynamoDB
|
||||
- Amazon Redshift
|
||||
- ArangoDB
|
||||
- Axibase Time Series Database
|
||||
- Apache Cassandra
|
||||
- ClickHouse
|
||||
- CockroachDB
|
||||
- Couchbase
|
||||
- CSV
|
||||
- Databricks
|
||||
- DB2 by IBM
|
||||
- Dgraph
|
||||
- Apache Drill
|
||||
- Apache Druid
|
||||
- e6data
|
||||
- Eccenca Corporate Memory
|
||||
- Elasticsearch
|
||||
- Exasol
|
||||
- Microsoft Excel
|
||||
- Firebolt
|
||||
- Databend
|
||||
- Google Analytics
|
||||
- Google BigQuery
|
||||
- Google Spreadsheets
|
||||
- Graphite
|
||||
- Greenplum
|
||||
- Apache Hive
|
||||
- Apache Impala
|
||||
- InfluxDB
|
||||
- InfluxDBv2
|
||||
- IBM Netezza Performance Server
|
||||
- JIRA (JQL)
|
||||
- JSON
|
||||
- Apache Kylin
|
||||
- OmniSciDB (Formerly MapD)
|
||||
- MariaDB
|
||||
- MemSQL
|
||||
- Microsoft Azure Data Warehouse / Synapse
|
||||
- Microsoft Azure SQL Database
|
||||
- Microsoft Azure Data Explorer / Kusto
|
||||
- Microsoft SQL Server
|
||||
- MongoDB
|
||||
- MySQL
|
||||
- Oracle
|
||||
- Apache Phoenix
|
||||
- Apache Pinot
|
||||
- PostgreSQL
|
||||
- Presto
|
||||
- Prometheus
|
||||
- Python
|
||||
- Qubole
|
||||
- Rockset
|
||||
- RisingWave
|
||||
- Salesforce
|
||||
- ScyllaDB
|
||||
- Shell Scripts
|
||||
- Snowflake
|
||||
- SPARQL
|
||||
- SQLite
|
||||
- TiDB
|
||||
- Tinybird
|
||||
- TreasureData
|
||||
- Trino
|
||||
- Uptycs
|
||||
- Vertica
|
||||
- Yandex AppMetrrica
|
||||
- Yandex Metrica
|
||||
Redash supports more than 35 [data sources](https://redash.io/help/data-sources/supported-data-sources).
|
||||
|
||||
## Getting Help
|
||||
|
||||
* Issues: https://github.com/getredash/redash/issues
|
||||
* Discussion Forum: https://github.com/getredash/redash/discussions/
|
||||
* Development Discussion: https://discord.gg/tN5MdmfGBp
|
||||
* Discussion Forum: https://discuss.redash.io/
|
||||
|
||||
## Reporting Bugs and Contributing Code
|
||||
|
||||
* Want to report a bug or request a feature? Please open [an issue](https://github.com/getredash/redash/issues/new).
|
||||
* Want to help us build **_Redash_**? Fork the project, edit in a [dev environment](https://github.com/getredash/redash/wiki/Local-development-setup) and make a pull request. We need all the help we can get!
|
||||
* 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!
|
||||
|
||||
## Security
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please email security@redash.io 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).
|
||||
39
bin/bundle-extensions
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from subprocess import call
|
||||
from distutils.dir_util import copy_tree
|
||||
|
||||
from pkg_resources import iter_entry_points, resource_filename, resource_isdir
|
||||
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
content_folder = resource_filename(root_module, content_folder_relative)
|
||||
|
||||
# This is where we place our extensions folder.
|
||||
destination = os.path.join(
|
||||
EXTENSIONS_DIRECTORY,
|
||||
entry_point.name)
|
||||
|
||||
copy_tree(content_folder, destination)
|
||||
@@ -1,120 +1,34 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ -z $REDASH_REDIS_URL ]; then
|
||||
export REDASH_REDIS_URL=redis://:${REDASH_REDIS_PASSWORD}@${REDASH_REDIS_HOSTNAME}:${REDASH_REDIS_PORT}/${REDASH_REDIS_NAME}
|
||||
fi
|
||||
worker() {
|
||||
WORKERS_COUNT=${WORKERS_COUNT:-2}
|
||||
QUEUES=${QUEUES:-queries,scheduled_queries,celery,schemas}
|
||||
|
||||
if [ -z $REDASH_DATABASE_URL ]; then
|
||||
export REDASH_DATABASE_URL=postgresql://${REDASH_DATABASE_USER}:${REDASH_DATABASE_PASSWORD}@${REDASH_DATABASE_HOSTNAME}:${REDASH_DATABASE_PORT}/${REDASH_DATABASE_NAME}
|
||||
fi
|
||||
echo "Starting $WORKERS_COUNT workers for queues: $QUEUES..."
|
||||
exec /usr/local/bin/celery worker --app=redash.worker -c$WORKERS_COUNT -Q$QUEUES -linfo --maxtasksperchild=10 -Ofair
|
||||
}
|
||||
|
||||
scheduler() {
|
||||
echo "Starting RQ scheduler..."
|
||||
WORKERS_COUNT=${WORKERS_COUNT:-1}
|
||||
QUEUES=${QUEUES:-celery}
|
||||
SCHEDULE_DB=${SCHEDULE_DB:-celerybeat-schedule}
|
||||
|
||||
case $REDASH_PRODUCTION in
|
||||
true)
|
||||
echo "Starting RQ scheduler in production mode"
|
||||
exec ./manage.py rq scheduler
|
||||
;;
|
||||
*)
|
||||
echo "Starting RQ scheduler in dev mode"
|
||||
exec watchmedo auto-restart \
|
||||
--directory=./redash/ \
|
||||
--pattern=*.py \
|
||||
--recursive -- ./manage.py rq scheduler $QUEUES
|
||||
;;
|
||||
esac
|
||||
}
|
||||
echo "Starting scheduler and $WORKERS_COUNT workers for queues: $QUEUES..."
|
||||
|
||||
worker() {
|
||||
export WORKERS_COUNT=${WORKERS_COUNT:-2}
|
||||
export QUEUES=${QUEUES:-}
|
||||
case $REDASH_PRODUCTION in
|
||||
true)
|
||||
echo "Starting RQ worker in production mode"
|
||||
exec supervisord -c worker.conf
|
||||
;;
|
||||
*)
|
||||
echo "Starting RQ worker in dev mode"
|
||||
exec watchmedo auto-restart \
|
||||
--directory=./redash/ \
|
||||
--pattern=*.py \
|
||||
--recursive -- ./manage.py rq worker $QUEUES
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
workers_healthcheck() {
|
||||
WORKERS_COUNT=${WORKERS_COUNT}
|
||||
echo "Checking active workers count against $WORKERS_COUNT..."
|
||||
ACTIVE_WORKERS_COUNT=`echo $(rq info --url $REDASH_REDIS_URL -R | grep workers | grep -oP ^[0-9]+)`
|
||||
if [ "$ACTIVE_WORKERS_COUNT" -lt "$WORKERS_COUNT" ]; then
|
||||
echo "$ACTIVE_WORKERS_COUNT workers are active, Exiting"
|
||||
exit 1
|
||||
else
|
||||
echo "$ACTIVE_WORKERS_COUNT workers are active"
|
||||
exit 0
|
||||
fi
|
||||
exec /usr/local/bin/celery worker --app=redash.worker --beat -s$SCHEDULE_DB -c$WORKERS_COUNT -Q$QUEUES -linfo --maxtasksperchild=10 -Ofair
|
||||
}
|
||||
|
||||
server() {
|
||||
# Recycle gunicorn workers every n-th request. See http://docs.gunicorn.org/en/stable/settings.html#max-requests for more details.
|
||||
case $REDASH_PRODUCTION in
|
||||
true)
|
||||
echo "Starting Redash Server in production mode"
|
||||
MAX_REQUESTS=${MAX_REQUESTS:-1000}
|
||||
MAX_REQUESTS_JITTER=${MAX_REQUESTS_JITTER:-100}
|
||||
TIMEOUT=${REDASH_GUNICORN_TIMEOUT:-60}
|
||||
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 \
|
||||
--timeout $TIMEOUT
|
||||
;;
|
||||
*)
|
||||
echo "Starting Redash Server in a dev mode"
|
||||
export FLASK_DEBUG=1
|
||||
exec /app/manage.py runserver --debugger --reload -h 0.0.0.0
|
||||
;;
|
||||
esac
|
||||
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w${REDASH_WEB_WORKERS:-4} redash.wsgi:app
|
||||
}
|
||||
|
||||
create_db() {
|
||||
REDASH_DATABASE_MIGRATE_TIMEOUT=${REDASH_DATABASE_UPGRADE_TIMEOUT:-600}
|
||||
REDASH_DATABASE_MIGRATE_MAX_ATTEMPTS=${REDASH_DATABASE_MIGRATE_MAX_ATTEMPTS:-5}
|
||||
REDASH_DATABASE_MIGRATE_RETRY_WAIT=${REDASH_DATABASE_MIGRATE_RETRY_WAIT:-10}
|
||||
ATTEMPTS=1
|
||||
while ((ATTEMPTS <= REDASH_DATABASE_MIGRATE_MAX_ATTEMPTS)); do
|
||||
echo "Creating or updating Redash database, attempt ${ATTEMPTS} of ${REDASH_DATABASE_MIGRATE_MAX_ATTEMPTS}"
|
||||
ATTEMPTS=$((ATTEMPTS+1))
|
||||
timeout $REDASH_DATABASE_MIGRATE_TIMEOUT /app/manage.py database create_tables
|
||||
timeout $REDASH_DATABASE_MIGRATE_TIMEOUT /app/manage.py db upgrade
|
||||
STATUS=$(timeout $REDASH_DATABASE_MIGRATE_TIMEOUT /app/manage.py status 2>&1)
|
||||
RETCODE=$?
|
||||
case "$RETCODE" in
|
||||
0)
|
||||
exit 0
|
||||
;;
|
||||
124)
|
||||
echo "Status command timed out after ${REDASH_DATABASE_MIGRATE_TIMEOUT} seconds."
|
||||
;;
|
||||
esac
|
||||
case "$STATUS" in
|
||||
*sqlalchemy.exc.OperationalError*)
|
||||
echo "Database not yet functional, waiting."
|
||||
;;
|
||||
*sqlalchemy.exc.ProgrammingError*)
|
||||
echo "Database does not appear to be installed."
|
||||
;;
|
||||
esac
|
||||
echo "Waiting ${REDASH_DATABASE_MIGRATE_RETRY_WAIT} seconds before retrying."
|
||||
sleep ${REDASH_DATABASE_MIGRATE_RETRY_WAIT}
|
||||
done
|
||||
echo "Reached ${REDASH_DATABASE_MIGRATE_MAX_ATTEMPTS} attempts, giving up."
|
||||
exit 1
|
||||
exec /app/manage.py database create_tables
|
||||
}
|
||||
|
||||
celery_healthcheck() {
|
||||
exec /usr/local/bin/celery inspect ping --app=redash.worker -d celery@$HOSTNAME
|
||||
}
|
||||
|
||||
help() {
|
||||
@@ -124,17 +38,21 @@ help() {
|
||||
echo ""
|
||||
|
||||
echo "server -- start Redash server (with gunicorn)"
|
||||
echo "worker -- start a single RQ worker"
|
||||
echo "scheduler -- start an rq-scheduler instance"
|
||||
echo "worker -- start Celery worker"
|
||||
echo "scheduler -- start Celery worker with a beat (scheduler) process"
|
||||
echo "celery_healthcheck -- runs a Celery healthcheck. Useful for Docker's HEALTHCHECK mechanism."
|
||||
echo ""
|
||||
echo "shell -- open shell"
|
||||
echo "dev_server -- start Flask development server with debugger and auto reload"
|
||||
echo "debug -- start Flask development server with remote debugger via ptvsd"
|
||||
echo "create_db -- create database tables and run migrations"
|
||||
echo "create_db -- create database tables"
|
||||
echo "manage -- CLI to manage redash"
|
||||
echo "tests -- run tests"
|
||||
}
|
||||
|
||||
tests() {
|
||||
export REDASH_DATABASE_URL="postgresql://postgres@postgres/tests"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
TEST_ARGS=tests/
|
||||
else
|
||||
@@ -148,10 +66,6 @@ case "$1" in
|
||||
shift
|
||||
worker
|
||||
;;
|
||||
workers_healthcheck)
|
||||
shift
|
||||
workers_healthcheck
|
||||
;;
|
||||
server)
|
||||
shift
|
||||
server
|
||||
@@ -160,9 +74,9 @@ case "$1" in
|
||||
shift
|
||||
scheduler
|
||||
;;
|
||||
celery_healthcheck)
|
||||
shift
|
||||
echo "DEPRECATED: Celery has been replaced with RQ and now performs healthchecks autonomously as part of the 'worker' entrypoint."
|
||||
dev_server)
|
||||
export FLASK_DEBUG=1
|
||||
exec /app/manage.py runserver --debugger --reload -h 0.0.0.0
|
||||
;;
|
||||
debug)
|
||||
export FLASK_DEBUG=1
|
||||
@@ -191,3 +105,4 @@ case "$1" in
|
||||
exec "$@"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
7
bin/flake8_tests.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
flake8 --version ; pip --version
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
@@ -1,46 +1,36 @@
|
||||
#!/bin/env python3
|
||||
|
||||
#!/bin/env python
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def get_change_log(previous_sha):
|
||||
args = [
|
||||
"git",
|
||||
"--no-pager",
|
||||
"log",
|
||||
"--merges",
|
||||
"--grep",
|
||||
"Merge pull request",
|
||||
'--pretty=format:"%h|%s|%b|%p"',
|
||||
"master...{}".format(previous_sha),
|
||||
]
|
||||
args = ['git', '--no-pager', 'log', '--merges', '--grep', 'Merge pull request', '--pretty=format:"%h|%s|%b|%p"', 'master...{}'.format(previous_sha)]
|
||||
log = subprocess.check_output(args)
|
||||
changes = []
|
||||
|
||||
for line in log.split("\n"):
|
||||
for line in log.split('\n'):
|
||||
try:
|
||||
sha, subject, body, parents = line[1:-1].split("|")
|
||||
sha, subject, body, parents = line[1:-1].split('|')
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
try:
|
||||
pull_request = re.match(r"Merge pull request #(\d+)", subject).groups()[0]
|
||||
pull_request = re.match("Merge pull request #(\d+)", subject).groups()[0]
|
||||
pull_request = " #{}".format(pull_request)
|
||||
except Exception:
|
||||
except Exception as ex:
|
||||
pull_request = ""
|
||||
|
||||
author = subprocess.check_output(["git", "log", "-1", '--pretty=format:"%an"', parents.split(" ")[-1]])[1:-1]
|
||||
author = subprocess.check_output(['git', 'log', '-1', '--pretty=format:"%an"', parents.split(' ')[-1]])[1:-1]
|
||||
|
||||
changes.append("{}{}: {} ({})".format(sha, pull_request, body.strip(), author))
|
||||
|
||||
return changes
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
previous_sha = sys.argv[1]
|
||||
changes = get_change_log(previous_sha)
|
||||
|
||||
for change in changes:
|
||||
print(change)
|
||||
print(change)
|
||||
8
bin/pack
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
NAME=redash
|
||||
VERSION=$(python ./manage.py version)
|
||||
FULL_VERSION=$VERSION+b$CIRCLE_BUILD_NUM
|
||||
FILENAME=$NAME.$FULL_VERSION.tar.gz
|
||||
|
||||
sed -ri "s/^__version__ = '([A-Za-z0-9.-]*)'/__version__ = '$FULL_VERSION'/" redash/__init__.py
|
||||
tar -zcv -f $FILENAME --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" *
|
||||
18
bin/pre_compile
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Heroku pre_compile script
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
pushd $DIR/..
|
||||
|
||||
# heroku requires cffi to be in requirements.txt in order for libffi to be installed.
|
||||
# https://github.com/heroku/heroku-buildpack-python/blob/master/bin/steps/cryptography
|
||||
# to avoid making it a requirement for other build systems, we'll inject it now
|
||||
# into the requirements.txt file
|
||||
|
||||
# Remove Heroku unsupported Python packages:
|
||||
grep -v -E "^(pymssql|thrift|sasl|pyhive)" requirements_all_ds.txt >> requirements.txt
|
||||
|
||||
# make the heroku Procfile the active one
|
||||
cp Procfile.heroku Procfile
|
||||
|
||||
popd
|
||||
@@ -1,20 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import requests
|
||||
import simplejson
|
||||
|
||||
github_token = os.environ["GITHUB_TOKEN"]
|
||||
auth = (github_token, "x-oauth-basic")
|
||||
repo = "getredash/redash"
|
||||
|
||||
github_token = os.environ['GITHUB_TOKEN']
|
||||
auth = (github_token, 'x-oauth-basic')
|
||||
repo = 'getredash/redash'
|
||||
|
||||
def _github_request(method, path, params=None, headers={}):
|
||||
if urlparse(path).hostname != "api.github.com":
|
||||
if not path.startswith('https://api.github.com'):
|
||||
url = "https://api.github.com/{}".format(path)
|
||||
else:
|
||||
url = path
|
||||
@@ -25,18 +22,15 @@ def _github_request(method, path, params=None, headers={}):
|
||||
response = requests.request(method, url, data=params, auth=auth)
|
||||
return response
|
||||
|
||||
|
||||
def exception_from_error(message, response):
|
||||
return Exception("({}) {}: {}".format(response.status_code, message, response.json().get("message", "?")))
|
||||
|
||||
return Exception("({}) {}: {}".format(response.status_code, message, response.json().get('message', '?')))
|
||||
|
||||
def rc_tag_name(version):
|
||||
return "v{}-rc".format(version)
|
||||
|
||||
|
||||
def get_rc_release(version):
|
||||
tag = rc_tag_name(version)
|
||||
response = _github_request("get", "repos/{}/releases/tags/{}".format(repo, tag))
|
||||
response = _github_request('get', 'repos/{}/releases/tags/{}'.format(repo, tag))
|
||||
|
||||
if response.status_code == 404:
|
||||
return None
|
||||
@@ -45,101 +39,84 @@ def get_rc_release(version):
|
||||
|
||||
raise exception_from_error("Unknown error while looking RC release: ", response)
|
||||
|
||||
|
||||
def create_release(version, commit_sha):
|
||||
tag = rc_tag_name(version)
|
||||
|
||||
params = {
|
||||
"tag_name": tag,
|
||||
"name": "{} - RC".format(version),
|
||||
"target_commitish": commit_sha,
|
||||
"prerelease": True,
|
||||
'tag_name': tag,
|
||||
'name': "{} - RC".format(version),
|
||||
'target_commitish': commit_sha,
|
||||
'prerelease': True
|
||||
}
|
||||
|
||||
response = _github_request("post", "repos/{}/releases".format(repo), params)
|
||||
response = _github_request('post', 'repos/{}/releases'.format(repo), params)
|
||||
|
||||
if response.status_code != 201:
|
||||
raise exception_from_error("Failed creating new release", response)
|
||||
|
||||
return response.json()
|
||||
|
||||
|
||||
def upload_asset(release, filepath):
|
||||
upload_url = release["upload_url"].replace("{?name,label}", "")
|
||||
filename = filepath.split("/")[-1]
|
||||
upload_url = release['upload_url'].replace('{?name,label}', '')
|
||||
filename = filepath.split('/')[-1]
|
||||
|
||||
with open(filepath) as file_content:
|
||||
headers = {"Content-Type": "application/gzip"}
|
||||
response = requests.post(
|
||||
upload_url, file_content, params={"name": filename}, headers=headers, auth=auth, verify=False
|
||||
)
|
||||
headers = {'Content-Type': 'application/gzip'}
|
||||
response = requests.post(upload_url, file_content, params={'name': filename}, headers=headers, auth=auth, verify=False)
|
||||
|
||||
if response.status_code != 201: # not 200/201/...
|
||||
raise exception_from_error("Failed uploading asset", response)
|
||||
raise exception_from_error('Failed uploading asset', response)
|
||||
|
||||
return response
|
||||
|
||||
|
||||
def remove_previous_builds(release):
|
||||
for asset in release["assets"]:
|
||||
response = _github_request("delete", asset["url"])
|
||||
for asset in release['assets']:
|
||||
response = _github_request('delete', asset['url'])
|
||||
if response.status_code != 204:
|
||||
raise exception_from_error("Failed deleting asset", response)
|
||||
|
||||
|
||||
def get_changelog(commit_sha):
|
||||
latest_release = _github_request("get", "repos/{}/releases/latest".format(repo))
|
||||
latest_release = _github_request('get', 'repos/{}/releases/latest'.format(repo))
|
||||
if latest_release.status_code != 200:
|
||||
raise exception_from_error("Failed getting latest release", latest_release)
|
||||
raise exception_from_error('Failed getting latest release', latest_release)
|
||||
|
||||
latest_release = latest_release.json()
|
||||
previous_sha = latest_release["target_commitish"]
|
||||
previous_sha = latest_release['target_commitish']
|
||||
|
||||
args = [
|
||||
"git",
|
||||
"--no-pager",
|
||||
"log",
|
||||
"--merges",
|
||||
"--grep",
|
||||
"Merge pull request",
|
||||
'--pretty=format:"%h|%s|%b|%p"',
|
||||
"{}...{}".format(previous_sha, commit_sha),
|
||||
]
|
||||
args = ['git', '--no-pager', 'log', '--merges', '--grep', 'Merge pull request', '--pretty=format:"%h|%s|%b|%p"', '{}...{}'.format(previous_sha, commit_sha)]
|
||||
log = subprocess.check_output(args)
|
||||
changes = ["Changes since {}:".format(latest_release["name"])]
|
||||
changes = ["Changes since {}:".format(latest_release['name'])]
|
||||
|
||||
for line in log.split("\n"):
|
||||
for line in log.split('\n'):
|
||||
try:
|
||||
sha, subject, body, parents = line[1:-1].split("|")
|
||||
sha, subject, body, parents = line[1:-1].split('|')
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
try:
|
||||
pull_request = re.match(r"Merge pull request #(\d+)", subject).groups()[0]
|
||||
pull_request = re.match("Merge pull request #(\d+)", subject).groups()[0]
|
||||
pull_request = " #{}".format(pull_request)
|
||||
except Exception:
|
||||
except Exception as ex:
|
||||
pull_request = ""
|
||||
|
||||
author = subprocess.check_output(["git", "log", "-1", '--pretty=format:"%an"', parents.split(" ")[-1]])[1:-1]
|
||||
author = subprocess.check_output(['git', 'log', '-1', '--pretty=format:"%an"', parents.split(' ')[-1]])[1:-1]
|
||||
|
||||
changes.append("{}{}: {} ({})".format(sha, pull_request, body.strip(), author))
|
||||
|
||||
return "\n".join(changes)
|
||||
|
||||
|
||||
def update_release_commit_sha(release, commit_sha):
|
||||
params = {
|
||||
"target_commitish": commit_sha,
|
||||
'target_commitish': commit_sha,
|
||||
}
|
||||
|
||||
response = _github_request("patch", "repos/{}/releases/{}".format(repo, release["id"]), params)
|
||||
response = _github_request('patch', 'repos/{}/releases/{}'.format(repo, release['id']), params)
|
||||
|
||||
if response.status_code != 200:
|
||||
raise exception_from_error("Failed updating commit sha for existing release", response)
|
||||
|
||||
return response.json()
|
||||
|
||||
|
||||
def update_release(version, build_filepath, commit_sha):
|
||||
try:
|
||||
release = get_rc_release(version)
|
||||
@@ -148,22 +125,21 @@ def update_release(version, build_filepath, commit_sha):
|
||||
else:
|
||||
release = create_release(version, commit_sha)
|
||||
|
||||
print("Using release id: {}".format(release["id"]))
|
||||
print("Using release id: {}".format(release['id']))
|
||||
|
||||
remove_previous_builds(release)
|
||||
response = upload_asset(release, build_filepath)
|
||||
|
||||
changelog = get_changelog(commit_sha)
|
||||
|
||||
response = _github_request("patch", release["url"], {"body": changelog})
|
||||
response = _github_request('patch', release['url'], {'body': changelog})
|
||||
if response.status_code != 200:
|
||||
raise exception_from_error("Failed updating release description", response)
|
||||
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
commit_sha = sys.argv[1]
|
||||
version = sys.argv[2]
|
||||
filepath = sys.argv[3]
|
||||
|
||||
242
bin/upgrade
Executable file
@@ -0,0 +1,242 @@
|
||||
#!/usr/bin/env python
|
||||
import urllib
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
from fnmatch import fnmatch
|
||||
|
||||
import requests
|
||||
|
||||
try:
|
||||
import semver
|
||||
except ImportError:
|
||||
print("Missing required library: semver.")
|
||||
exit(1)
|
||||
|
||||
REDASH_HOME = os.environ.get('REDASH_HOME', '/opt/redash')
|
||||
CURRENT_VERSION_PATH = '{}/current'.format(REDASH_HOME)
|
||||
|
||||
|
||||
def run(cmd, cwd=None):
|
||||
if not cwd:
|
||||
cwd = REDASH_HOME
|
||||
|
||||
return subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.STDOUT)
|
||||
|
||||
|
||||
def confirm(question):
|
||||
reply = str(raw_input(question + ' (y/n): ')).lower().strip()
|
||||
|
||||
if reply[0] == 'y':
|
||||
return True
|
||||
if reply[0] == 'n':
|
||||
return False
|
||||
else:
|
||||
return confirm("Please use 'y' or 'n'")
|
||||
|
||||
|
||||
def version_path(version_name):
|
||||
return "{}/{}".format(REDASH_HOME, version_name)
|
||||
|
||||
END_CODE = '\033[0m'
|
||||
|
||||
|
||||
def colored_string(text, color):
|
||||
if sys.stdout.isatty():
|
||||
return "{}{}{}".format(color, text, END_CODE)
|
||||
else:
|
||||
return text
|
||||
|
||||
|
||||
def h1(text):
|
||||
print(colored_string(text, '\033[4m\033[1m'))
|
||||
|
||||
|
||||
def green(text):
|
||||
print(colored_string(text, '\033[92m'))
|
||||
|
||||
|
||||
def red(text):
|
||||
print(colored_string(text, '\033[91m'))
|
||||
|
||||
|
||||
class Release(namedtuple('Release', ('version', 'download_url', 'filename', 'description'))):
|
||||
def v1_or_newer(self):
|
||||
return semver.compare(self.version, '1.0.0-alpha') >= 0
|
||||
|
||||
def is_newer(self, version):
|
||||
return semver.compare(self.version, version) > 0
|
||||
|
||||
@property
|
||||
def version_name(self):
|
||||
return self.filename.replace('.tar.gz', '')
|
||||
|
||||
|
||||
def get_latest_release_from_ci():
|
||||
response = requests.get('https://circleci.com/api/v1.1/project/github/getredash/redash/latest/artifacts?branch=master')
|
||||
|
||||
if response.status_code != 200:
|
||||
exit("Failed getting releases (status code: %s)." % response.status_code)
|
||||
|
||||
tarball_asset = filter(lambda asset: asset['url'].endswith('.tar.gz'), response.json())[0]
|
||||
filename = urllib.unquote(tarball_asset['pretty_path'].split('/')[-1])
|
||||
version = filename.replace('redash.', '').replace('.tar.gz', '')
|
||||
|
||||
release = Release(version, tarball_asset['url'], filename, '')
|
||||
|
||||
return release
|
||||
|
||||
|
||||
def get_release(channel):
|
||||
if channel == 'ci':
|
||||
return get_latest_release_from_ci()
|
||||
|
||||
response = requests.get('https://version.redash.io/api/releases?channel={}'.format(channel))
|
||||
release = response.json()[0]
|
||||
|
||||
filename = release['download_url'].split('/')[-1]
|
||||
release = Release(release['version'], release['download_url'], filename, release['description'])
|
||||
|
||||
return release
|
||||
|
||||
|
||||
def link_to_current(version_name):
|
||||
green("Linking to current version...")
|
||||
run('ln -nfs {} {}'.format(version_path(version_name), CURRENT_VERSION_PATH))
|
||||
|
||||
|
||||
def restart_services():
|
||||
# We're doing this instead of simple 'supervisorctl restart all' because
|
||||
# otherwise it won't notice that /opt/redash/current pointing at a different
|
||||
# directory.
|
||||
green("Restarting...")
|
||||
try:
|
||||
run('sudo /etc/init.d/redash_supervisord restart')
|
||||
except subprocess.CalledProcessError as e:
|
||||
run('sudo service supervisor restart')
|
||||
|
||||
|
||||
def update_requirements(version_name):
|
||||
green("Installing new Python packages (if needed)...")
|
||||
new_requirements_file = '{}/requirements.txt'.format(version_path(version_name))
|
||||
|
||||
install_requirements = False
|
||||
|
||||
try:
|
||||
run('diff {}/requirements.txt {}'.format(CURRENT_VERSION_PATH, new_requirements_file)) != 0
|
||||
except subprocess.CalledProcessError as e:
|
||||
if e.returncode != 0:
|
||||
install_requirements = True
|
||||
|
||||
if install_requirements:
|
||||
run('sudo pip install -r {}'.format(new_requirements_file))
|
||||
|
||||
|
||||
def apply_migrations(release):
|
||||
green("Running migrations (if needed)...")
|
||||
if not release.v1_or_newer():
|
||||
return apply_migrations_pre_v1(release.version_name)
|
||||
|
||||
run("sudo -u redash bin/run ./manage.py db upgrade", cwd=version_path(release.version_name))
|
||||
|
||||
|
||||
def find_migrations(version_name):
|
||||
current_migrations = set([f for f in os.listdir("{}/migrations".format(CURRENT_VERSION_PATH)) if fnmatch(f, '*_*.py')])
|
||||
new_migrations = sorted([f for f in os.listdir("{}/migrations".format(version_path(version_name))) if fnmatch(f, '*_*.py')])
|
||||
|
||||
return [m for m in new_migrations if m not in current_migrations]
|
||||
|
||||
|
||||
def apply_migrations_pre_v1(version_name):
|
||||
new_migrations = find_migrations(version_name)
|
||||
|
||||
if new_migrations:
|
||||
green("New migrations to run: ")
|
||||
print(', '.join(new_migrations))
|
||||
else:
|
||||
print("No new migrations in this version.")
|
||||
|
||||
if new_migrations and confirm("Apply new migrations? (make sure you have backup)"):
|
||||
for migration in new_migrations:
|
||||
print("Applying {}...".format(migration))
|
||||
run("sudo sudo -u redash PYTHONPATH=. bin/run python migrations/{}".format(migration), cwd=version_path(version_name))
|
||||
|
||||
|
||||
def download_and_unpack(release):
|
||||
directory_name = release.version_name
|
||||
|
||||
green("Downloading release tarball...")
|
||||
run('sudo wget --header="Accept: application/octet-stream" -O {} {}'.format(release.filename, release.download_url))
|
||||
green("Unpacking to: {}...".format(directory_name))
|
||||
run('sudo mkdir -p {}'.format(directory_name))
|
||||
run('sudo tar -C {} -xvf {}'.format(directory_name, release.filename))
|
||||
|
||||
green("Changing ownership to redash...")
|
||||
run('sudo chown redash {}'.format(directory_name))
|
||||
|
||||
green("Linking .env file...")
|
||||
run('sudo ln -nfs {}/.env {}/.env'.format(REDASH_HOME, version_path(directory_name)))
|
||||
|
||||
|
||||
def current_version():
|
||||
real_current_path = os.path.realpath(CURRENT_VERSION_PATH).replace('.b', '+b')
|
||||
return real_current_path.replace(REDASH_HOME + '/', '').replace('redash.', '')
|
||||
|
||||
|
||||
def verify_minimum_version():
|
||||
green("Current version: " + current_version())
|
||||
if semver.compare(current_version(), '0.12.0') < 0:
|
||||
red("You need to have Redash v0.12.0 or newer to upgrade to post v1.0.0 releases.")
|
||||
green("To upgrade to v0.12.0, run the upgrade script set to the legacy channel (--channel legacy).")
|
||||
exit(1)
|
||||
|
||||
|
||||
def show_description_and_confirm(description):
|
||||
if description:
|
||||
print(description)
|
||||
|
||||
if not confirm("Continue with upgrade?"):
|
||||
red("Cancelling upgrade.")
|
||||
exit(1)
|
||||
|
||||
|
||||
def verify_newer_version(release):
|
||||
if not release.is_newer(current_version()):
|
||||
red("The found release is not newer than your current deployed release ({}).".format(current_version()))
|
||||
if not confirm("Continue with upgrade?"):
|
||||
red("Cancelling upgrade.")
|
||||
exit(1)
|
||||
|
||||
|
||||
def deploy_release(channel):
|
||||
h1("Starting Redash upgrade:")
|
||||
|
||||
release = get_release(channel)
|
||||
green("Found version: {}".format(release.version))
|
||||
|
||||
if release.v1_or_newer():
|
||||
verify_minimum_version()
|
||||
|
||||
verify_newer_version(release)
|
||||
show_description_and_confirm(release.description)
|
||||
|
||||
try:
|
||||
download_and_unpack(release)
|
||||
update_requirements(release.version_name)
|
||||
apply_migrations(release)
|
||||
link_to_current(release.version_name)
|
||||
restart_services()
|
||||
green("Done! Enjoy.")
|
||||
except subprocess.CalledProcessError as e:
|
||||
red("Failed running: {}".format(e.cmd))
|
||||
red("Exit status: {}\nOutput:\n{}".format(e.returncode, e.output))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--channel", help="The channel to get release from (default: stable).", default='stable')
|
||||
args = parser.parse_args()
|
||||
|
||||
deploy_release(args.channel)
|
||||
@@ -1,29 +1,17 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"exclude": ["@babel/plugin-transform-async-to-generator", "@babel/plugin-transform-arrow-functions"],
|
||||
"corejs": "2",
|
||||
"useBuiltIns": "usage"
|
||||
}
|
||||
],
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-typescript"
|
||||
["@babel/preset-env", {
|
||||
"targets": "> 0.5%, last 2 versions, Firefox ESR, ie 11, not dead",
|
||||
"useBuiltIns": "usage"
|
||||
}],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"angularjs-annotate",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-transform-object-assign",
|
||||
[
|
||||
"babel-plugin-transform-builtin-extend",
|
||||
{
|
||||
"globals": ["Error"]
|
||||
}
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": ["istanbul"]
|
||||
}
|
||||
}
|
||||
["babel-plugin-transform-builtin-extend", {
|
||||
"globals": ["Error"]
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
build/*.js
|
||||
dist
|
||||
config/*.js
|
||||
client/dist
|
||||
node_modules
|
||||
|
||||
@@ -1,71 +1,60 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
extends: [
|
||||
"react-app",
|
||||
"plugin:compat/recommended",
|
||||
"prettier",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
// Remove any typescript-eslint rules that would conflict with prettier
|
||||
"prettier/@typescript-eslint",
|
||||
],
|
||||
plugins: ["jest", "compat", "no-only-tests", "@typescript-eslint", "jsx-a11y"],
|
||||
extends: ["airbnb", "plugin:jest/recommended"],
|
||||
plugins: ["jest", "cypress"],
|
||||
settings: {
|
||||
"import/resolver": "webpack",
|
||||
"import/resolver": "webpack"
|
||||
},
|
||||
parser: "babel-eslint",
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
"jest/globals": true,
|
||||
"cypress/globals": true,
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
rules: {
|
||||
// allow debugger during development
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
|
||||
"jsx-a11y/anchor-is-valid": [
|
||||
// TMP
|
||||
"off",
|
||||
{
|
||||
components: ["Link"],
|
||||
aspects: ["noHref", "invalidHref", "preferButton"],
|
||||
},
|
||||
],
|
||||
"jsx-a11y/no-redundant-roles": "error",
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off", // TMP
|
||||
"jsx-a11y/no-static-element-interactions": "off", // TMP
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off", // TMP
|
||||
"no-console": ["warn", { allow: ["warn", "error"] }],
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: "antd",
|
||||
message: "Please use 'import XXX from antd/lib/XXX' import instead.",
|
||||
},
|
||||
{
|
||||
name: "antd/lib",
|
||||
message: "Please use 'import XXX from antd/lib/XXX' import instead.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
// Only run typescript-eslint on TS files
|
||||
files: ["*.ts", "*.tsx", ".*.ts", ".*.tsx"],
|
||||
extends: ["plugin:@typescript-eslint/recommended"],
|
||||
rules: {
|
||||
// Do not require functions (especially react components) to have explicit returns
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
// Do not require to type every import from a JS file to speed up development
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
// Do not complain about useless contructors in declaration files
|
||||
"no-useless-constructor": "off",
|
||||
"@typescript-eslint/no-useless-constructor": "error",
|
||||
// Many API fields and generated types use camelcase
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'no-param-reassign': 0,
|
||||
'no-mixed-operators': 0,
|
||||
'no-underscore-dangle': 0,
|
||||
"no-use-before-define": ["error", "nofunc"],
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-template": "off",
|
||||
"no-restricted-properties": "off",
|
||||
"no-restricted-globals": "off",
|
||||
"no-multi-assign": "off",
|
||||
"no-lonely-if": "off",
|
||||
"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)"
|
||||
'operator-linebreak': 'off',
|
||||
'react/destructuring-assignment': 'off',
|
||||
"react/jsx-filename-extension": "off",
|
||||
'react/jsx-one-expression-per-line': 'off',
|
||||
"react/jsx-uses-react": "error",
|
||||
"react/jsx-uses-vars": "error",
|
||||
'react/jsx-wrap-multilines': 'warn',
|
||||
'react/no-access-state-in-setstate': 'warn',
|
||||
"react/prefer-stateless-function": "warn",
|
||||
"react/forbid-prop-types": "warn",
|
||||
"react/prop-types": "warn",
|
||||
"jsx-a11y/anchor-is-valid": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/label-has-associated-control": ["warn", {
|
||||
"controlComponents": true
|
||||
}],
|
||||
"jsx-a11y/label-has-for": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"max-len": ['error', 120, 2, {
|
||||
ignoreUrls: true,
|
||||
ignoreComments: false,
|
||||
ignoreRegExpLiterals: true,
|
||||
ignoreStrings: true,
|
||||
ignoreTemplateLiterals: true,
|
||||
}],
|
||||
"no-else-return": ["error", {"allowElseIf": true}],
|
||||
"object-curly-newline": ["error", {"consistent": true}],
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ["plugin:jest/recommended"],
|
||||
plugins: ["jest"],
|
||||
env: {
|
||||
"jest/globals": true,
|
||||
},
|
||||
rules: {
|
||||
"jest/no-focused-tests": "off",
|
||||
},
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
import { configure } from "enzyme";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
import { configure } from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import MockDate from "mockdate";
|
||||
import MockDate from 'mockdate';
|
||||
|
||||
const date = new Date("2000-01-01T02:00:00.000");
|
||||
const date = new Date('2000-01-01T02:00:00.000');
|
||||
|
||||
MockDate.set(date);
|
||||
|
||||
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 42 KiB |
BIN
client/app/assets/images/db-logos/dynamodb_sql.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 29 KiB |
BIN
client/app/assets/images/db-logos/qubole.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
client/app/assets/images/destinations/hipchat.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
@@ -1,13 +0,0 @@
|
||||
<svg width="274" height="199" viewBox="0 0 274 199" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path opacity="0.5" d="M57.9111 49.2668L202.769 30" stroke="#F2F2F2" stroke-width="59" stroke-linecap="round"/>
|
||||
<path opacity="0.5" d="M39.2842 92.7371L244.24 64.886" stroke="#F2F2F2" stroke-width="59" stroke-linecap="round"/>
|
||||
<path opacity="0.5" d="M30 136.299L232.813 107.734" stroke="#F2F2F2" stroke-width="59" stroke-linecap="round"/>
|
||||
<path opacity="0.5" d="M86.4541 169.149L234.166 150.596" stroke="#F2F2F2" stroke-width="59" stroke-linecap="round"/>
|
||||
<path d="M167.829 69.1349H96.458L117.605 51.9531H183.028L167.829 69.1349Z" fill="#C0D5FF"/>
|
||||
<path d="M171.133 70.4566H92.4933V85.6559V143.149H171.133V70.4566Z" fill="#E8F4FF"/>
|
||||
<path d="M190.298 48.6489L171.133 70.4566L186.993 94.9076L192.28 89.9514L206.818 73.7608L190.298 48.6489Z" fill="#E8F4FF"/>
|
||||
<path d="M171.133 70.4566V143.149L192.28 118.037V89.9514L186.993 94.9076L171.133 70.4566Z" fill="#E8F4FF"/>
|
||||
<path d="M92.4933 70.4566L81.9199 89.9514L92.4933 85.6559V70.4566Z" fill="#E8F4FF"/>
|
||||
<path d="M92.4933 70.4566H171.133M92.4933 70.4566L118.927 48.6489H190.298M92.4933 70.4566L81.9199 89.9514L92.4933 85.6559M92.4933 70.4566V85.6559M171.133 70.4566V143.149M171.133 70.4566L190.298 48.6489M171.133 70.4566L186.993 94.9076L192.28 89.9514M171.133 143.149H92.4933V85.6559M171.133 143.149L192.28 118.037V89.9514M190.298 48.6489L206.818 73.7608L192.28 89.9514" stroke="black" stroke-width="3" stroke-linejoin="round"/>
|
||||
<path d="M117.605 89.6208H147.343" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,60 +1,35 @@
|
||||
@import "~antd/lib/style/core/iconfont";
|
||||
@import "~antd/lib/style/core/motion";
|
||||
@import "~antd/lib/alert/style/index";
|
||||
@import "~antd/lib/input/style/index";
|
||||
@import "~antd/lib/input-number/style/index";
|
||||
@import "~antd/lib/date-picker/style/index";
|
||||
@import "~antd/lib/modal/style/index";
|
||||
@import "~antd/lib/tooltip/style/index";
|
||||
@import "~antd/lib/select/style/index";
|
||||
@import "~antd/lib/checkbox/style/index";
|
||||
@import "~antd/lib/upload/style/index";
|
||||
@import "~antd/lib/form/style/index";
|
||||
@import "~antd/lib/button/style/index";
|
||||
@import "~antd/lib/radio/style/index";
|
||||
@import "~antd/lib/time-picker/style/index";
|
||||
@import "~antd/lib/pagination/style/index";
|
||||
@import "~antd/lib/table/style/index";
|
||||
@import "~antd/lib/popover/style/index";
|
||||
@import "~antd/lib/tag/style/index";
|
||||
@import "~antd/lib/grid/style/index";
|
||||
@import "~antd/lib/switch/style/index";
|
||||
@import "~antd/lib/empty/style/index";
|
||||
@import "~antd/lib/drawer/style/index";
|
||||
@import "~antd/lib/card/style/index";
|
||||
@import "~antd/lib/steps/style/index";
|
||||
@import "~antd/lib/divider/style/index";
|
||||
@import "~antd/lib/dropdown/style/index";
|
||||
@import "~antd/lib/menu/style/index";
|
||||
@import "~antd/lib/list/style/index";
|
||||
@import '~antd/lib/style/core/iconfont';
|
||||
@import '~antd/lib/style/core/motion';
|
||||
@import '~antd/lib/alert/style/index';
|
||||
@import '~antd/lib/input/style/index';
|
||||
@import '~antd/lib/input-number/style/index';
|
||||
@import '~antd/lib/date-picker/style/index';
|
||||
@import '~antd/lib/modal/style/index';
|
||||
@import '~antd/lib/tooltip/style/index';
|
||||
@import '~antd/lib/select/style/index';
|
||||
@import '~antd/lib/checkbox/style/index';
|
||||
@import '~antd/lib/upload/style/index';
|
||||
@import '~antd/lib/form/style/index';
|
||||
@import '~antd/lib/button/style/index';
|
||||
@import '~antd/lib/radio/style/index';
|
||||
@import '~antd/lib/time-picker/style/index';
|
||||
@import '~antd/lib/pagination/style/index';
|
||||
@import '~antd/lib/table/style/index';
|
||||
@import '~antd/lib/popover/style/index';
|
||||
@import '~antd/lib/icon/style/index';
|
||||
@import '~antd/lib/tag/style/index';
|
||||
@import '~antd/lib/grid/style/index';
|
||||
@import '~antd/lib/switch/style/index';
|
||||
@import '~antd/lib/drawer/style/index';
|
||||
@import '~antd/lib/divider/style/index';
|
||||
@import '~antd/lib/dropdown/style/index';
|
||||
@import '~antd/lib/menu/style/index';
|
||||
@import '~antd/lib/list/style/index';
|
||||
@import "~antd/lib/badge/style/index";
|
||||
@import "~antd/lib/card/style/index";
|
||||
@import "~antd/lib/spin/style/index";
|
||||
@import "~antd/lib/skeleton/style/index";
|
||||
@import "~antd/lib/tabs/style/index";
|
||||
@import "~antd/lib/notification/style/index";
|
||||
@import "~antd/lib/collapse/style/index";
|
||||
@import "~antd/lib/progress/style/index";
|
||||
@import "~antd/lib/typography/style/index";
|
||||
@import "~antd/lib/descriptions/style/index";
|
||||
@import "inc/ant-variables";
|
||||
|
||||
// Increase z-indexes to avoid conflicts with some other libraries (e.g. Plotly)
|
||||
@zindex-modal: 2000;
|
||||
@zindex-modal-mask: 2000;
|
||||
@zindex-message: 2010;
|
||||
@zindex-notification: 2010;
|
||||
@zindex-popover: 2030;
|
||||
@zindex-dropdown: 2050;
|
||||
@zindex-picker: 2050;
|
||||
@zindex-tooltip: 2060;
|
||||
@item-hover-bg: #e5f8ff;
|
||||
|
||||
.@{drawer-prefix-cls} {
|
||||
&.help-drawer {
|
||||
z-index: @zindex-tooltip; // help drawer should be topmost
|
||||
}
|
||||
}
|
||||
@import 'inc/ant-variables';
|
||||
|
||||
// Remove bold in labels for Ant checkboxes and radio buttons
|
||||
.ant-checkbox-wrapper,
|
||||
@@ -62,11 +37,6 @@
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.ant-select-dropdown-menu-item em {
|
||||
color: @input-color-placeholder;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
// Fix for disabled button styles inside Tooltip component.
|
||||
// Tooltip wraps disabled buttons with `<span>` and moves all styles
|
||||
// and classes to that `<span>`. This resets all button styles and
|
||||
@@ -84,14 +54,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Fix for Ant dropdowns when they are used in Boootstrap modals
|
||||
.ant-dropdown-in-bootstrap-modal {
|
||||
z-index: 1050;
|
||||
}
|
||||
|
||||
// Button overrides
|
||||
.@{btn-prefix-cls} {
|
||||
transition-duration: 150ms;
|
||||
|
||||
&.icon-button {
|
||||
width: 32px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
// Fix ant input number showing duplicate arrows
|
||||
@@ -162,10 +132,6 @@
|
||||
border-color: transparent;
|
||||
color: @pagination-color;
|
||||
line-height: @pagination-item-size - 2px;
|
||||
|
||||
.@{pagination-prefix-cls}.mini & {
|
||||
line-height: @pagination-item-size-sm - 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus .@{pagination-prefix-cls}-item-link,
|
||||
@@ -225,16 +191,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-tbody > tr&-row {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
& > td {
|
||||
background: @table-row-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Custom styles
|
||||
|
||||
&-headerless &-tbody > tr:first-child > td {
|
||||
@@ -248,11 +204,11 @@
|
||||
&-item {
|
||||
// custom rule
|
||||
&.selected {
|
||||
background-color: #f6f8f9;
|
||||
background-color: #F6F8F9;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background-color: fade(#f6f8f9, 40%);
|
||||
background-color: fade(#F6F8F9, 40%);
|
||||
|
||||
& > * {
|
||||
opacity: 0.4;
|
||||
@@ -261,61 +217,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.@{dialog-prefix-cls} {
|
||||
// styling for short modals (no lines)
|
||||
&.shortModal {
|
||||
.@{dialog-prefix-cls} {
|
||||
&-header,
|
||||
&-footer {
|
||||
border: none;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
&-close-x {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
// styling for short modals (no lines)
|
||||
.@{dialog-prefix-cls}.shortModal {
|
||||
.@{dialog-prefix-cls} {
|
||||
&-header,
|
||||
&-footer {
|
||||
border: none;
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
// fullscreen modals
|
||||
&-fullscreen {
|
||||
.@{dialog-prefix-cls} {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
.@{dialog-prefix-cls}-content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.@{dialog-prefix-cls}-body {
|
||||
flex: 1 1 auto;
|
||||
overflow: auto;
|
||||
}
|
||||
&-body {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
&-close-x {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -328,109 +244,6 @@
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
// Notification overrides
|
||||
.@{notification-prefix-cls} {
|
||||
// vertical centering
|
||||
&-notice-close {
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
&-notice-description {
|
||||
max-width: 484px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{btn-prefix-cls} .@{iconfont-css-prefix}-ellipsis {
|
||||
margin: 0 -7px 0 -8px;
|
||||
}
|
||||
|
||||
// Collapse
|
||||
|
||||
.@{collapse-prefix-cls} {
|
||||
&&-headerless {
|
||||
border: 0;
|
||||
background: none;
|
||||
|
||||
.@{collapse-prefix-cls}-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.@{collapse-prefix-cls}-item,
|
||||
.@{collapse-prefix-cls}-content {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.@{collapse-prefix-cls}-content-box {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// overrides for tall form components such as ace editor
|
||||
.@{form-prefix-cls}-item {
|
||||
&-children {
|
||||
display: block; // so feeback icon positions correctly
|
||||
}
|
||||
|
||||
// no change for short components, sticks to body for tall ones
|
||||
&-children-icon {
|
||||
top: auto !important;
|
||||
bottom: 8px;
|
||||
|
||||
// makes the icon white instead of see-through
|
||||
& svg {
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
// for form items that contain text
|
||||
&.form-item-line-height-normal .@{form-prefix-cls}-item-control {
|
||||
line-height: 20px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{menu-prefix-cls} {
|
||||
// invert stripe position with class .invert-stripe-position
|
||||
&-inline.invert-stripe-position {
|
||||
.@{menu-prefix-cls}-item {
|
||||
&::after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
color: @menu-highlight-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{dropdown-prefix-cls}-menu-item {
|
||||
&:focus,
|
||||
&:focus-within {
|
||||
background-color: @item-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// overrides for checkbox
|
||||
@checkbox-prefix-cls: ~"@{ant-prefix}-checkbox";
|
||||
|
||||
.@{checkbox-prefix-cls}-wrapper + span,
|
||||
.@{checkbox-prefix-cls} + span {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
// make sure Multiple select has room for icons
|
||||
.@{select-prefix-cls}-multiple {
|
||||
&.@{select-prefix-cls}-show-arrow,
|
||||
&.@{select-prefix-cls}-show-search,
|
||||
&.@{select-prefix-cls}-loading {
|
||||
.@{select-prefix-cls}-selector {
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
.ant-popover {
|
||||
z-index: 1000; // make sure it doesn't cover drawer
|
||||
}
|
||||
|
||||
@@ -1,25 +1,7 @@
|
||||
.ace_editor {
|
||||
border: 1px solid fade(@redash-gray, 15%);
|
||||
border: 1px solid #eee;
|
||||
height: 100%;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&.ace_autocomplete .ace_completion-highlight {
|
||||
text-shadow: none !important;
|
||||
background: #ffff005e;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&.ace-tm {
|
||||
.ace_gutter {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.ace_gutter-active-line {
|
||||
background-color: fade(@redash-gray, 20%) !important;
|
||||
}
|
||||
|
||||
.ace_marker-layer .ace_active-line {
|
||||
background: fade(@redash-gray, 9%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +1,45 @@
|
||||
.alert-page h3 {
|
||||
flex-grow: 1;
|
||||
|
||||
input {
|
||||
margin: -0.2em 0;
|
||||
width: 100%;
|
||||
min-width: 170px;
|
||||
}
|
||||
.alert {
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-create-alert[disabled] {
|
||||
display: block;
|
||||
margin-top: -20px;
|
||||
.alert-dismissable,
|
||||
.alert-dismissible {
|
||||
padding-right: 44px;
|
||||
}
|
||||
|
||||
.alert-inverse {
|
||||
.alert-variant(@alert-inverse-bg; @alert-inverse-border; @alert-inverse-text);
|
||||
}
|
||||
|
||||
.alert-state {
|
||||
border-bottom: 1px solid @input-border;
|
||||
padding-bottom: 30px;
|
||||
|
||||
.alert-state-indicator {
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
padding: 5px 8px;
|
||||
}
|
||||
|
||||
.ant-form-item-explain {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.alert-last-triggered {
|
||||
color: @headings-color;
|
||||
}
|
||||
.alert-link {
|
||||
color: #fff !important;
|
||||
font-weight: normal !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.alert-query-selector {
|
||||
min-width: 250px;
|
||||
width: auto !important;
|
||||
}
|
||||
.growl-animated {
|
||||
&.alert-inverse {
|
||||
box-shadow: 0 0 5px fade(@alert-inverse-bg, 50%);
|
||||
}
|
||||
|
||||
&.alert-info {
|
||||
box-shadow: 0 0 5px fade(@alert-info-bg, 50%);
|
||||
}
|
||||
|
||||
// allow form item labels to gracefully break line
|
||||
.alert-form-item label {
|
||||
white-space: initial;
|
||||
padding-right: 8px;
|
||||
line-height: 21px;
|
||||
&.alert-success {
|
||||
box-shadow: 0 0 5px fade(@alert-success-bg, 50%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
&.alert-warning {
|
||||
box-shadow: 0 0 5px fade(@alert-warning-bg, 50%);
|
||||
}
|
||||
|
||||
&.alert-danger {
|
||||
box-shadow: 0 0 5px fade(@alert-danger-bg, 50%);
|
||||
}
|
||||
}
|
||||
|
||||
8
client/app/assets/less/inc/angular.less
Normal file
@@ -0,0 +1,8 @@
|
||||
a[ng-click] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Immediately apply ng-cloak, instead of waiting for angular.js to load: */
|
||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/* --------------------------------------------------------
|
||||
Colors
|
||||
-----------------------------------------------------------*/
|
||||
@lightblue: #03a9f4;
|
||||
@primary-color: #2196f3;
|
||||
@lightblue: #03A9F4;
|
||||
@primary-color: #2196F3;
|
||||
|
||||
@redash-gray: rgba(102, 136, 153, 1);
|
||||
@redash-orange: rgba(255, 120, 100, 1);
|
||||
@@ -12,31 +12,34 @@
|
||||
/* --------------------------------------------------------
|
||||
Font
|
||||
-----------------------------------------------------------*/
|
||||
@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
|
||||
sans-serif;
|
||||
@font-family-no-number: @redash-font;
|
||||
@font-family: @redash-font;
|
||||
@code-family: @redash-font;
|
||||
@font-size-base: 13px;
|
||||
@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
@font-family-no-number: @redash-font;
|
||||
@font-family: @redash-font;
|
||||
@code-family: @redash-font;
|
||||
@font-size-base: 13px;
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Borders
|
||||
-----------------------------------------------------------*/
|
||||
@border-color-split: #f0f0f0;
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Typograpgy
|
||||
-----------------------------------------------------------*/
|
||||
@text-color: #595959;
|
||||
@text-color: #595959;
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Form
|
||||
-----------------------------------------------------------*/
|
||||
@input-height-base: 35px;
|
||||
@input-color: #595959;
|
||||
@input-color-placeholder: #b4b4b4;
|
||||
@input-height-base: 35px;
|
||||
@input-color: #595959;
|
||||
@border-radius-base: 2px;
|
||||
@border-color-base: #e8e8e8;
|
||||
@border-color-base: #E8E8E8;
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Button
|
||||
-----------------------------------------------------------*/
|
||||
@btn-danger-bg: fade(@redash-gray, 10%);
|
||||
@btn-danger-border: fade(@redash-gray, 15%);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Pagination
|
||||
@@ -45,13 +48,14 @@
|
||||
@pagination-font-family: @redash-font;
|
||||
@pagination-font-weight-active: normal;
|
||||
|
||||
@pagination-bg: fade(@redash-gray, 15%);
|
||||
@pagination-color: #7e7e7e;
|
||||
@pagination-active-bg: @lightblue;
|
||||
@pagination-active-color: #fff;
|
||||
@pagination-disabled-bg: fade(@redash-gray, 15%);
|
||||
@pagination-hover-color: #333;
|
||||
@pagination-hover-bg: fade(@redash-gray, 25%);
|
||||
@pagination-bg: fade(@redash-gray, 15%);
|
||||
@pagination-color: #7E7E7E;
|
||||
@pagination-active-bg: @lightblue;
|
||||
@pagination-active-color: #FFF;
|
||||
@pagination-disabled-bg: fade(@redash-gray, 15%);
|
||||
@pagination-hover-color: #333;
|
||||
@pagination-hover-bg: fade(@redash-gray, 25%);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table
|
||||
@@ -68,9 +72,3 @@
|
||||
@table-row-hover-bg: fade(@redash-gray, 5%);
|
||||
@table-padding-vertical: 7px;
|
||||
@table-padding-horizontal: 10px;
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Notification
|
||||
-----------------------------------------------------------*/
|
||||
@notification-padding: @notification-padding-vertical 48px @notification-padding-vertical 17px;
|
||||
@notification-width: auto;
|
||||
|
||||
@@ -1,231 +1,92 @@
|
||||
*,
|
||||
button,
|
||||
input,
|
||||
i,
|
||||
a {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
*, button, input, i, a {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
*,
|
||||
*:active,
|
||||
*:hover {
|
||||
outline: none !important;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
|
||||
outline: none !important;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow-x: ~"hidden\0/";
|
||||
-ms-overflow-style: auto;
|
||||
overflow-x: ~"hidden\0/";
|
||||
-ms-overflow-style: auto;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
min-height: 100vh;
|
||||
html, body {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 0;
|
||||
background: #f6f8f9;
|
||||
font-family: @redash-font;
|
||||
position: relative;
|
||||
|
||||
#application-root {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
#application-root {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
#application-root,
|
||||
#app-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
padding-top: @header-height;
|
||||
position: relative;
|
||||
padding-bottom: @footer-height;
|
||||
&.headless {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
.nav.app-header {
|
||||
display: none;
|
||||
}
|
||||
div#footer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#content {
|
||||
position: relative;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
position: relative;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
|
||||
@media (min-width: (@screen-sm-min + 1)) {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
@media (min-width: (@screen-sm-min + 1)) {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
@media (min-width: (@screen-lg-min + 80px)) {
|
||||
margin-left: @sidebar-left-width;
|
||||
}
|
||||
@media (min-width: (@screen-lg-min + 80px)) {
|
||||
margin-left: @sidebar-left-width;
|
||||
}
|
||||
|
||||
@media (min-width: @screen-sm-min) and (max-width: (@screen-md-max + 80px)) {
|
||||
margin-left: @sidebar-left-mid-width;
|
||||
}
|
||||
@media (min-width: @screen-sm-min) and (max-width: (@screen-md-max + 80px)) {
|
||||
margin-left: @sidebar-left-mid-width;
|
||||
}
|
||||
|
||||
@media (max-width: (@screen-sm-min)) {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (max-width: (@screen-sm-min)) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
&.c-boxed {
|
||||
max-width: @boxed-width;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-screen,
|
||||
.home-page,
|
||||
.page-dashboard-list,
|
||||
.page-queries-list,
|
||||
.page-alerts-list,
|
||||
.alert-page,
|
||||
.admin-page-layout {
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
&.c-boxed {
|
||||
max-width: @boxed-width;
|
||||
}
|
||||
}
|
||||
|
||||
.scrollbox {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.clickable {
|
||||
cursor: pointer;
|
||||
|
||||
button&:disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.resize-vertical {
|
||||
resize: vertical !important;
|
||||
transition: height 0s !important;
|
||||
resize: vertical !important;
|
||||
transition: height 0s !important;
|
||||
}
|
||||
.resize-horizontal {
|
||||
resize: horizontal !important;
|
||||
transition: width 0s !important;
|
||||
resize: horizontal !important;
|
||||
transition: width 0s !important;
|
||||
}
|
||||
.resize-both,
|
||||
.resize-vertical.resize-horizontal {
|
||||
resize: both !important;
|
||||
transition: height 0s, width 0s !important;
|
||||
}
|
||||
|
||||
.bg-ace {
|
||||
background-color: fade(@redash-gray, 12%) !important;
|
||||
}
|
||||
|
||||
// resizeable
|
||||
.rg-top span,
|
||||
.rg-bottom span {
|
||||
height: 3px;
|
||||
border-color: #b1c1ce; // TODO: variable
|
||||
}
|
||||
|
||||
.rg-bottom {
|
||||
bottom: 15px;
|
||||
|
||||
span {
|
||||
margin: 1.5px 0 0 -10px;
|
||||
}
|
||||
}
|
||||
|
||||
// Plotly
|
||||
text.slicetext {
|
||||
text-shadow: 1px 1px 5px #333;
|
||||
}
|
||||
|
||||
// markdown
|
||||
.markdown strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: fade(@redash-gray, 15%);
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.profile__image--sidebar {
|
||||
border-radius: 100%;
|
||||
margin-right: 3px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.profile__image--settings {
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.profile__image_thumb {
|
||||
border-radius: 100%;
|
||||
margin-right: 3px;
|
||||
margin-top: -2px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
// Error state
|
||||
.error-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
text-align: center;
|
||||
margin-top: 25vh;
|
||||
padding: 35px;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
|
||||
.error-state__icon {
|
||||
.zmdi {
|
||||
font-size: 64px;
|
||||
color: @redash-gray;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
margin-top: 10vh;
|
||||
}
|
||||
}
|
||||
|
||||
.warning-icon-danger {
|
||||
color: @red !important;
|
||||
}
|
||||
|
||||
// page
|
||||
.page-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.label {
|
||||
margin-top: 3px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.favorites-control {
|
||||
font-size: 19px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.page-header--new {
|
||||
h3 {
|
||||
margin: 0.2em 0;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.select-option-divider {
|
||||
margin: 10px 0 !important;
|
||||
resize: both !important;
|
||||
transition: height 0s, width 0s !important;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
.collapsing,
|
||||
.collapse.in {
|
||||
padding: 0;
|
||||
padding: 5px 10px;
|
||||
transition: all 0.35s ease;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,21 +122,3 @@
|
||||
top: 1px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.btn-default {
|
||||
background-color: fade(@redash-gray, 15%);
|
||||
}
|
||||
|
||||
.btn-transparent {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
|
||||
background-color: fade(@redash-gray, 25%);
|
||||
}
|
||||
|
||||
.btn-default:active:hover, .btn-default.active:hover, .open > .dropdown-toggle.btn-default:hover, .btn-default:active:focus, .btn-default.active:focus, .open > .dropdown-toggle.btn-default:focus, .btn-default:active.focus, .btn-default.active.focus, .open > .dropdown-toggle.btn-default.focus {
|
||||
color: #333;
|
||||
background-color: fade(@redash-gray, 45%);
|
||||
}
|
||||
@@ -1,23 +1,54 @@
|
||||
.edit-in-place {
|
||||
.edit-in-place span {
|
||||
white-space: pre-line;
|
||||
display: inline-block;
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.editable {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
.edit-in-place span.editable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: @redash-yellow;
|
||||
border-radius: @redash-radius;
|
||||
.edit-in-place span.editable:hover {
|
||||
background: @redash-yellow;
|
||||
border-radius: @redash-radius;
|
||||
}
|
||||
|
||||
.edit-in-place.active input,
|
||||
.edit-in-place.active textarea {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.edit-in-place {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.edit-in-place {
|
||||
.rd-form-control {
|
||||
padding: 0px 6px;
|
||||
width: 30vw;
|
||||
}
|
||||
|
||||
&.active {
|
||||
textarea.rd-form-control {
|
||||
height: 29px;
|
||||
width: 40vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active input,
|
||||
&.active textarea {
|
||||
display: inline-block;
|
||||
|
||||
@media (max-width: 880px) {
|
||||
.edit-in-place {
|
||||
.rd-form-control {
|
||||
width: 50vw;
|
||||
}
|
||||
|
||||
&.active {
|
||||
textarea.rd-form-control {
|
||||
width: 50vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
48
client/app/assets/less/inc/footer.less
Executable file
@@ -0,0 +1,48 @@
|
||||
#footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: @footer-height;
|
||||
color: #a2a2a2;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
|
||||
.f-menu {
|
||||
display: block;
|
||||
width: 100%;
|
||||
.list-inline();
|
||||
margin-top: 8px;
|
||||
|
||||
& > li > a {
|
||||
color: #a2a2a2;
|
||||
|
||||
&:hover {
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: (@screen-lg-min + 80px)) {
|
||||
padding-left: (@sidebar-left-width + @grid-gutter-width);
|
||||
}
|
||||
|
||||
@media (min-width: @screen-sm-min) and (max-width: (@screen-md-max + 80px)) {
|
||||
padding-left: (@sidebar-left-mid-width + @grid-gutter-width);
|
||||
}
|
||||
|
||||
@media (max-width: (@screen-sm-min)) {
|
||||
padding-left: @grid-gutter-width/2;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
color: #818d9f;
|
||||
padding-bottom: 30px;
|
||||
a {
|
||||
color: #818d9f;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||