Commit Graph

1594 Commits

Author SHA1 Message Date
Maxime Beauchemin 16731056ed [sqllab] async queries - better error handling (#1853) 2016-12-19 22:33:55 -08:00
Maxime Beauchemin 0712894353 Improving database logging by adding duration, referrer and post data (#1830)
* Improving logging with duration and referrer

* Handling case where referrer is None

* Providing log_this with its own session

* Attempting to fix tests

* Fixing tests
2016-12-19 22:32:50 -08:00
Riccardo Magliocchetti 36fad803ed sqllab: don't hold database deletion because of query reference (#1863)
Let people delete the database even if there are sqllab queries
on that database. Instead delete them too.

Fix #1848
2016-12-18 17:12:23 -08:00
vera-liu 6732f01cb7 Enable freeform-select with fetched column values for filter values (#1697)
* Enable freeform-select with fetched column values for filter values
 - db migration to add filter_select_enabled
 - add freeform-multi option for Selectfield
 - modify formatFilter() function on query to accomodate filter-select

* Fix js tests

* Fix codeclimate issue

* Changes based on comments

* Add test for filter endpoint

* Extract out renderFilterFormField function from render

* Fix landscape issues
2016-12-16 14:23:48 -08:00
szmate1618 bb04e6fcfa Use APP_ICON in template (#1855)
* use APP_ICON in template

* use APP_NAME in navbar template
2016-12-16 08:56:26 -08:00
Maxime Beauchemin 007ee88d33 [explorev2] improving the scrolling/scrollbars placement (#1840) 2016-12-16 08:06:40 -08:00
vera-liu 7a5bb94754 Stop ChartContainer from rendering twice on chartStatus change (#1828)
* Stop ChartContainer from rendering twice on chartStatus change

* Make spinner overlay and dim chart while laoding

* Added timeout to make render more stable on resize

* Put viz in state and call resize at browser size change

* add render after height change since resize depends on render called on the same object

* Change name of renderVis to renderVisOnChange

* Only call resize at height change, persist viz in state

* Call resize wihout render at window size change
2016-12-15 14:06:54 -08:00
vera-liu e06a0cd89b Add force_ctas_schema to query model when enabled (#1825)
* Add force_ctas_schema to query model when enabled

* Add schema to temp_table_name

* Remove extra arg in create_table_as
2016-12-15 13:19:54 -08:00
Maxime Beauchemin b6cba13293 [explorev2] enabling redux dev tools (#1842) 2016-12-15 08:54:02 -08:00
Maxime Beauchemin d929bbfe30 [explorev2] making QueryAndSaveBtns disabled while running queries (#1841)
As I altered QueryAndSaveBtns to add the `disabled` prop
I also moved it to using react-boostrap
2016-12-15 08:53:33 -08:00
Maxime Beauchemin bf67d64708 [explorev2] making Datasource an Viz controls not clearable (#1845)
* [explorev2] making Datasource an Viz controls not clearable

* Making choices default to empty list
2016-12-15 08:53:15 -08:00
Bogdan 92aa1a6124 Permissions refactoring, optimizations and unit testing. (#1798)
* Refactor and speed up superset init

* Add unit tests.

* Test fixes.

* More test updates.

* Fix read only perms

* Address comments.
2016-12-15 08:38:34 -05:00
Maxime Beauchemin 733ab8014b [explorev2] using a loader to load the explorev2 specific css (#1843) 2016-12-14 18:31:50 -08:00
Alexander Mancevice 6aaa49f0bf Change default gunicorn address (#1838)
Use `0.0.0.0` as default instead of `127.0.0.1`
2016-12-14 16:34:35 -08:00
vera-liu 638f27c2df [sqllab] Fix sql expression bug with count distinct metrics (#1805)
* Return error message when metrics are not valid

* Fix bug with count distinct expression

* Fixed codeclimate issue
2016-12-14 16:09:22 -08:00
Maxime Beauchemin 84a3b55912 [explorev2] remove unused file SqlClause.jsx (#1839) 2016-12-14 15:17:45 -08:00
Maxime Beauchemin 552d46479b [explorev2] no bootstrap data, just metadata in exploreV2 (#1827)
json_data really just returns the *metadata* for the slice, where
get_json returns both the metadata and the data
2016-12-14 14:42:14 -08:00
vera-liu fa9c066ffe Add email-to option in action buttons for dashboard and slice (#1705)
* Add email-to option in explore action buttons

* email to option for dashboard
2016-12-14 11:52:53 -08:00
vera-liu e1e20b8757 Sort searched queries by recency (#1735)
* Sort searched queries by recency

* Fixed sqllab tests

* Add one more tr to QueryTable spec for pagination

* Change desc to asc as we reverse queries in component
2016-12-14 10:14:54 -08:00
Rossouw Minnaar 2fb94a89e2 Add ADDITIONAL_MIDDLEWARE option to config (#1832)
Add documentation to explain ADDITIONAL_MIDDLEWARE
2016-12-14 09:39:59 -08:00
rlei 7a9604a3c9 Workaround for slices "Not Found" issue in IE <= 11 (#1821)
This should fix issue #1339.

IE 11 and lower has a long standing issue: out-of-document element's
pathname has no leading '/'. See

https://connect.microsoft.com/IE/feedbackdetail/view/1002846/pathname-incorrect-for-out-of-document-elements

And Superset's Slice.jsonEndpoint() method relies on pathname() to build
JSON API URL for slices:

```javascript
      jsonEndpoint() {
        const parser = document.createElement('a');
        parser.href = data.json_endpoint;
        let endpoint = parser.pathname + this.querystring();
        endpoint += '&json=true';
        endpoint += '&force=' + this.force;
        return endpoint;
      },
```

`parser` above is exactly an out-of-document element. Therefore when
running in IE <= 11, Superset would build wrong JSON endpoint URLs,
hence the 404 errors for loading data for slices.

This commit adds a simple workaround when leading '/' is missing in the
value returned by pathname().
2016-12-14 08:41:03 -08:00
Maxime Beauchemin e099088012 [hotfix] fixing the build 2016-12-13 16:05:05 -08:00
Alanna Scott 34e107e7d3 [explore-v2] add config option for explore v2 beta users, and send through v2 path (#1671)
* add config option for explore v2 beta users, and send through v2 path

* fix long lines

* use role rather than user ids in config

* add test

* simplify role check

* remove extra  line

* use different test user for v2 tests
2016-12-12 16:42:38 -08:00
Maxime Beauchemin 2254a4d0b4 v0.15.0 2016-12-12 11:30:11 -08:00
vera-liu 9f7486f402 remove extra call to get_viz in explorev2 (#1812)
* Not working errors

* Remove update_explore endpoint, only update explore endpoints in reducer on query

* Change scroll to auto and make container reponse to height:

* Remove update_explore endpoint

* Remove can_update_explore perm
2016-12-12 10:58:07 -08:00
vera-liu 699602d1c5 Add tooltips to RunAsync and CTAS button (#1792)
* Add tooltips to RunAsync and CTAS button

* Use button from components

* Phrasing
2016-12-12 10:13:01 -08:00
Daniel Darabos 2993ff1d75 Add NVD3's bullet chart (#1775)
* Add NVD3's bullet chart.

* Add empty lines before nested function definitions.

* Add thumbnail for bullet chart.

* Add bullet chart to gallery.rst.

* Add "requiresTime: false", fix indentation.

* Avoid scaling bullet chart vertically.

* Use a default if no range is specified.

* Fix coloring of bullet chart.
2016-12-12 08:58:13 -08:00
Maxime Beauchemin afb3c24d5a Showing more fields in DatabaseView 2016-12-10 08:06:58 -08:00
vera-liu 8ef730b5fe Added timer to explore v2 and share it with sqllab (#1802)
* Added timer to explore v2 and share it with sqllab

* Fixed js tests

* Add timer to initial load

* Make timer smaller

* nits
2016-12-09 13:39:53 -08:00
vera-liu 866cfe5279 Add schema name to output column in query history (#1790)
* Add schema name to output column in query history

* Replace line break with dot between schema and table name
2016-12-09 11:03:31 -08:00
Maxime Beauchemin 68c2eab6b9 [hotfix] handling 0% change in big number with trendline (#1801) 2016-12-08 12:59:35 -08:00
Maxime Beauchemin aeda5bd260 [sqllab] config item for SQLLAB_DEFAULT_DBID (#1793) 2016-12-07 21:01:02 -08:00
vera-liu a95cd71456 Add viz thumbnails to viz_type select (#1794)
* Add viz thumbnails to viz_type select

* Replace alt with value
2016-12-07 15:59:17 -08:00
Alanna Scott 34d0dd9d6e adjust header nav links so they are all aligned on the base line (#1786) 2016-12-07 11:24:54 -08:00
Alanna Scott 401d9afd54 [ui] update logo, favicon, and new primary color (#1781)
* update favicon image

* change primary color

* update logo in header

* update logo in readme
2016-12-06 20:59:44 -08:00
vera-liu 74edb936a5 [WIP] Add http to copied url and move function to componentWillReceiveProps (#1780)
* Add http to copied url and move function to componentWillReceiveProps

* Added getText() to CopyToClipbaord to enable ajax calls for getting copy text

* Set ajax call to synchronous (document.execCommand only works in synchronous mode
2016-12-06 17:49:41 -08:00
Maxime Beauchemin c1558578d7 [explorev2] Breaking down large files, fixing JS warnings (#1773)
* Breaking down large files, fixing JS warnings

* fix unit tests
2016-12-06 14:39:30 -08:00
Bogdan 3597fdb7f8 Filter table list based on the user permissions. (#1769)
* Filter table list based on the user permissions.

* Fix tests
2016-12-06 02:18:16 -05:00
vera-liu 43f2a379a1 Make cell-click filter in table viz optional (#1762)
* Make cell-click filter in table viz optional
 - Added table_filter checkbox in table viz
 - If set to false, clicking on a cell in table will not apply filter to
   dashboard

* Fix codeclimate issue

* Change default to false
2016-12-05 17:17:31 -08:00
Bogdan 69702e3a19 Create users if not found. (#1753)
* Create users if not found.

* Do not fail is user is a duplicate.

* Make endpoint faster.
2016-12-05 20:03:40 -05:00
vera-liu eb0655cf85 [sqllab] Fixed js error when results are not available (#1715)
* Fixed js error when results are not available

* Flush data and query in results when running new query, keeping columns

* add exception for columns

* Move setState from componentWillMount to componentWillReceiveProps

* Nit
2016-12-05 13:36:18 -08:00
vera-liu d8864bc92b Enable overwrite sql in QueryHistory (#1731) 2016-12-05 11:34:42 -08:00
vera-liu 89fc9d7c80 Make entire menuitem clickable for copy query (#1747) 2016-12-05 10:02:23 -08:00
vera-liu 76aa9f7e10 [explorev2] fix textfield and druid bug (#1732)
* Fixed bug with textfield being empty

* Only return time grains for sqla table
2016-12-05 09:51:59 -08:00
Riccardo Magliocchetti abd0974897 Fix superset cli for python3 (#1760)
* Fix superset cli for python3

dict.iteritems() has been removed since dict.items() returns an
iterable in python3. Shouldn't be a big deal for python2 to load
all the data into a list.

Fix #1756

* bin/superset: avoid some work when reading config

We don't need to unpack and then pack again a dictionary.
2016-12-04 07:40:56 -08:00
Maxime Beauchemin c4e943a24f [sqllab] making 'click to retrieve results' a button (#1737) 2016-12-03 20:09:09 -08:00
Maxime Beauchemin a3106bcb3d [bugfix] bignumber comparison wrong with neg values (#1743)
* [bugfix] bignumber comparison wrong with neg values

* Handling zero div
2016-12-03 20:05:43 -08:00
David Dolphin b045075a96 Sankey Tooltip fix (#1748) (#1750)
.layer{X,Y} gives viewport offset, moved to node offset using .offset{X,Y}
2016-12-02 22:14:39 -08:00
Bogdan 09d597f3ad Prevent duplicated view_menu perms (#1751) 2016-12-02 17:48:46 -05:00
Bogdan 9d4c3d83d0 Update role based on usernames not emails. (#1749) 2016-12-02 16:30:21 -05:00