Commit Graph

48 Commits

Author SHA1 Message Date
Grace Guo
6b8bda6096 [dashboard] After update filter, trigger new queries when charts are visible (#7233)
* trigger query when chart is visible

* add integration test
2019-05-07 23:41:18 -07:00
Maxime Beauchemin
1dd4d7a587 Apply ASF licenses throughout the code base (#5800)
* Add license headers

* reabased

* lint

* Removing licenses from vendors folder
2019-01-15 15:53:27 -08:00
Maxime Beauchemin
7b3095d6ff Fix examples charts/dashboards and refactor (#5881)
* Fix examples charts/dashboards and refactor

* pylinting

* Fix pylint

* Lint the refactor

* Rebased
2018-10-31 15:29:04 -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
timifasubaa
5c5be825d9 remove future imports (#6050) 2018-10-11 09:46:25 -07:00
michellethomas
d40ded0be8 Adding simple Cypress tests (#5693)
* Adding simple Cypress tests

* Changing visitChart into multiple commands

* Adding Cypress to tox
2018-09-06 14:55:48 -07:00
Grace Guo
21bf8d9f8f [bug]Fix load_examples dashboard version key name (#5592) 2018-08-09 13:09:14 -07:00
Maxime Beauchemin
68ba63fcd9 Implement a React-based table editor (#5186)
* A React table editor

* addressing comments

* Fix SelectAsyncControl error on clear

* fix tests

* more corrections

* Removed <strong>
2018-08-06 15:30:13 -07:00
Maxime Beauchemin
b7f9dabc44 A collection of small bug fixes on master (#5561) 2018-08-06 08:36:06 -07:00
Grace Guo
faf35b0daa convert position to v2 for Superset load_examples (#5515) 2018-08-03 15:28:12 -07:00
Beto Dealmeida
83e1e2c0fe Time filter fixes (#5448)
* Fixes for the new time filter

* Fix dashboard

* Trigger tests
2018-07-20 15:15:33 -07:00
Maxime Beauchemin
5be0e69d1b Avoid expensive select_star on dashboard bootstrap data (#5424)
The dashboard page bootstrap data currently attempts to generate the
`SELECT` statement with column name details for each table represented
in the dash. This means it calls the database(s) and waits for column
details prior to returning any HTML.

This makes the default select_star property generate a simple
`SELECT *` with no column details instead, which doesn't require
interogating the DBs.
2018-07-18 15:54:47 -07:00
timifasubaa
66ffcb665a Merge pull request #5118 from michellethomas/add_metrics_control_sort_by
Adding the MetricsControl to the timeseries_limit_metric field
2018-06-14 10:38:32 -07:00
Michelle Thomas
b380a57c91 Fixing sortby adhoc metrics for table viz 2018-06-13 17:51:17 -07:00
michellethomas
d6846d96ff Adding column only if it doesn't already exist (#5179) 2018-06-13 11:49:43 -07:00
Michelle Thomas
47768284d0 Adding tests for adhoc metric as timeseries_limit_metric 2018-05-31 23:48:12 -07:00
michellethomas
b8aeb1a825 Allow MetricsControl to aggregate on a column with an expression (#5021)
* Allow MetricsControl to aggregate on a column with an expression

* Adding test case for metrics based on columns
2018-05-22 09:58:38 -07:00
Beto Dealmeida
459cb701fb Visualization for multiple line charts (#4819)
* Initial test

* Save

* Working version

* Use since/until from payload

* Option to prefix metric name

* Rename LineMultiLayer to MultiLineViz

* Add more styles

* Explicit nulls

* Add more x controls

* Refactor to reuse nvd3_vis

* Fix x ticks

* Fix spacing

* Fix for druid datasource

* Rename file

* Small fixes and cleanup

* Fix margins

* Add proper thumbnails

* Align yaxis1 and yaxis2 ticks

* Improve code

* Trigger tests

* Move file

* Small fixes plus example

* Fix unit test

* Remove SQL and Filter sections
2018-05-21 17:47:21 -07:00
Maxime Beauchemin
7b427d7ee0 Make MetricsControl the standard across visualizations (#4914)
* [WiP] make MetricsControl the standard across visualizations

This spreads MetricsControl across visualizations.

* Addressing comments

* Fix deepcopy issue using shallow copy

* Fix tests
2018-05-15 12:37:34 -05:00
John Bodley
d533ce0967 [pylint] prepping for enabling pylint for non-errors (#4884) 2018-04-28 20:08:09 -07:00
Maxime Beauchemin
3f48c005df [bugfix] temporal columns with expression fail (#4890)
* [bugfix] temporal columns with expression fail

error msg: "local variable 'literal' referenced before assignment"

Error occurs [only] when using temporal column defined as a SQL
expression.

Also noticed that examples were using `granularity` instead of using
`granularity_sqla` as they should. Fixed that here.

* Add tests
2018-04-26 21:13:52 -07:00
Maxime Beauchemin
a98c3cfdef Fix time granularity-related issues (#4821)
* Fixing time grain

* Add tests
2018-04-18 16:17:28 -07:00
timifasubaa
8dd052de4b [security] Refactor security code into SupersetSecurityManager (#4565)
* move access permissions methods to security manager

* consolidate all security methods into SupersetSecurityManager

* update security method calls

* update calls from tests

* move get_or_create_main_db to utils

* raise if supersetsecuritymanager is not extended

* rename sm to security_manager
2018-03-27 16:46:02 -07:00
Maxime Beauchemin
8942436ece [examples] let's not use 'date' as a col name (#4555)
'date' is a reserved word in most database
2018-03-19 22:15:19 -07:00
Maxime Beauchemin
680bfc1b43 [dashboard] more granular grid layout (#4416)
Moving to a grid that is 4 times more granular. 48 columns.

Shipping a db migration script which will upgrade the position metadata
to reflect this change.

Also adapting the examples to the new grid parameters.
2018-02-15 17:47:19 -08:00
Maxime Beauchemin
e0bbb0c77e [geo] introduce "Auto Zoom" control (#4389)
* [geo] introduce "Auto Zoom" control

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.

For dashboards with region filters, the map should jump to the right
position.

Eventually we should enhance this to fly and ease to the position in an
animated way.

* Added TODO notes
2018-02-13 11:10:15 -08:00
Beto Dealmeida
f14c1bb593 Add hour grain to Sqlite (#4333) 2018-02-07 14:07:15 -08:00
Hugh A. Miles II
073d56cb33 Added Path, Polygon, and Arcs to deckGL example dashboard (#4242)
* Added Path, Polygon, and Arcs to deckGL example dashboard

* reorder task

* formatting...

* fix flights reference

* cleanup on aisle 9
2018-01-29 11:51:36 -08:00
Hugh A. Miles II
5079b2aa95 Added DeckGL.Polygon Layer w/ JS controls (#4227)
* Working polygon layer for deckGL

* add js controls

* add thumbnail

* better description

* refactor to leverage line_column controls

* templates: open code and documentation on a new tab (#4217)

As they are external resources.

* Fix tutorial doesn't match the current interface #4138 (#4215)

* [bugfix] markup and iframe viz raise 'Empty query' (#4225)

closes https://github.com/apache/incubator-superset/issues/4222

Related to: https://github.com/apache/incubator-superset/pull/4016

* [bugfix] time_pivot entry got missing in merge conflict (#4221)

PR here https://github.com/apache/incubator-superset/pull/3518 missed a
line of code while merging conflicts with time_pivot viz

* Improve deck.gl GeoJSON visualization (#4220)

* Improve geoJSON

* Addressing comments

* lint

* refactor to leverage line_column controls

* refactor to use DeckPathViz

* oops
2018-01-18 13:28:46 -08:00
Hugh A. Miles II
f905726c24 [geo] Added DeckGL GeoJson layer (#4097)
* added deckgl geojson layer

* linting

* fixed comments

* addressed comments

* added override with controls.color_picker > 0

* set var properly

* set colors if property doesnt exist at all

* refacator on property mapping
2017-12-22 14:40:08 -08:00
Maxime Beauchemin
e4903e6dc6 [geo] add support for deck.gl's path layer (#4067)
* [geo] add support for deck.gl's path layer

Works with json and polyline data.

* Lint
2017-12-19 12:38:03 -08:00
Maxime Beauchemin
ec752b1378 [geo] provide more flexible Spatial controls (#4032)
Before this PR the only way to query lat/long is in the shape of 2
columns that contains lat and long.

Now we're adding 2 more options:
* a single column that has lat and long with a delimiter in between
* support for geohashes - geohashes are cool
2017-12-15 11:47:27 -08:00
Maxime Beauchemin
3a8af5d0b0 DECKGL integration - Phase 1 (#3771)
* DECKGL integration

Adding a new set of geospatial visualizations building on top of the
awesome deck.gl library. https://github.com/uber/deck.gl

While the end goal it to expose all types of layers and let users bind
their data to control most props exposed by the deck.gl API, this
PR focusses on a first set of visualizations and props:

* ScatterLayer
* HexagonLayer
* GridLayer
* ScreenGridLayer

* Addressing comments

* lint

* Linting

* Addressing chri's comments
2017-11-16 00:30:02 -08:00
John Bodley
17623f71d4 [flake8] Resolving C??? errors (#3787) 2017-11-07 21:32:45 -08:00
John Bodley
e2bca47421 [flake8] Resolve I??? errors (#3797) 2017-11-07 20:23:40 -08:00
Jay Lindquist
b4bdc45a6b Add support for IE 11 for markup slices (#3702)
* Add srcdoc-polyfill tosupport Internet Explorer iframes in markup slices. Add allow-top-navigation and allow-popups to support links within iframes

* Remove jquery from markup.js
2017-10-23 15:35:15 -07:00
Maxime Beauchemin
6fc837db51 [sql lab] improve error messages (#3308)
* [sql lab] improve error messages

Some error messages in non-async mode were showing as JSON or sometimes
as tuples. This fixes that.

* linting
2017-08-18 15:50:07 -07:00
ymatagne
b308a3eb4e Added Country Map : New Visualization tools (#2708)
* feat(visualization): Create new visualization's tools that display country with geojson file. Currently only  france and Spain are loaded

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by travis for mysql databases

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* refacto(visualization): fix issues created by codeclimate

* fix(visualization): fix issues

* doc(visualization): Init visualization documentation

* doc(visualization): init visualization documentation for country

* fix(visualization): implement iso 3166-2 for id of country

* fix(visualization): implement iso 3166-2 for id of country

* doc(visualization): init visualization documentation for country

* fix(visualization): implement iso 3166-2 for id of country

* feat(country_map): add ukraine map in component

* fix(visualization): Test dont working and add color based on metrics

* refacto(visualization): fix issues for es6 and color component
2017-05-23 10:43:33 -07:00
Maxime Beauchemin
a2d2f8bb8c Enable filter value autocomplete in examples (#2781) 2017-05-18 15:56:24 -07:00
Maxime Beauchemin
db6b2f3ae1 pylint errors will now break the build (#2543)
* Linting pylint errors

* Backing off of an unecessary change
2017-04-03 21:53:06 -07:00
Maxime Beauchemin
abe79d1427 Deprecate is_featured as a datasource attribute (#2485) 2017-03-31 08:27:20 -07:00
Maxime Beauchemin
2969cc9993 Refactoring Druid & SQLa into a proper "Connector" interface (#2362)
* Formalizing the Connector interface

* Checkpoint

* Fixing views

* Fixing tests

* Adding migrtion

* Tests

* Final

* Addressing comments
2017-03-10 09:11:51 -08:00
Maxime Beauchemin
0cc8eff1c3 [WiP] Deprecate Explore v1 (#2064)
* Simplifying the viz interface (#2005)

* Working on dashes

* Making this a collaborative branch

* Fixing some bugs

* Fixing bugs

* More improvements

* Add datasource back in bootstrap data

* Decent state

* Linting

* Moving forward

* Some more linting

* Fix the timer

* Triggering events through state

* Lingint

* Put filters in an array instead of flt strings (#2090)

* Put filters in an array instead of flt strings

* Remove query_filter(), put opChoices into Filter

* Update version_info.json

* Fix migrations

* More renderTrigger=true

* Fixing bugs

* Working on standalone

* getting standalone to work

* Fixed forcedHeight for standalone =view

* Linting

* Get save slice working in v2 (#2106)

* Filter bugfix

* Fixing empty series limit bug

* Fixed dashboard view

* Fixing short urls

* Only allow owners to overwrite slice (#2142)

* Raise exception when date range is wrong

* Only allow owner to overwrite a slice

* Fix tests for deprecate v1 (#2140)

* Fixed tests for control panels container and filters

* Fixed python tests for explorev2

* Fix linting errors

* Add in stop button during slice querying/rendering (#2121)

* Add in stop button during slice querying/rendering

* Abort ajax request on stop

* Adding missing legacy module

* Removing select2.sortable.js because of license

* Allow query to display while slice is loading (#2100)

* Allow query to display while slice is loading

* Put latestQueryFormData in store

* Reorganized query function, got rid of tu[le return values

* Merging migrations

* Wrapping up shortner migration

* Fixing tests

* Add folder creation to syncBackend

* Fixing edit URL in explore view

* Fix look of Stop button

* Adding syntax highlighting to query modal

* Fix cast_form_data and flase checkbox on dash

* Bugfix

* Going deeper

* Fix filtering

* Deleing invalid filters when changing datasource

* Minor adjustments

* Fixing calendar heatmap examples

* Moving edit datasource button to header's right side

* Fixing mapbox example

* Show stack trace when clicking alert

* Adding npm sync-backend command to build instruction

* Bumping up JS dependencies

* rm dep on select2

* Fix py3 urlparse

* rm superset-select2.js

* Improving migration scripts

* Bugfixes on staging

* Fixing Markup viz
2017-02-16 17:28:35 -08:00
Benedict Jin
1f58e18b6f Some code refactoring (#2139) 2017-02-08 11:52:58 -08:00
vera-liu
c3edc6e24b [WIP] Add dual-axis line chart to viz (#1782)
* Add dual-axis line chart to viz
 - Add a new viz using two y axis for multi-chart in nvd3
 - Option to set metric and axis format for two y axis

* Resolve conflicts

* Fixed x axis and resized thumbnail

* Added example to __init__.py

* Change get_df to match with format
2017-01-06 10:30:27 -08:00
Maxime Beauchemin
e099088012 [hotfix] fixing the build 2016-12-13 16:05:05 -08:00
Maxime Beauchemin
bce02e3f51 [security] improving the security scheme (#1587)
* [security] improving the security scheme

* Addressing comments

* improving docs

* Creating security module to organize things

* Moving CLI to its own module

* perms

* Materializung perms

* progrss

* Addressing comments, linting
2016-11-17 11:58:33 -08:00
Maxime Beauchemin
15b67b2c6c [WiP] rename project from Caravel to Superset (#1576)
* Change in files

* Renamin files and folders

* cleaning up a single piece of lint

* Removing boat picture from docs

* add superset word mark

* Update rename note in docs

* Fixing images

* Pinning datatables

* Fixing issues with mapbox-gl

* Forgot to rename one file

* Linting

* v0.13.0

* adding pyyaml to dev-reqs
2016-11-09 23:08:22 -08:00