Skip to content

Conversation

kravets-levko
Copy link
Collaborator

@kravets-levko kravets-levko commented Jan 31, 2019

  • Create new base component based on /lib/list-ctrl.js (which is a common parent for mentioned pages);
  • Migrate Dashboards list page;
  • Migrate Queries list page;
  • Migrate Users list page;
    • Error handling
    • <users-list-extra>
  • Cleanup.

Screenshots:

image

image

image

image

image

image

image

@kravets-levko kravets-levko added Frontend Frontend: React Frontend codebase migration to React labels Jan 31, 2019
@kravets-levko kravets-levko self-assigned this Jan 31, 2019
@ghost ghost added the in progress label Jan 31, 2019
@arikfr
Copy link
Member

arikfr commented Jan 31, 2019

Have you considered using Ant's component instead of a table for these pages?

@jezdez
Copy link
Contributor

jezdez commented Jan 31, 2019

@kravets-levko Could we please merge #2888 first since there is some overlap with the routes refactor there?

@arikfr
Copy link
Member

arikfr commented Jan 31, 2019

@jezdez

@kravets-levko Could we please merge #2888 first since there is some overlap with the routes refactor there?

Yes, I'll merge yours first. (Sorry, Levko...)

@ranbena
Copy link
Contributor

ranbena commented Jan 31, 2019

@kravets-levko Great to see Ant Table and page titles change by context 👍🏻

Only noticed that the favorite icon in first table column is misaligned. Perhaps the column is missing a specific width?

@ranbena
Copy link
Contributor

ranbena commented Jan 31, 2019

Have you considered using Ant's component

What did you have in mind @arikfr ?

@kravets-levko
Copy link
Collaborator Author

@arikfr @jezdez

Yes, I'll merge yours first. (Sorry, Levko...)

It's totally fine, I didn't expect anything else :-)

@ranbena

the favorite icon in first table column is misaligned

I'll do the final cleanup on the last step, will fix this too 👍

@ranbena
Copy link
Contributor

ranbena commented Jan 31, 2019

@kravets-levko is it possible to avoid re-rendering the table when changing ordering? I thought Ant Table could do the whole thing on its own without intervention, no?

@kravets-levko
Copy link
Collaborator Author

@ranbena

is it possible to avoid re-rendering the table when changing ordering? I thought Ant Table could do the whole thing on its own without intervention, no?

No, because sorting (and pagination) is server-side. On each click we fetch new set of items and update the table

@ranbena
Copy link
Contributor

ranbena commented Jan 31, 2019

No, because sorting (and pagination) is server-side

So you're saying it is possible if we load all the items into the table?

@arikfr
Copy link
Member

arikfr commented Feb 5, 2019

@ranbena this is probably a bad venue for having this discussion: it's hard to follow and it will be lost. Maybe a forum post with references to the relevant code?

In general, I'm not 100% sold about using HOCs for passing presentation logic. But need specific examples to discuss.

@kravets-levko
Copy link
Collaborator Author

kravets-levko commented Feb 5, 2019

@ranbena Sometimes this approach will work, sometimes not. For example, on pages from this PR search and sorting are coupled: when you start searching something, it resets sorting, and when you clear search input - it should return previously selected search column/order. It's much easier to maintain both functions together because you can see this dependency explicitly. As well as almost everything depends on pagination (LivePaginator is the one who rules over pagination, sorting and loads data). If we'll split this into smaller parts - they'll need to communicate somehow - it will add a lot of complexity (and I doubt that parts will be reusable without others). IMHO the only right decision in this case is to use common sense.

@kravets-levko
Copy link
Collaborator Author

@arikfr If you don't have more comments - let's merge it. Probably it's a good time to introduce some convention for PR commits - WDYT?

P.S. Please review Percy check and approve it if you're fine with users list page.

@ranbena
Copy link
Contributor

ranbena commented Feb 5, 2019

convention for PR commits

Like what?

@kravets-levko
Copy link
Collaborator Author

@ranbena 🤷‍♂️ Yesterday we decided that we'll mark PRs with new features/bug fixes/etc. and describe what's changed, but didn't discuss how exactly it should look like.

@arikfr
Copy link
Member

arikfr commented Feb 5, 2019

Small bug 🐞 : when selecting "Demo Set" the table width changes and overlaps with the menu:

image

@kravets-levko
Copy link
Collaborator Author

@arikfr How could I miss that 🤦‍♂️ Fixed

@ranbena
Copy link
Contributor

ranbena commented Feb 5, 2019

@kravets-levko perhaps give each column an individual min-width or else the titles squish.

screen shot 2019-02-05 at 17 10 46

@kravets-levko
Copy link
Collaborator Author

@ranbena Thanks! Should be fine now

@ranbena
Copy link
Contributor

ranbena commented Feb 5, 2019

@ranbena Thanks! Should be fine now

@kravets-levko It looks much better but look here the two right columns still break line. I'm unsure if this should be considered an issue or not..

@kravets-levko
Copy link
Collaborator Author

kravets-levko commented Feb 5, 2019

@ranbena No, it's okay (and BTW - on 1920px it's fine):

image

@ghost ghost assigned arikfr Feb 5, 2019
@arikfr arikfr merged commit ac68fe1 into getredash:master Feb 5, 2019
@ghost ghost removed the in progress label Feb 5, 2019
@pr-triage pr-triage bot added the PR: merged label Feb 5, 2019
@arikfr
Copy link
Member

arikfr commented Feb 5, 2019

Merged ✌️

@kravets-levko kravets-levko deleted the feature/react-list-controllers branch February 18, 2019 19:12
axeltlarsson added a commit to Jojnts/redash that referenced this pull request Jul 29, 2019
Squashed commits of the following:

* Delete an unused global (getredash#3231)

Signed-off-by: koooge <[email protected]>

* Fix: forked query wasn't opening in MULTI_ORG env (getredash#3236)

* Send argsrepr value with execute_query task (getredash#3235)

* request.view_args might be None and add org_id to ApiUser (getredash#3237)

* Handle the case when a QueryTracker is None and change order. (getredash#3238)

* Fix: Query editor duplicates keystrokes [getredash#2972] (getredash#3239)

* Simple user view (getredash#3244)

* show a simple user details page when viewing a user who isn't you (or you arent the admin)

* add a snapshot test

* lint

* getredash#3213 Scatter charts can have category Y axis (similar to Bubble) (getredash#3243)

* Upgrade requests package (getredash#3245)

* Support overriding the default Celery schedule database file via SCHEDULE_DB environment variable. (getredash#3056)

By default Celery will use a file celerybeat-schedule in the current directory.
This is an issue in a Kubernetes/Openshift environment as the file may be lost or even impossible to write.

* Closes getredash#2396: Add finer-grained scheduling. (getredash#2426)

* Closes getredash#187: Add finer-grained scheduling - backend.

* Closes getredash#2396 - Add finer-grained scheduling - frontend.

* Fix linting issues

* Rename ScheduleDialgo to .jsx

* Feature: Refresh schedule - code optimizations

* Feature: Refresh schedule - save/cancel actions

* Feature: Refresh schedule - styling (getredash#3247)

* Fix: Able to set out-of-range refresh interval

* Fix: Refresh schedule phrase overlaps title (getredash#3250)

* Add "Active at" column to user list. (getredash#3026)

* add last_active_at to users page

* Use our JSON encoder as the SQLAlchemy JSON serializer.

* Fixed some inconsistencies in the user query class methods.

* Minor cosmetic fixes.

* Add some make tasks for easier development.

* Add user detail sync system based on Redis backend.

There is a periodic Celery task that updates a new “details” JSONB column in the “user” table with the data from Redis.

Currently this is only used for tracking the date of last activity of a user but can be extended with other user information later.

Updates a few dependencies.

* Normalize a few Flask extension API names.

* Reduce implementation complexity of JSONEncoder.

* Use request_started signal to make sure we have a request context.

Otherwise loading the user based on the request won’t work.

* Fix test that checks if disabled users can login.

This correctly uses a URL path that includes the current organization and checks for the error message.

The previous test seems to have been a red herring.

* Minor cosmetic fixes.

* Remove needs_sync in favor of just deleting things.

* Misc review fixes.

* Ignore line length.

* Split redash.models import several modules.

* Move walrus UTC DateTimeField into redash.models.types.

* Restore distinctly loading dashboards.

* Simplify default values for user details.

* Define __repr__ methods generically.

* Consistently have underscore methods at the top of model methods.

* Fix tests.

* Split redash.models import several modules.

* Update to latest walrus and redis-py.

* Update kombu to 4.2.2 for redis-py 3.x compatibility.

* Remove redis-cli container after running Make task.

* Move buffer condition after datetime/time conditions.

* Update walrus to 0.7.1.

* Refactor some query APIs.

This uses the flask-sqlalchemy helpers consistently and makes more use of mixins.

* Post rebase fixes.

* Use correct kombu version

* Fix migration down revision

* Invitation Pending changes (getredash#3229)

* determine invitation_pending according to empty password. This commit will be reverted, I'm just deferring the implementation

* show '(Invitation Pending)' to users who haven't accepted their invitation yet

* allow resending invitations

* allow deletion of pending users from user list

* set invitation as not pending when following invite link

* prevent deleting activated users

* test that users who follow invitation links are set as non-pending invitations

* prevent re-using invitations

* invitees who use SSO will now also be marked as "non-pending"

* lint

* client: Remove estraverse (getredash#3254)

Signed-off-by: koooge <[email protected]>

* Redis based implementation of user active_at timestamp update (getredash#3256)

* Switch to simpler implementation
* Fix active_at update code
* Fix sync test

* update Flask-OAuthLib (getredash#3262)

* Fix invitation pending for existing users (getredash#3261)

* default `is_invitation_pending` to false and actively set it to true
when inviting users, so that existing users won't show "Invitation
Pending"

* fix tests that broke due to default is_invitation_pending value

* update Flask-OAuthLib

* [Data Sources] Implement Apache Drill (getredash#3188)

* Added support for Apache Drill datasource

* Improvements in `Drill` query runner and minor refactoring

1. Drill query runner now inherits from `BaseHTTPQueryRunner`, because they both have a lot of common code.
2. `BaseHTTPQueryRunner.get_response` method now accepts `http_method` argument (original implementation was only capable of sending `GET` HTTP requests).
3. Added `order` to `BaseHTTPRequestRunner` configuration schema to fix order of UI elements based on the schema.
4. Eliminated duplicate method `_guess_type` in `GoogleSpreadsheet`, `Results` and `Drill` query runners, moved `guess_type` to `redash.query_runner`.
5. Removed tests for `_guess_type` in `GoogleSpreadsheet`, `Results` and `Drill` query runners, merged them into single test case and moved to `tests.query_runner.test_utils`.
6. Various minor changes (code style, imports, etc).

* Fix: Refresh schedule interval count doesn't adhere to permission rules (getredash#3265)

* Fix: Refresh schedule interval count doesn't adhere to permission rules

* Fix “4.28 weeks” to “30 days”

* Merge interval type and count into one <Select>

* Fix: Refresh schedule durations not pluralized sufficiently (getredash#3268)

* Fix: Refresh schedule durations not pluralized sufficiently

* Allows omitting single value number in durationHumanize (getredash#3274)

* Verify admin email address (getredash#3267)

* add an  bit

* prompt on homepage when user's email hasn't been verified

* set e-mail as verified for new setups and invited users

* 👋 copy & paste invite links, it's time for verified e-mails!

* default `is_invitation_pending` to false and actively set it to true
when inviting users, so that existing users won't show "Invitation
Pending"

* fix tests that broke due to default is_invitation_pending value

* treat admin's e-mail address as verified

* add verification endpoint

* send verification e-mail

* Update client/app/components/empty-state/empty-state.html

Co-Authored-By: rauchy <[email protected]>

* Update redash/authentication/account.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/handlers/authentication.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/templates/emails/verify.html

Co-Authored-By: rauchy <[email protected]>

* Update redash/authentication/account.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/templates/verify.html

Co-Authored-By: rauchy <[email protected]>

* Update redash/templates/emails/verify.txt

Co-Authored-By: rauchy <[email protected]>

* add link in case redirects are disabled

* POSTing to /email_verification makes more sense than GETting /send_verification

* avoid sending invitations when no_invite is passed along

* Update client/app/pages/users/new.html

Co-Authored-By: rauchy <[email protected]>

* move e-mail verification prompt to home-page

* get rid of redundant $scope

* return JSON

* flip is_email_verified's default value so that existing users do not
show as not-verified

* e-mail verification propmt isn't dangerous, it just wants to warn you

* Scheduler tests (jest/enzyme) (getredash#3269)

* Setup enzyme and initial ScheduleDialog test

* Added tests for each schedule setting

* Added refreshOptions tests

* Added count out-of-range tests

* Added modal confirm/cancel tests

* Fixed tests failing due to server timezone difference

* Rebased to master

* Pleasant alert-warning colors (getredash#3276)

* Pleasant alert-warning colors

* Fix for json viewer primitive color

* handlers: Fix post users (getredash#3273)

* Update Antd to latest version + fix tests (getredash#3281)

* Pin version of pyparsing (getredash#3282)

* Separate Bootstrap/Ant styling (getredash#3279)

* Separate Ant less dependency tree

* Change order between variables and ant imports

* Remove inc/variables from ant.less

* Update input-height-base for antd

* Set same input-color for Ant and Bootstrap

* Dashboard Parameters (getredash#2756)

* getredash#2641 Step 1: split Add Widget/Add Textbox buttons

* Convert Add widget/textbox dialogs to React components

* getredash#2641 Step 2: Implement new dashboard parameters logic

* Resolve conflicts and fix build errors

* getredash#2641 Refactoring and improve code quality

* Add Edit parameter mappings dialog to the widget

* getredash#2641 Changes after code review

* Use Ant's Select component instead on <select> tags

* Fix Antd imports

* Fix Antd imports

* Fix Cannot read property 'getParametersDefs' of undefined

* Fix widgets static params bugs (don't show input, don't init from URL)

* Minor UI/UX fixes

* Migrate DynamicForm to React (getredash#3209)

* create DynamicForm React component

* Render fields based on target in DynamicForm

* Add missing title property to fields

* Fix style properties in DynamicForm

* Render File fields in DynamicForm

* Use React for middle component instead of Angular

* Functional save button

* Update label style

* Render functional actions

* Handle file inputs

* Update render methods to fix code climate issues

* Fix ant input number showing duplicate arrows

* Update DynamicForm style to be vertical

* Separate imports from antd in DynamicForm

* Add Feedback Icons to DynamicForm

* Change Action props on DynamicForm
- use type and pullRight instead of class prop
- update data sources and destinations pages accordingly

* Remove setDefaults method from DynamicForm fields

* Update antd version

* Remove unnecessary class selectors

* Remove another unnecessary class selector

* Remove tree validations and introduce ParameterizedQuery (getredash#3230)

* Fix invitation pending for older invitations (getredash#3298)

* explicitly look for a False under details['is_invitation_pending'] and
not any falsey result, to avoid locking out invitations which were
created before the Pending Invitation feature was introduced. Solves getredash#3297

* test that old invites (that do not have any is_invitation_pending flag set in their details object) are still acceptable

* Multifilter's dropdown cropped when visualization container is too small

* Use None as "not scheduled" default value of a query (getredash#3277)

* Use null as the default scheduled value.

* Don't serialize None to json, so we can use SQL is not null predicate.

* Fix warning about unicode in tests

* Handling empty query.schedule in UI (getredash#3283)

* Add migration to convert empty schedules to null and drop the not null contraint.

* Update form text colors (getredash#3296)

* Create ant variables and update form colors

* Remove less extension from imports in ant.less

* Update font-weight for labels

* Add percy snapshot for create data source page

* Remove bold in labels only for checkboxes and radio buttons

* Allow execution of highlighted subquery (getredash#3288)

* allow execution of selected subquery
* fix query save while highlighted
* don't modify queryText and update UI when running selected
* code style and transition
* Fix query selection execution background color
* make naming consistent

* override default integer/float formatting with environment variables (getredash#3307)

* Add regenerate function of user's API key (getredash#3224)

* Add regenerate function of user's API Key

* Update client/app/pages/users/show.js

Co-Authored-By: kyoshidajp <[email protected]>

* Remove unused error message

* Refactoring: Inline temp

* Update client/app/pages/users/show.js

Co-Authored-By: kyoshidajp <[email protected]>

* Change action event of regenerate user API key

* add wait time before percy data source page snapshot (getredash#3320)

* Fix an error of exporting dict value as Excel (getredash#3323)

* support for fetching all JQL results by way of pagination (getredash#3304)

* Use Ant's Paginator component; migrate SortIcon to React (getredash#3317)

* Textless query result endpoint (getredash#3311)

* add an endpoint for running a query by its id and (optional) parameters
without having to provide the query text

* check for access to query before running it

* Add configuration for the Support probot. (getredash#3327)

* Remove link to roadmap (getredash#3329)

It's no longer maintained 😢

* Filtering out incompatible dashboard params (getredash#3330)

* Add: Uptycs query runner (getredash#3319)

* adding uptycs query_runner in redash

* as per comment from Arik comment fixed the code

* fixed function_name

* fixed some indentation issues

* fixed the indentation issue and taken out customer_id from secret

* fixed the dependency of urllib3

* fixed the indententaton issue

* remved the urllib3 from requirements

* fixed the indentation issues

* added the new square image for Uptycs. Removed unnecessary variable and made ssl as an option

* fixed indentation issue

* Renamed SSL to verify_ssl and also added verify_ssl validate in verify in missing places

* Migrate PageHeader component to React (getredash#3324)

* Migrate PageHeader component to React

* CR1

* Convert Angular services to CommonJS-style and use them in React components instead of injecting (getredash#3331)

* Refine Auth service: remove dead code and fix race condition
* Export services in CommonJS style
* Refine Users, Events and OfflineListener services
* Refactor Notifications service - rewrite to CommonJS
* Replace Angular service injection with imports in React components
* Fix Footer tests
* Events service -> recordEvent function
* CR1

* Allow query owners to hard-overwrite query content in case of overlap with other user (getredash#2370)

* Hard overwrite on conflict for query owners (re getredash#283)

* Use AlertDialog instead of custom global function.

* Refine SettingsMenu service and <settings-screen> component (getredash#3339)

* Refine SettingsMenu service and <settings-screen> component

* Rename services/settingsMenu file to match default export name

* CR1

* Move BigQueryGCE to its own file (getredash#3356)

* Move BigQueryGCE to its own file

* Add missing import

* Add Percy Page Screenshots (getredash#3338)

* Add Percy Page Screenshots

* Add missing space

* WIP: Add dashboard details section for dashboard owner and more (getredash#2934)

Show dashboard creator on dashboard page

* getredash#3355 Widget params: Date/Date range value empty in static param input (getredash#3357)

* Refactor Policy and OrganizationStatus services (getredash#3345)

* Refactor Policy and OrganizationStatus services

* Cypress tests: preset the admin API key to a static value (getredash#3358)

* Server-side parameter validation (getredash#3315)

* stop testing `collect_query_parameters`, it's an implementation detail

* add tests for `missing_query_params`

* rename SQLQuery -> ParameterizedSqlQuery

* rename sql_query.py to parameterized_query.py

* split to parameterized queries and parameterized SQL queries, where
parameterized queries only do templating and parameterized SQL queries
add tree validation on top of it

* move missing parameter detection to ParameterizedQuery

* get rid of some old code

* fix tests

* set syntax to `custom`

* revert the max-age-related refactoring

* 👋 tree validations 😢

* BaseQueryRunner is no longer a factory for ParameterizedQuery, for now

* add an endpoint for running a query by its id and (optional) parameters
without having to provide the query text

* adds parameter schema to ParameterizedQuery

* adds parameter schema validation (currently for strings)

* validate number parameters

* validate date parameters

* validate parameters on POST /api/queries/<id>/results

* validate enum parameters

* validate date range parameters

* validate query-based dropdowns by preprocessing them at the handler
level and converting them to a populated enum

* change _is_date_range to be a tad more succinct

* a single assignment with a `map` is sufficiently explanatory

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/handlers/query_results.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* build error message inside the error

* support all types of numbers as number parameters

* check for permissions when populating query-based dropdowns

* check for access to query before running it

* check for empty rows when populating query-based enums

* don't bother loading query results if user doesn't have access

* 💥 on unexpected parameter types

* parameter schema default is a list, not a dictionary

* remove redundant null guards

* Frontend lint update (getredash#3253)

* client: Add lint command

Signed-off-by: koooge <[email protected]>

* client: Override eslint rule object-curly-newline to keep current style

Signed-off-by: koooge <[email protected]>

* client: Override eslint rule no-else-return to keep current style

Signed-off-by: koooge <[email protected]>

* client: Fix eslint import/named

Signed-off-by: koooge <[email protected]>

* client: eslint-5

Signed-off-by: koooge <[email protected]>

* codeclimate: Delete the old setting

Signed-off-by: koooge <[email protected]>

* client: Downgrade eslint 5 to 4 in codeclimate

Signed-off-by: koooge <[email protected]>

* client: npx install-peerdeps --dev eslint-config-airbnb

Signed-off-by: koooge <[email protected]>

* client: Enbale .jsx lint

Signed-off-by: koooge <[email protected]>

* client: Set warn

Signed-off-by: koooge <[email protected]>

* client: Fix lint indent, implicit-arrow-linebreak, lines-between-class-members

Signed-off-by: koooge <[email protected]>

* client: Disable eslint operator-linebreak

Signed-off-by: koooge <[email protected]>

* Revert "client: Downgrade eslint 5 to 4 in codeclimate"

This reverts commit f0fb0f0.

* client: Fix react/button-has-type

Signed-off-by: koooge <[email protected]>

* client: Disable an eslint rule react/jsx-one-expression-per-line

Signed-off-by: koooge <[email protected]>

* codeclimate: Disable no-multiple-empty-lines

Signed-off-by: koooge <[email protected]>

* client: Disable eslint react/destructuring-assignment

Signed-off-by: koooge <[email protected]>

* yandex_metrica: changed auth from params to headers (getredash#3360)

* Filename set when /results called directly (getredash#3359)

* filename set when /results called directly

* /results filename changed from query name to id

* Long line shortened

* Fix: Escape button in tag edit modal (getredash#3363)

* Update CodeClimate configuration format to Version 2 (getredash#3286)

* codeclimate: Update format v2
* codeclimate: Ignore generated files

* Fix: make ClickHouse password and username truly optional (getredash#3362)

* clickhouse optional password

* clickhouse URL and user made optional

* Migrate FavoritesControl component to React

* Migrate TagsList component to React

* CR1

* CR2

* Fix: Static param value not editable for Text/Number (getredash#3369)

* CR3

* Fix: static param text value is `[object Object]` (getredash#3371)

* Tune CodeClimate's config to make it less annoying (getredash#3370)

* Fix some incompatible dependencies (getredash#3348)

* Pin requests-oauthlib to work around incompatible deptree.

* Update boto3/botocore to fix incompatible deptree.

* Fix eslint errors

* CR1

* Migrate EmptyState component to React (getredash#3373)

* Migrate EmptyState component to React

* CR1

* CR2

* Widget param url prefix p to p_w (getredash#3380)

* Show disabled unpublished queries for alert and dashboard modals. (getredash#3347)

* BigQuery should correctly handle tmp tables that do not have a schema field. (getredash#3382)

* Alternative implementation: Step component

* Bring back data sources step for non admins

* No need to export Step

* Refine implementation, fix 'shouldShow' condition, fix eslint warnings

* Last refinements:

* Update Step implementation to be easier to read.
* Set some props to required to remove default value.

* Fix Cypress E2E failing in CI

* Fix Add datasource step; EmptyState.icon is optional

* Migrate "time ago" components to React (getredash#3385)

* Replace <am-time-ago> (angular-moment) and <rd-timer> with React component

* PropTypes: Moment validation

* Increase polling interval

* Refine component implementation

* Add tooltip with formatted date/time

* Refine component implementation

* fix lint error - getDerivedStateFromProps should be placed after state (getredash#3391)

* Add archived queries section to queries list. (getredash#2888)

* Add archived queries section to queries list.

* Refactor route building for list based controllers.

This also fixes the dashboard empty state page.

* Ignore to copy some files onto docker container (getredash#3388)

* Ignore to copy some files onto docker container

Signed-off-by: koooge <[email protected]>

* Dockerignore venv/

Signed-off-by: koooge <[email protected]>

* Make the logic around schedule['until'] easier to read (getredash#3376)

*  [Widget Params] Migrated edit params + new widget dialog to Ant Modal (getredash#3387)

* Use textless endpoint for pristine queries (getredash#3367)

* use the textless endpoint (/api/queries/:id/results) for pristine
queriest

* Revert "use the textless endpoint (/api/queries/:id/results) for pristine"

This reverts commit cd2cee7.

* move execution preparation to a different function, which will be soon
reused

* go to textless /api/queries/:id/results by default

* let the query view decide if text or textless endpoint is needed

* lint

* Fix: Selected item in dropdown unreadable (getredash#3398)

* Fix: only login user when it's the current user. (getredash#3396)

Otherwise it would login the admin as the user...

* Added pre-push hook (getredash#3390)

* [Widget Params] Switched parameter list to table style (all parts) (getredash#3332)

* [Widget Params] Split title and mapping editing

* [Widget Params] Restyled source editing

* [Widget Params] Switched parameter list to table style

* Displaying different labels and help phrases when changing type
Added link to knowledge base
Fixed issue with existing param default select value

* Add YAML support in QueryEditor (getredash#3395)

* Migrate Dashboards/Queries/Users list pages to React (getredash#3381)

* Refine existing implementation of dashboards/queries/users lists and a common base controller

* Migrate common list page controller to React and refactor it's logic

* Migrate Dashboard list page to React

* Migrate Queries list page to React

* Migrate Users list page to React

* Remove react-timeago dependency

* Use composition instead of inheritance

* Refine implementation

* Merge sidebar into single component

* Refine column definitions

* Use simple controller instead of React context

* Refine implementation

* Restore changes from getredash#2888

* Tweak Users list page

* Ability to render dynamically defined components

* Tweak users list page

* User list page for non-admins

* Fix: ItemsTable ignores isAvailable field

* Refine implementation

* Refine implementation

* Implement LiveItemsList as higher order component

* Some fixes

* Move some definitions to a better place

* Some fixes

* Refine components

* Refine UsersList page

* More comments for a god of comments

* Fix wrong tables size on smaller screens

* Tweak tables

* Fix: cohorts get stuck when passing strings instead of numbers. (getredash#3397)

* Fix: cohorts get stuck when passing strings instead of numbers.

Parse the value to get a number.

* Use parseInt for stage

* Remove redundant parseInt

* Refactor TagsControl; fix TagsEditorModal animation (getredash#3399)

* Refactor TagsControl; fix TagsEditorModal animation

* Update tooltip text

Co-Authored-By: kravets-levko <[email protected]>

* Update tooltip text

Co-Authored-By: kravets-levko <[email protected]>

* CR1

* [Bug fix] Few small bugs on Queries list page (getredash#3402)

* Link to query page
* Sidebar menu item title: `Archive` -> `Archived`
* Whitespaces in empty state block

* Coerce to moment when 'datetime' selected by user. (getredash#3150)

* Work around a resizing issue. (getredash#3412)

* Work around a resizing issue.

Fix getredash#3353.

* Add comment to remove this when we delete Angular.

Co-Authored-By: jezdez <[email protected]>

* Show active and pending users separately (for admins) (getredash#3400)

* Fix: “Add TextBox” dialog not opening (getredash#3414)

* [Widget Params] Title edit fixes (getredash#3413)

* [Codebase Improvement] Refine dialog wrapper and use it for all existing dialogs (getredash#3407)

* [UI/UX Improvement] Use Ant's Button component on users list page (getredash#3416)

* Unify query based dropdown population (getredash#3337)

* stop testing `collect_query_parameters`, it's an implementation detail

* add tests for `missing_query_params`

* rename SQLQuery -> ParameterizedSqlQuery

* rename sql_query.py to parameterized_query.py

* split to parameterized queries and parameterized SQL queries, where
parameterized queries only do templating and parameterized SQL queries
add tree validation on top of it

* move missing parameter detection to ParameterizedQuery

* get rid of some old code

* fix tests

* set syntax to `custom`

* revert the max-age-related refactoring

* 👋 tree validations 😢

* BaseQueryRunner is no longer a factory for ParameterizedQuery, for now

* add an endpoint for running a query by its id and (optional) parameters
without having to provide the query text

* adds parameter schema to ParameterizedQuery

* adds parameter schema validation (currently for strings)

* validate number parameters

* validate date parameters

* validate parameters on POST /api/queries/<id>/results

* validate enum parameters

* validate date range parameters

* validate query-based dropdowns by preprocessing them at the handler
level and converting them to a populated enum

* change _is_date_range to be a tad more succinct

* a single assignment with a `map` is sufficiently explanatory

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/handlers/query_results.py

Co-Authored-By: rauchy <[email protected]>

* Update redash/utils/parameterized_query.py

Co-Authored-By: rauchy <[email protected]>

* build error message inside the error

* support all types of numbers as number parameters

* check for permissions when populating query-based dropdowns

* check for access to query before running it

* check for empty rows when populating query-based enums

* don't bother loading query results if user doesn't have access

* 💥 on unexpected parameter types

* parameter schema default is a list, not a dictionary

* fix a totally unrelated typo

* remove redundant null guards

* introduce /dropdown.json endpoint with dummy data

* wire frontend to /dropdown.json

* always return name/value combos from /dropdown.json

* load actual data into /dropdown.json

* pluck correct values for `name` and `value`

* reuse dropdwon plucking logic in QueryResultResource

* simplify _get_dropdown_values

* when doing parameter validation, we only care about the value and not
the display name

* rename dropdown to dropdownOptions

* move dropdown_values to utils/parameterized_query.py

* stop converting queries to enums and encapsulate the work inside
ParameterizedQuery (almost - /dropdown.json would still access the
dropdown_values method)

* re-order arguments by importance

* test query parameter validation

* tests for dropdown_values logic

* remove `.json` suffix to the dropdown endpoint

* allow `BaseResource` to handle JSON stuff

* move _pluck_name_and_value outside its containing method

* case-insensitive lookup when plucking name and value

* separate concerns and simplify test isolation for `dropdown_values`

* pick the default column according to the order specified in the query
result columns attribute

* use `current_org` instead of passing `org`

* test that user has access to the query when calling the /dropdown
endpoint

* Added short modal specific styling (getredash#3366)

* Handle InterruptException in Athena query runnner like in the Presto query runner. (getredash#3403)

* Upgrade Sentry SDK (getredash#3418)

* replace raven with sentry-sdk

* use sentry-sdk in celery

* use sentry-sdk with flask

* unify Flask and Celery initializations for Sentry

* extract sentry stuff to own module

* it's time for Sentry 0.7.2

* [Bug fix] Show query result footer only when there is a query result. (getredash#3422)

* Bug fix] Saving a new query removes reference to last query result (getredash#3421)

* Correctly test if the current query result is for the current query.
* Serialize a new query with its visualizations.

* [Feature] Alternative implementation of dashboard param title editing (