Commit Graph

336 Commits

Author SHA1 Message Date
Alanna Scott
30ef8eba37 [ui] hack bootswatch/cosmo theme to get better tabs for sql-lab (and other things) (#975)
* start hacking cosmo theme and fixing small ui bugs on pages.

* straighten up welcome page

* fix tab styling

* remove paper theme files

* add tables to docs

* make alerts lighter
2016-08-18 23:49:31 -07:00
Maxime Beauchemin
23a5463208 Hack around the "last migration doesn't stamp" Alembic bug (#967)
* Hack around the "last migration doesn't stamp" Alembic bug

This makes MySQL, Sqlite and Postgres work with a special hard coded
rule. I'm hoping Alembic fixes the root cause eventually.

* Running db upgrade twice in tests
2016-08-17 17:10:07 -07:00
Maxime Beauchemin
84213ab8cd [line] growth vs factor option for 'Period Ratio' (#970)
* [line] growth vs factor option for 'Period Ratio'

* i18n
2016-08-17 12:26:10 -07:00
Alanna Scott
379cf6cbd9 [ui] tweaks and improvements (#965)
* update panel headings, titles

* remove panel heading collapser

* style slice meta controls

* fix favstar on dashboard

* add space between heat map and list
2016-08-17 08:05:47 -07:00
Maxime Beauchemin
ac512ef731 [hotfix] SQL endpoint JQUERY error
Fixes #935
2016-08-16 22:29:11 -07:00
vera-liu
80974958bd vera_liu-deleted_dashboard_title_column_in_welcome_page (#951) 2016-08-16 21:52:57 -07:00
Riccardo Magliocchetti
cc058e5c9e viz: cache datetime.now() in query_obj (#955)
It shouldn't be a big deal, and it's pretty cheap on linux, but
still :)
2016-08-16 21:40:27 -07:00
Riccardo Magliocchetti
061d4f1ac7 Refine gamma experience (#883)
* gamma: filter the sqla tables the user has access to

Refs #359

* gamma: filter slices available for dashboards in DashboardModelView

Refs #359

* gamma: limit owners to dashboard to self

As we don't want to leak other users to unpriviliged users

Refs #359
2016-08-16 21:37:55 -07:00
Adam Jones
88f4260777 Change default location for db and logs to ~/.caravel Fix #915 (#947) 2016-08-16 21:35:31 -07:00
Adam Jones
66c2b84cb4 Add time grains for mssql. (#956) 2016-08-16 21:23:03 -07:00
Maxime Beauchemin
c474581138 Fixing the rendering of the separator widget (#936) 2016-08-16 09:47:47 -07:00
Maxime Beauchemin
d79220fb71 .codeclimate.yml on the right spot 2016-08-14 17:14:34 -07:00
Maxime Beauchemin
10011d572a Adding Code Climate conf file 2016-08-14 16:57:46 -07:00
Maxime Beauchemin
aa01283774 [hotfix] adding react-select to package.json 2016-08-13 23:28:52 -07:00
Maxime Beauchemin
1b9458dcf0 Adding config element for alert message in navbar (#938) 2016-08-12 23:40:24 -07:00
Maxime Beauchemin
e243a14c64 Refactor around how visualizations/*.js are required (#913)
* Refactor around how visualizations/*.js are required

* Reactifying FilterBox further

* Fixing the auto-refresh on filtering events

* Fixing preselected filters
2016-08-11 21:39:10 -07:00
Gustavo Brian
198226a39f Fix date serialization (#873)
* [panoramix] -> [dashed]

* merge from caravel/master

* Updated from airbnb

* Cleaning

* Rebase with upstream/master

* merge from caravel/master

* Updated from airbnb

* Cleaning

* Manual rebase

* Last pending change to rebase

* Convert date to datetime before serialization.
Approach choosen: transform data before serialize and keep just one way to serialize

* Unit test created

* stupid error :(

* remove uneeded code and rename test

* Avoid double type checking
Test updated
note: isinstance(<datetime>, <date>) == True, check order changed

* Increase coverage

* Fix assertRaises
2016-08-10 23:13:59 -07:00
Chris Williams
2bfb9cc7dd pass the standalone request arg in the /caravel/slices/<slice_id>/ endpoint redirect (#876)
* pass the  request arg in the /caravel/slices/<slice_id>/ endpoint.

remove unused import.

* test that a single slice redirects rather than testing them all. update standalone redirect logic for Javascript 'false' instead of Python False
2016-08-10 23:11:53 -07:00
Riccardo Magliocchetti
71bdabe1a1 dashboard: don't enable buttons that would fail (#881)
With gamma users saving the dashboard model would fail if they
are not owner of the dashboard.
So if that's not the case just disable the "Add a new slice to
the dashboard" and "Save the current positioning and CSS".

Refs #359
2016-08-10 23:10:59 -07:00
Maxime Beauchemin
9b3b1f69df Fixes explore view when no slice is defined (#924) 2016-08-10 22:59:35 -07:00
Maxime Beauchemin
bcbe08bd5c Fixing some aspects of the theme (#907) 2016-08-10 21:14:24 -07:00
Maxime Beauchemin
9a2c7740f0 [bugfix] nvd3's API changed and broke the range filter (#903)
* [bugfix] nvd3's API changed and broke the range filter

* Removing if that is not needed
2016-08-10 17:47:05 -07:00
Maxime Beauchemin
efdfa81f21 [bugfix] controls info bubble don't show up (#904) 2016-08-10 15:04:50 -07:00
Shashank Shekhar
15ee6d82e3 Histogram (#888)
* Add Histogram as a visualization

The css and js file use the histogram code from https://bl.ocks.org/mbostock/3048450.
THe viz.py extends from BaseViz to create chart data only for one histogram

* using d3.layout.histogram

* CSS updated

The new css has been used from the d3 chart http://bl.ocks.org/mbostock/1933560

* bars are visible

* added semicolons

* histogram from http://bl.ocks.org/mbostock/1933560

It takes as input no of bins. The histogram cycles through
a set of colors for different lengths of the bar. It places a
y axis coordinate on top or on the upper end of the bar
whichever is suitable.

* update style changes
2016-08-10 15:04:19 -07:00
Maxime Beauchemin
d15c557cd6 [bugfix] missing spinner in explore view (#914) 2016-08-10 15:02:13 -07:00
Maxime Beauchemin
08d682501e [webpack] set up proper dev/prod environment (#916) 2016-08-10 15:02:01 -07:00
Bogdan
d6bb8c6935 Add per database permissions for the SQL Lab. (#885) 2016-08-09 17:53:23 -07:00
Alanna Scott
b0a1f07818 ui update (#879)
* caravel ui update

* make headings bold on /explore

* bump back pagination color
2016-08-08 10:55:03 -07:00
Kang Tu
cb23362a5b handle UUID type field (some database like postgres support UUID type field) (#889) 2016-08-07 22:04:36 -07:00
Riccardo Magliocchetti
7c810dbd20 Miscellaneous style fixes spotted by landscape (#874) 2016-08-04 15:30:33 -07:00
Maxime Beauchemin
82a8e6316f [bugfix] refresh dashboard widget button doesn't work (#878) 2016-08-03 15:44:10 -07:00
Maxime Beauchemin
aaef338539 Altering theme for more subtle alerts / labels / buttons (#798)
* Altering theme for more subtle alerts / labels / buttons

* Taking comments into account

* changed button-primary to more sober grey instead of brand-primary
* remove carousel from theme demo page and other useless items

* Forcing links to be gray
2016-08-01 23:09:25 -07:00
Riccardo Magliocchetti
e7ce38b486 Smarter redirect on slice creation (#691)
After ea8a7ec1ba creating a slice
started redirecting to druid datasource from sqlalchemy tables.
That's quite painful for sqlalchemy tables users.
Instead of hardcoding a choice just query the db, if we don't
have any druid datasource fallback to sqlalchemy tables.
Bonus points we remove hacky javascript and make the message
translatable.

While at it fix druid client test to not hardcode datasource id.
2016-08-01 23:06:19 -07:00
George Ke
cbca740f9f use css transforms for dashboard grid cells (#848) 2016-08-01 23:02:54 -07:00
Riccardo Magliocchetti
55afda3a7e viz: use sort_values(inplace=True) instead of sort (#870) 2016-08-01 23:02:16 -07:00
Maxime Beauchemin
ee9141a31a New endpoint that receives SQL and returns data as JSON (#842)
* New endpoint that receives SQL and returns data as JSON

* Addressing comments
2016-07-29 22:39:33 -07:00
Hari Prasath R
299e31fdff Added order_by_cols to as_list. Fix to issue #821 (#823) 2016-07-28 11:51:21 -07:00
George Ke
f9427b9bfb Fix mapbox radius calculations being off when changing latitude (#824) 2016-07-28 11:50:39 -07:00
plumbeo
88726773f1 Add an option to allow users to choose to what IP address the web server must bind to. Default to 0.0.0.0 (all IP addresses). (#826) 2016-07-28 11:49:43 -07:00
x4base
29e3dd404d Let the user decide the label type of pie charts (#819) 2016-07-28 11:39:29 -07:00
Alanna Scott
1101de5ae4 [js linting] use airbnb eslint settings (#796)
* add airbnb eslint settings and lint all the code

* fix linting erros
2016-07-27 16:57:05 -07:00
x4base
f43e5f18d5 Support showing the values on top of the bars (#777) 2016-07-25 20:38:26 -07:00
Maxime Beauchemin
7dd5b6716e Fixing serializing the lazy string (#818) 2016-07-25 20:15:57 -07:00
George Ke
2425b8f614 [presto] Smaller granularity units; fallback support for HⓂ️s (#731)
* [presto] Smaller granularity units; fallback support for HⓂ️s

* break lines >90

* cast to DATETIME instead
2016-07-22 12:10:05 -07:00
George Ke
6731a287b5 Filter add/remove fix (#779) 2016-07-22 09:47:04 -07:00
aljones
cf785b4d03 fix datasources foreign key size (#791) 2016-07-22 09:46:41 -07:00
Riccardo Magliocchetti
8b694ddd7a Fix caching in python3 (#806)
* caravel: fix visualization cache for python3

python3 wants bytes and not strings:

2016-07-22 10:36:09,474:INFO:root:Caching for the next 28800 seconds
2016-07-22 10:36:09,475:WARNING:root:Could not cache key 1eeb45f32960f0df0ad99a125bdaf199
2016-07-22 10:36:09,475:ERROR:root:'str' does not support the buffer interface
Traceback (most recent call last):
  File "/home/rm/caraveltest/venv/lib/python3.4/site-packages/caravel/viz.py", line 306, in get_json
    zlib.compress(self.json_dumps(payload)),
TypeError: 'str' does not support the buffer interface

Tested with memcached and pylibmc client library.

* docs: add note about using a proper memcached client library
2016-07-22 09:45:51 -07:00
yxjames
19f5371787 In subquery use alias to do 'order by' (#795)
* in subqry add orderby metric to select

* add comment
2016-07-21 17:53:25 -07:00
Maxime Beauchemin
9cdd289081 Set BoxPlotViz to is_timeseries=False (#802)
Fixes #786
2016-07-21 17:52:29 -07:00
Alanna Scott
a704d4ddee remove z-index from slice div and .nvtooltip (#793) 2016-07-21 12:30:40 -07:00