Commit Graph

6685 Commits

Author SHA1 Message Date
shinsuke-nara
cab011def9 Migrate with SQL statements. (#4105) 2019-08-30 14:08:22 +03:00
Omer Lachish
31c888ea8e
Dashboard: when updating parameters, run only relevant queries (#3804)
* refresh only affected queries in dashboard when parameters are changed

* rename pendingParameters to updatedParameters

* select which widgets to update according to their mapping as a dashboard-level parameter

* use lodash's include
2019-08-30 07:03:51 +03:00
Sandeep Belagavi
443054428f [Qubole] - Adding support to process Quantum query types. (#4066)
* [Qubole] - Adding support to process Quantum query types.

Quantum is a serverless interactive service that offers
direct SQL access to user's data lake. Changes are made
to accept `quantum` query type from user which makes
`Cluster Label` as optional.

* -Making quantum as defult query.
-Dictionary safe access to connection parmeters

* keeping pep8 standards

* Maintainig pep8 std

* Use latest version of qds-sdk

* Use qds-sdk v1.13.0

* Use qds-sdk v1.12.0

* Use qds-sdk v1.13.0

* Updating SDK with verified version

* hive as default query type

* qds-sdk : Locking most recent release version

* qds-sdk : Locking recent release version

* falling back to original version of qds-sdk
2019-08-29 19:22:52 +03:00
Gleb Lesnikov
ef9a4d5eed [Data Sources] Add: Azure Data Explorer (Kusto) query runner (#4091)
* [Data Sources] Add: Azure Data Explorer (Kusto) query runner

* CodeClimate fixes

* Remove TODO

* Fixed configuration properties names for Azure Kusto

* Azure Kusto: get_schema in one query

* azure-kusto-data update to 0.0.32

* Add Kusto to the default query runners list
2019-08-26 10:17:49 +03:00
Arik Fraimovich
a2b68a3569
Make sure we always pass a list to _get_column_lists (#4095)
(some data sources might return None as the columns list)
2019-08-25 17:39:15 +03:00
Ran Byron
e7b707eb25
Removed redash-newstyle.less (#4017) 2019-08-22 08:06:54 +03:00
Arik Fraimovich
1786273344
Fix: MySQL connections without SSL are failing (#4090)
* Move connection logic into a single method & make sure not to pass ssl value if not used.

* Remove wildcard import and format file.
2019-08-21 14:31:17 +03:00
Christian Clauss
d38ca803c5 Add more flake8 tests and fail build if any test fails (#4055)
* Add more flake8 tests and fail build if any test fails

Run all flake8 E9xx + F63x + F7xx + F82x tests.

* long = long in Python 2
2019-08-18 11:27:44 +03:00
Gabriel Dutra
a1f11cb8d9 Migrate Parameters component to React (#4006)
* Start Parameters Migration

* Add dirtyCount

* Use workaround with setState

* Apply Changes

* Add EditSettingsDialog

* Add Cmd/Ctrl + Enter behavior

* Remove isApplying

* Delete Angular version of parameters

* Update tests

* Remove angular stuff

* Update jest

* Drag placeholder

* Update events

* Use old button styling and move css

* Reviewing code

* Add parameter rearrange test

* Add Parameter Settings title change test

* Update Parameter Settings button styling

* Move parameter url logic back to Parameters

* Disable url update when query is new

* Styling changes (#4019)

* Ran's title width styling

* Update drag test

* Improve sizing for Number inputs

Co-Authored-By: Ran Byron <ranbena@gmail.com>

* Fix issue with dragged parameter wrapping

Co-Authored-By: Ran Byron <ranbena@gmail.com>

* Don't reevaluate dirtyParamCount

* Allow multiple values :)

* Fix parameter alignments

* Fix Select width on search

* Update client/app/components/Parameters.less

Co-Authored-By: Ran Byron <ranbena@gmail.com>

* Humanize param.name

* Make sure angular updates Execute disabled status
2019-08-18 11:27:20 +03:00
Vladimir Ponarevsky
b426e4fdc4 Fix clickhouse password leak (#4078)
* Fix clickhouse password leak

* Fix after review
2019-08-18 11:05:41 +03:00
Arik Fraimovich
e5e926bac5
Pin kombu version (#4075)
kombu is a dependency of Celery and usually we let them declare the version, but their version is pinned and the most recent release (4.6.4) has a severe regression where workers stop responding to inspect commands.
2019-08-16 19:27:24 +03:00
Arik Fraimovich
24d68008fa
Format target value as a number with reasonable default (#4073) 2019-08-15 15:54:32 +03:00
Arik Fraimovich
0e90b89acc
ParameterizedQuery: handle the case where a value is null (#4072) 2019-08-15 15:18:40 +03:00
Jannis Leidel
2c2f241671 Require a more up-to-date version of importlib-metadata. (#4069) 2019-08-15 11:50:27 +03:00
Jakdaw
d49514abe9 When we fork a query, make sure we create the new visualizations in the same order as per the source query (#4067) 2019-08-14 11:08:56 +03:00
Arik Fraimovich
934a145ced
Switch to mysqlclient from Python-MySQL (#4061) 2019-08-14 10:11:53 +03:00
Omer Lachish
f7c70c2b91
Add parameter dialog doesn't work when query has selected text (#4032)
* debounce updateQuery to prevent pasting parameters over selected texts failing parseQuery (see #4032)

* drop defer
2019-08-14 07:47:34 +03:00
The Alchemist
69ba165565 [Data Sources] Initial commit for adding Dgraph support (#3987)
* Initial commit for adding Dgraph support

* Made suggestions from https://codeclimate.com/github/getredash/redash/pull/3964

* feedback from @arikfr

* added logo for Dgraph from Twitter

* Better conversion of Dgraph JSON to Redash's internal JSON

* made recommendations from @arikfr

* removed unused function
2019-08-13 13:14:37 +03:00
Jannis Leidel
7b5696dc75 Fix loading of periodic tasks and clean up extension loading. (#4064)
* Fix loading of periodic tasks and clean up extension loading.

This does a few things:

- add tests for extension loading
- refactor the extension and periodic task loading
- better handle assertions raised by extensions (e.g. when an extension tries to override an already registered view)
- attach exception traceback to error log during loading for improved debugging

* Use site.addsitedir instead of calling pip.

* Use sys.path instead of site.addsitedir and also the setup.py egg_info command.
2019-08-13 13:11:59 +03:00
Gabriel Dutra
4698408a08
Cypress: Fix cy.clock not freezing time (#4060) 2019-08-13 07:08:59 -03:00
Ievgen Aleinikov
be142d60df Add assume role as a credential source for AWS Athena Query runner (#4028)
* allowing to specify a custom work group for AWS Athena queries

* Fixing title + adding correct position in the UI

* Adding assume role configuration to Athena query runner.

* removing extra blank lines

* fixes based on comments to the PR
2019-08-12 16:45:56 +03:00
Arik Fraimovich
aceea6516f
Change the required Docker Compose version to 3.2 (#4059)
With the default Docker installed from sources on Ubuntu 19.04 it failed starting the project when asking for Compose version 3.7, but everything worked fine with 3.2.
2019-08-12 13:26:29 +03:00
Arik Fraimovich
685b53672e
Prevent CSP violations by not having script URLs (#4062)
* Fix: remove inline script to avoid CSP violation

Closes #4039.

* Restore eslint rule that prevents javascript href attributes.

* Remove all inline script links.
2019-08-12 13:25:07 +03:00
Arik Fraimovich
7dd62ef948
Add option to control whether to format target value. (#4063) 2019-08-12 13:24:11 +03:00
Evghenii Goncearov
7c2acc34c9 Dont send password reset link to disabled users (#2631)
* Dont send password reset link to disabled users

* Update email subject

* Update blocked email text.

* Update blocked email text (plain text version).

* Remove debug print.
2019-08-11 17:29:26 +03:00
Arik Fraimovich
c5a90876f3
Add Cassandra to the list of default enabled query runners (#4058) 2019-08-11 17:17:57 +03:00
Takuya Arita
8abaf89394 Add tag management commands (#3168) 2019-08-11 16:30:48 +03:00
PengYuan Lai
aa2bd0042e check float if scale > 0 in snowflake query result (#3876) 2019-08-11 16:21:57 +03:00
Yoshiken
a7b14bfb9a Fix according to pycodestyle format (#4011)
* Fix W292 no newline at end of file

* Fix extra whitespace

* Fix E305 expected 2 blank lines after class or function definition

* Fix W391 blank line at end of file

* Fix E231 missing whitespace after

* Fix E303 too many blank lines

* Fix E302 expected 2 blank lines

* Fix E128 continuation line under-indented for visual indent
2019-08-11 16:09:04 +03:00
Oluwafemi Sule
4e5f55a4b7 Align content vertically in restricted widget type (#4056) 2019-08-11 15:28:46 +03:00
Omer Lachish
76fbe858ba refresh_queries requires Request Context (#4045)
* avoid using 'abort' in parameterized query - raise an exception instead

* when facing invalid parameters or detached dropdown queries - continue to refresh the rest of the outdated queries

* test that dropdown queries detached from data source raise an exception when fetch values is attempted

* test that queries with invalid parameters arent refreshed

* test that queries with dropdown query parameters which are detached from the data source are skipped

* fix stale test double name

* newlines. newlines everywhere.

* pass org into dropdown_values

* pass in org in every ParameterizedQuery usage

* Update redash/tasks/queries.py

Co-Authored-By: Arik Fraimovich <arik@arikfr.com>

* reduce refresh_queries log noise

* track failure count for queries that failed to apply parameters, and also notify the failures

* Update redash/tasks/queries.py

Co-Authored-By: Arik Fraimovich <arik@arikfr.com>

* newlines. newlines everywhere.
2019-08-09 15:26:31 +03:00
Omer Lachish
cf7aef1e16 Make sure there is an event for any query execution (#4051)
* move event recording for query executions inside run_query

* include indication of cache hit or miss inside execute_query events
2019-08-09 15:24:17 +03:00
Jannis Leidel
77625b2a13 Remove duplicate base_url function. (#4043) 2019-08-08 10:44:44 +03:00
Omer Lachish
c4dcf01b3c
avoid variable shadowing (#4050) 2019-08-07 22:43:04 +03:00
Ran Byron
a167c590b6
Added arrow to multi-select component (#4044) 2019-08-06 16:46:53 +03:00
Gabriel Dutra
8e23f93433
Allow dynamic values dropdown to scroll with the page (#4040) 2019-08-06 08:55:25 -03:00
Levko Kravets
e41d40bbe0
getredash/redash#4036 Visualisation editor crashes out when changing datetype to non-HTML text (#4037) 2019-08-05 12:37:21 +03:00
Gabriel Dutra
6fc4d5b551
Focus DatePicker after selecting dynamic values (#4033) 2019-08-04 22:24:33 -03:00
Gabriel Dutra
f0576a3623 Support multi-select in parameters (#3952)
* Allow multiple values for enum parameter

* Allow multi-select for Query dropdown parameters

* CR + make sure list values are allowed

* Add prefix, suffix and separator

* Rename multipleValues and cast options as strings

* Replicate serialization logic on frontend

* Add Quote Option Select

* Make sure it's enum or query before join

* Add a couple of tests

* Add help to quote option

* Add min-width and normalize empty array

* Improve behavior when changing parameter settings
- Set parameter value again to pass through checks
- Add setValue check for multi values

* Validate enum values on setValue + CodeClimate

* Ran wording suggestions

* Updates after Apply Changes

* Fix failing Cypress tests

* Make sure enumOptions exists before split

* Improve propTypes for QueyBasedParameterInput

Co-Authored-By: Ran Byron <ranbena@gmail.com>

* CR

* Cypress: Test for multi-select Enum

* Fix multi-selection Cypress spec

* Update Refresh Schedule
2019-08-04 15:47:30 +03:00
Levko Kravets
9eabf89771 getredash/redash#4031 Counter visualization: formatting not applied to target value (#4035) 2019-08-04 15:22:53 +03:00
Arik Fraimovich
11cc274c1c
Update Snowflake connector version to latest (#4029) 2019-08-04 08:55:02 +03:00
Ran Byron
8ad08a566a Revert "Revoked widget refresh button spinners" (#4027)
This reverts commit ab5494a8fde49c2fee108a0c3ddd5853f89e7e9f.
2019-08-01 08:23:17 +03:00
Levko Kravets
ef31d0d768 Fix: don't update dashboard's version when adding a widget (#4026) 2019-07-31 22:28:12 +03:00
Levko Kravets
4640c33387 Bug fix: error when trying to collect dashboard-level filters for a textbox widget (#4024) 2019-07-31 18:03:40 +03:00
Levko Kravets
9b290913a6
Migrate Table visualization to React Part 1: Renderer (#3963) 2019-07-31 17:33:33 +03:00
Ran Byron
db89c4f7bc
Turned off max asset size warning (#4023) 2019-07-31 11:34:52 +03:00
Gabriel Dutra
eae1fb7d73 Force readonly inputs click (#4016) 2019-07-30 11:16:34 +03:00
Arik Fraimovich
4f742aeaac
Fix: support for unicode in DynamoDB queries (#4015) 2019-07-30 11:14:57 +03:00
Ran Byron
5ddad862be Updated timeago strings (#4012)
* Updated timeago strings

* Moved moment config to app/config
2019-07-29 18:03:59 +03:00
Ran Byron
6f811f163a
Added widget header refresh indicator (#3970) 2019-07-29 16:43:44 +03:00