From 8c4be43ddf486b77c16763cbdd48a0f49814e058 Mon Sep 17 00:00:00 2001 From: Alexey Kinev Date: Mon, 17 Apr 2023 20:50:39 +0400 Subject: [PATCH] Redash development history in a single commit (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ErrorMessage is not centered (#4981) * ErrorMessage is not centered * Adjust ErrorMessage size on large screens Co-authored-by: Gabriel Dutra Co-authored-by: Gabriel Dutra * 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 * 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 * Catch QueryResultError on widget load (#4991) * 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 Co-authored-by: Gabriel Dutra * 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 * Allow unregistering settings tabs (#5000) * Dynamically register frontend routes (#4998) * Allow to override frontend routes * Configure app before initializing ApplicationArea * Refine code * Avoid purging operational queues (#4973) * avoid purging operational queues * schema queues actually run queries, so they should be purged * Fix org option in users create_root cli command (#5003) Thanks @nason 👍 * Remove pace-progress (#4990) * Delete locks for cancelled queries (#5006) * delete locks for cancelled queries * test that query cancellations do not prevent reenqueues * Too large visualization cause filters block to collapse (#5007) * 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 Co-authored-by: Gabriel Dutra * Allow private addresses when enforcing is disabled (#4983) * 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` * Add "Last 12 months" option to dynamic date ranges (#5004) * Fixed broken custom JS visualization settings (#5013) * Python query runner fix (#4966) * fixed print method * fixed `.items()` error * added extra builtins * added guarded_unpack_sequence * add a couple of missed custom key types hooks (#5014) * Databricks custom Schema Browser (#5010) * Allow GET from non-admins on data source resource (#4992) * Handle React exception when a function is provided (#5016) * Add plus between tags to clarify how they are used #4628 (#5017) Co-authored-by: Levko Kravets Co-authored-by: Levko Kravets * 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 * Fix Databricks Schema Browser scrollbar (#5023) * Refactor: extract commonly used pattern into hook (#5022) * 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 * 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 * Query Source: Add Shift+Enter shortcut for query execution (#5037) * Fix schema browser items height (#5024) * Dynamic Form: Make default extra fields state a prop (#5039) * purge_failed_jobs can take up to several minutes, so better have a proper timeout (#5033) * Visualizations Library: Enhance docs (#4946) * Allow to change order of legend items (#5021) * Allow to change order of legend items * Update tests * Update Ace Editor version (#5041) * getredash/redash#5031 Counter is too large on Query View/Source pages (#5044) * 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 * Remove fetchDataFromJob usage Co-authored-by: Arik Fraimovich * 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 Co-authored-by: Gabriel Dutra Co-authored-by: Levko Kravets * Fix bundle-extensions script to work on recent importlib-resources. (#5050) Also adds a test case for running the script. * 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 * Eager load outdated queries (#5049) * eager load outdated queries * explicitly use .all() instead of list() * 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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 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 * Load extensions on db init (#5062) * Only try to create tables and stamp DB if not tables exist already. * load extensions when creating the database * Add Column Type to Databricks schema browser (#5052) * Add Column Type to Databricks schema browser * Map schema columns to be an object * Format pg with Black * Add data_type for Postgres * Add override mechanism for webpack config (#5057) * loosen up some proptypes and backend casting to allow different primary key types (#5066) * Move page size select to the Paginator component (#5064) * Queries list: move "My Queries" above "Archived" (#5072) * Introduce caching to the Databricks Schema Browser (#5038) * Add refresh button in the bottom * Add caching * Drop allSettled * Simplify refresh button * Update error to return 500 * Load tables before loading columns * Don't mutate schema * Reset db name and schemas when changing data source * Load both tables and columns * Return error with code 200 * Code review updates * Add expiration time to the cache Keys * Back with RQ * Make sure Policy is loaded for user session (#5081) * Exposing setting for overriding template directory (#4324) When using some of the customized login flows such as `REMOTE_USER` the deployed site breaks due to not finding template files. This change updated the app default to use the existing Flask templates directory rather than the compiled static assets directory which only contains an index.html file. * fix: Compose version due to --build-arg (#5083) Signed-off-by: koooge * Add: periodic job to remove ghost locks. (#5087) * Bar chart with second y axis overlaps data series (#4150) * Add support for CSRF tokens (#5055) * add flask-wtf * add CSRF tokens to all static forms * add CSRF tokens to all axios requests * disable CSRF validation in unit tests * support CSRF-protected requests in *most* cypress tests * don't enfroce CSRF checks by default * avoid CSRF enforcement in unit tests * remove redundant spread * some camel casing hiccups * always yield the CSRF cookie, but avoid enforcing it if CSRF toggle is off * Restyled by prettier (#5056) Co-authored-by: Restyled.io * set a CSRF header only if cookie is present * enforce CSRF in CI * install lodash directly for Cypress * install request-cookies directly for Cypress. We should probably start loading package.json deps * enable CSRF support when logout and login happen within the same spec Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io * Make table visualization header fixed (#5103) * add lock table header * Move styling to a new class * Update renderer.less * Move class to table and fix top border * Update renderer.less * Update viz-lib/src/visualizations/table/renderer.less Thanks, this change is good to me. Co-authored-by: Gabriel Dutra Co-authored-by: Gabriel Dutra * CSRF Exempts (#5108) * if present, always convert CSRF cookies to headers * exempt auth blueprints from CSRF protection * respect CSRF exempts * Update Organization Settings (#5114) * Update Organization Settings * Cypress: Update tab naming * Make DataSourceListComponent a dynamic component (#5113) * Use Skeleton as ItemsList loading state (#5079) * Cypress touch-ups (#5109) * allow non-sequential IDs for DataSources in Cypress tests * refactor redash-api to a set of Cypress commands * support mounting Redash endpoints in Cypress routes * fix some parameter specs by waiting for schema to load * extract baseUrl from cypress.json * Restyled by prettier (#5110) Co-authored-by: Restyled.io Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io * Remove content width limit on all pages (#5091) * Remove content width limit on all pages * Update client/app/assets/less/inc/base.less Co-authored-by: Gabriel Dutra * Remove content limit; limit sidebar width Co-authored-by: Gabriel Dutra * Keep widget loading when fetch request is replaced (#5118) * Fix create link on data sources page (#5121) * Fix create link on data sources page * Cypress: Add test that the source dialog opens * Add DynamicComponent to PermissionsControl flag (#5116) * Misc changes to codebase back ported from internal fork (#5129) * Set corejs version in .babelrc so Jest doesn't complain. * Rewrite services/routes in TypeScript. * Add TypeScript definitions for DialogComponent. * Make image paths more portable * Add current route context and hook. * Make EmptyState more flexible by being able to pass in getSteps function. * Rewrite ItemsList in TypeScript. * Introduce the possibility to add custom sorters for a column. * Rearrange props to be friendly to TypeScript. * Type definitions for NotificationApi. * Use Databricks query editor components for databricks_internal type of query runner. * URL Escape password in Alembic configuration. * Compare types in migrations. * Misc changes to codebase back ported from internal fork - part 2 (#5130) * Auth: make login url configurable. * More portable image url. * durationHumanize: support for milliseconds. * Sorter: support for custom sort. * Upgrade Ant Design to v4 (#5068) * Introduce Link component (#5122) * Introduce Link component * Use Link component for external links as well * Remove unused file (I hope it's really not needed) * Use Link component in visualizations library * Simplify Link component implementation * CR1 * Trigger build * CR2 * Support multiple queries in a single query box (#5058) * Support multiple queries in a single query box * Implement statement splitting function and add tests for it * Add a test for databricks-specific syntax * Split statements before running query * Add toggle to disable public URLs (#5140) * Add toggle to disable public URLs * Add Cypress tests * Antd v4: Fix CreateUserDialog (#5139) * Antd v4: Update CreateUserDialog * Add Cypress test for user creation * Misc frontend changes from internal fork (#5143) * Move CardsList to typescript (#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 (#5146) * getredash/redash#4944 Query pages: keep selected filters when switching visualizations * Pass current filters to expanded widget modal * prevent assigning queries to view_only data sources (#5152) * Add default limit (1000) to SQL queries (#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 (#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 (#5184) * Refresh CSRF tokens (#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 (#5187) * Ask user to log in when session expires (#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 (#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 (#5053) * Align Y axes as zero * Fix typo (with @deecay) * Add alignYAxesAtZero function * Avoid 0 division Co-authored-by: Gabriel Dutra * Generate Code Coverage report for Cypress (#5137) * Move Cypress to dev dependencies (#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 (#5196) * Share Embed Spec: Make sure query is executed (#5191) * Updated Cypress to v5.3 and fixed e2e tests (#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 * fixed test in choropleth Co-authored-by: Gabriel Dutra * Extra actions on Queries and Dashboards pages (#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 (#5203) * Frontend updates from internal fork (#5209) * Add horizontal bar chart (#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 Co-authored-by: Levko Kravets * Fix Home EmptyState help link (#5217) * Static SAML configuration and assertion encryption (#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 Co-authored-by: Chad Chen Co-authored-by: Gabriel Dutra * Fix dashboard background grid (#5238) * added required to Form.Item and Input for better UI (#5231) * added required to Form.Item and Input for better UI * removed required from input * Revert "removed required from input" This reverts commit b56cd76fa1b1eba4e337e55c2797b6a5d64f2699. * Redo "removed required from input" * removed typo Co-authored-by: rafawendel2010@gmail.com * Fix annotation bug causing queries not to run - ORA-00933 (#5179) * Fix for the typo button in ParameterMappingInput (#5244) * extend the refresh_queries timeout from 3 minutes to 10 minutes (#5253) * Multiselect dropdown slowness (fix) (#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 * 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 4daf1d4bef9edf93cd9bb1f404bd022472ff17a2. * Pin Percy version to 0.24.3 * Update client/app/components/ParameterMappingInput.jsx Co-authored-by: Gabriel Dutra * renamed Select.jsx to SelectWithVirtualScroll Co-authored-by: Gabriel Dutra * bugfix: fix #5254 (#5255) Co-authored-by: Jerry * Enable graceful shutdown of rq workers (#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 (#5262) * Frontend updates from internal fork (#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 (#5276) Correct comment from QUERY_RESULTS_MAX_AGE to QUERY_RESULTS_CLEANUP_MAX_AGE * Remove unwanted props from Select component (#5277) * Explicitly selected props so as to avoid errors from non-wanted props * Simplified approach * Ran prettier 😬 * Fixed minor issues * Fix QuerySourceDropdown value type (#5284) * Changed 'Delete Alert' into 'Delete' for consistency (#5287) * Redesign desktop nav bar (#5294) * Add React Fast Refresh + Hot Module Reloading (#5291) * removed leftover console.log (#5303) * Fix disabled hot reload flow (#5306) * Sync date format from settings with clientConfig (#5299) * added eslint no-console (#5305) * added eslint no-console * Update client/.eslintrc.js to allow warnings Co-authored-by: Gabriel Dutra Co-authored-by: Gabriel Dutra * Convert viz-lib to TypeScript (#5310) Co-authored-by: ts-migrate <> * change item element in system status page (#5323) * Obfuscate non-email alert destinations (#5318) * Dropdown param search fix (#5304) * fixed QueryBasedParamterInput optionFilterProp * added optionFilterProp fallback for SelectWithVirtualScroll * simplified syntax * removed optionFilterProp from QueryBasedParameterInput.jsx Co-authored-by: Gabriel Dutra * 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 * Add Username and Password fields to MongoDB config (#5314) * docs: fix simple typo, possbily -> possibly (#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 (#5312) * Bar chart e2e test (#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 * Truncate large Databricks ODBC result sizes (#5290) Truncates results sets that exceed a limit taken from an environment variable called DATABRICKS_ROW_LIMIT. * Add reorder to dashboard parameter widgets (#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 * 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 41ae2ce4755a6fa03fd76d900819b11016919275. * 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 163fb6fef5ecf7ec9924d5ff2dddcb4d889caab8. * 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 433e11edc353b645410bac4bc162819ffd37d89a. * 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 * Fix inconsistent Sankey behavior (#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 (#5309) Fixes #5300 and fixes #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 (#5317) * Remove unnecessary space in rq log (#5345) * Fix: add a merge migration to solve multi head issue (#5364) * Add unit test to test for multi-head migrations issue * Add merge migration * Fix for Cypress flakiness generated by param_spec (#5349) * Bump dompurify from 2.0.8 to 2.0.17 in /viz-lib (#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](https://github.com/cure53/DOMPurify/compare/2.0.8...2.0.17) Signed-off-by: dependabot[bot] 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 (#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](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 0.19.0 to 0.21.1 (#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](https://github.com/axios/axios/compare/v0.19.0...v0.21.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Updated axios (#5371) * Increased waiting time to avoid flakiness (#5370) * Add My Dashboards filter option to the Dashboards list (#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 (#5330) * Revert "Updated axios (#5371)" (#5385) This reverts commit 49536de1ed8331928cb6139d5aac2a2ebe780fc7. * Fix duplicate stylesheets (#5396) * Upgrade RQ to v1.5 (#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 (#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 00a1685b1b37ad1ad5770880f9653dbd06d2cf3f. * Wrapped close icon into button * Add plain button (#5419) * Add plain button * Minor syntax improvements * Refactor of Link component (#5418) * Refactor of link component * Applied anchor-is-valid to Link component * Fixed Eslint error * Removed improper anchor uses * Fixed TS errors * Reset failure counter on adhoc success (#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 (#5377) * Add setting to identify email block domain ref: #5368 * rename Co-authored-by: Levko Kravets * rename and add comment Co-authored-by: Levko Kravets * Update redash/handlers/users.py Co-authored-by: Levko Kravets * Update redash/handlers/users.py Co-authored-by: Levko Kravets * Add more comment to settting Co-authored-by: Levko Kravets * feat: support Trino data-source (#5411) * feat: add trino logo * feat: add trino * Improve css and add focus styles (#5420) * Add styles for focused ant menus * Add disabled styles to clickable button * Improved dashboard header syntax and added focus * Improved CSS syntax * Add interactive styles * Improved anchor dependent styles * Improved styles of widget (gray more/delete btns) * Add interactive style for favorite star * Improved style of delete btn * Make table content fill all space * Added focus and active styles * Scoped query snippets list * Fixed behavior for all major browsers * Replaced button styles with plain button * Scoped items list styles * Added focus styles to ant table * Add plain button (#5419) * Minor syntax improvements * Refactor of Link component (#5418) * Improve icon a11y (#5424) * Added screen reader CSS * Added description to external links * Added spinner icon accessibility * Added accessibility to exclamation and big message * Added question and exclamation accessibility * Hide decorative icons * Standardized link design * Added a11y to refresh icons * Added aria-label to anchors and buttons * Added a11y to conditional icons * Added applicable labels to Ant Icons * Changed escape to interpolation * Replaced external links with opens in new tab * Improved Tooltip hosts * Added aria live to temporary elements * Removed mistakenly added redundant helper * Undoes unnecessarily added interpolation * Replaced empty label with hidden * Improved full icon label * Improved display of live regions * Added note * remove unused class * Created unique id * Remove TODOs * Proper action label * Improved feedback for autocomplete toggle * feature: add id hook * refactor: use id hook * standardize white space * Query Runner: eccenca Corporate Memory (SPARQL) - query RDF / Linked Data Knowledge Graphs with redash (#5415) * add Corporate Memory Runner based on cmempy 21.2.3 * fix code style * apply some code nice ups * use extendedEnum, boolean and extra_options for schema description * use lower case sorting for data source types list This correctly orders data source names which starts with lower chars (such as eccenca Corporate Memory) * add missing dblogo * Adds configuration for `` trigger on focus (#5434) * refactor: add tooltip * refactor: replace imports * feature: add focus trigger * Add jsx/a11y eslint plugin (#5439) * build: install eslint jsx/a11y * chore: add ESlint rules for jsx/a11y * bug: add exceptions * Add live regions to tooltip (#5440) * feature: add live regions to tooltip * bug: treat null case * Improve input fields a11y (#5427) * Added labels to params * Added aria-label to inputs * Linked unsemantic label with input * Replaced span with label * refactor: improve labels for schema browsers * refactor: component accepts aria label * refactor: add labels to sidebar search inputs * Embed "external" link type into `` component (#5432) * feature: add external link * refactor: split external link into own component * refactor: added link with icon * refactor: remove reduntant tab index * refactor: simplify props * refactor: fix types * refactor: bring types and components together * refactor: improve treatment of target * Prepare viz-lib release with Antd v4 (#5443) * Get the user's current groups from props instead of useEffect(). (#5450) useEffect() doesn't run until _after_ the component renders. Before the hook runs, the value of `groups` === []. And this is passed to 's `initialValue` prop. The `initialValue` is not re-evaluated after useEffect() completes. So the users groups are never updated. This change pulls the user's current groups from `user` prop on the page. * Run prettier (#5436) * run in /client * run in /viz-lib * bug: fix wrong line ts expect error * bug: fixed search pattern for prettier * Fix Ace editor keyboard trap (#5451) * bug: fix a11y and add sr notification * refactor: improvements to sr notification * Fixes issue #5445: Scheduled query not working (#5448) * use 'query_id' everywhere instead of 'Query ID' * some black while we're at it Co-authored-by: Omer Lachish * fix: rollback pip version to avoid legacy resolver problem (#5467) Co-authored-by: Lingkai Kong * fix: treat possibly empty hrefs (#5468) * Replace `` and `