Commit Graph

1701 Commits

Author SHA1 Message Date
Nolan Nichols
a70eeb9530
Query Runner: SPARQL Endpoint Data Source (#5469) 2021-04-19 16:45:52 -05:00
Rafael Wendel
427c005c04
Replace hardcoded ids with hook (#5444)
* refactor: replace hardcoded ids with hook

* refactor: replace hard coded ids with lodash id (class)
2021-04-19 09:30:46 -03:00
Rafael Wendel
d8d7c78992
Replace <a> and <button> with <PlainButton> (#5433)
* Add PlainButton

* refactor close icons

* reorder import

* refactor remaining anchors

* refactor: replace remaining <button> and TODOs

* refactor: changed applicable elements to type link

* fix: minor details

* bug: fix tooltip ternary

* refactor: improve interactivity and semantics of schema list item
2021-04-10 16:43:58 -03:00
Rafael Wendel
23ced5db50
fix: treat possibly empty hrefs (#5468) 2021-04-10 13:00:15 -03:00
Rafael Wendel
bb1f8cbcf5
Fix Ace editor keyboard trap (#5451)
* bug: fix a11y and add sr notification

* refactor: improvements to sr notification
2021-04-07 09:50:54 -03:00
Rafael Wendel
a61a25dd32
Run prettier (#5436)
* run in /client

* run in /viz-lib

* bug: fix wrong line ts expect error

* bug: fixed search pattern for prettier
2021-03-31 16:44:19 -03:00
Jesse
21ea72fdc5
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
<DynamicForm>'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.
2021-03-31 16:18:59 +03:00
Rafael Wendel
a2c96c1e6d
Embed "external" link type into <Link> 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
2021-03-26 15:24:07 -03:00
Rafael Wendel
44178d9908
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
2021-03-26 11:45:24 -03:00
Rafael Wendel
6228f4cf71
Add live regions to tooltip (#5440)
* feature: add live regions to tooltip

* bug: treat null case
2021-03-25 17:47:49 -03:00
Rafael Wendel
c8df7a1c8a
Add jsx/a11y eslint plugin (#5439)
* build: install eslint jsx/a11y

* chore: add ESlint rules for jsx/a11y

* bug: add exceptions
2021-03-24 18:50:21 -03:00
Rafael Wendel
a665253f50
Adds configuration for <Tooltip> trigger on focus (#5434)
* refactor: add tooltip

* refactor: replace imports

* feature: add focus trigger
2021-03-24 18:35:21 -03:00
Sebastian Tramp
70681294a3
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
2021-03-24 00:15:24 -07:00
Rafael Wendel
fb90b501cb
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
2021-03-22 19:49:36 -03:00
Rafael Wendel
0560e2410e
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)
2021-03-17 14:26:08 -03:00
Đặng Minh Dũng
a5ec506b60
feat: support Trino data-source (#5411)
* feat: add trino logo

* feat: add trino
2021-03-12 12:10:06 -08:00
Rafael Wendel
10bce2d1ac
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
2021-03-11 11:07:01 -03:00
Rafael Wendel
b2636deef4
Add plain button (#5419)
* Add plain button

* Minor syntax improvements
2021-03-10 13:42:51 -03:00
Rafael Wendel
6cc69ec2c1
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
2021-03-04 16:30:31 -03:00
Levko Kravets
640fea5e47
Fix duplicate stylesheets (#5396) 2021-02-14 22:16:06 +02:00
Justin Talbot
0e1587a068
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
2021-02-02 12:37:48 +02:00
Rafael Wendel
84c2abed59
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 <nesk.frz@gmail.com>

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

* experimental removal of helper element

* cleaner comment

* Added dashboard global params logic

* Added backend logic for dashboard options

* Removed testing leftovers

* removed appending sortable to parent component behavior

* Revert "Added backend logic for dashboard options"

This reverts commit 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 <nesk.frz@gmail.com>
2021-01-11 15:18:50 -03:00
Christopher Grant
8b068dfd0b
Truncate large Databricks ODBC result sizes (#5290)
Truncates results sets that exceed a limit taken from an environment
variable called DATABRICKS_ROW_LIMIT.
2021-01-08 15:20:11 -06:00
Rafael Wendel
dcdff66e62
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 <nesk.frz@gmail.com>

* restricted SelectWithVirtualScroll props

* Added e2e test for parameter filters

* moved filter assertion to more suitable place

* created helper for option filter prop assertion

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

* refactor openAndSearchAntdDropdown helper

* Fix parameter_spec

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-12-17 21:56:46 -03:00
Lingkai Kong
7b8bcdf356
change item element in system status page (#5323) 2020-12-16 11:22:19 -08:00
Elad Ossadon
c290864ccd
Convert viz-lib to TypeScript (#5310)
Co-authored-by: ts-migrate <>
2020-12-15 18:21:37 -08:00
Elad Ossadon
18ee5343aa
Sync date format from settings with clientConfig (#5299) 2020-12-10 11:16:31 -08:00
Rafael Wendel
88c13868a3
removed leftover console.log (#5303) 2020-12-07 17:21:40 -03:00
Elad Ossadon
00c77cf36e
Redesign desktop nav bar (#5294) 2020-12-06 12:09:19 -08:00
Rafael Wendel
6e2631dec2
Changed 'Delete Alert' into 'Delete' for consistency (#5287) 2020-11-30 18:48:35 -03:00
Rafael Wendel
4b88959341
Fix QuerySourceDropdown value type (#5284) 2020-11-24 11:42:20 -03:00
Rafael Wendel
fa2b57a209
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
2020-11-22 13:07:56 -03:00
Gabriel Dutra
fa7ecca485
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
2020-11-10 14:59:15 +02:00
Jerry
c6bf8a1c55
bugfix: fix #5254 (#5255)
Co-authored-by: Jerry <jerry.yuan@webweye.com>
2020-11-04 20:56:41 +02:00
Rafael Wendel
12f71925c2
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 <nesk.frz@gmail.com>

* created custom restrictive types

* added quick const

* fixed style

* fixed generics

* added pos absolute to fix percy

* removed custom select from ParameterMappingInput

* applied prettier

* Revert "added pos absolute to fix percy"

This reverts commit 4daf1d4bef9edf93cd9bb1f404bd022472ff17a2.

* Pin Percy version to 0.24.3

* Update client/app/components/ParameterMappingInput.jsx

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

* renamed Select.jsx to SelectWithVirtualScroll

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-11-03 21:50:39 +02:00
Rafael Wendel
a3c79f26b9
Fix for the typo button in ParameterMappingInput (#5244) 2020-10-29 17:24:13 -03:00
Rafael Wendel
55cf17aa47
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 <rafawendel>
2020-10-28 09:37:16 +02:00
Levko Kravets
8dd76a00c5
Fix dashboard background grid (#5238) 2020-10-26 21:46:38 +02:00
Christopher Grant
e242ac2b10
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 <nesk.frz@gmail.com>

Co-authored-by: Chad Chen <chad.chen@databricks.com>
Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-10-25 12:06:45 -03:00
Gabriel Dutra
66463aedd4
Fix Home EmptyState help link (#5217) 2020-10-16 11:53:21 -03:00
Gabriel Dutra
9097feb100
Frontend updates from internal fork (#5209) 2020-10-15 14:25:22 -03:00
Levko Kravets
0d4615a482
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
2020-10-09 12:12:56 +03:00
Gabriel Dutra
2992c382d1
ScheduleDialog: Filter empty interval groups (#5196) 2020-10-03 05:54:05 +03:00
Levko Kravets
a473611cb0
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
2020-09-24 14:39:09 +03:00
Levko Kravets
210008c714
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
2020-09-23 16:30:08 +03:00
Omer Lachish
6b811c5245
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
2020-09-21 23:21:14 +03:00
Levko Kravets
83726da48a
Keep additional URL params when forking a query (#5184) 2020-09-21 12:54:55 +03:00
Levko Kravets
72dc157bbe
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
2020-09-17 14:01:15 +03:00
Lingkai Kong
1b8ff8e810
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
2020-09-14 14:18:31 +03:00
Levko Kravets
5cabf7a724
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
2020-09-10 13:42:53 +03:00