Commit Graph

3734 Commits

Author SHA1 Message Date
Krist Wongsuphasawat 04e5e87114 remove reactable from Hotkeys.jsx (#6143) 2018-10-18 18:00:03 -07:00
Krist Wongsuphasawat 9d01af201e Add annotation information to ChartMetadata (#6136)
* add annotations information to ChartMetadata

* rename fields
2018-10-18 17:59:30 -07:00
Krist Wongsuphasawat d662e36442 [Ready] Define ChartProps data structure (#6125)
* rename basicChartInput to chartProps

* replace BasicChartInput with ChartProps class

* Add transformProps to deck.gl plugins

* Add space

* delete BasicChartInput

* add width and height as part of ChartProps and update transformProps

* remove width and height

* remove adaptors from deck.gl components

* remove deck.gl creataAdaptor
2018-10-18 15:44:21 -07:00
Krist Wongsuphasawat 4e2341a131 downgrade reactable and remove fastdom (#6142)
* downgrade reactable and remove fastdom

* remove caret
2018-10-18 14:09:01 -07:00
michellethomas 7d0a17aef5
Turning off flaky link tests (#6141) 2018-10-18 12:02:59 -07:00
Krist Wongsuphasawat 0aa6d90429 Remove isNumeric util function and use Number.isFinite instead (#6106)
* remove isNumeric util function and use lodash isFinite instead

* use native Number.isFinite
2018-10-18 11:24:43 -07:00
Krist Wongsuphasawat 58be31af3f change viewport dimension (#6123) 2018-10-18 11:22:43 -07:00
Chris Williams e163dfe744
[SIP-4] replace SQL Lab ajax calls with `SupersetClient` (#5896)
* [superset-client] replace sqllab ajax calls with SupersetClient

* [superset-client][sqllab] replace more misc ajax calls

* [superset-client][tests] call setupSupersetClient() in test shim

* [superset-client] replace more sqllab ajax calls and fix tests

* [superset-client][tests] remove commented lines

* [sqllab][superset-client] fix eslint and tests, add better error handling tests.

* [superset-client] fix tests from rebase

* [cypress][sqllab][superset-client] fix

* [superset-client] use Promises not callbacks in getShortUrl calls

* [superset-client][short-url] don't stringify POST

* [superset-client][short-url][cypress] add data-test attribute for more reliable test

* [cypress] remove .only() call
2018-10-18 10:40:30 -07:00
Krist Wongsuphasawat 273991fd4e Use @vx/responsive to provide Chart width on Explore page (#6104)
* use parent size to compute width

* simplify this.width() and this.height()

* remove unnecessary jquery

* fix indent and import

* adjust headerheight from 100 to 80

* fix test
2018-10-16 22:18:35 -07:00
Maxime Beauchemin bbfd69a138 [utils.py] gathering/refactoring into a "utils/" folder (#6095)
* [utils] gathering/refactoring into a "utils/" folder

Moving current utils.py into utils/core.py and moving other *util*
modules under this new "utils/" as well.

Following steps include eroding at "utils/core.py" and breaking it down
into smaller modules.

* Improve tests

* Make loading examples in scope for tests

* Remove test class attrs examples_loaded and requires_examples
2018-10-16 17:59:34 -07:00
Chris Williams af0ffa44ab
[SIP-4] replace explorer ajax calls with `SupersetClient` (#5869)
* [superset-client] initialize SupersetClient in app setup

* [core] replace explore ajax calls with SupersetClient

* [core] fix SupersetClient explore tests

* [core] remove _packages mistake directory

* remove unused files

* add yarn.lock

* always render modal

* [superset-client][jest] fix SaveModal_spec

* [lint] remove unnecessary AbortController global

* yarn.lock
2018-10-16 14:54:31 -07:00
Krist Wongsuphasawat dcfbae1ab9 [SIP-5&6] Refactor line_multi (#6058)
* Rewrite line_multi

* move dir

* add chartplugin for line_multi

* rename var
2018-10-16 14:54:01 -07:00
Chris Williams 462c58ee67
[SIP-4] replace dashboard ajax calls with `SupersetClient` (#5854)
* [core] replace dashboard ajax calls with SupersetClient

* [core] fix SupersetClient dashboard tests

* [dashboard][superset-client] don't error by parsing save dashboard response as json
2018-10-16 13:42:22 -07:00
Junda Yang 177bed3bb6 allow cache and force refresh on table list (#6078)
* allow cache and force refresh on table list

* wording

* flake8

* javascript test

* address comments

* nit
2018-10-16 13:14:45 -07:00
michellethomas 7d49255926
This control test is flaky and affecting travis runs, turning it off for now (#6121) 2018-10-16 12:20:07 -07:00
Beto Dealmeida b4a1983303 Fixes to the CategoricalDeckGLContainer and filter box (#6038)
* WIP

* WIP

* Fix time grain

* Fix autoformatting

* Fix more autoformatting

* Fix even more autoformatting

* Fix manual move of play slider

* Fix state management

* Revert change

* Fix screengrid

* Remove autozoom on render

* Remove unneeded code

* Zoom when mounted

* Fix lint
2018-10-16 12:08:37 -07:00
Junda Yang 91792a564a send username in sync request (#6113)
* send username in sync request

* nit
2018-10-15 20:33:59 -07:00
Chris Williams 316fdcb4d0
[SIP-4] replace chart ajax calls with `SupersetClient` (#5875)
* [deps] add @superset-ui/core

* [superset-client] initialize SupersetClient in app setup

* [superset-client] add abortcontroller-polyfill

* [superset-client] replace all chart ajax calls with SupersetClient

* [tests] add fetch-mock dep and helpers/setupSupersetClient.js

* [superset client][charts][tests] fix and improve chartActions_spec

* [deps] @superset-ui/core@^0.0.4

* [common] add better SupersetClient initialization error

* [cypress] add readResponseBlob helper, fix broken fetch-based tests

* [cypress] fix tests from rebase

* [deps] @superset-ui/core@^0.0.5

* [cypress][fetch] fix controls test for fetch

* [cypress][dashboard][fetch] fix filter test for fetch

* [superset-client] configure protocol on init

* yarn.lock

* undo Chart.jsx revert

* yarn again

* [superset-client] fix chartAction unit tests
2018-10-15 16:52:19 -07:00
Christine Chambers 9029701f24 [refactor] Migrate from Mocha+Chai to Jest (#6079)
* [refactor] Migrate from Mocha+Chai to Jest

This change migrates all the existing unit tests
- to Jest's global expect and matchers from chai's imported expect, asserts and matchers.
- to Jest's describe/test from mocha's describe/it

The majority of the mechanical changes to tests are achieved through running jest-codemods. The only two note-worthy manual tweaks:
1. Setting a testURL of http://localhost in jest config and adjusting a few tests to leverage this value instead of relying on about:blank.
2. Re-enabling ExploreChartPanel_spec which was previously commented out as we cannot have empty tests with nothing in it with Jest. :)

This change also removes dependencies to Mocha and Chai.

* Remove the test:one command as it now does the same thing as test.

* Fixing lint errors. The diff looks large but is large done through `yarn run lint --fix`

The only noteworthy change is the one in eslintrc for tests. The env has been updated from mocha to jest.

* Adding eslint-plugin-jest and further modify tests.

- One small fix in sqllab's Timer Spec for a test that is not using the spy it created for testing.
- Deletion of a duplicated test caught by eslint-plugin-jest.

* - Make istanbul coverage work with Jest.

- Remove dependency on stand-alone istanbul and babel-istanbul as they're built-into jest. Yes!

* Attempt to fix dynamic imports in tests.

* run sequentially and log heap usage

* - tweaking maxworkers for travis and specifying coverageDirectory for codecov

- remove dynamic import in shim.js now that it is set in babelrc for tests only.
2018-10-15 13:10:18 -07:00
timifasubaa 46c86672c8 remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
Chen Chen 68ff4e5b72 fix dependency issue #6086 (#6102) 2018-10-15 09:28:39 -07:00
Krist Wongsuphasawat dc7b6f2bae Rename onTooltip to setTooltip (#6103)
* rename onTooltip to setTooltip

* fix typo
2018-10-15 09:26:59 -07:00
Krist Wongsuphasawat 3df98e5b4c make BigNumber PureComponent (#6105) 2018-10-15 09:25:48 -07:00
Adam Dobrawy 12ce1b20bd Fix link formating in README.md (#6097) 2018-10-13 18:19:32 -07:00
Krist Wongsuphasawat 2fc07435ca move countries directory under CountryMap (#6088) 2018-10-13 10:12:45 -07:00
timifasubaa dd9eeda03e
remove future (#6065) 2018-10-13 09:39:04 -07:00
timifasubaa 047c8b0943
remove six dependency (#6091) 2018-10-13 09:38:46 -07:00
Krist Wongsuphasawat e1e8778554 Add ChartPlugin and metadata for deck.gl vis (#6090) 2018-10-12 14:01:32 -07:00
Krist Wongsuphasawat 8e88d0233a Add ChartPlugin and metadata for nvd3 and BigNumber vis (#6085)
* add nvd3 thumbnails

* add ChartPlugin and metadata files

* add BigNumber thumbnails

* Add bignumber ChartPlugin
2018-10-12 12:09:40 -07:00
Chris Williams 1d2b1aa465
[cypress][sqllab] increase timeout for sqllab results (#6089) 2018-10-12 11:21:06 -07:00
Krist Wongsuphasawat 2a7b64fef5 [SIP-5] Remove references to slice from all deck.gl components. (#6039)
* start removing slice.

* migrate arc

* refactor arc

* refactor path

* refactor deck polygon

* remove commented code

* refactor factory function

* refactor grid

* refactor hex

* refactor polygon

* refactor scatter

* refactor geojson

* refactor screengrid

* remove unnecessary nesting

* add proptypes

* add proptypes

* refactor deck.gl Multi

* fix lint

* Use export syntax instead of module.exports
2018-10-11 20:56:36 -07:00
Krist Wongsuphasawat 5282f39026 Create chart plugins and metadata (#6072)
* add credit field

* change image size limit for url-loader

* create chord ChartPlugin

* Update config to include original file name in the output

* add calendar

* add country map

* add eventflow

* add thumbnails

* add eventflow, filterbox, force-directed and heatmap

* Add histogram, horizon, mapbox, paired t-test, parallel coordinates

* Create plugins for the rest one-off charts

* ignore chartplugin files from istanbul
2018-10-11 20:55:40 -07:00
timifasubaa e37b83a21a
remove future imports from db migrations (#6063) 2018-10-11 14:22:56 -07:00
michellethomas b7d555420d Cypress tests for controls and explore links (#6069)
* Adding tests for controls

* Adding tests for explore links
2018-10-11 14:13:04 -07:00
Krist Wongsuphasawat 64383ce96e Rename color constants and move util function into separate file (#6074)
* rename constant colors to UPPERCASE

* Move isDefined into its own file and add unit test
2018-10-11 14:05:34 -07:00
Narcissus7 c0f685b640 Fix the horizon title only show the first key (#5998) 2018-10-11 13:08:26 -07:00
timifasubaa 5c5be825d9
remove future imports (#6050) 2018-10-11 09:46:25 -07:00
Beto Dealmeida 247a85b916
Fix top groups with user defined metrics (#6073) 2018-10-11 09:14:41 -07:00
Chris Williams 9b4cf856dd
[cypress] add SQL lab tests (#5974)
* [cypress] add sqllab/sourcePanel integration tests

* [cypress] add tests for SQL Lab query panel

* [cypress] add selectors/

* [cypress] add tests for SQL Lab tabs

* [cypress][sqllab] remove nested assertions where possible, update to single test index file

* [cypress][sqllab] try force click

* [cypress][sqllab] wait for saved query to load

* [cypress][sqllab] unnest, use visit for href

* [cypress][sqllab] try 1s wait :O

* [cypress][sqllab] wait for savedquery api response

* [cypress][sqllab] fix wait syntax

* [cypress][sqllab] add route wait in sourcepanel for flakiness

* [cypress] use *.test.js pattern for tests

* [cypress] fix paths

* [cypress][sqllab] actually try running lint

* [cypress][dashboards] use *.test.js pattern for tests

* [cypress][sqllab] combine tests, remove nesting

* [cypress][sqllab] explicitly wait for query results
2018-10-09 14:28:11 -07:00
Arpit ee472af14d feat: import/export dashboards via cli (#6061)
* feat: import/export dashboards via cli

* style: fixed lint error

* test: added test for import and export util

* test: removing import test as it is causing integrity issues

Import is a wrapper around exist functionality so we can go ahead without a test or mock the actual db operation using https://docs.python.org/3/library/unittest.mock.html

And validate the wrapper operations only.

* test: remove test data file

* test: removed usage of reserved keyword id

* Fix: remove test that is causing unintended impact
2018-10-09 13:59:46 -07:00
John Bodley 238ffb4dee
[setup] Using pip-tools to create requirements.txt (#6054) 2018-10-09 13:45:43 -07:00
Beto Dealmeida 3cc6fb61ab
Add increment back arrow to time player (#6062)
* Working on CSS

* Will fix CSS later

* Simplify PR
2018-10-09 11:47:59 -07:00
Krist Wongsuphasawat cd2c46a5ed Add data structures for chart plugin system (#6028)
* add unit tests

* add test structure

* add unit tests for Registry

* add LoaderRegistry unit test

* add unit test for makeSingleton

* add type check

* add plugin data structures

* simplify API

* add preset tests

* update test message

* fix lint

* update makeSingleton

* update Plugin, Preset and unit test

* revise Registry code

* update unit test, add remove function

* update test

* update unit test

* update plugin unit test

* add .keys(), .entries() and .entriesAsPromise()

* update test description
2018-10-09 11:47:16 -07:00
Grace Guo 395359f5ad [cypress] add integration tests for dashboard (#6002) 2018-10-09 10:03:50 -07:00
Grace Guo 361f588b71
[Dashboard] Fix margin issue in dashboard modal (#6037) 2018-10-08 22:48:27 -07:00
Junda Yang f50ed17655 check db extra and metadata params preemptively (#6004)
* check db extra and metadata params preemptively

* flake8

* make use of inspect
2018-10-08 20:26:26 -07:00
Junda Yang 712c1aa767 Allow user to force refresh metadata (#5933)
* Allow user to force refresh metadata

* fix javascript test error

* nit

* fix styling

* allow custom cache timeout configuration on any database

* minor improvement

* nit

* fix test

* nit

* preserve the old endpoint
2018-10-08 20:25:40 -07:00
John Bodley 1ee08fc216
[select-star] Adding optional schema to view (#6051) 2018-10-08 10:32:40 -07:00
Joshua Carp 9dcf8e101a Upgrade flask-appbuilder to latest. (#6030)
* Upgrade flask-appbuilder to latest.

* Skip constraint deletes if not exist.

* Document breaking change in flask-login.
2018-10-08 12:40:52 -04:00
Teemu Heikkilä 6282edd033 Revert old precision formatters (#6056)
Revert commit 66fcf9b687 (diff-366fb3d6e52b5fb2b9c306763adbc983)
It caused sunburst to became confusing.
2018-10-08 09:41:59 -04:00