Commit Graph

7105 Commits

Author SHA1 Message Date
Levko Kravets
a1255b4144
Fix wrong Y-axis range for stacked bar chart (#5029)
* getredash/redash#5026 Fix wrong Y-axis range for stacked bar chart

* Update tests

* Use Plotly's built-in algorinthm to compute Y-axis range

* Update tests

* Revert previous solution (yRange-related code)

* Revert other unrelated changes

* Revert other unrelated changes

* Move chart rendering to own file and ensure that rendering steps will occur in necessary order

* Reduce amount of plot updates by mergin separate updates into a sigle cumulative update

* Give better names for several functions
2020-07-17 11:28:15 +03:00
dependabot[bot]
6c349ea70a
Bump lodash from 4.17.15 to 4.17.19 in /viz-lib (#5051)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 22:41:16 -03:00
Omer Lachish
95c28c47ad
Eager load outdated queries (#5049)
* eager load outdated queries

* explicitly use .all() instead of list()
2020-07-16 23:29:47 +03:00
simonschneider-db
48924de700
Add TypeScript support (#5027)
* TASK Add typescript dependencies to package.json

* TASK Add typescript to build process and npm scripts and TASK Move example components to typescript and add an example definition file.

* TASK Move back to ts-loader instead of babel typescript preset

* FIX Remove unnecessary changes

* FIX Explicitly mention tsconfig file in webpack.config.js to avoid `error while parsing tsconfig.json, The 'files' list in config file 'tsconfig.json' is empty`
See (https://github.com/TypeStrong/ts-loader/issues/405#issuecomment-330108362)

* FIX Move tsconfig to client subdirectory to make it accessible in docker container (only webpack.config.js is copied over from root folder in Dockerfile)

* TASK Move from ts-loader to babel to reduce compatibility issues between ES6/7 and typescript compilation.

* TASK Add types for classnames, hoist-non-react-statics and lodash. Fix default export of DashboardList and run prettier on eslintrc

* Run npm install

* Trigger tests

* Run npm install 2

* Trigger tests
2020-07-16 23:05:44 +03:00
Jannis Leidel
41a691328a
Fix bundle-extensions script to work on recent importlib-resources. (#5050)
Also adds a test case for running the script.
2020-07-16 23:05:22 +03:00
Omer Lachish
cb97364771
Dashboard URL does not show new name when dashboard name is updated (#1009)
* on dashboard api calls - take the id from the beginning of the slug, unless there is no number in it - in that case, take the entire slug as id

* add dashboard id when showing links to dashboards

* change path to include new name when renaming dashboards

* move slug generation to backend

* redirect to new name after changing (this time with a proper promise)

* oh right, we already have a slug function

* add spec that makes sure that renamed dashboards are redirected to the
url which contains their new name

* use id-slug in all Cypress specs

* move dashboards from /dashboard/:slug to /dashboards/:id-:name_as_slug

* Update dashboard url as its name changes

* Update separator to be "/"

* Update missing dashboard urls

* Update api not to depend on int id

* Use '-' instead of '/' as separator and update Dashboard.get calls

* slug -> name_as_slug

* Keep slug urls on cypress

* Update route path

* Use legacy attr for GET

* Use getter for urlForDashboard

* Update dashboard url when loaded by slug

* Update Dashboard routes to use id instead of slug

* Update Dashboard handler tests

* Update Cypress tests

* Fix create new dashboard spec

* Use axios { params }

* Drop Ternary operator

* Send updated slug directly in 'slug' attr

* Update multiple urls Dashboard test name

* Update route names

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

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
Co-authored-by: Levko Kravets <levko.ne@gmail.com>
2020-07-16 23:03:59 +03:00
Gabriel Dutra
d12691dc2a
Databricks Schema Browser: Allow eventlet worker instead of RQ (#5045)
* Add loading button in UI

* Handle databricks schema requests without RQ

* Don't use gevent worker

* Revert "Don't use gevent worker"

This reverts commit 9704c70a941a68c249db73e0450961e608fc0507.

* Use eventlet

* Use first column instead of 'namespace' one

* Revert "Add loading button in UI"

This reverts commit c0e4dfb966714a9f9e23977ab659e64afb5ce255.

* Remove databricks tasks

* Update eventlet

* Add libevent

* Display logs on failure

* Revert "Add libevent"

This reverts commit a00d067cb77b6f4f9919cf47f1d15c34d107a18c.

* Test updating gunicorn

* Don't set eventlet as the default for Redash

Co-authored-by: Arik Fraimovich <arik@arikfr.com>

* Remove fetchDataFromJob usage

Co-authored-by: Arik Fraimovich <arik@arikfr.com>
2020-07-15 17:35:59 +03:00
Levko Kravets
6f9e79c641
getredash/redash#5031 Counter is too large on Query View/Source pages (#5044) 2020-07-14 21:56:01 +03:00
Gabriel Dutra
461f98bbfc
Update Ace Editor version (#5041) 2020-07-14 10:02:33 -03:00
Levko Kravets
81e7c72d48
Allow to change order of legend items (#5021)
* Allow to change order of legend items

* Update tests
2020-07-13 19:08:51 +03:00
Gabriel Dutra
328f0f3f0c
Visualizations Library: Enhance docs (#4946) 2020-07-12 12:36:03 -03:00
Omer Lachish
ecb9adf903
purge_failed_jobs can take up to several minutes, so better have a proper timeout (#5033) 2020-07-12 10:18:38 +03:00
Gabriel Dutra
87e09f676e
Dynamic Form: Make default extra fields state a prop (#5039) 2020-07-09 12:39:25 -03:00
Gabriel Dutra
6fc5c803e0
Fix schema browser items height (#5024) 2020-07-08 11:55:10 -03:00
Gabriel Dutra
6c57aa448e
Query Source: Add Shift+Enter shortcut for query execution (#5037) 2020-07-08 10:36:16 -03:00
Lei Ni
878b297601
Fix: sorting queries by schedule was resulting in a wrong order (#4954)
* fix schedule sorting issue

* style change

* Update to meet code style.

* move the schedule sort to backend

* mod comment

Co-authored-by: Arik Fraimovich <arik@arikfr.com>
2020-07-07 21:29:12 +03:00
Levko Kravets
9c0450c84e
Explicitly sort routes to reduce a chance of conflicts (#5020)
* Explicitly sort routes to reduce (avoid at all?) a chance of conflicts

* Sort routes by params count
2020-07-03 21:11:39 +03:00
Levko Kravets
74f206614f
Refactor: extract commonly used pattern into hook (#5022) 2020-07-03 10:44:51 +03:00
Gabriel Dutra
2f26cf791c
Fix Databricks Schema Browser scrollbar (#5023) 2020-07-02 17:20:22 -03:00
Levko Kravets
c6be5758ad
Y-axis autoscale fails when min or max is set (#4904)
* getredash/redash#4784 Y-axis autoscale fails when min or max is set

* Update tests

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-07-02 20:33:20 +03:00
Alex Kovar
8341592b05
Add plus between tags to clarify how they are used #4628 (#5017)
Co-authored-by: Levko Kravets <kravets-levko@users.noreply.github.com>

Co-authored-by: Levko Kravets <kravets-levko@users.noreply.github.com>
2020-07-02 18:44:38 +03:00
Gabriel Dutra
a7edbf1e8d
Handle React exception when a function is provided (#5016) 2020-07-01 22:53:42 -03:00
Gabriel Dutra
217f41b586
Allow GET from non-admins on data source resource (#4992) 2020-07-01 10:10:24 -03:00
Gabriel Dutra
a8bd07e293
Databricks custom Schema Browser (#5010) 2020-07-01 10:09:18 -03:00
Omer Lachish
332c16b130
add a couple of missed custom key types hooks (#5014) 2020-07-01 12:39:46 +03:00
Vladislav Denisov
7940d36616
Python query runner fix (#4966)
* fixed print method

* fixed `.items()` error

* added extra builtins

* added guarded_unpack_sequence
2020-07-01 10:53:27 +03:00
Daniel Lang
68b70ed63b
Fixed broken custom JS visualization settings (#5013) 2020-07-01 01:22:07 -03:00
Gabriel Dutra
e0297835df
Add "Last 12 months" option to dynamic date ranges (#5004) 2020-06-30 09:56:00 -03:00
Omer Lachish
004bc7a2ac
Custom primary/foreign key types (#5008)
* allow overriding the type of key used for primary/foreign keys of the different models

* rename key_types to singular key_type

* add some documentation for `database_key_definitions`
2020-06-30 15:08:28 +03:00
Gabriel Dutra
efcf22079f
Allow private addresses when enforcing is disabled (#4983) 2020-06-30 10:54:49 +03:00
Levko Kravets
a83cb18cc5
Textbox: confirm close if text was changed (#5009)
* Textbox: confirm close if text was changed

* Update texting (with @gabrieldutra)

* Update texting

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

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-06-29 19:29:56 +03:00
Levko Kravets
1ecdf7b853
Too large visualization cause filters block to collapse (#5007) 2020-06-29 15:20:08 +03:00
Omer Lachish
90024ebc92
Delete locks for cancelled queries (#5006)
* delete locks for cancelled queries

* test that query cancellations do not prevent reenqueues
2020-06-29 13:09:01 +03:00
Gabriel Dutra
a37b7babbf
Remove pace-progress (#4990) 2020-06-28 15:27:48 -03:00
Mike Nason
8f4ac958b1
Fix org option in users create_root cli command (#5003)
Thanks @nason 👍
2020-06-25 22:02:46 +03:00
Omer Lachish
637d9837f4
Avoid purging operational queues (#4973)
* avoid purging operational queues

* schema queues actually run queries, so they should be purged
2020-06-25 15:35:50 +03:00
Levko Kravets
bdd3c3e735
Dynamically register frontend routes (#4998)
* Allow to override frontend routes

* Configure app before initializing ApplicationArea

* Refine code
2020-06-25 13:38:23 +03:00
Levko Kravets
6fc35510d3
Allow unregistering settings tabs (#5000) 2020-06-25 12:54:46 +03:00
Levko Kravets
6f842ef94a
Refactor User Profile page and add extension points to it (#4996)
* Move components specific to UserProfile page to corresponding folder

* Split UserProfile page into components

* Rename components, refine code a bit

* Add some extension points

* Fix margin
2020-06-25 12:03:19 +03:00
Levko Kravets
a563900f0a
Refactor Organization Settings and add extension points to it (#4995)
* Split OrganizationSettings page into components

* Update change handling: use objects instead of string keys, move some logic to more appropriate place

* Convert OrganizationSettings page to functional component and refine code a bit

* Add some extension points

* Improve onChange handler

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

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-06-24 12:36:45 +03:00
Gabriel Dutra
ee3930c64d
Catch QueryResultError on widget load (#4991) 2020-06-23 19:48:14 -03:00
Levko Kravets
10bff8b3b1
Some permissions fixes (#4994)
* Don't show New ... buttons on list pages if user doesn't have corresponding permissions

* Hide Create menu item if no create actions available
2020-06-23 22:56:24 +03:00
Jim Sparkman
a8510d1ad5
Fix CLI command for "status" (#4989)
* Fix CLI command for "status"

CLI command "status" can fail due to incorrect connection information to RQ.

This change matches the behavior from line 65 and solves the connection error.

* Move connection up to CLI entrypoint
2020-06-23 14:40:36 +03:00
Levko Kravets
3a543a4ab2
ErrorMessage is not centered (#4981)
* ErrorMessage is not centered

* Adjust ErrorMessage size on large screens

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

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-06-18 15:35:51 +03:00
Levko Kravets
2b1ba1ee33
Add New Dashboard/Query/Alert buttons to corresponding list pages (#4976) 2020-06-18 15:23:48 +03:00
Levko Kravets
4a54ad9d06
Add/Edit Tags dialog does not set focus on tags input (#4979)
* Refactor: convert EditTagsDialog to functional component; properly cleanup on destruction

* Pass focus to select when EditTagsDialog opens
2020-06-18 15:05:07 +03:00
Levko Kravets
676f560830
Navbar: show correct settings link for non-admin users (#4978)
* Non-admin users have an access to some settings, so need to show correct menu item in navbar

* Refine settings test

* Add some tests
2020-06-18 14:49:08 +03:00
Levko Kravets
98a5154345
Fix headless mode (didn't work with vertical navbar) (#4977)
* Fix headless mode (didn't work with vertical navbar)

* Fix header margins on public dashboard page

* Fix test
2020-06-17 11:10:12 +03:00
Gabriel Dutra
4c324ddc80
Custom Query components per Data Source type (#4948) 2020-06-15 16:13:10 -03:00
Gabriel Dutra
05c2233782
Don't reuse getErrorMessage (#4968) 2020-06-15 07:45:02 -03:00