Commit Graph

494 Commits

Author SHA1 Message Date
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
Maxime Beauchemin
fa0497de5e [eslint] changing to always-multiline on comma-dangle (#794) 2016-07-20 21:32:20 -07:00
Maxime Beauchemin
7bba9f73d0 [bugfix] fix dual alert messages where the second one is empty 2016-07-20 13:46:10 -07:00
smilin-desperado
7306b9caaa Fix small typo in message strings (#778) 2016-07-19 17:30:06 -04:00
Alanna Scott
2b237f483f update-webpack-config to match babelrc (#776) 2016-07-15 10:36:22 -07:00
Alanna Scott
24e85f52b4 get npm test working (#762) 2016-07-14 19:50:47 -07:00
Alanna Scott
1fed498e33 [webpack] revert change to output extension (#760)
* revert change to output extension

* make dashboard use .js
2016-07-14 18:19:52 -07:00
Maxime Beauchemin
f034f2701e Allowing to define a default format string per-metric (#750) 2016-07-13 23:45:05 -04:00
Maxime Beauchemin
8312f1c2aa Adding an option to make separators in dashboard (#699) 2016-07-13 23:40:52 -04:00
Maxime Beauchemin
3522bf9b09 Fixes #721 - [mktime out of range] (#756) 2016-07-13 23:39:26 -04:00
Maxime Beauchemin
b295436bff [bugfix] refresh button on dashboard widget dones't work 2016-07-13 15:07:16 -04:00
x4base
8cfe9e96b8 Preselect filters (#752)
* Preselect filters in filter boxes according to the get parameters

* Use the JSX version in dashboard.html

* Use default parameters in ES6 and fix the indent
2016-07-13 11:23:43 -04:00
alanmcruickshank
65efe53bfc Adding in Second and Minute time grains for MySQL (#696)
* Added documentation of the health check endpoint

* Adding Minute and Second time grains for MySQL

* Fixed Migration script so that it doesn't break when new fields added to the models for Dashboards or Slices (using declarative base)

* Revert "Fixed Migration script so that it doesn't break when new fields added to the models for Dashboards or Slices (using declarative base)"

This reverts commit 0b6dd696d6.

* Code Cleanliness
2016-07-13 11:20:40 -04:00
x4base
09c95fb28a Fix the mapbox for Druid (#725) 2016-07-13 10:58:59 -04:00
Riccardo Magliocchetti
212284cbd4 viz: make sunburst work again (#728)
By using a different method for renaming the metric columns
Thanks to @simobasso for the help!

Fix #673
2016-07-13 10:42:00 -04:00
Maxime Beauchemin
082645d312 [bugfix] html points to dashboard.entry.js instead of jsx (#749) 2016-07-13 00:03:38 -04:00
Alanna Scott
18b8e6fa58 make show columns explicit, don't show password column (#748) 2016-07-11 18:15:33 -07:00
Maxime Beauchemin
9d7c05a015 [hotfix] fix py3 compatibility broken by basestring 2016-07-11 17:36:12 -04:00
x4base
3c92ba9bd5 Fix bugs in the world map and deal with edge cases (#722)
* Fix bugs in the world map and deal with edge cases

* Ignore countries labeled XXX
2016-07-10 19:38:12 -07:00
George Ke
00970d6b99 Fix erroneous options for default slices (#730) 2016-07-10 19:37:02 -07:00
Van Tien
979782d1cf Fix path for windows platfrom (#742)
* At platform specific path for Windows

* At platform specific path for Windows
2016-07-10 19:20:21 -07:00
George Ke
04f3e3bc8f "Add Slices" modal on dashboard page (#678)
* Add slice modal

* use datatables, filter by slice creator

* tests & landscaping

* code review + react-bootstrap-table + modularity
2016-07-07 21:40:33 -07:00
Alanna Scott
afff78868f remove console.log (#729) 2016-07-07 19:04:36 -07:00
Alanna Scott
8020464602 [explore] convert query and save btns to react (#690)
* start to convert query and save btns to react

* more explore.jsx to explore/
2016-07-07 18:39:43 -07:00
Maxime Beauchemin
8135c240dc Revert "Binding key Q to the running the query in explore view" (#713) 2016-07-01 16:36:06 -07:00
Maxime Beauchemin
19983147a3 Binding key Q to the running the query in explore view (#685) 2016-07-01 15:28:40 -07:00
x4base
d5b22dd86e Filter empty strings or nulls, and add more operators (#704)
* Filter empty strings or nulls, and add more operators

* Encapsulate strings for translation
2016-07-01 14:45:04 -07:00
Maxime Beauchemin
917bc984eb Make DruidDatasource.version_higher support funky version strings (#706) 2016-07-01 14:44:25 -07:00
x4base
1a952a4961 Dashboards can only be deleted by their owners (#701) 2016-07-01 14:33:07 -07:00
lucky2you
ee00aa6522 some Chinese simplified translation work (#710) 2016-07-01 14:31:22 -07:00
Maxime Beauchemin
2e0e6e3342 [quickfix] support isNaN aggregates in Table viz 2016-06-30 17:34:58 -07:00
Maxime Beauchemin
8b95d17b7b [quickfix] embeded view missing some dependencies 2016-06-30 10:34:53 -07:00
Maxime Beauchemin
f407bd45fd [quickfix] fix broken CRUD column header links 2016-06-29 22:20:25 -07:00
yxjames
1ac2fccd2a fix small issue of dttm PR (#688) 2016-06-28 16:51:26 -07:00
Maxime Beauchemin
57bffe099f v0.10.0 2016-06-28 16:42:33 -07:00
Maxime Beauchemin
a016d181d7 [hotfix] mistakes slipped in 2016-06-28 12:58:09 -07:00
Maxime Beauchemin
759c8d5377 [hotfix] fixing minor control issues
* View Query button is disabled
* Missing tooltip on View Query
2016-06-28 12:29:51 -07:00
Maxime Beauchemin
bd68378d9c Saving slices and adding them to dashboards directly from explore view (#680)
* Saving slices from explore view

* Addressing comments
2016-06-28 10:31:36 -07:00
yxjames
7a7f61a296 datetime format and database expression on column level (#652)
* time format minor features added

* add description for datetime format input

* db version bug walkaround

* removed unecessary comments and fixed minor bug

* fixed code style

* minor fix

* fixed missing time format column in DruidDatasource

* Update models.py

Minor style fix

* Revert "Update models.py"

This reverts commit 6897c388e0.

* removed timestamp_format from druid and removed try catch in migration

* Using spaces, not tabs

* get the most updated migration and add the migration on the head of it

* remove vscode setting file

* use colunm based dttm_format

* modify dttm_converter

* modify datetime viz

* added comments and documents

* fixed some description and removed unnecessary import

* fix migration head

* minor style

* minor style

* deleted empty lines

* delete print statement

* add epoch converter

* error fixed

* fixed epoch parsing issue

* delete unnecessary lines

* fixed typo

* fix minor error

* fix styling issues

* fix styling error

* fixed typo

* support epoch_ms and did some refactoring

* fixed styling error

* fixed styling error

* add one more dataset to test dttm_format and db_expr

* add more slices

* styling

* specified String() lenght
2016-06-27 21:33:44 -07:00
Maxime Beauchemin
3e742c74bb [hotfix] many tooltips were not quoted properly 2016-06-27 20:44:32 -07:00
Maxime Beauchemin
6a34b729e9 Adapting Babel to new FAB version, regenerating translations (#684) 2016-06-27 20:10:40 -07:00
Maxime Beauchemin
4191b75966 Adding padding to markup widget 2016-06-26 13:13:16 -07:00
Maxime Beauchemin
d5b8414fde Showing only dashboards on welcome page (#676) 2016-06-24 18:42:55 -07:00
George Ke
57ebb2bacf Map visualization (#650)
* simple mapbox viz

use react-map-gl

superclustering of long/lat points

Added hook for map style, huge performance boost from bounding box fix, added count text on clusters

variable gradient size based on metric count

Ability to aggregate over any point property

This needed a change in the supercluster npm module, a PR was placed here:
https://github.com/mapbox/supercluster/pull/12

Aggregator function option in explore, tweaked visual defaults

better radius size management

clustering radius, point metric/unit options

scale cluster labels that don't fit, non-numeric labels for points

Minor fixes, label field affects points, text changes

serve mapbox apikey for slice

global opacity, viewport saves (hacky), bug in point labels

fixing mapbox-gl dependency

mapbox_api_key in config

expose row_limit, fix minor bugs

Add renderWhileDragging flag, groupby. Only show numerical columns for point radius

Implicitly group by lng/lat columns and error when label doesn't match groupby

'Fix' radius in miles problem, still some jankiness

derived fields cannot be typed as of now -> reverting numerical number change

better grouping error checking, expose count(*) for labelling

Custom colour for clusters/points + smart text colouring

Fixed bad positioning and overflow in explore view + small bugs + added thumbnail

* landscaping & eslint & use izip

* landscapin'

* address js code review
2016-06-24 14:16:51 -07:00
Maxime Beauchemin
914f23432f Make text in sunburst path more readable (#675) 2016-06-24 12:28:13 -07:00
Maxime Beauchemin
967b2ffeb0 Only creating perms for restricted metrics (#655)
* Only creating perms for restricted metrics

* Adding post_update hooks for is_restricted
2016-06-24 08:47:43 -07:00
Maxime Beauchemin
131372740e Adding orderby to Table 'not grouped by' and fixing metrics ordering (#669) 2016-06-23 22:43:52 -07:00
Maxime Beauchemin
51024b5f8a Reintroducing showControls as an option (#672) 2016-06-23 22:43:40 -07:00
Maxime Beauchemin
141dc12e44 Adding quarter time grain for Presto 2016-06-23 16:59:10 -07:00
Maxime Beauchemin
e230d9db4a Don't force formatting when using "Period Ratio" (#668)
At the moment, when using the "Period Ratio" option, a percentage
formatting is forced on the Y Axis. This code pre-dates the `Y Axis
Format` option.

People may want to see a growth rate, in which case the current `.3p`
isn't what they want, or they may want only 2 digits of precision or
whatever else. This PR allows that.
2016-06-23 15:28:42 -07:00
Maxime Beauchemin
4a8e62b439 Fixing the examples's dashboard positioning (#667) 2016-06-23 15:28:23 -07:00
Maxime Beauchemin
f949b88ebd A cleaner right side of the navbar with a Github link (#666) 2016-06-23 15:28:07 -07:00
x4base
ab71ee4f93 Make the headers of tables and pivot tables fixed (#651) 2016-06-22 16:16:27 -07:00
Maxime Beauchemin
8ebe074954 [bugfix] filter widgets to apply on applicable Slices (#658)
Also fixed a white on white issue on hover
2016-06-22 16:14:07 -07:00
Maxime Beauchemin
f25e37579d [quickfix] showControls on area chart 2016-06-22 14:21:09 -07:00
Maxime Beauchemin
3ef79bbaf3 [quickfix] removing controls in Area chart to leave more room for the legend 2016-06-22 14:00:35 -07:00
J Phani Mahesh
73601e4acb docs: correct name of local config module in comments (#653) 2016-06-22 07:55:09 -07:00
Maxime Beauchemin
a9fd2271dd [hotfix] caching and list ordering related bugs 2016-06-21 23:44:22 +00:00
Maxime Beauchemin
7c2d485de0 [quickfix] removing year detail in smart_date 2016-06-21 11:20:11 -07:00
kkalyan
30da408ace Druid Intervals Issues prevents metadata pull (#526)
* Druid Intervals Issues

* fetching druid version

* fixes

* space

* version fix

* landscape issues
2016-06-21 10:03:56 -07:00
x4base
485234bc78 Add having filters (#553)
Support the dimSelector having filters
2016-06-21 09:43:10 -07:00
x4base
13095eb550 Show right messages as soon as possible (#632)
* Flashed messaged should be flushed in every page

* Show error messages in AJAX style

* Introduce the decorator "api"

* Move toggleCheckbox() to the right place and trigger it in jQuery style
2016-06-21 09:42:54 -07:00
x4base
40e1787948 Improve the error message in the slices (#555)
* Improve the error message in the slices

Let slice.error() accept msg and xhr

* Check error first in nvd3_vis.js
2016-06-21 09:42:44 -07:00
Maxime Beauchemin
7e8053abef Adding list of table names to show Dashboard view (#648) 2016-06-21 09:41:48 -07:00
Maxime Beauchemin
d71a67cdad Bumping FAB and cryptography to current version (#647) 2016-06-20 15:31:15 -07:00
George Ke
54e4be1d13 [hotfix] lint error should fail travis build 2016-06-20 15:17:04 -07:00
George Ke
fb0750710e [hotfix] missing semicolon breaking build 2016-06-20 14:14:20 -07:00
Chris Williams
668ede1133 expose /slice/<slice_id>/ endpoint to redirect to a slice's url (#633)
* expose /slice/<slice_id>/ endpoint to redirect to a slice's url

* remove residual print statement

* add unit test for caravel/slices/id endpoint
2016-06-20 09:18:03 -07:00
Maxime Beauchemin
deb197a1d8 Adding contribution to total option to Bar chart (#641) 2016-06-20 09:16:51 -07:00
Maxime Beauchemin
55c549d86f Adding option for reduceXTicks (#640) 2016-06-17 12:31:20 -07:00
Maxime Beauchemin
78eb1e6a54 [hotfix] fixing bug around looking up security access 2016-06-17 11:34:54 -07:00
yxjames
4c8523efc0 Prevent potential db upgrading problem (#628)
* fix general db upgrade problem

* add comments
2016-06-17 08:14:26 -07:00
Riccardo Magliocchetti
4400c70514 Make time grains translatable (#622)
* Make time grains translatable

Fix #616

* Refresh translations
2016-06-17 08:12:15 -07:00
Maxime Beauchemin
3105c9f9ae Improvments to NVD3 charts (axis labels & min bar width) (#629) 2016-06-17 08:11:53 -07:00
x4base
db30f20341 Only initiate permissions of valid metrics (#630) 2016-06-16 08:55:11 -07:00
x4base
65d9feb0a9 Check ownership before a slice is deleted (#624) 2016-06-15 14:27:36 -07:00
Rocky Qi
77c5c9400a Update sql.js to fix a invalid error msg (#621)
when using sql.html page to run sql directly, for any SELECT * sql, when click run! button for the second time,
the page will show error msg like: DataTables warning: table id={id} - Cannot reinitialise DataTable.
this can be fix by:https://datatables.net/manual/tech-notes/3#retrieve
2016-06-15 14:27:12 -07:00
x4base
ea8a7ec1ba Redirect to druid datasource page when the user wants to add slice. Also, provide a link to the table page (#625) 2016-06-15 14:23:25 -07:00
alanmcruickshank
b38590a0bb Added Hour time grain for MySQL (#615) 2016-06-15 14:22:27 -07:00
x4base
ee2d3330aa Prevent the cannot-overwrite error message from being removed before it can be seen (#626) 2016-06-15 14:19:50 -07:00
Maxime Beauchemin
91e272546a v0.9.1 2016-06-15 09:46:29 -07:00
Maxime Beauchemin
a117498991 Adding some CRUD field descriptions to clarify things 2016-06-15 08:50:50 -07:00
Maxime Beauchemin
e29d71d0ff [hotfix] passing payload to Slice.done everywhere 2016-06-13 22:58:04 -07:00
Maxime Beauchemin
bacbd909d1 [hotfix] parallel coordinates grey background on hover 2016-06-13 22:44:57 -07:00
Maxime Beauchemin
77d8ccba87 Compress before caching, store more in each memcache key (#614) 2016-06-13 21:59:03 -07:00
Junxian Wu
347c39b8e9 Better support for Druid cardinality estimation mertics (#613)
* added rocognition of thetasketch and HLL metrics

* make sure the name agreed with SQL convention
2016-06-13 20:49:51 -07:00
Maxime Beauchemin
bc58c5d031 [hotfix] delete cache key when set fails 2016-06-13 18:01:55 -07:00
Maxime Beauchemin
267c0191a8 Make sure cache.set never fails hard (#611) 2016-06-13 13:26:05 -07:00
Maxime Beauchemin
1a4c7afbef Fixing a potential FK error when doing bulk updates (#606)
I hit this upgrade issue in production where the FK for user wasn't
allowing null. Perhaps it is specific to our environment but I'd rather
fix this.
2016-06-12 21:39:06 -07:00
Maxime Beauchemin
c58fd63efc [hotfix] caching indicator was missing on dashboard view 2016-06-12 21:38:32 -07:00
Maxime Beauchemin
fa13b77cfa Adding postgres to the build matrix (#604) 2016-06-12 11:01:16 -07:00
Maxime Beauchemin
c490138afe Fixing json issues (#602) 2016-06-11 20:39:25 -07:00
Maxime Beauchemin
327fceefb7 [hotfix] fixes issue around multidict 2016-06-11 08:02:56 -07:00
Marigold
1631137da1 fix missing multiple values for the same parameter name (#565) 2016-06-11 07:55:01 -07:00
Junxian Wu
4661b0210d Popover to generate iframe html tag when standalone button is clicked (#575)
* fixed

* basic implementation of the iframe embed popover

* remove unecessary comments

* remove public embed iframe

* remove debug print line and public access

* remove uncessary extra line and use better text explain

* maintain the style of airbnb/master

* fixed style

* re-run the test locally. Made sure it passed
2016-06-11 07:48:30 -07:00
Riccardo Magliocchetti
a8136bb9f5 Update translations files (#595) 2016-06-11 07:47:42 -07:00
x4base
4c6026fdda Add access control over metrics (#584)
* Add the new field "is_restricted" to SqlMetric and DruidMetric

* Add the access control on metrics

* Add the more descriptions on is_restricted

* Update docs/security.rst

* Update docs/security.rst
2016-06-10 15:49:33 -07:00
Maxime Beauchemin
55baab413a [hotfix] fixing the build (#594) 2016-06-09 22:58:20 -07:00
Maxime Beauchemin
2f60801059 [hotfix] fixing the build 2016-06-09 21:12:44 -07:00
Maxime Beauchemin
c35e0e831c [hotfix] csv and json link are off (#592)
* Fixing bugs

* [hotfix] csv and json link are off
2016-06-09 18:06:20 -07:00
Maxime Beauchemin
60ed3e4050 TOX / Travis build matrix (#593)
* Building on many dbs

* Fixing some translation related error msg
2016-06-09 18:05:58 -07:00
Riccardo Magliocchetti
dd662eaca3 caravel: mark more strings for translations in viz (#586) 2016-06-09 16:46:27 -07:00
Riccardo Magliocchetti
e3da785321 caravel: reduce usage of choicify in forms (#591)
So that more string can be translated

Fix #583
2016-06-09 16:45:45 -07:00
Jeremi Joslin
f4c92da4e6 Make sure the APP_ICON config is used in the template (#590) 2016-06-09 16:45:03 -07:00
Riccardo Magliocchetti
eb208b921c config: there's no such thing as WEBSERVER_THREADS (#587)
The config option is CARAVEL_WORKERS. Bump example to 16 processes
to keep backward compatibility with the current default.
2016-06-09 16:44:13 -07:00
Riccardo Magliocchetti
8a579e2a2a Mark more strings for translations (#581)
* caravel: mark viz strings for translations

* caravel: mark templates string for translation

* caravel: make forms strings translatable

* Update translations
2016-06-08 17:38:43 -07:00
Riccardo Magliocchetti
ad5507c5f4 views: translate labels and not names (#567)
So that we can install caravel on postgresql:
```
2016-06-03 17:58:05,386:ERROR:flask_appbuilder.base:
Add Permission on Menu Error: (psycopg2.ProgrammingError) can't adapt type '_LazyString'
[SQL: 'SELECT ab_view_menu.id AS ab_view_menu_id, ab_view_menu.name AS
ab_view_menu_name \nFROM ab_view_menu \nWHERE ab_view_menu.name = %(name_1)s \n
LIMIT %(param_1)s'] [parameters: {'param_1': 1, 'name_1': l'Sources'}]
```

Other that translating names should be a recipe for disaster if
you switch language.

Fix #558
2016-06-07 17:43:51 -07:00
George Ke
24a68f5c48 Two hotfixes (#574)
* fix for dashboards created without slices

* [hotfix] check_ownership param needed for adding slice to dashboard
2016-06-07 11:07:25 -07:00
Maxime Beauchemin
0d800fa302 Fixing bugs where params aren't reflected on nvd3* (#564) 2016-06-07 08:10:49 -07:00
Maxime Beauchemin
dc33506bfa Removing deprecated refs to flask.ext.* (#566) 2016-06-05 21:37:03 -07:00
Maxime Beauchemin
89f9efd3a3 Fixing the dashboard's look after resizing the window (#556) 2016-06-03 11:53:37 -07:00
George Ke
52c2b2348a allow for multiple columns in NOT GROUP BY (#560) 2016-06-03 11:34:29 -07:00
Maxime Beauchemin
b5fe9dbe33 Adding a security section to the docs (#561) 2016-06-03 11:33:11 -07:00
Riccardo Magliocchetti
5bc50210ad utils: generalize utility to find find_constraint_name (#557)
See https://github.com/airbnb/caravel/pull/531
2016-06-03 09:47:51 -07:00
Riccardo Magliocchetti
fe402465b1 caravel: catch only ImportError when loading config (#559)
As you may want to see the exception raised on at leasts SyntaxError
2016-06-03 09:46:03 -07:00
Maxime Beauchemin
3ee9a68c09 Only owners can update their objects (#507) 2016-06-02 19:17:34 -07:00
Maxime Beauchemin
29170512ab Adapting default CSS templates to the new grid layout 2016-06-02 16:40:55 -07:00
Maxime Beauchemin
b5614a433e Fixing 2 bugs that happen when fields are removed from table (#551) 2016-06-02 12:39:21 -07:00
Giacomo Tagliabue
5f005d67e3 Add CORS support (#478)
* Add optional CORS

* make CORS an extra dependency

* add documentation
2016-06-02 12:34:36 -07:00
George Ke
c78d3682ac Reactify dashboard grid (#523)
* Use react-grid-layout instead of gridster

* visualizations show and resize

* display slice name and description; links work

* positioning of widgets to match gridster, rowHeight matches

* Change margins, rowHeight, unpositioned viz, and expandedSlices to match gridster

* Saving dashboard, deleting slices, formatting on slices (chart control and resize handle), expanded slices fixed.

* responsiveness + use es6 classes

* Minor ui fixes + linting

* CSS transforms on slices messes up nvd3 tooltip positioning.
Turn off CSS transforms for the time being, with a cost of painting speed.

Issue is currently being looked at on the nvd3 repo
PR: https://github.com/novus/nvd3/pull/1674

* Remove breakpoint listener, fires when it shouldn't (i.e. too often)

* resize is no longer buggy, minor cleanup

* gridster class, const, landscape error

* one source of data for data to front end from python
2016-06-02 12:31:05 -07:00
Luca Albertalli
fe6628b0a4 Fix #529 2 - "This Session's transaction has been rolled back" (#531)
* Created migration to fix the bug

* Working also on MySQL

* Added support for Vertica Grains (#515)

* Fix #529 1 "This Session's transaction has been rolled back" (#530)

* Fixing the specific issue

* Added an additional fix for a similar error in #529

Background:
- When an object is modified by SQLAlchemy, it is invalidated so need to be fetched again from the DB
- If there's an exception during a transaction, SQLAlchemy performs a rollback and mark the connection as dirty.

Bug:
- When handling exceptions, the exception handler tries to access the name of the cluster in the main object. Since the name has been invalidated due to a write, SQLAlchemy tries to fetch it on a 'dirty' connection and spits out an error. Solution:
- Fetch the information for handling the exception before starting the process.

* Modified the migration function to to automatically detect the the foreign keys based on the signature.
It supports also sqlite using batch migrations

* i18n: Fix typo in Druid cluster broker port label (#512)

* Update models.py (#541)

removing duplicated `user_id` def
2016-06-02 12:27:59 -07:00
George Ke
cb384d051b Fix for Not Grouped By on Table View (#544)
* fix for default metric in table visualization

* better location for form override; covers all parameters

* remove dead code, use items instead of iteritems for python 3
2016-06-01 22:59:06 -07:00
George Ke
849063c797 fix world_map appending to old world map when updating (#549) 2016-06-01 22:47:22 -07:00
Luca Albertalli
087c47a37e Fix #529 1 "This Session's transaction has been rolled back" (#530)
* Fixing the specific issue

* Added an additional fix for a similar error in #529

Background:
- When an object is modified by SQLAlchemy, it is invalidated so need to be fetched again from the DB
- If there's an exception during a transaction, SQLAlchemy performs a rollback and mark the connection as dirty.

Bug:
- When handling exceptions, the exception handler tries to access the name of the cluster in the main object. Since the name has been invalidated due to a write, SQLAlchemy tries to fetch it on a 'dirty' connection and spits out an error. Solution:
- Fetch the information for handling the exception before starting the process.
2016-05-31 21:16:32 -07:00
Riccardo Magliocchetti
b193539fa4 i18n: Fix typo in Druid cluster broker port label (#512) 2016-05-31 21:10:28 -07:00
Luca Albertalli
ae7fb012a9 Added support for Vertica Grains (#515) 2016-05-31 21:09:04 -07:00
Jiayu Liu
409233d4fc Update models.py (#541)
removing duplicated `user_id` def
2016-05-31 21:07:14 -07:00
Maxime Beauchemin
dee4c34411 [hotfix] adapting to pydruid 0.2.3 2016-05-24 18:35:10 +00:00
Maxime Beauchemin
57990bfd83 Implementing druid's regex filters (#501)
* Implementing druid's regex filters

* Debugging

* Debuggin'
2016-05-23 13:06:35 -07:00
Xuefeng Zhu
29f5ace436 complete Chinese translation (#503) 2016-05-23 11:46:46 -07:00
Maxime Beauchemin
0fcab30652 More translation instrumentation and some french to test (#502) 2016-05-23 11:46:33 -07:00
Maxime Beauchemin
c53874c8ab [hotfix] treemap was broken 2016-05-20 14:05:08 -07:00
Maxime Beauchemin
f0c6a98027 Gunicorn tweaks, unlimited limit-request-line & limit-request-field_size (#500)
This is mostly to enable long text in the Markdown widget
Related:
https://github.com/benoitc/gunicorn/issues/376
2016-05-20 11:35:41 -07:00
Maxime Beauchemin
58d78beeaa [bugfix] 'Y Axis Zero' would force 1 in Y axis (#497) 2016-05-20 11:10:46 -07:00
Riccardo Magliocchetti
e1a3854f2a utils: add special serializer for numpy.int64 (#492)
It looks like COUNT(*) returns a numpy.int64 value that the
default JSONEncoder does not handle.

While at if we get a type we are not handling make it easier to
debug the issue by throwing a TypeError exception with useful
data.

Fix #486
2016-05-20 11:10:29 -07:00
Riccardo Magliocchetti
3cfc58e3a2 Add italian translation (#491) 2016-05-20 11:05:08 -07:00
Josh Walters
3ee102b79f Made '__' prefix into suffix. (#496) 2016-05-20 11:03:49 -07:00
Maxime Beauchemin
f5180d8724 [hotfix] fix name change on test dashboard triggers error 2016-05-19 08:51:13 -07:00
Maxime Beauchemin
4738b01125 [hotfix] setting default value for druid_time_origin 2016-05-16 23:08:46 -07:00
Maxime Beauchemin
d1f0276408 Introducing Horizon charts (#472)
* Introducing Horizon charts

* JS Lintin
2016-05-16 22:49:12 -07:00
Maxime Beauchemin
1766f6edd6 [hotfix] making druid_time_origin stick 2016-05-16 22:48:32 -07:00
Andrii Sydorchuk
8a406b18f5 Add PUBLIC_ROLE_LIKE_GAMMA config flag (#473) 2016-05-16 21:24:43 -07:00
Maxime Beauchemin
2620aeca02 Fixing the heatmap calendar color ranges in the Welcome page (#474) 2016-05-16 21:22:38 -07:00
George Ke
5c0e30ed70 Added Calendar Heatmap (#475)
* Added sqlite Grains

* Calendar heatmap visualization

* Linting

* Explicit metric setting was breaking tests

* Python linting

* Code cleanup + review

* [fixing the build] a new version of eslint is more picky

* Linting

* Added sqlite Grains

* Calendar heatmap visualization

* Linting

* Linting

* Explicit metric setting was breaking tests

* Python linting

* Code cleanup + review
2016-05-16 17:59:38 -07:00
Maxime Beauchemin
607e1f941b Fixing the build 2 out of 2 2016-05-16 17:41:02 -07:00
Maxime Beauchemin
d30567959b [fixing the build] a new version of eslint is more picky 2016-05-16 16:33:08 -07:00
Maxime Beauchemin
83e0e58888 [hotfix] Druid explore/table dropdown doesn't change anything 2016-05-16 16:10:22 -07:00
x4base
5a870fe1c2 Mysql key length (#459)
* Use varchar(255) in MySQL

* Adjust the key lengths in old migration scripts
2016-05-12 10:27:38 -07:00
Maxime Beauchemin
a0099ad6d6 v0.9.0 2016-05-12 08:24:01 -07:00
Maxime Beauchemin
f28c2b2557 Cosmetric tweaks in the CRUD list view (#458) 2016-05-11 21:05:32 -07:00
Maxime Beauchemin
52bbb38188 Don't limit parallel coordinates table size (#455)
Before we limited the table size to 10 rows, now there's no limit and it
will overflow properly with a scrollbar.
2016-05-11 17:48:04 -07:00
Maxime Beauchemin
aa6e6bdf7a Allowing for templated urls in iFrame (#460)
* Allowing for templated urls in iFrame

This can allow for passing {{ width }} and {{ height }} as dynamic
attributes in the iFrame's URL.

The new method Slice.render_template method could do more eventually
exposing more variables to be used in dynamic strings.

* Passing function references

* js linting
2016-05-11 17:00:46 -07:00
Maxime Beauchemin
6c333d5010 Fixing the missing searchbox bug (#431)
* Fixing the missing searchbox bug

* Linting JS

* Layout tweaks
2016-05-10 11:49:32 -07:00
Maxime Beauchemin
673cce9e56 Attempting to fix #412 (#430)
* Attempting to fix #412

* More flushes
2016-05-10 11:19:30 -07:00
Maxime Beauchemin
d79089c587 Improving the parallel coordinate viz (#452)
* Improving the parallel coordinate viz

* Clear container on refresh
* Order of columns is kept
* Option to show/hide the series column in viz
* Color metric not shown by default

* JS linting
2016-05-10 09:39:33 -07:00
Maxime Beauchemin
c4e3020369 Conververting datetime based on database dialects (#446) 2016-05-10 09:29:29 -07:00
Maxime Beauchemin
77e9e6a5d7 Fixing issue #444 color function chokes on non-string param (#447) 2016-05-10 09:22:59 -07:00
Siddharth Gupta
a75d6bc52c add timestamp toggle in chart options (Table Viz) (#439)
* add timestamp toggle in chart options (Table Viz)

* refactor timestamp choices

* fix build error
2016-05-10 09:22:32 -07:00
x4base
c5fcbc0709 Support hyperUniqueCardinality type in post aggregation (#451) 2016-05-10 09:21:09 -07:00
Siddharth Gupta
2f64c42062 blacklist druid datasources to be refreshed because it takes forever to load all druid datasources metadata which is not even required (given the use cases user should be able to blacklist data sources which are not required to be refreshed). (#441) 2016-05-06 12:03:42 -07:00
Maxime Beauchemin
d304ee005a Bugfix in line chart where the series name is an empty string (#434) 2016-05-05 12:19:51 -07:00
Junshuo
82fa501dea Update Chinese translation (#438)
Change some Chinese translations to make them sound less robotic
2016-05-05 12:19:21 -07:00
x4base
bc7170769b Recursively get the dependency fields of post aggregators (#437) 2016-05-05 08:52:48 -07:00
andrewhn
6941f1de64 add unicode data to tests (#432)
* add unicode data to tests

* make tests pass on 2.7

* clean up data loading

- remove duplicate keys in slice_data
- reduce line length

* change manager option flag to -t, --load-test-data

* test --> load_test_data
2016-05-05 08:46:16 -07:00
Maxime Beauchemin
a3f549bb9e Some chinese translations as a Proof of Concept (#435) 2016-05-04 21:36:10 -07:00
Andrii Sydorchuk
0bedaed367 Make sure anonymous user with proper permissions can access data (#415)
* Make sure anonymous user with proper permissions can access data

* Review fixes: naming changes

* Review fixes: add more granular tests for public user dashboard access

* Review fixes: test that public user has access only to permitted data sets
2016-05-03 22:31:37 -07:00
x4base
1d0863abfe Rename the dummy variable _ to avoid conflict with lazy_gettext (#427)
Otherwise "local variable '_' referenced before assignment" will be raised
2016-05-03 22:28:30 -07:00
Maxime Beauchemin
a3a9ec926f [hotfix] piechart goes black on refresh (#424) 2016-05-03 12:49:52 -07:00
Giacomo Tagliabue
9a08c45e59 add additional postgres and redshift time grains (#429) 2016-05-03 12:44:42 -07:00
Maxime Beauchemin
88c9516e20 Getting started on translations (#423) 2016-05-02 10:50:23 -07:00
Maxime Beauchemin
ec7dbed800 Blank theme (#419)
* A white theme

* Updating TODO

* Fixing tests
2016-05-02 10:04:29 -07:00
Maxime Beauchemin
26d273643b Allowing for druid post aggregations (#418)
* Druid post aggregations

* Fixing tests
2016-05-02 10:00:39 -07:00
Maxime Beauchemin
0ca3f5ec80 Improving SQLA query generation (#421)
* Improving SQLA query generation

* Fixing debug
2016-05-02 10:00:28 -07:00
Siddharth Gupta
d7ea47387f enable timerotateloghandler (configurable) (#311)
* attempt to enchance logging

* clean up logging

* clean up logging

* reset to logger

* clean up imports

* add comments in config.py

* remove redundant declaration of logging.config. Already exists in caravel/__init__.py

* replace RotatingFileHandler with TimedRotatingFileHandler

* revert back running web server in debug mode

* fix debug in bin/caravel

* resolve build errors - formatting

* need to test

* enable time rotateloghandler

* revert back print statements - add feature for rotatetimelog which is needed and make it configurable

* revert back to default in master

* fix build issues

* remove extra print statement

* change log location to default

* configure console log level and format
2016-05-01 07:59:08 -07:00
x4base
7b5b602e96 Use batch_alter_table to drop column in the migration script (#406) 2016-04-30 08:30:40 -07:00
Chris Williams
b78ec54650 Merge pull request #414 from airbnb/chris/fix-sunburst-level-trunc
[bugfix] allow repeated values across levels when building sunburst hierarchy
2016-04-29 10:59:29 -07:00
Maxime Beauchemin
337c9d59ae v0.8.9 2016-04-27 19:38:36 -07:00
Maxime Beauchemin
89d1a77281 [hotfix] filter_immune_slices fix 2016-04-27 13:41:06 -07:00
Maxime Beauchemin
b634d03ac3 Show only Slices and Dashboards users have access to (#404)
* Introducing more security features

* Many to many owners for slices and dashboards
* Slices are filtered to only slices that the user has access to

* Adding unit tests
2016-04-26 16:44:51 -07:00
Maxime Beauchemin
ab64a26b5b fix img loading overlay in explore view (#403) 2016-04-26 16:14:40 -07:00
andrewhn
a2f2ad84da add navigation, zoom to treemap (#396)
* add navigation, zoom to treemap

* don't use stale form data
2016-04-26 11:51:01 -07:00
Maxime Beauchemin
c0fb9eeca4 [bugfix] big_number doesn't fadeout on hover 2016-04-26 09:29:40 -07:00
Maxime Beauchemin
42ac46c1e1 [bugfix] fix context confusion in Slice 2016-04-26 09:29:19 -07:00
Maxime Beauchemin
7b1075990c [hotfix] periodic refresh dashboard feature had broken caching 2016-04-25 15:28:14 -07:00
Maxime Beauchemin
37be01bc12 [hotfix] adding cache_key in payload 2016-04-25 12:41:30 -07:00
Maxime Beauchemin
7d90f26554 Fixing #388 (#391) 2016-04-21 21:10:09 -07:00
Maxime Beauchemin
f1e10d8d25 One more Druid test (#387) 2016-04-21 08:17:15 -07:00
x4base
b01d378475 Fix the label of the periodic-refresh button (#386) 2016-04-21 08:16:52 -07:00
Maxime Beauchemin
f4177bfa94 More examples / tests (#385)
* More examples / tests

* Fixing the dashboards positioning
2016-04-20 17:36:37 -07:00
x4base
d8a2b621d8 Periodically update the slices in the dashboard (#374)
* Periodically update the slices in the dashboard

* Make the refresh interval changeable

* Add the button and the modal for the user to change the refresh interval

* Don't use callback for refreshing

* Randomize to prevent all widgets refreshing at the same time

* Show the loading icon as an overlay when the slices refresh
2016-04-20 17:35:07 -07:00
Maxime Beauchemin
9a33557112 Removing forgotten print statement 2016-04-20 15:28:02 -07:00
Kim Pham
efc6bf4eb8 Redirect application log to stderr, which is picked up by gunicorn. (#335) 2016-04-20 15:09:15 -07:00
Maxime Beauchemin
17e711fda2 Druid unit tests using Mock (#384)
* Initial Druid mock unit tests

* More unit tests

* Test for Druid query

* Adding a groupby test
2016-04-20 15:08:10 -07:00
Chris Williams
d96b634ded split sunburst breadcrumb names on '_' to apply ' '-dependent wrapping more freqently (#376) 2016-04-19 14:42:36 -07:00
Siddharth Gupta
afcdcf06a1 Fixing overwrite and save slice permissions for a give role (#298)
* Fixing overwrite and save slice permissions for a give role

* fix function name - build failed

* fix function name and test user permissions

* disable the button in the UI

* fix build error - characters too long in 1 line

* try to disable button on the UI

* disable cursor in caravel css. You wont be able to click anymore if no access

* fix build issues

* fix build errors! god bless me

* disable main features in dashboard and slice

* fix build issues
2016-04-18 13:56:00 -07:00
Maxime Beauchemin
5597eb4cc4 Fix db upgrade script b4456560d4f3 (#370)
* Recreating db upgrade error first

* Wrapping alter table calls in try statements
2016-04-18 12:49:13 -07:00
Siddharth Gupta
3f0171b77b Configure Visualizations (#365)
* make viz types configurable

* make visualizations configurable

* deault every viz is true

* add blacklist viz_type

* fix build
2016-04-18 09:00:03 -07:00
Maxime Beauchemin
badcd8bfa1 Storing version number in only one place (#362) 2016-04-17 08:20:11 -07:00
Maxime Beauchemin
04f1b176c4 Fixes issue #364 2016-04-17 08:17:08 -07:00
Maxime Beauchemin
899fe19afb [WiP] Attempting to support Druid's granularity origin as a hidden url param (#194)
* Supporting Druid'd time origin feature

* Adding origin to form, making it free form
2016-04-15 17:00:44 -07:00
Maxime Beauchemin
f3168518e2 New url default for iframe viz 2016-04-15 16:50:16 -07:00
Maxime Beauchemin
04d769ff24 Some more error handling when rendering the explore view (#361) 2016-04-15 15:00:49 -07:00
Maxime Beauchemin
01c2c7baf8 Fixing unique constraint in SqlaTable model (#360) 2016-04-15 14:53:06 -07:00
Maxime Beauchemin
2d420eee25 v0.8.8 2016-04-14 21:25:47 -07:00
Maxime Beauchemin
1a6757f10a Better type detection for inference of column matrix (#353) 2016-04-14 21:24:04 -07:00
Maxime Beauchemin
63e5e932cb Hide password from database 'show' view (#355) 2016-04-14 21:23:49 -07:00
Maxime Beauchemin
e6e8ec9620 [bugfix] missing redirect when datasource is missing (#352) 2016-04-14 20:25:40 -07:00
Maxime Beauchemin
ffdae19312 v0.8.7 2016-04-13 22:45:50 -07:00
Maxime Beauchemin
e5fabf39df Adjusting positioning in the examples 2016-04-13 22:39:23 -07:00
Ludovic
eb5a41728e Change the size of the column datasource_name in datasource creation … (#345)
* Change the size of the column datasource_name in datasource creation table to fix a Sql server specific issue.

* Change the model according to the change of the database script done in the PR 345
2016-04-13 22:32:48 -07:00
Maxime Beauchemin
91a3594be3 Fixing the thumbs and the galery (#346) 2016-04-13 22:32:03 -07:00
andrewhn
52ebdc5017 add treemap (#344) 2016-04-13 20:27:00 -07:00
Maxime Beauchemin
5cadd6794c Allowing to specify schema for tables (#330)
* Allowing to specify schema for tables

* Installed postgres and tested/fixed
2016-04-13 17:28:12 -07:00
Maxime Beauchemin
0a94b36d3d Adding version subcommand to CLI (#329) 2016-04-13 17:27:20 -07:00
Maxime Beauchemin
21b3a5f199 [big_number*] fixing a few bugs (#342) 2016-04-13 17:27:00 -07:00
Maxime Beauchemin
a76ccf462d [welcome page] shows the most recently updated items first (#343) 2016-04-13 17:26:44 -07:00
Denis Zgonjanin
8fe5790ec3 Don't die on malformed json in the extras field. Give feedback to user (#338) 2016-04-13 16:41:55 -07:00
Chris Williams
1e08b3e8c5 add tooltips to sankey (#341)
* add tooltips to sankey

* update tooltip language ('count' --> 'value', 'Link Weight' --> 'Path Value').
2016-04-13 15:12:11 -07:00
Maxime Beauchemin
77828b630a [bugfix] druid granularity form field should be select2_freeform 2016-04-13 13:58:28 -07:00
Maxime Beauchemin
3c72751c26 [bugfix] druid granularity form field should be select2Sortable 2016-04-13 13:16:19 -07:00
Maxime Beauchemin
af417b6b58 Adding expression column description in the CRUD 2016-04-12 10:41:23 -07:00
Maxime Beauchemin
1dd416570a Json dumps iso date for Table view (#328) 2016-04-11 21:22:54 -07:00
Maxime Beauchemin
54fb76e680 Getting the SQL view back in a working state (#327) 2016-04-11 21:20:42 -07:00
Maxime Beauchemin
74975a1606 Getting error messages to show up on the interactive debugger 2016-04-11 21:17:57 -07:00
Denis Zgonjanin
6d0b5767b3 Include connection parameters in call to Test Connection for a new database (#326) 2016-04-11 15:39:50 -07:00
Maxime Beauchemin
f32ebeeb98 Fixing the way tables overflow in dashboard view (#310) 2016-04-11 12:11:47 -07:00
Maxime Beauchemin
807d686312 Showing thumbsnails when switching viz (#313)
* Showing thumbsnails when switching viz

* Adding missing images

* linting
2016-04-11 12:11:34 -07:00
Maxime Beauchemin
5b822492c8 Linting to 99% (#317) 2016-04-10 22:49:08 -07:00
antbell
a9af6b1b96 Fix for undefined inner_time_filter on missing granularity in models.SqlaTable (#309) 2016-04-10 16:22:58 -07:00
andrewhn
fe045ad076 New viz: box plot (#312)
* add box plot

* changes for linters
2016-04-10 16:15:25 -07:00
Maxime Beauchemin
dab31eb66d Bugfix, link pointing to json 2016-04-10 11:17:37 -07:00
Maxime Beauchemin
f8e5d30e2e Revert previous css commit 2016-04-09 14:37:44 -07:00
Maxime Beauchemin
bfd1c8711b Forcing widget overflow to be visible 2016-04-09 14:20:01 -07:00
Maxime Beauchemin
542b66ef68 Giving credit where credit is due (#307) 2016-04-09 13:17:20 -07:00
Maxime Beauchemin
866e00d78c Detecting loops in Sankeys (#271)
* Detecting loops in Sankeys

* Fixing the algo
2016-04-09 00:17:31 -07:00
Maxime Beauchemin
a3dcb0f309 closes #292 (#304) 2016-04-08 22:32:12 -07:00
Maxime Beauchemin
25831f0033 Making prod web server run by default 2016-04-08 22:09:01 -07:00
Alexander Mancevice
b47ca785c7 Preserve order of breakdowns in bar_dist (#302) 2016-04-08 21:27:32 -07:00
prihoda
ef992b6449 Fix week and month Time grain in MySQL (#297)
With mysql datetime and timestamp columns, currently the Time grain "week" and "month" options don't remove the time part. This results in groupings like this:

timestamp count
2015-04-05 07:00:00 1
2015-04-05 10:00:00 1
2015-04-05 11:00:00 2
2015-04-05 11:50:00 1
2015-04-05 12:00:00 5
2015-04-05 14:20:00 1
2015-04-05 14:30:00 1

and so on.

This is solved by wrapping the DATE_SUB with DATE().
2016-04-08 20:54:04 -07:00
Maxime Beauchemin
fdcedd097f Adding edit link to datasource in explore view (#303) 2016-04-08 20:49:54 -07:00
Maxime Beauchemin
9a02c88afa Adding link to docs on navbar, re-indent 2016-04-08 18:13:24 -07:00
Chris Williams
ef64884e53 [heatmap] fix bug to display this view properly in dashboards. fix bug to display their d3-tip tooltips in dashboards. don't show empty tooltips on heatmap. update logic for margins so they fit dynamically based on label size. (#301) 2016-04-08 17:54:59 -07:00
Siddharth Gupta
eff0beb195 Optimizing import statements for better readability and to avoid unused, excessive and duplicating imports in the project. (#294) 2016-04-07 23:01:40 -07:00