Skip to content

Commit

Permalink
Update helmchart and redrploymext (#34)
Browse files Browse the repository at this point in the history
* Add toggle to disable public URLs (getredash#5140)

* Add toggle to disable public URLs

* Add Cypress tests

* Antd v4: Fix CreateUserDialog (getredash#5139)

* Antd v4: Update CreateUserDialog

* Add Cypress test for user creation

* Misc frontend changes from internal fork (getredash#5143)

* Move CardsList to typescript (getredash#5136)

* Refactor CardsList - pass a suffix for list item

Adding :id to an item to be used as a key suffix is redundant and the same
can be accomplished by using :index from the map function.

* Move CardsList to typescript

* Convert CardsList component to functional component

* CR1

* CR2

* Keep selected filters when switching visualizations (getredash#5146)

* getredash#4944 Query pages: keep selected filters when switching visualizations

* Pass current filters to expanded widget modal

* prevent assigning queries to view_only data sources (getredash#5152)

* Add default limit (1000) to SQL queries (getredash#5088)

* add default limit 1000

* Add frontend changes and connect to backend

* Fix query hash because of default limit

* fix CircleCI test

* adjust for comment

* Allow to clear selected tags on list pages (getredash#5142)

* Convert TagsList to functional component

* Convert TagsList to typescript

* Allow to unselect all tags

* Add title to Tags block and explicit "clear filter" button

* Some tweaks

* Keep additional URL params when forking a query (getredash#5184)

* Refresh CSRF tokens (getredash#5177)

* expire CSRF tokens after 6 hours

* use axios' built-in cookie to header copy mechanism

* add axios-auth-refresh

* retry CSRF-related 400 errors by refreshing the cookie

* export the auth refresh interceptor to support ejecting it if neccessary

* reject the original request if it's unrelated to CSRF

* add 'cancelled' meta directive to all cancelled jobs (getredash#5187)

* Ask user to log in when session expires (getredash#5178)

* Ask user to log in when session expires

* Update implementation

* Update implementation

* Minor fix

* Update modal

* Do not intercept calls to api/session as Auth.requireSession() relies on it

* Refine code; adjust popup size and position

* Some Choropleth improvements/refactoring (getredash#5186)

* Directly map query results column to GeoJSON property

* Use cache for geoJson requests

* Don't handle bounds changes while loading geoJson data

* Choropleth: fix map "jumping" on load; don't save bounds if user didn't edit them; refine code a bit

* Improve cache

* Optimize Japan Perfectures map (remove irrelevant GeoJson properties)

* Improve getOptions for Choropleth; remove unused code

* Fix test

* Add US states map

* Convert USA map to Albers projection

* Allow to specify user-friendly field names for maps

* Align Y axes at zero (getredash#5053)

* Align Y axes as zero

* Fix typo (with @deecay)

* Add alignYAxesAtZero function

* Avoid 0 division

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Generate Code Coverage report for Cypress (getredash#5137)

* Move Cypress to dev dependencies (getredash#3991)

* Test Cypress on package list

* Skip Puppeteer Chromium as well

* Put back missing npm install on netlify.toml

* Netlify: move env vars to build.environment

* Remove cypress:install script

* Update Cypress dockerfile

* Copy package-lock.json to Cypress dockerfile

* ScheduleDialog: Filter empty interval groups (getredash#5196)

* Share Embed Spec: Make sure query is executed (getredash#5191)

* Updated Cypress to v5.3 and fixed e2e tests (getredash#5199)

* Upgraded Cypress to v5.3 and fixed e2e tests

* Updated cypress image

* Fixed failing tests

* Updated NODE_VERSION in netlify

* Update client/cypress/integration/visualizations/choropleth_spec.js

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* fixed test in choropleth

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Extra actions on Queries and Dashboards pages (getredash#5201)

* Extra actions for Query View and Query Source pages

* Convert Queries List page to functional component

* Convert Dashboards List page to functional component

* Extra actions for Query List page

* Extra actions for Dashboard List page

* Extra actions for Dashboard page

* Pass some extra data to Dashboard.HeaderExtra component

* CR1

* Remove build args from Cypress start script (getredash#5203)

* Frontend updates from internal fork (getredash#5209)

* Add horizontal bar chart (getredash#5154)

* added bar chart boilerplate

* added x/y manipulation

* replaced x/y management to inner series preparer

* added tests

* moved axis inversion to all charts series

* removed line and area

* inverted labels ui

* removed normalizer check, simplified inverted axes check

* finished working hbar

* minor review

* added conditional title to YAxis

* generalized horizontal chart for line charts, resetted state on globalSeriesType change

* fixed updates

* fixed updates to layout

* fixed minor issues

* removed right Y axis when axes inverted

* ran prettier

* fixed updater function conflict and misuse of getOptions

* renamed inverted to swapped

* created mappingtypes for swapped columns

* removed unused import

* minor polishing

* improved series behaviour in h-bar

* minor fix

* added basic filter to ChartTypeSelect

* final setup of filtered chart types

* Update viz-lib/src/components/visualizations/editor/createTabbedEditor.jsx

* added proptypes and renamed ChartTypeSelect props

* Add missing import

* fixed import, moved result array to global scope

* merged import

* clearer naming in ChartTypeSelect

* better lodash map syntax

* fixed global modification

* moved result inside useMemo

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* Fix Home EmptyState help link (getredash#5217)

* Static SAML configuration and assertion encryption (getredash#5175)

* Change front-end and data model for SAML2 auth - static configuration

* Add changes to use inline metadata.

* add switch for static and dynamic SAML configurations

* Fixed config of backend static/dynamic to match UI

* add ability to encrypt/decrypt SAML assertions with pem and crt files. Upgraded to pysaml2 6.1.0 to mitigate signature mismatch during decryption

* remove print debug statement

* Use utility to find xmlsec binary for encryption, formatting saml_auth module

* format SAML Javascript, revert want_signed_response to pre-PR value

* pysaml2's entityid should point to the sp, not the idp

* add logging for entityid for validation

* use mustache_render instead of string formatting. put all static logic into static branch

* move mustache template for inline saml metadata to the global level

* Incorporate SAML type with Enabled setting

* Update client/app/pages/settings/components/AuthSettings/SAMLSettings.jsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

Co-authored-by: Chad Chen <chad.chen@databricks.com>
Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Fix dashboard background grid (getredash#5238)

* added required to Form.Item and Input for better UI (getredash#5231)

* added required to Form.Item and Input for better UI

* removed required from input

* Revert "removed required from input"

This reverts commit b56cd76.

* Redo "removed required from input"

* removed typo

Co-authored-by: rafawendel2010@gmail.com <rafawendel>

* Fix annotation bug causing queries not to run - ORA-00933 (getredash#5179)

* Fix for the typo button in ParameterMappingInput (getredash#5244)

* extend the refresh_queries timeout from 3 minutes to 10 minutes (getredash#5253)

* Multiselect dropdown slowness (fix) (getredash#5221)

* created util to estimate reasonable width for dropdown

* removed unused import

* improved calculation of item percentile

* added getItemOfPercentileLength to relevant spots

* added getItemOfPercentileLength to relevant spots

* Added missing import

* created custom select element

* added check for property path

* removed uses of percentile util

* gave up on getting element reference

* finished testing Select component

* removed unused imports

* removed older uses of Option component

* added canvas calculation

* removed minWidth from Select

* improved calculation

* added fallbacks

* added estimated offset

* removed leftovers 😅

* replaced to percentiles to max value

* switched to memo and renamed component

* proper useMemo syntax

* Update client/app/components/Select.tsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* created custom restrictive types

* added quick const

* fixed style

* fixed generics

* added pos absolute to fix percy

* removed custom select from ParameterMappingInput

* applied prettier

* Revert "added pos absolute to fix percy"

This reverts commit 4daf1d4.

* Pin Percy version to 0.24.3

* Update client/app/components/ParameterMappingInput.jsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* renamed Select.jsx to SelectWithVirtualScroll

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* bugfix: fix getredash#5254 (getredash#5255)

Co-authored-by: Jerry <jerry.yuan@webweye.com>

* Enable graceful shutdown of rq workers (getredash#5214)

* Enable graceful shutdown of rq workers

* Use `exec` in the `worker` command of the entrypoint to propagate
  the `TERM` signal
* Allow rq processes managed by supervisor to exit without restart on
  expected status codes
* Allow supervisorctl to contact the running supervisor
* Add a `shutdown_worker` command that will send `TERM` to all running
  worker processes and then sleep. This allows orchestration systems
  to initiate a graceful shutdown before sending `SIGTERM` to
  supervisord

* Use Heroku worker as the BaseWorker

This implements a graceful shutdown on SIGTERM, which simplifies
external shutdown procedures.

* Fix imports based upon review

* Remove supervisorctl config

* Enable Boxplot to be horizontal (getredash#5262)

* Frontend updates from internal fork (getredash#5259)

* DynamicComponent for QuerySourceAlerts

* General Settings updates

* Dynamic Date[Range] updates

* EmptyState updates

* Query and SchemaBrowser updates

* Adjust page headers and add disablePublish

* Policy updates

* Separate Home FavoritesList component

* Update FormatQuery

* Autolimit frontend fixes

* Misc updates

* Keep registering of QuerySourceDropdown

* Undo changes in DynamicComponent

* Change sql-formatter package.json syntax

* Allow opening help trigger in new tab

* Don't run npm commands as root in Dockerfile

* Cypress: Remove extra execute query

* Correct cleanup_query_results comment (getredash#5276)

Correct comment from QUERY_RESULTS_MAX_AGE
to QUERY_RESULTS_CLEANUP_MAX_AGE

* Remove unwanted props from Select component (getredash#5277)

* Explicitly selected props so as to avoid errors from non-wanted props

* Simplified approach

* Ran prettier 😬

* Fixed minor issues

* Fix QuerySourceDropdown value type (getredash#5284)

* Changed 'Delete Alert' into 'Delete' for consistency (getredash#5287)

* Redesign desktop nav bar (getredash#5294)

* Add React Fast Refresh + Hot Module Reloading (getredash#5291)

* removed leftover console.log (getredash#5303)

* Fix disabled hot reload flow (getredash#5306)

* Sync date format from settings with clientConfig (getredash#5299)

* added eslint no-console (getredash#5305)

* added eslint no-console

* Update client/.eslintrc.js to allow warnings

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Convert viz-lib to TypeScript (getredash#5310)

Co-authored-by: ts-migrate <>

* change item element in system status page (getredash#5323)

* Obfuscate non-email alert destinations (getredash#5318)

* Dropdown param search fix (getredash#5304)

* fixed QueryBasedParamterInput optionFilterProp

* added optionFilterProp fallback for SelectWithVirtualScroll

* simplified syntax

* removed optionFilterProp from QueryBasedParameterInput.jsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* restricted SelectWithVirtualScroll props

* Added e2e test for parameter filters

* moved filter assertion to more suitable place

* created helper for option filter prop assertion

* moved option filter prop assertion to proper place, added result update assertion

* refactor openAndSearchAntdDropdown helper

* Fix parameter_spec

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Add Username and Password fields to MongoDB config (getredash#5314)

* docs: fix simple typo, possbily -> possibly (getredash#5329)

There is a small typo in redash/settings/__init__.py.

Should read `possibly` rather than `possbily`.

* Secret handling for Yandex, TreasureData, & Postgres/CockroachDB SSL (getredash#5312)

* Bar chart e2e test (getredash#5279)

* created bar-chart e2e test boilerplate

* refactored assertions

* added snapshots and dashboard

* refactored assertions to properly deal with async

* replaced loops with getters for proper workings of cypress

* added a couple other bar charts

* ran prettier

* added a better query for bar charts

* removed leftovers

* moved helpers to support folder

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Truncate large Databricks ODBC result sizes (getredash#5290)

Truncates results sets that exceed a limit taken from an environment
variable called DATABRICKS_ROW_LIMIT.

* Add reorder to dashboard parameter widgets (getredash#5267)

* added paramOrder prop

* minor refactor

* moved logic to widget

* Added paramOrder to widget API call

* Update client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Merge branch 'master' into reorder-dashboard-parameters

* experimental removal of helper element

* cleaner comment

* Added dashboard global params logic

* Added backend logic for dashboard options

* Removed testing leftovers

* removed appending sortable to parent component behavior

* Revert "Added backend logic for dashboard options"

This reverts commit 41ae2ce.

* Re-structured backend options

* removed temporary edits

* Added dashboard/widget param reorder cypress tests

* Separated edit and sorting permission

* added options to public dashboard serializer

* Removed undesirable events from drag

* Bring back attaching sortable to its parent

This reverts commit 163fb6f.

* Added prop to control draggable destination parent

* Removed paramOrder fallback

* WIP (for Netflify preview)

* fixup! Added prop to control draggable destination parent

* Better drag and drop styling and fix for the padding

* Revert "WIP (for Netflify preview)"

This reverts commit 433e11e.

* Improved dashboard parameter Cypress test

* Standardized reorder styling

* Changed dashboard param reorder to edit mode only

* fixup! Improved dashboard parameter Cypress test

* fixup! Improved dashboard parameter Cypress test

* Fix for Cypress CI error

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Fix inconsistent Sankey behavior (getredash#5286)

* added type casting to coerce number string into nuber

* Merge branch 'master' into fix-inconsistent=sankey-behavior

* typed map viz options

* Partially typed what was possible

* reworked data coercion

* improved MapOptionsType types

* readaqueted sankey rows so as to allow strings again

* Use legacy resolver in pip to fix broken build (getredash#5309)

Fixes getredash#5300 and fixes getredash#5307 

There have been upstream (`python:37-slim` image) changes that
bring in `pip` version 20.3.1, which makes new `2020-resolver`
the default.  Due to that, un-resolvable dependency conflicts
in  `requirements_all_ds.txt` now cause the build to fail.

This is a workaround until the package versions can be updated
to work with the new pip resolver.

* Encrypt alert notification destinations (getredash#5317)

* Remove unnecessary space in rq log (getredash#5345)

* Fix: add a merge migration to solve multi head issue (getredash#5364)

* Add unit test to test for multi-head migrations issue

* Add merge migration

* Fix for Cypress flakiness generated by param_spec (getredash#5349)

* Bump dompurify from 2.0.8 to 2.0.17 in /viz-lib (getredash#5326)

Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.8 to 2.0.17.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@2.0.8...2.0.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump bl from 1.2.2 to 1.2.3 in /viz-lib (getredash#5257)

Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](rvagg/bl@v1.2.2...v1.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump axios from 0.19.0 to 0.21.1 (getredash#5366)

Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](axios/axios@v0.19.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated axios (getredash#5371)

* Increased waiting time to avoid flakiness (getredash#5370)

* Add My Dashboards filter option to the Dashboards list (getredash#5375)

* Add My Dashboards filter option to the Dashboards list. Added API endpoint to get the list of a user's dashboards, similar to the My Queries feature.

* Update empty dashboard list state to show an invite to create a new dashboard, like My Queries

* Update to Levko's suggested approach. Clean up some of the formatting for consistency. Put the 'My Queries/Dashboards' item before the Favorites since that organization seems cleaner to me.

* Address Levko's comments

* extend sync_user_details expiry (getredash#5330)

* Revert "Updated axios (getredash#5371)" (getredash#5385)

This reverts commit 49536de.

* Fix duplicate stylesheets (getredash#5396)

* Upgrade RQ to v1.5 (getredash#5207)

* upgrade RQ to v1.5

* set job's started_at

* update healthcheck to match string worker names

* delay worker healthcheck for 5 minutes from start to allow enough time to load in case many workers try to load simultaneously

* log when worker cannot be found

* Initial a11y improvements (getredash#5408)

* Fixed jsx-a11y problems

* Changed tabIndex to type number

* Initial improvements to DesktopNavbar accessibility

* Added accessibility to favorites list

* Improved accessibility in Desktop Navbar

* Improvements in Desktop navbar semantics

* Added aria roles to tags list

* Fixed tabindex type

* Improved aria labels in query control dropdown

* Added tab for help trigger close button

* Fixed typo

* Improved accessibility in query selector

* Changed resizable role to separator

* Added label to empty state close button

* Removed redundant and mistaken roles

* Used semantic components

* Removed tabIndex from anchor tags

* Removed mistakenly set menuitem role from anchors

* Removed tabIndex from Link components

* Removed improper hidden aria label from icon

* Reverted button and link roles in anchors for minimal merge conflicts

* Replaced alt attr with aria-label for icons

* Removed redundant menu role

* Improved accessibility of CodeBlock

* Removed improper role from schema browser

* Reverted favorites list to div

* Removed improper presentation role in query snippets

* Tracked changes for further PR

* Revert "Improved accessibility of CodeBlock"

* Add aria-labelledby to the associated code labels

This reverts commit 00a1685.

* Wrapped close icon into button

* remove check datasource permission

* show list dashboard

* show list dashboard

* show list dashboard

* Add plain button (getredash#5419)

* Add plain button

* Minor syntax improvements

* Refactor of Link component (getredash#5418)

* Refactor of link component

* Applied anchor-is-valid to Link component

* Fixed Eslint error

* Removed improper anchor uses

* Fixed TS errors

* show list dashboard

* merge original repo

* Reset failure counter on adhoc success (getredash#5394)

* reset failure counter when query completes successfully via adhoc

* Use "query_id" in metadata, but still allow "Query ID" for transition/legacy support

* Add setting to identify email block domain (getredash#5377)

* Add setting to identify email block domain

ref: getredash#5368

* rename

Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* rename and add comment

Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* Update redash/handlers/users.py

Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* Update redash/handlers/users.py

Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* Add more comment to settting

Co-authored-by: Levko Kravets <levko.ne@gmail.com>

* feat: support Trino data-source (getredash#5411)

* feat: add trino logo

* feat: add trino

* merge original repo

* merge original repo

* fix report

* fix report

* display query owner

* check permission can view dashboard

* check permission can view dashboard

* fix css login

* fix css login

* fix css login

* fix css login

* fix css login

* fix password user

* fix css

* fix css

* fix sub dashboard

* [Tmp]

* fix css

* add description

* fix error build

* fix css

* fix css

* [Change for Deployment]

* zip

* new version

* new version

* new version

* new version

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
Co-authored-by: max-voronov <70445727+max-voronov@users.noreply.github.com>
Co-authored-by: Levko Kravets <levko.ne@gmail.com>
Co-authored-by: Omer Lachish <omer@rauchy.net>
Co-authored-by: Lingkai Kong <lingkai.kong@databricks.com>
Co-authored-by: Alexander Rusanov <alexander.rusanov@gmail.com>
Co-authored-by: Rafael Wendel <rafawendel2010@gmail.com>
Co-authored-by: Christopher Grant <chrisgrant@lavabit.com>
Co-authored-by: Chad Chen <chad.chen@databricks.com>
Co-authored-by: Jonathan Hult <jonathan@jonathanhult.com>
Co-authored-by: Jerry <610819267@qq.com>
Co-authored-by: Jerry <jerry.yuan@webweye.com>
Co-authored-by: Josh Bohde <josh@joshbohde.com>
Co-authored-by: deecay <deecay@users.noreply.github.com>
Co-authored-by: Jiajie Zhong <zhongjiajie955@hotmail.com>
Co-authored-by: Elad Ossadon <elado7@gmail.com>
Co-authored-by: Elad Ossadon <elad.ossadon@databricks.com>
Co-authored-by: Patrick Yang <patrick.yang@databricks.com>
Co-authored-by: Tim Gates <tim.gates@iress.com>
Co-authored-by: Christopher Grant <christopher.grant@protonmail.com>
Co-authored-by: Vipul Mathur <vipulmathur@users.noreply.github.com>
Co-authored-by: Arik Fraimovich <arik@arikfr.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Talbot <76974990+justint-db@users.noreply.github.com>
Co-authored-by: Khiem Nguyen <khiem.nguyen@ttekglobal.com>
Co-authored-by: Đặng Minh Dũng <dungdm93@live.com>
Co-authored-by: Hải Triều Nguyễn Hồ <trieu@ltv.vn>
Co-authored-by: Nguyễn Hồ Hải Triều <hohaitrieuntu@gmail.com>
Co-authored-by: Nit <tin@ltv.vn>
  • Loading branch information
1 parent 7bd7ffe commit 100ea75
Show file tree
Hide file tree
Showing 474 changed files with 20,589 additions and 6,405 deletions.
10 changes: 5 additions & 5 deletions .circleci/Dockerfile.cypress
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM cypress/browsers:chrome67
FROM cypress/browsers:node14.0.0-chrome84

ENV APP /usr/src/app
WORKDIR $APP

COPY package.json $APP/package.json
RUN npm run cypress:install > /dev/null
COPY package.json package-lock.json $APP/
COPY viz-lib $APP/viz-lib
RUN npm ci > /dev/null

COPY client/cypress $APP/client/cypress
COPY cypress.json $APP/cypress.json
COPY . $APP

RUN ./node_modules/.bin/cypress verify
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- store_artifacts:
path: coverage.xml
frontend-lint:
environment:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
docker:
- image: circleci/node:12
steps:
Expand All @@ -67,6 +70,9 @@ jobs:
- store_test_results:
path: /tmp/test-results
frontend-unit-tests:
environment:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
docker:
- image: circleci/node:12
steps:
Expand All @@ -90,11 +96,20 @@ jobs:
PERCY_TOKEN_ENCODED: ZGRiY2ZmZDQ0OTdjMzM5ZWE0ZGQzNTZiOWNkMDRjOTk4Zjg0ZjMxMWRmMDZiM2RjOTYxNDZhOGExMjI4ZDE3MA==
CYPRESS_PROJECT_ID_ENCODED: OTI0Y2th
CYPRESS_RECORD_KEY_ENCODED: YzA1OTIxMTUtYTA1Yy00NzQ2LWEyMDMtZmZjMDgwZGI2ODgx
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
docker:
- image: circleci/node:12
steps:
- setup_remote_docker
- checkout
- run:
name: Enable Code Coverage report for master branch
command: |
if [ "$CIRCLE_BRANCH" = "master" ]; then
echo 'export CODE_COVERAGE=true' >> $BASH_ENV
source $BASH_ENV
fi
- run:
name: Install npm dependencies
command: |
Expand All @@ -113,6 +128,13 @@ jobs:
command: |
docker-compose logs
when: on_fail
- run:
name: Copy Code Coverage results
command: |
docker cp cypress:/usr/src/app/coverage ./coverage || true
when: always
- store_artifacts:
path: coverage
build-docker-image: *build-docker-image-job
build-preview-docker-image: *build-docker-image-job
workflows:
Expand Down
35 changes: 22 additions & 13 deletions .circleci/docker-compose.cypress.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
version: '2.2'
version: "2.2"
x-redash-service: &redash-service
build:
context: ../
args:
skip_dev_deps: "true"
skip_ds_deps: "true"
code_coverage: ${CODE_COVERAGE}
x-redash-environment: &redash-environment
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
REDASH_RATELIMIT_ENABLED: "false"
REDASH_ENFORCE_CSRF: "true"
services:
server:
build: ../
<<: *redash-service
command: server
depends_on:
- postgres
- redis
ports:
- "5000:5000"
environment:
<<: *redash-environment
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
REDASH_RATELIMIT_ENABLED: "false"
REDASH_ENFORCE_CSRF: "true"
scheduler:
build: ../
<<: *redash-service
command: scheduler
depends_on:
- server
environment:
REDASH_REDIS_URL: "redis://redis:6379/0"
<<: *redash-environment
worker:
build: ../
<<: *redash-service
command: worker
depends_on:
- server
environment:
<<: *redash-environment
PYTHONUNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
cypress:
ipc: host
build:
context: ../
dockerfile: .circleci/Dockerfile.cypress
Expand All @@ -42,6 +50,7 @@ services:
- scheduler
environment:
CYPRESS_baseUrl: "http://server:5000"
CYPRESS_coverage: ${CODE_COVERAGE}
PERCY_TOKEN: ${PERCY_TOKEN}
PERCY_BRANCH: ${CIRCLE_BRANCH}
PERCY_COMMIT: ${CIRCLE_SHA1}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Tests & Build Redash
on:
push:
branches: "develop"
branches: "tinrpt_new"

jobs:
buidl-redash:
Expand All @@ -28,10 +28,10 @@ jobs:
- name: Build Redash image
run: |
# cd packages/redash/
docker build --tag docker.pkg.github.com/ttekglobal/redash/ttekredash:dev-$IMAGE_VERSION .
docker build --tag docker.pkg.github.com/ttekglobal/redash/ttekredash_d9:dev-$IMAGE_VERSION .
- name: Push Redash image
run: docker push docker.pkg.github.com/ttekglobal/redash/ttekredash:dev-$IMAGE_VERSION
run: docker push docker.pkg.github.com/ttekglobal/redash/ttekredash_d9:dev-$IMAGE_VERSION
deploy-k8s:
name: "Deployment"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -63,5 +63,5 @@ jobs:

- name: Install / Upgrade App
run: |
helm upgrade --install ra --namespace=ra --values ./helm/values.yaml ./helm \
helm upgrade --install rpd9 --namespace=rpd9 --values ./helm/values.yaml ./helm \
--set image.tag=dev-$IMAGE_VERSION
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ venv/
.coveralls.yml
.idea
*.pyc
.nyc_output
coverage
.coverage
coverage.xml
client/dist
Expand All @@ -26,3 +28,4 @@ npm-debug.log
client/cypress/screenshots
client/cypress/videos
redash_dev
redash/tasks/worker.py
22 changes: 18 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@ FROM node:12 as frontend-builder
# Controls whether to build the frontend assets
ARG skip_frontend_build

ENV CYPRESS_INSTALL_BINARY=0
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1

RUN useradd -m -d /frontend redash
USER redash

WORKDIR /frontend
COPY package.json package-lock.json /frontend/
COPY viz-lib /frontend/viz-lib
COPY --chown=redash package.json package-lock.json /frontend/
COPY --chown=redash viz-lib /frontend/viz-lib

# Controls whether to instrument code for coverage information
ARG code_coverage
ENV BABEL_ENV=${code_coverage:+test}

RUN if [ "x$skip_frontend_build" = "x" ] ; then npm ci --unsafe-perm; fi

COPY client /frontend/client
COPY webpack.config.js /frontend/
COPY --chown=redash client /frontend/client
COPY --chown=redash webpack.config.js /frontend/
RUN if [ "x$skip_frontend_build" = "x" ] ; then npm run build; else mkdir -p /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi
FROM python:3.7-slim

Expand Down Expand Up @@ -68,6 +79,9 @@ WORKDIR /app
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_NO_CACHE_DIR=1

# Use legacy resolver to work around broken build due to resolver changes in pip
ENV PIP_USE_DEPRECATED=legacy-resolver

# We first copy only the requirements file, to avoid rebuilding on every file
# change.
COPY requirements.txt requirements_bundles.txt requirements_dev.txt requirements_all_ds.txt ./
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ backend-unit-tests: up test_db
docker-compose run --rm --name tests server tests

frontend-unit-tests: bundle
npm ci
CYPRESS_INSTALL_BINARY=0 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm ci
npm run bundle
npm test

Expand Down
5 changes: 3 additions & 2 deletions bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ worker() {

export WORKERS_COUNT=${WORKERS_COUNT:-2}
export QUEUES=${QUEUES:-}

supervisord -c worker.conf

exec supervisord -c worker.conf
# supervisord -c worker.conf
}

dev_worker() {
Expand Down
7 changes: 6 additions & 1 deletion client/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
"globals": ["Error"]
}
]
]
],
"env": {
"test": {
"plugins": ["istanbul"]
}
}
}
18 changes: 18 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ module.exports = {
// allow debugger during development
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
"jsx-a11y/anchor-is-valid": "off",
"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: [
{
Expand All @@ -34,6 +50,8 @@ module.exports = {
// 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",
},
},
],
Expand Down
Binary file modified client/app/assets/images/db-logos/databricks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/db-logos/trino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions client/app/assets/less/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ table {
color: #fff !important;
}
}

.col-md-4 {
width: 350px;
}

.logo-img {
padding-left: 20px;
padding-bottom: 20px;
}
}

.ant-modal-close-icon {
Expand Down Expand Up @@ -938,6 +947,10 @@ div[data-test="QueryPageVisualizationTabs"] {
}
}
}

.ant-list-item.selected {
background-color: #26387b !important;
}
// .react-grid-item {
// background: red;
// }
Expand All @@ -962,3 +975,19 @@ div[data-test="QueryPageVisualizationTabs"] {
::-webkit-scrollbar-thumb:hover {
background: #555;
}

div[data-test="GroupList"] {
a.ant-btn {
border-radius: 4px !important;
margin-right: 10px;
}
a.ant-btn:last-child {
margin-right: 0;
}
}

// .layout-sidebar {
// .tags-list {
// display: none;
// }
// }
4 changes: 2 additions & 2 deletions client/app/assets/less/inc/table.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
padding-top: 5px !important;
}

.btn-favourite,
.btn-favorite,
.btn-archive {
font-size: 15px;
}
Expand All @@ -114,7 +114,7 @@
line-height: 1.7 !important;
}

.btn-favourite {
.btn-favorite {
color: #d4d4d4;
transition: all 0.25s ease-in-out;

Expand Down
1 change: 1 addition & 0 deletions client/app/assets/less/redash/query.less
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ a.label-tag {
display: flex;
flex-direction: column;
flex-grow: 1;
position: relative;
}

.query-fullscreen {
Expand Down
Loading

0 comments on commit 100ea75

Please sign in to comment.