Compare commits

...

968 Commits

Author SHA1 Message Date
Arik Fraimovich
903463972b Fix: handle the case when a scheduled query wasn't run before 2017-04-02 15:20:45 +03:00
Arik Fraimovich
2707e24f30 Update CHANGELOG & version 2017-04-02 14:43:02 +03:00
Arik Fraimovich
3df826692c Merge pull request #1703 from getredash/queries
Fix: optimize queries to avoid N+1 cases
2017-04-02 14:09:12 +03:00
Arik Fraimovich
1142a441fc Fix: optimize queries to avoid N+1 cases 2017-04-02 14:01:23 +03:00
Arik Fraimovich
53268989c5 Merge pull request #1701 from akiray03/refactor-next-to-next_path
Change: rename local variable `next` to `next_path`
2017-04-02 11:15:46 +03:00
Akira Yumiyama
0dc98e87a6 rename local variable next to next_path. because shadow built-in methods. 2017-04-01 20:25:23 +09:00
Arik Fraimovich
0cf4db1137 Update atsd_client version. 2017-03-30 15:19:57 +03:00
Arik Fraimovich
4e27069d07 Merge pull request #1696 from spasovski/percentstack
Fix: wrong percent stacking math
2017-03-30 12:15:05 +03:00
Davor Spasovski
3fcd07bc1c fix percent stacking math (issue 41) 2017-03-29 15:07:37 -04:00
Arik Fraimovich
3414ff7331 Update CHANGELOG.md 2017-03-27 15:07:11 +03:00
Arik Fraimovich
04cd798c48 Update changelog 2017-03-27 15:07:00 +03:00
Arik Fraimovich
50dcf23b1a Merge pull request #1665 from benmagro/filter_params
Fix: Set query filter to match dashboard level filters
2017-03-27 13:13:30 +03:00
Arik Fraimovich
1bb4d6d534 Fix condition to only have effect when there is a value in query string. 2017-03-27 13:12:50 +03:00
Arik Fraimovich
66a5e394de Merge pull request #1688 from akiray03/refactoring-query-results-export
[Refactoring] make_{csv,excel}_content move to models from handlers
2017-03-27 12:42:58 +03:00
Arik Fraimovich
c4ab0916cc Merge pull request #1682 from denisov-vlad/clickhouse-types-fix
[Clickhouse] Fix: better support for types
2017-03-27 12:18:17 +03:00
Arik Fraimovich
73cb6925d3 Merge pull request #1689 from getredash/feature/bubble
Fix: user can't edit their own alert
2017-03-26 11:55:39 +03:00
Arik Fraimovich
aaf0da4b70 Fix: user can't edit their own alert 2017-03-26 11:45:13 +03:00
Arik Fraimovich
c99bd03d99 Merge pull request #1666 from deecay/pivot-getdata
Change: add support for filtered data in Pivot table visualization
2017-03-26 11:33:57 +03:00
Akira Yumiyama
7fbb1b9229 [Refactoring] make_{csv,excel}_content move to models from handlers
I want to be able to use like: `python manage.py queries export <query_id>`
2017-03-26 12:24:10 +09:00
Arik Fraimovich
ba54d68513 Merge pull request #1686 from msnider/salesforce-sandbox
[Salesforce] Change: Sandbox cannot be required or it will force it to be True.
2017-03-25 21:08:22 +03:00
Matt Snider
f73cbf3b51 Sandbox cannot be required or it will force it to be True. Also, dont annotate SOQL queries as they dont allow comments 2017-03-25 12:19:53 -05:00
deecay
3f047348e2 Pivottable shows filtered data 2017-03-23 21:08:57 +09:00
deecay
10fe3c5373 Revert "Pivottable shows filtered and formatted data"
This reverts commit f011d3060a.
2017-03-23 21:07:56 +09:00
Vladislav Denisov
9c8755c9ae clickhouse: added support for nullable columns 2017-03-22 10:28:44 +03:00
Vladislav Denisov
e8908d04bb issues/1616: fixed clickhouse types 2017-03-22 09:44:21 +03:00
Arik Fraimovich
293f9dcaf6 Merge pull request #1680 from getredash/feature/bubble
Add: bubble charts support
2017-03-21 10:58:36 +02:00
Arik Fraimovich
ce31b13ff6 Add: bubble charts support 2017-03-21 10:46:11 +02:00
Arik Fraimovich
a033dc4569 Fix: angular minification issue in textbox editor 2017-03-20 17:41:52 +02:00
Arik Fraimovich
6ff338964b Fix: angular minification issue in schema browser 2017-03-20 17:37:32 +02:00
Arik Fraimovich
97a7701879 Merge pull request #1617 from 44px/refresh-schema-button
Add "Refresh Schema" button to the datasource
2017-03-20 14:11:05 +02:00
Arik Fraimovich
7558b391a9 Merge pull request #1673 from 44px/editorconfig
Add: .editorconfig to keep code style consistent
2017-03-20 10:54:58 +02:00
Alexander Shepelin
b6bed112ee Add .editorconfig to keep code style consistent 2017-03-17 01:09:44 +03:00
Alexander Shepelin
9417dcb2c2 preserve old schema if we get error on refresh 2017-03-16 23:56:56 +03:00
Alexander Shepelin
5f106a1eee Merge remote-tracking branch 'origin/master' into refresh-schema-button 2017-03-16 23:20:21 +03:00
Arik Fraimovich
cda05c73c7 Merge pull request #1657 from deecay/ie-scrollbar
Show vertical scrollbar for IE
2017-03-16 11:59:42 +02:00
deecay
95398697cb Set ms-overflow-style to auto for html 2017-03-16 18:29:25 +09:00
Arik Fraimovich
dc019cc37a Merge pull request #1649 from getredash/fixes201602
Fix: datetime parameters were not using a date picker.
2017-03-15 18:08:32 +02:00
Arik Fraimovich
72cb5babe6 Change datetime serialization format 2017-03-15 18:00:25 +02:00
Arik Fraimovich
ebc2e12621 Merge pull request #1622 from axibase/master
[Data Sources] Add: ATSD query runner
2017-03-15 16:31:03 +02:00
deecay
f011d3060a Pivottable shows filtered and formatted data 2017-03-10 19:10:31 +09:00
Ben Magro
8c5f71a0a1 set filter paramas in query to match dashboard level filters when they are present 2017-03-10 11:28:39 +11:00
Arik Fraimovich
da00e74491 Merge pull request #1660 from akiray03/docker-entrypoint-support-manage-py
Add: docker-entrypoint for manage.py's commands.
2017-03-08 15:49:14 +02:00
Akira Yumiyama
b56ff1357e docker-entrypoint supports manage.py's any commands. 2017-03-08 22:41:15 +09:00
Arik Fraimovich
ecd4d659a8 Merge pull request #1494 from yuua/impala-schema
[Impala] enable schema browser
2017-03-07 14:37:42 +02:00
Arik Fraimovich
fec5565396 Merge pull request #1650 from deecay/v1-ie11
Add babel-plugin-transform-object-assign for IE support
2017-03-07 14:32:41 +02:00
Arik Fraimovich
6ec5ea5c28 Resume to building Docker images 2017-03-07 12:26:00 +02:00
Arik Fraimovich
3f8e32cc1f Merge pull request #1656 from getredash/docker
Fix Docker file ownership issues:
2017-03-07 11:40:18 +02:00
Arik Fraimovich
be6426014d Fix Docker file ownership issues:
1. Simplify user creation to create a non system user (so the uid will usually
   match the host user).
2. Set the user to redash & remove the need to change user in docker entrypoint.
2017-03-07 11:37:31 +02:00
Arik Fraimovich
8b4643d6ac Remove nosiy log 2017-03-06 21:22:41 +02:00
Arik Fraimovich
d8a0885953 Fix: tests were using old method signature 2017-03-06 21:22:29 +02:00
Arik Fraimovich
83e6b6f50c Tests use the same session as the tested code, and we can't use the same
objects after the tested code calls commit() without disabling expire
on commit.

It seems like a safe thing in our case.
2017-03-06 13:49:29 +02:00
rmakulov
928bd83967 minor change 2017-03-06 13:16:02 +03:00
Arik Fraimovich
230fe15cde Merge pull request #1653 from r0fls/fix-embed-close
Fix: query embed dialog close button wasn't working
2017-03-05 20:08:14 +02:00
Arik Fraimovich
72ad16a8b3 Fix: use correct format string 2017-03-05 20:03:44 +02:00
Arik Fraimovich
23cc632d5a Duplicate favicons instead of symlinks 2017-03-05 09:15:11 +02:00
Raphael Deem
1cf2bb1bb2 fix query embed close button 2017-03-04 14:51:00 -08:00
yuua
181031957f impala get_table remove filtter and str to unicode 2017-03-03 17:58:13 +09:00
deecay
cfa9a45fc8 Add babel-plugin-transform-object-assign 2017-03-03 09:26:56 +09:00
Arik Fraimovich
9bb87e711a Fix: datetime parameters were not using a date picker. 2017-03-02 15:56:40 +02:00
Rustam Makulov
255a01f786 Merge branch 'master' into master 2017-03-01 12:29:09 +04:00
Arik Fraimovich
69c26f2c0d Merge pull request #1643 from msnider/salesforce
[Data Sources] Add: SalesForce query runner
2017-03-01 09:51:43 +02:00
Matt Snider
3650e21458 Move import to top of file 2017-02-28 22:06:34 -06:00
Matt Snider
8eefd0e9c4 Format to PEP8 2017-02-28 21:54:32 -06:00
Matt Snider
c72a097808 Added Salesforce SOQL query runner 2017-02-28 21:44:38 -06:00
rmakulov
2ffda6f5c5 code revised 2017-02-28 19:03:17 +03:00
Arik Fraimovich
ce8ffae152 Merge pull request #1584 from washort/scheduled-query-backoff
Scheduled query backoff
2017-02-28 13:19:34 +02:00
Arik Fraimovich
b54dd27959 Merge pull request #1624 from washort/presto-errors
Fix: make errors from Presto runner JSON-serializable
2017-02-28 13:04:46 +02:00
Arik Fraimovich
3e807e5b41 Merge pull request #1623 from washort/jobs-race
Bugfix: race condition in query task status reporting
2017-02-28 13:04:10 +02:00
Arik Fraimovich
20f1a60f90 Merge pull request #1619 from deecay/count-rows
Add: use results row count as the value for the counter visualization.
2017-02-28 13:03:36 +02:00
Arik Fraimovich
9d2619b856 Merge pull request #1641 from getredash/fixes201602
UI Fixes
2017-02-28 12:59:41 +02:00
Arik Fraimovich
a2c7f6df7a Friendlier labels for archived state of dashboard/query 2017-02-28 12:50:27 +02:00
Arik Fraimovich
15a87db5d5 Fix: remove 29402hashKey from Pivot table 2017-02-28 12:46:58 +02:00
Arik Fraimovich
2f86466309 Merge pull request #1639 from getredash/fixes201602
Small UI fixes
2017-02-28 12:10:22 +02:00
Arik Fraimovich
bccfef533e Fix: wrong timestamps in admin tasks page 2017-02-27 17:51:00 +02:00
Arik Fraimovich
ef020e88e7 Fix: word cloud visualization didn't show column names 2017-02-27 17:42:44 +02:00
Arik Fraimovich
222a6069cb Fix: pemrission dialog wasn't rendering.
Closes #1633.
2017-02-27 15:44:19 +02:00
Arik Fraimovich
6b6df84bce Fix: map visualization had severe performance issue.
Close #1603.
2017-02-27 15:30:30 +02:00
rmakulov
fcfd204ec6 atsd query runner 2017-02-24 17:31:01 +03:00
Arik Fraimovich
57e6c5f05e Merge pull request #1630 from MichaelJAndy/MichaelJAndy-sorting-patch
Fix: dashboard-list.js to sort dashboards and update page-header
2017-02-23 15:10:34 +02:00
Michael Andy
683e369d86 dashboard-list.js sorts dashboards and updates page-header 2017-02-23 23:41:58 +11:00
Arik Fraimovich
f12596a6fc Merge pull request #1629 from getredash/fix_too_many_connections
Fix: keyboard shortcuts didn't work in parameter inputs
2017-02-23 14:38:22 +02:00
Arik Fraimovich
09239439ae Fix: keyboard shortcuts didn't work in parameter inputs 2017-02-23 12:51:38 +02:00
Arik Fraimovich
2bb11dffca add v1-rc.2 release date. 2017-02-22 22:11:26 +02:00
Arik Fraimovich
2f019a0897 Update CHANGELOG.md 2017-02-22 21:58:12 +02:00
Arik Fraimovich
1350555931 Update CHANGELOG. 2017-02-22 21:57:16 +02:00
Arik Fraimovich
6d3aa3b53c Merge pull request #1627 from getredash/fix_too_many_connections
Dashboard page fixes
2017-02-22 21:57:02 +02:00
Allen Short
2407b115e4 Exponential backoff for failing queries 2017-02-22 10:29:08 -06:00
Allen Short
ca3e125da8 Refactor outdated_queries/refresh_queries tests 2017-02-22 10:28:35 -06:00
Arik Fraimovich
2d82c4dc98 Fix: multi filters broken on dashboards 2017-02-22 16:24:11 +02:00
Arik Fraimovich
84ca02be09 Fix: download links broken on dashboards 2017-02-22 16:14:41 +02:00
Arik Fraimovich
61244dead3 Merge pull request #1626 from getredash/fix_too_many_connections
Fix: Redash is using too many db connections
2017-02-22 15:18:49 +02:00
Arik Fraimovich
907b33b5a0 Fix: tests failling because they run on different app contextes 2017-02-22 14:06:47 +02:00
Arik Fraimovich
e6fc73f444 Fix: Redash was using too many db connections
Fixes #1561.

The issue was caused by creating a new Flask app instance on every task execution,
resulting in creating a new SQLALchemy connection pool and a new database connection.
2017-02-22 12:40:22 +02:00
Arik Fraimovich
672347ba8b Merge pull request #1621 from kopanitsa/fix-dynamo-count
[DynamoDB] Fix: handle count(*) queries
2017-02-22 10:06:36 +02:00
Arik Fraimovich
db465ffe58 Rename res_dict to result and add comment. 2017-02-22 10:06:00 +02:00
Allen Short
2a447137d4 Fix: make errors from Presto runner JSON-serializable 2017-02-21 13:11:32 -06:00
Takahiro Okada
18a157ac84 handle count(*) in dynamo db 2017-02-21 22:26:50 +09:00
deecay
3864f11694 Add: Counter option to count resultset row count. 2017-02-21 16:56:45 +09:00
Alexander Shepelin
8b59815bf2 add 'refresh schema' button to schema-browser 2017-02-20 23:56:21 +03:00
Allen Short
a98df94399 Fix race condition in query task status reporting 2017-02-20 12:20:55 -06:00
Arik Fraimovich
2e751b3dad Fix: dashboards without tags break rendering 2017-02-19 09:20:25 +02:00
Alexander Shepelin
b2e747caef refactor schema-browser directive to component style 2017-02-18 23:10:15 +03:00
Arik Fraimovich
f9da6ddcdd Merge pull request #1611 from getredash/circleci
Improve CircleCI configuration
2017-02-18 14:15:20 +02:00
Arik Fraimovich
99cef97c89 Add #1612 to the CHANGELOG. 2017-02-18 14:14:30 +02:00
Arik Fraimovich
2071ca1bc8 Merge pull request #1612 from getredash/rc1-fixes
Change: Improvements to the dashboards list page
2017-02-18 14:14:04 +02:00
Arik Fraimovich
5815d635a0 Update CHANGELOG for v1.0.0-rc.2.
@44px @janusd @btmc @deecay @aslotnick thanks!
2017-02-18 14:13:49 +02:00
Arik Fraimovich
517e5bcddb Improvements to the dashboards list page:
- Fix search to be case insensitive.
- Fix tag extraction to support multiple words prefixes.
- Change selection behavior to use OR by default and AND on shift+click.
2017-02-18 12:56:56 +02:00
Arik Fraimovich
eaa2ec877c Merge pull request #1607 from getredash/rc1-fixes
v1.0.0-rc.1 fixes
2017-02-18 12:51:45 +02:00
Arik Fraimovich
0e68228e6e Remove Procfile.heroku - it's no longer up to date. 2017-02-18 12:50:02 +02:00
Arik Fraimovich
6e5435261b Improve CircleCI configuration 2017-02-18 12:48:39 +02:00
Arik Fraimovich
1cc9b87ead Fix PEP8 section name 2017-02-18 12:41:57 +02:00
Arik Fraimovich
bd9ad3140d Allow longer lines in pep8 2017-02-18 12:37:00 +02:00
Arik Fraimovich
3e23143910 Fix: alert subscriptions were not triggered 2017-02-18 12:30:02 +02:00
Arik Fraimovich
0f95d12e83 Fix: use the correct model for delete. 2017-02-18 12:25:54 +02:00
Arik Fraimovich
fd37fd8545 Fix: remove whitespace created by the filters component 2017-02-18 12:19:22 +02:00
Arik Fraimovich
742199f05c Change: change Plotly's default hover mode to compare 2017-02-16 22:33:34 +02:00
Arik Fraimovich
902fb44782 Change: remove send to Plotly button 2017-02-16 20:08:55 +02:00
Arik Fraimovich
10e78bb4e4 Fix: sunburst & sankey visualization broke because of Angular values 2017-02-16 19:06:12 +02:00
Arik Fraimovich
e4659d0485 Fix: when adding text widget global parameters break.
Closes #1587.
2017-02-16 18:54:58 +02:00
Arik Fraimovich
a25302773d Fix: google button missing on invite link 2017-02-16 18:51:23 +02:00
Arik Fraimovich
2188baca16 Fix: schema browser got dark background 2017-02-16 18:42:28 +02:00
Arik Fraimovich
8940533176 Fix: embeds don't work after minifcation 2017-02-16 18:28:56 +02:00
Arik Fraimovich
1367b63ae1 Fix: shared dashboards didn't work after minifcation 2017-02-16 18:19:23 +02:00
Arik Fraimovich
c2a9e2e960 Fix: public widget serializer was referncing wrong name 2017-02-16 18:16:19 +02:00
Arik Fraimovich
8a41328033 Fix: share dashboard dialog not working after minification 2017-02-16 18:08:46 +02:00
Arik Fraimovich
ce16124d7b Fix: API keys were not logged properly in events table. 2017-02-15 22:13:33 +02:00
Arik Fraimovich
c547752dc6 Merge pull request #1606 from getredash/rc1-fixes
Change: move the message about unavailable data source types to be
2017-02-15 21:58:45 +02:00
Arik Fraimovich
3981c1c8a7 Fix: wrong use of Events.record function 2017-02-15 21:52:24 +02:00
Arik Fraimovich
f732f30bf0 Change: move the message about unavailable data source types to be
debug level message instead of warning. It seems to confuse people
and basically do more harm than add value.
2017-02-15 21:47:14 +02:00
Arik Fraimovich
9c0f0cb044 Merge pull request #1601 from aslotnick/1529_presto_error_message
[Presto] Change: better formatted error messages
2017-02-15 21:40:44 +02:00
Arik Fraimovich
f01399c33d Merge pull request #1604 from getredash/rc1-fixes
Fix: dashboard owner can't edit the dashboard.
2017-02-15 20:17:11 +02:00
Arik Fraimovich
253f2e613c Fix: dashboard owner can't edit the dashboard. 2017-02-15 19:50:04 +02:00
Andrew Slotnick
f2879a1e3d better formatting for presto error messages 2017-02-14 17:14:52 -05:00
deecay
af978e966d Show vertical scrollbar for IE 2017-02-14 16:53:11 +09:00
Arik Fraimovich
0151360fdf Merge pull request #1597 from deecay/fix-1571
[SQL Server] Fix: schema won't load if the server is case sensitive
2017-02-14 09:37:05 +02:00
Arik Fraimovich
d1b0a9580d Merge pull request #1592 from deecay/master
Change: use https instead of git protocol for git repositories in npm-shrinkwrap.json
2017-02-13 16:34:26 +02:00
deecay
9d796b20df Fix for #1571 2017-02-13 14:10:48 +09:00
deecay
574a7573ce Udate shrinkwrap to work behind some proxies 2017-02-13 12:05:04 +09:00
Arik Fraimovich
db9c925cbb Merge pull request #1564 from janusd/viz-map-column-fix
Fix: options selection in the map visualization editor (lat, long, groupBy)
2017-02-10 20:10:00 +02:00
Arik Fraimovich
9ef6836175 Remove unused setup files 2017-02-10 20:06:30 +02:00
Arik Fraimovich
351cd62189 Docker entrypoint: update user's uid 2017-02-09 23:48:33 +02:00
Arik Fraimovich
7bbc782e5d Fix npm build command. 2017-02-09 22:22:41 +02:00
Arik Fraimovich
50d20ff277 Merge pull request #1582 from getredash/json_webhook
Updates to Dockerfile:
2017-02-09 17:07:46 +02:00
Arik Fraimovich
964926aaab Change external-links to links. 2017-02-09 17:07:34 +02:00
Arik Fraimovich
b67ecde107 Merge pull request #1570 from btmc/master
Update docker-compose.production.yml
2017-02-09 17:06:56 +02:00
Arik Fraimovich
6338596710 Updates to Dockerfile:
- Build frontend assets (needed for standalone use of the image).
- Change ownership of the files to redash user.
2017-02-09 16:53:25 +02:00
btmc
5361a99b22 Update docker-compose.production.yml
Nginx doesn't have "redash" upstream. This fixes the error.
2017-02-06 23:53:46 +03:00
Arik Fraimovich
01a8075a67 Merge pull request #1563 from getredash/json_webhook
Change: send events to webhook as JSON with a schema.
2017-02-05 10:36:55 +02:00
Arik Fraimovich
209e714084 Add changelog entry 2017-02-05 10:36:28 +02:00
Janus
e3d0b4075e fix column options selection in the map visualisation editor (lat, long and groupBy) 2017-02-02 15:39:52 +01:00
Arik Fraimovich
ad18128794 Fix test 2017-02-02 10:39:21 +02:00
Arik Fraimovich
71fa013970 Change: send events to webhook as JSON with a schema.
Closes #1552.
2017-02-02 10:21:01 +02:00
Arik Fraimovich
dd6028384d Merge pull request #1555 from 44px/original-source-sourcemaps
Change: generate sourcemaps for modules (original source files)
2017-02-01 23:17:37 +02:00
Arik Fraimovich
5716da205e Merge pull request #1559 from getredash/new_upgrade
New and shiny upgrade script
2017-01-31 21:21:18 +02:00
Arik Fraimovich
d650995da3 New and shiny upgrade script 2017-01-31 21:16:27 +02:00
Arik Fraimovich
18fee82b73 Merge pull request #1558 from getredash/new_upgrade
Update the CHANGELOG
2017-01-31 20:47:36 +02:00
Arik Fraimovich
23a87410ac Update the CHANGELOG 2017-01-31 20:47:00 +02:00
Alexander Shepelin
9b9a752f78 Generate sourcemaps for modules (original source) 2017-01-31 09:30:27 +03:00
Arik Fraimovich
4b4758af22 Merge pull request #1551 from getredash/change_tracking
Fix: flask-admin - exclude created_at/updated_at so models can be saved
2017-01-27 17:00:27 +02:00
Arik Fraimovich
3cdd732078 flask-admin fixes (exclude created_at/updated_at so models can be saved) 2017-01-26 22:50:30 +02:00
Arik Fraimovich
77139e2867 Merge pull request #1546 from washort/api-docstrings
Add: API docstrings
2017-01-26 22:37:11 +02:00
Arik Fraimovich
ff28b751ed Merge pull request #1549 from getredash/change_tracking
Change: disable version counter for queries:
2017-01-26 22:36:22 +02:00
Arik Fraimovich
84aba70a1a Merge pull request #1545 from hgs847825/master
[ElasticSearch] Fix: query fails when properties key is missing
2017-01-26 22:35:59 +02:00
Arik Fraimovich
39c4e1cd59 Merge branch 'master' into api-docstrings 2017-01-26 22:34:48 +02:00
Arik Fraimovich
6cf1c1cb70 Disable query version check in test (#1550) 2017-01-26 22:25:12 +02:00
Arik Fraimovich
ae2927d7d3 Set default value for query version 2017-01-26 22:08:05 +02:00
Arik Fraimovich
cd51076150 Disable version counter for queries:
Since the move to SQLAlchemy, version is managed automatically.
When running a query, the worker updates the query row and increments
the version. This results in the user's inability to save the query
after that.

From reviewing SQLA's documentation, it looks like we will have to
manage the version value ourselves. For now, I'm just disabling the
version auto increment. In a follow up update we need to actually
implement the manual increment where we think it's needed.
2017-01-26 21:50:08 +02:00
Arik Fraimovich
a5d73514ce Merge pull request #1504 from rockwotj/rockwood/global-params
Add: global parameters for dashboards
2017-01-26 21:24:08 +02:00
Arik Fraimovich
7ffa8f89aa Remove unused code 2017-01-26 21:20:53 +02:00
Tyler Rockwood
11faabed1f Move helper functions out of the query obj 2017-01-26 10:56:12 -08:00
Arik Fraimovich
25ca061b3d Merge pull request #1548 from getredash/drafts
Improve UI in small resolution:
2017-01-26 20:06:32 +02:00
Arik Fraimovich
8140100496 Merge pull request #1547 from getredash/drafts
Improve drafts UX
2017-01-26 15:56:42 +02:00
Arik Fraimovich
9aab74d8e7 Improve UI in small resolution:
- Add meta tag to scalae UI properly in small resolutions
- Make the menu button work (great) again.
- Change menu background color.
2017-01-26 15:55:44 +02:00
Allen Short
4e06a38676 more docstrings 2017-01-25 10:52:51 -06:00
Arik Fraimovich
7e43e54b9d Revise Query.by_user method 2017-01-25 18:08:29 +02:00
Arik Fraimovich
84e1ac8072 Show your unpublished items in recents 2017-01-25 17:29:00 +02:00
Arik Fraimovich
ba6109e7ac List unpublished dashboard only to owners 2017-01-25 17:22:30 +02:00
Arik Fraimovich
febe908e65 Revise drafts flow for queries:
* Draft queries are now called "Unpublished" -- felt like it better convey the feature.
* Unpublished queries won't be shown in "All Queries" for non owners, but will appear in
  search.
* You can't add unpublished queries to dashboards or alerts.
2017-01-25 16:55:39 +02:00
Arik Fraimovich
8445b04844 Proxy /invite URLs 2017-01-25 16:55:39 +02:00
Arik Fraimovich
42a5194893 Add Redis explicitly to circle.yml 2017-01-25 11:33:40 +02:00
hgs847825
3b4e3067bb Fix issue #1538 2017-01-25 02:34:28 +00:00
Arik Fraimovich
98757db3e3 Merge pull request #1508 from stefanseifert/feature/jql-custom-fields
[Jira JQL] Add: support custom JIRA fields and enhance value mapping
2017-01-24 12:32:21 +02:00
Arik Fraimovich
4e7adcf89b Merge pull request #1540 from yaningzhu/faster-get-mysql-schema
[MySQL] Change: faster retrieval of schema
2017-01-24 12:29:38 +02:00
Arik Fraimovich
df0d1f3cc8 Merge pull request #1536 from k-hal/add-support-for-bigquery-gce-configuration
[BigQuery] Add: support for additional configuration in BigQueryGCE
2017-01-24 12:28:05 +02:00
Arik Fraimovich
38f6f82c0b Merge pull request #1517 from denisov-vlad/clickhouse_uint64
Clickhouse: convert UInt64 columns to integer type
2017-01-24 12:27:25 +02:00
Arik Fraimovich
4f9ffdc094 Merge pull request #1542 from getredash/sass
Add Sass support
2017-01-24 10:08:57 +02:00
Arik Fraimovich
3431f2ebe8 Add Sass support 2017-01-24 09:54:28 +02:00
Arik Fraimovich
788830ddad Fix docker-entrypoint server command.
Fixes #1541.
2017-01-24 08:53:55 +02:00
Arik Fraimovich
2e358e89f4 Add missing db.session.commit() call. 2017-01-24 08:00:34 +02:00
Yaning Zhu
d58040ad11 Faster retrieval of MySQL schema
Because `information_schema.tables` and `information_schema.columns` do not have indexes on them, when they get large, joining them becomes painful. We have a database with over 10k tables and more than 200k columns. The old query takes forever.

The new query do not look at `information_schema.tables` at all. This works if your `information_schema.columns` table is in good shape in terms of data integrity (and it should be).

Tested on MySQL 5.5, 5.6(Percona), 5.7(Percona). The schema has not changed since then.
2017-01-23 09:51:40 -08:00
Arik Fraimovich
4904c67cbe Update logo URL. 2017-01-22 23:08:16 +02:00
Arik Fraimovich
b479bb39a0 Merge pull request #1530 from getredash/docker_workflow
Docker based developer workflow
2017-01-22 15:53:54 +02:00
Arik Fraimovich
5ee5b5a8f5 Update postgres configuration to improve tests performance 2017-01-22 15:03:13 +02:00
Arik Fraimovich
7cc97fafdb Add tests entry point to docker 2017-01-22 13:28:46 +02:00
Arik Fraimovich
c82a01b5c8 Don't exclude client/app from tarball 2017-01-22 12:34:49 +02:00
Arik Fraimovich
65237967ec Implement subscription task 2017-01-22 12:12:58 +02:00
Koichi HARUNA
53536a15f1 Add support for BigQueryGCE to be set just like BigQuery 2017-01-21 17:49:57 +09:00
Arik Fraimovich
4e4d52a558 Add line break in setup screen 2017-01-19 15:20:52 +02:00
Arik Fraimovich
7b11dc0ee6 Setup wizard for first run of Redash 2017-01-19 15:20:52 +02:00
Arik Fraimovich
bc230e988d Make noisy libraries less noisy 2017-01-19 15:20:52 +02:00
Arik Fraimovich
c39f440450 Name the development docker compose file as docker-compose.yml 2017-01-19 15:20:52 +02:00
Arik Fraimovich
00e1e90d6e Add node_modules to dockerignore 2017-01-19 15:20:52 +02:00
Arik Fraimovich
b1bd8f1c25 friendlier entrypoint script 2017-01-19 15:20:52 +02:00
Arik Fraimovich
837e3a372a Remove webpack from Docker Compose:
I realized that it makes more sense to run Webpack on the host machine
as usually you will need to install Node's tools on the host to enjoy
better intelisense and eslint support in the editor.

On top of that, installing Node.js on most developer machines should be
relatively easy.
2017-01-19 15:20:52 +02:00
Ofer Segev
81fca9329e App header: query search css fix 2017-01-19 15:20:52 +02:00
Ofer Segev
06186d9e8d Close #242: added ui indication for offline state 2017-01-19 15:20:52 +02:00
Arik Fraimovich
ddf6fc50a5 New Dockerfile and docker-compose for dev 2017-01-19 15:20:52 +02:00
Arik Fraimovich
af70f34f05 Remove Vagrant related files 2017-01-19 15:20:52 +02:00
Allen Short
d93a325902 API docstrings suitable for generating sphinx docs 2017-01-18 20:43:39 -06:00
Arik Fraimovich
8b74de71ba Merge pull request #1528 from lab79/patch-1
[Vertica] Change: set longer read_timeout
2017-01-17 15:26:25 +02:00
lab79
509c17632a Update vertica.py 2017-01-17 14:46:09 +03:00
Arik Fraimovich
bca7d08082 Disable eslint packages check 2017-01-16 22:24:02 +02:00
Arik Fraimovich
785b6fc412 Rename codeclimate file 2017-01-16 22:22:23 +02:00
Arik Fraimovich
94891502c3 Merge pull request #1525 from kakoni/patch-1
Update amazon linux bootstrap.sh
2017-01-16 17:02:54 +02:00
Arik Fraimovich
8d1b5b4153 Merge pull request #1526 from someones/fix_es_get_query_mappings
[ElasticSearch] Fix for #1521
2017-01-16 17:01:29 +02:00
Arik Fraimovich
e586f99cb1 Fix content-base option of webpack-dev-server 2017-01-16 15:10:01 +02:00
Arik Fraimovich
7e986db979 Make webpack-dev-server config more modular 2017-01-16 15:09:45 +02:00
Arik Fraimovich
681fd213da Fix package name in npm-shrinkwrap 2017-01-16 15:09:15 +02:00
lab79
34f7b2f50a add read_timeout to configuration_schema 2017-01-16 12:42:47 +03:00
lab79
1a06a5c789 add read_timeout
https://github.com/getredash/redash/issues/1527
2017-01-16 11:36:30 +03:00
Adam Griffiths
9d36d39f47 Fix for #1521
The merge from #1521 fixed the invalid variable error
but it fixed in in a way that introduced another error:
"dictionary changed size during iteration"
This correctly applies the fix.
2017-01-16 11:45:06 +11:00
Karri Niemelä
c67519e45d Update amazon linux bootstrap.sh
Changed this so it works with recent redash version.
2017-01-15 19:44:46 +02:00
Arik Fraimovich
b7ad138c6c Add pymongo to requirements_dev 2017-01-15 12:35:17 +02:00
Arik Fraimovich
6124e08fa3 Revert to original codeclimate configuration 2017-01-15 11:27:15 +02:00
Arik Fraimovich
9dd7efe894 Disable our eslint config 2017-01-15 11:24:33 +02:00
Arik Fraimovich
b1e7a767ae Disable eslint 2017-01-15 11:21:18 +02:00
Arik Fraimovich
99d867f1b4 Check only Python files in redash/ 2017-01-15 11:02:20 +02:00
Arik Fraimovich
6de66447bb Merge pull request #1523 from getredash/codeclimate
Add CodeClimate configuration
2017-01-15 10:53:31 +02:00
Arik Fraimovich
de4ff7fc56 Add CodeClimate configuration 2017-01-15 10:39:38 +02:00
Arik Fraimovich
29de13ba87 Merge pull request #1522 from getredash/reorg
Move package.json/webpack.config to root directory
2017-01-15 10:33:20 +02:00
Arik Fraimovich
09542138cc Add missing then 2017-01-15 10:16:04 +02:00
Arik Fraimovich
8f53274f17 Move package.json/webpack.config to top level 2017-01-15 10:13:34 +02:00
Arik Fraimovich
8f1750b9f0 Merge pull request #1521 from getredash/arikfr-patch-1
[ElasticSearch] Fix: wrong variable name.
2017-01-13 22:32:46 +02:00
Arik Fraimovich
3d0b90ff2a [ElasticSearch] Fix: wrong variable name.
Fixes #1519.
2017-01-13 20:51:22 +02:00
Vladislav Denisov
361abac7ad clickhouse: convert UInt64 to integer type 2017-01-12 14:09:37 +03:00
Arik Fraimovich
57e25786cd Fix: View Query link was pointing to the wrong page 2017-01-11 17:01:40 +02:00
Arik Fraimovich
47b1b03be7 Merge pull request #1514 from GAwadhwalAtlassian/AthenaQueryRunner_Annotations_Enable
[Athena] Change: enable query annotations
2017-01-11 12:08:51 +02:00
Arik Fraimovich
9d7171ffaf Merge pull request #1515 from denisov-vlad/python_get_schema
[Python] Add: get_source_schema method
2017-01-11 12:08:32 +02:00
Vladislav Denisov
34ffdf52c7 Python: rewrited some functions to static, fixed missed commas in safe_builtins 2017-01-11 08:57:02 +03:00
Vladislav Denisov
8226445e4d Add get_schema method to Python Query runner 2017-01-11 08:53:00 +03:00
Gaurav Awadhwal
4d4822fcfb Removed the code that disables the query annotations from Athena query runner. 2017-01-11 10:05:07 +11:00
Tyler Rockwood
cb2e6fddf4 Remove unused $scope 2017-01-10 08:52:08 -08:00
Tyler Rockwood
a2be7bf060 Adding an explict toggle for global parameters 2017-01-10 08:46:03 -08:00
Tyler Rockwood
894a85ae63 Remove events on widget delete 2017-01-10 08:25:32 -08:00
Arik Fraimovich
57a0ddb1a9 Add v1 section to the changelog' 2017-01-10 14:55:26 +02:00
Arik Fraimovich
dd24d27558 Merge pull request #1512 from denisov-vlad/python_safe_builtins
[Python] Add: define more safe_builtins
2017-01-10 14:55:16 +02:00
Arik Fraimovich
a62db75624 Merge pull request #1513 from denisov-vlad/python_runner_fix
Add: get_by_id & get_by_name methods for Query and DataSource classes
2017-01-10 14:26:54 +02:00
Vladislav Denisov
ab0a448c87 Add get_by_id & get_by_name methods for Query and DataSource classes 2017-01-10 15:08:36 +03:00
Vladislav Denisov
5da8c6c0cb Add safe_builtins in Python query runner 2017-01-10 13:19:47 +03:00
Arik Fraimovich
b11685d8d4 Merge pull request #1509 from GAwadhwalAtlassian/PublicSchema_Name_Fix
[Presto/Athena] Change: remove special rule around public schema
2017-01-09 16:57:21 +02:00
sseifert
187b557eee adapt to new field mapping syntax and add unit tests 2017-01-09 14:40:27 +01:00
sseifert
9126874c87 apply snake_case naming conventions 2017-01-09 14:40:19 +01:00
Arik Fraimovich
4ccf0decbd It's 2017 now ! 🎉 2017-01-09 08:50:42 +02:00
Gaurav Awadhwal
869fa263f6 Made fixes to Presto & Athena query runners so they do not omit the schema name in autocomplete and shame list if the schema name is ‘public’ 2017-01-09 11:51:45 +11:00
sseifert
689a1aac4d should set nothing instead of empty string as value when no valid list items are found 2017-01-07 12:15:43 +01:00
sseifert
2aae497169 include custom fields in JQL query results
convert list values to concatenated strings
support definition of fieldMapping property in query which allows to rename output columns or pick specific members from dict values
2017-01-07 00:41:42 +01:00
Arik Fraimovich
c635d9abed Add icon to dashboard refresh button 2017-01-05 13:36:56 +02:00
Arik Fraimovich
eb637b69b8 Alert fixes: alert name wasn't set right & couldn't delete alert 2017-01-05 13:36:56 +02:00
Arik Fraimovich
9213a18057 Fix: visualization tab wasnt updating on add/delete. 2017-01-05 13:36:56 +02:00
Arik Fraimovich
07b6b16fda Fix: show color options in colors dropdown 2017-01-05 13:36:56 +02:00
Arik Fraimovich
bc18b05d0b Use ui-select native clear button 2017-01-05 13:36:56 +02:00
Arik Fraimovich
6a489bb743 Fix: icons were not aligned in selectors 2017-01-05 13:36:56 +02:00
Tyler Rockwood
b1fd2101df Refactored to make more efficent and cleaner 2017-01-04 08:29:25 -08:00
Tyler Rockwood
96bc3a5d0e Adding global params to dashboard by prefixing with '$' 2017-01-03 18:14:36 -08:00
Arik Fraimovich
2df0979be5 Merge pull request #1482 from yershalom/master
[Cassandra] Add: schema browser support & explicit protocol version
2017-01-03 10:39:28 +02:00
Arik Fraimovich
512ac9bb27 Move all webpack stuff to devDependencies 2017-01-02 20:57:00 +02:00
Arik Fraimovich
e33439c9f7 Update plotly version & shrinkwrap 2017-01-02 20:50:27 +02:00
Arik Fraimovich
fd19d2b79d Add shrinkwrap file to the project 2017-01-02 17:25:21 +02:00
Arik Fraimovich
b3d2d5aba2 Set more specific version of Angular 2017-01-02 17:12:32 +02:00
Arik Fraimovich
3dfaea1dcf Update Node version in circle.yml 2017-01-02 16:58:01 +02:00
Arik Fraimovich
7d8b8a16fd Merge pull request #1493 from washort/more-commits
Fix: more `db.commit()` calls
2017-01-02 16:08:29 +02:00
Arik Fraimovich
1fae6017bd Change order of db.commit and event logging 2017-01-02 16:07:47 +02:00
Allen Short
d86962b4e3 Commit DB transaction when needed 2017-01-02 16:07:47 +02:00
syerushalmy
ca4db619f2 Fixed from BaseSQLQueryRunner to BaseQueryRunner and get_schema instead of _get_tables 2017-01-02 14:47:54 +02:00
Arik Fraimovich
c39af040fe Merge pull request #1500 from getredash/v1fixes
Remove ng-table and queries search fix
2017-01-02 11:34:28 +02:00
Arik Fraimovich
c900e83bd9 Fix #1499: queries search should be case insensitive 2017-01-02 11:28:23 +02:00
Arik Fraimovich
589634b621 Remove ng-table 2017-01-02 11:22:09 +02:00
Arik Fraimovich
627f3f4fd5 Merge pull request #1498 from getredash/v1fixes
Fix #1452: Python query runner log information was wrongly formatted
2017-01-02 10:44:27 +02:00
Arik Fraimovich
69339b7c80 Fix #1452: Python query runner log information was wrongly formatted 2017-01-01 12:46:20 +02:00
Arik Fraimovich
703f996630 Merge pull request #1497 from getredash/v1fixes
Fix #16: when updating dashboard name refresh dashboards dropdown
2017-01-01 12:30:21 +02:00
Arik Fraimovich
e58f703331 Fix #16: when updating dashboard name refresh dashboards dropdown 2017-01-01 12:09:13 +02:00
Arik Fraimovich
fe363e27a3 Flatten dashboards list in menu 2017-01-01 10:39:42 +02:00
Arik Fraimovich
4e218b76ae Merge pull request #1496 from getredash/v1fixes
Add content hash to JS/CSS build files. Closes #1450
2017-01-01 10:09:08 +02:00
syerushalmy
f54e7b3343 [Cassandra]: Changed test qurey due to error with parsing uuid as a result 2016-12-31 11:11:18 +02:00
Arik Fraimovich
bb24b878c6 Add content hash to JS/CSS build files. Closes #1450 2016-12-30 22:40:51 +02:00
Arik Fraimovich
7182cbb9d3 Merge pull request #1495 from getredash/v1fixes
Fix: dashboard filters working again
2016-12-30 22:40:03 +02:00
Arik Fraimovich
48faf50db6 Replace old filters directive with new component 2016-12-30 22:31:09 +02:00
Arik Fraimovich
1db12fa0ec Fix: counter editor wasn't showoing column names 2016-12-30 22:25:06 +02:00
Arik Fraimovich
c6ef932183 Fix: changes only includes changed properties 2016-12-30 22:24:51 +02:00
Arik Fraimovich
5d3cf5367a Filters component for use in dashboards 2016-12-30 22:09:02 +02:00
yuua
78408e50c5 impala query_runner get_tables error fix 2016-12-29 10:54:57 +09:00
Arik Fraimovich
ea12dc4038 Merge pull request #1491 from getredash/v1fixes
Fix: DynamoDB test connection was broken
2016-12-27 14:52:29 +02:00
Arik Fraimovich
1388e76b48 Fix: DynamoDB test connection was broken 2016-12-27 14:47:12 +02:00
Arik Fraimovich
8d92702fc7 Merge pull request #1490 from getredash/v1fixes
v1 fixes (data source delete & visualization first load)
2016-12-27 14:46:46 +02:00
Arik Fraimovich
f5e8fc816c Fix: data source delete was broken 2016-12-27 14:02:59 +02:00
Arik Fraimovich
b3d0f705be Fix: visualization wasn't loading on first page load 2016-12-27 12:17:10 +02:00
Arik Fraimovich
894da612f4 Improve data sources create test 2016-12-25 12:57:10 +02:00
Arik Fraimovich
35eb7b0980 Merge pull request #1489 from getredash/snowflake
Fix: data source wasn't saving in the UI
2016-12-25 12:47:58 +02:00
Arik Fraimovich
06f96d9258 Fix: data source saving 2016-12-25 12:39:54 +02:00
Arik Fraimovich
01076c0759 Merge pull request #1488 from getredash/snowflake
[Data Sources] Add: Snowflake query runner
2016-12-25 12:39:24 +02:00
Arik Fraimovich
490733eff9 Add missing enabled support 2016-12-25 12:33:40 +02:00
Arik Fraimovich
a781d312c0 [Data Sources] Add: Snowflake query runner 2016-12-25 12:29:22 +02:00
Arik Fraimovich
9e5944d563 Merge pull request #1487 from getredash/v1fixes
Fix #1432: delete visualization sends full visualization body instead…
2016-12-23 23:15:32 +02:00
Arik Fraimovich
ff6bb2c45b Merge pull request #1486 from getredash/v1fixes
Close #1451: render safe HTML in table output
2016-12-23 23:14:06 +02:00
Arik Fraimovich
e4f13253e5 Fix #1432: delete visualization sends full visualization body instead of only id 2016-12-23 23:13:48 +02:00
Arik Fraimovich
a16b333b93 Close #1451: render safe HTML in table output 2016-12-23 23:07:32 +02:00
Arik Fraimovich
bff4ebd43d Merge pull request #1485 from getredash/v1fixes
Close #1453: more minimal notification of draft status for query/dashboard
2016-12-23 23:06:54 +02:00
Arik Fraimovich
7a94bed250 Close #1453: more minimal notification of draft status for query/dashboard 2016-12-23 22:58:15 +02:00
Arik Fraimovich
e0a010f7be Merge pull request #1484 from getredash/v1fixes
Fix #1457: sort was using the string value
2016-12-23 22:57:33 +02:00
Arik Fraimovich
40b82004fa Fix #1457: sort was using the string value 2016-12-23 22:36:57 +02:00
Arik Fraimovich
3bc98fba5b Merge pull request #1479 from someones/es_schema
[ElasticSearch] Add: enable schema browser
2016-12-23 18:26:49 +02:00
syerushalmy
045c921372 Fixed get_tables for execute 1 query instead of N queries 2016-12-23 11:32:55 +02:00
syerushalmy
420973c015 Added get tables query for cassandra and expilicit protocol version to 3 (Also working with cassandra version 2.1 and above) 2016-12-22 11:32:10 +02:00
Arik Fraimovich
513d74ac7d Merge pull request #1478 from someones/es_test_connection
[ElasticSearch] Fix: connection test was always succesfful
2016-12-21 09:28:20 +02:00
Adam Griffiths
e0d6d3feeb Enable schema browser for elasticsearch
Split _get_mappings into 2 functions.
Add _get_query_mappings which is used by existing logic
and parses the mappings json for query mappings.
Add get_schema which uses basic _get_mappings and recurses
through the mappings json to build a schema for the indices.
2016-12-21 15:22:04 +11:00
Adam Griffiths
ae5b6fbc57 Fix ES test connection
Error was being created, but not returned. Which caused it
to always display as success.
2016-12-21 12:15:11 +11:00
Arik Fraimovich
9d579dc089 Merge pull request #1475 from yershalom/master
[Cassnadra] Added set_keyspace for easier query cassandra
2016-12-20 23:34:00 +02:00
Arik Fraimovich
94519d1d76 Merge pull request #1476 from getredash/v1fixes
Multiple fixes from latest refactors
2016-12-20 23:14:50 +02:00
Arik Fraimovich
9b4cf4d3ee Fix query saving 2016-12-20 15:58:47 +02:00
Arik Fraimovich
ee57a5bf08 Fix #1456: large result sets overflow from the frame 2016-12-20 15:54:13 +02:00
Arik Fraimovich
e5aa567c73 Add missing call to session.commit 2016-12-20 15:30:38 +02:00
Arik Fraimovich
0029b4cd7f Fix #1455: missing ngInject annotations 2016-12-20 14:27:08 +02:00
syerushalmy
c423832931 Fixed python typo 2016-12-20 14:04:15 +02:00
Arik Fraimovich
bf2366bf1c Make sure organization is fetched only once 2016-12-20 14:02:56 +02:00
Arik Fraimovich
358d6807e5 Fix groups APIs 2016-12-20 14:02:44 +02:00
syerushalmy
024837137b Added set_keyspace for easier query cassandra 2016-12-20 13:58:09 +02:00
Arik Fraimovich
6510b01b6c Fix: user group assignment wasn't persisted 2016-12-20 13:29:32 +02:00
Arik Fraimovich
ac18aedde9 Fix: members endpoint 2016-12-20 12:26:34 +02:00
Arik Fraimovich
70f1a923a3 Fix: dashbaords page not loading 2016-12-20 12:15:48 +02:00
Arik Fraimovich
350b253833 Fix: dashboard drop down not working 2016-12-20 12:13:32 +02:00
Arik Fraimovich
6f3ca1e01a Rename all re:dash/Re:dash to Readsh. Closes #1396. 2016-12-20 12:10:33 +02:00
Arik Fraimovich
8d39ee4171 Merge pull request #1474 from yershalom/master
[Cassandra] Change: test connection query
2016-12-20 11:54:54 +02:00
syerushalmy
a860c83963 Removed ReadTimeout exception 2016-12-20 11:46:58 +02:00
syerushalmy
f3f39a5b00 Changed exception type to ReadTimeout and added test query for test connection 2016-12-19 21:35:36 +02:00
Arik Fraimovich
e6e83423e7 Merge pull request #1468 from getredash/athena
[Datasources] Add: Amazon Athena query runner
2016-12-15 15:30:21 +02:00
Arik Fraimovich
d0696853af Amazon Athena query runner 2016-12-15 15:16:04 +02:00
Arik Fraimovich
b07b347faa Merge pull request #1433 from luke14free/graphs_errors_from_master
[Charts] Add: errors bands in graphs
2016-12-13 19:24:43 +02:00
Arik Fraimovich
47c54b3c85 Merge pull request #1464 from jaykelin/master
[Clickhouse] Change: use UTF-8 encoding for POST data
2016-12-12 10:05:49 +02:00
Jayke.Lin
d4534d6045 Using UTF-8 encoding for clickhouse POST data 2016-12-12 11:05:16 +08:00
Arik Fraimovich
3cf6e31727 Forgot to add Flaks-Migrate to requirements.txt. 😳 2016-12-11 16:43:50 +02:00
Arik Fraimovich
d631171e81 Fix Query.recent tests 2016-12-11 15:54:13 +02:00
Arik Fraimovich
4df58bb724 Merge pull request #1440 from whummer/fix/dashboard-layout-error
Fix: API errors for dashboards with invalid layout data
2016-12-11 15:43:03 +02:00
Arik Fraimovich
19960eedda Merge pull request #1417 from washort/sqlalchemy
Change: Replace Peewee with SQLAlchemy/Alembic
2016-12-11 15:42:07 +02:00
Arik Fraimovich
b3bfc3bc74 Bring back support for total query time/queries count 2016-12-11 15:41:07 +02:00
Arik Fraimovich
1978e07748 Use group ids instead of groups in Queries.search/recent 2016-12-11 15:11:30 +02:00
Allen Short
e524db0215 Measure query time with statsd 2016-12-09 18:21:56 -06:00
Arik Fraimovich
81fb139b88 Add shell_context_processor to inject models to shell. 2016-12-08 16:16:53 +02:00
Arik Fraimovich
1d18109964 Fix tests that used Query.all_queries 2016-12-08 16:07:25 +02:00
Arik Fraimovich
c380596930 Fix cases where we used User.groups instead of User.group_ids 2016-12-08 16:02:51 +02:00
Arik Fraimovich
106c743647 Keep same logging format in ALembic 2016-12-08 15:36:08 +02:00
Arik Fraimovich
12cbfe1af4 Stamp database on first creation 2016-12-08 15:35:54 +02:00
Arik Fraimovich
3cce4d0ce4 Add warning script to migrations folder 2016-12-08 14:59:21 +02:00
Allen Short
4945d0bec7 fix cleanup_query_results task 2016-12-07 19:59:48 -06:00
Allen Short
4ba399af67 fix basic query execution from UI 2016-12-07 17:57:21 -06:00
Allen Short
da31d983b7 Fix test_cli tests 2016-12-07 13:18:07 -06:00
Arik Fraimovich
923c463e4a Add migration for the is_draft column 2016-12-07 18:33:52 +02:00
Arik Fraimovich
70d545410d Add Flask-Migrate to the project
Also moved old migrations to old_migrations folder (before deleting them entirely).
2016-12-07 17:59:01 +02:00
Arik Fraimovich
74e6ef5c1d Fix users CLI tests 2016-12-07 15:54:08 +02:00
Arik Fraimovich
abf57e4e70 Upgrade setuptools to install mock 2016-12-07 15:33:58 +02:00
Arik Fraimovich
2d206ef470 Switch to flask.cli.AppGroup instead of flask.cli.with_app_context 2016-12-07 15:21:13 +02:00
Arik Fraimovich
2b33963bee Add missing db.session.commit calls in CLI 2016-12-07 15:11:42 +02:00
Arik Fraimovich
a84c3e25f5 Move CLI logic into redash.cli and uses manager for tests.
Otherwise the Flask wasn't created and tests were failing.
2016-12-07 14:58:33 +02:00
Arik Fraimovich
b9024b18c1 Remove unused code 2016-12-07 14:00:37 +02:00
Arik Fraimovich
bcce9cf251 Update circle.yml to skip docker builds for now 2016-12-07 14:00:03 +02:00
Arik Fraimovich
80a7d377fe Fix: set the column name of QueryResult.query_text 2016-12-07 12:43:17 +02:00
Arik Fraimovich
73121890b3 Remove usage of the deprecated flask.ext package 2016-12-07 12:42:46 +02:00
Arik Fraimovich
51117e8e5b Update dependencies to more latest versions 2016-12-07 12:42:01 +02:00
Arik Fraimovich
fb75626458 Create default visualization using a method instead of signal 2016-12-07 12:02:57 +02:00
Arik Fraimovich
045e880f25 Add dedicated delete method to widgets instead of using an event 2016-12-07 12:02:46 +02:00
Arik Fraimovich
0c974bd48b Update User.find_by_email to SQLA 2016-12-07 12:02:31 +02:00
Arik Fraimovich
463da02be1 remove group_hack method (unused) 2016-12-07 12:01:44 +02:00
Arik Fraimovich
ecbed0087e Update create_and_login_user not to call save 2016-12-07 12:01:34 +02:00
Arik Fraimovich
8c2b310419 Add tests to alerts celery task 2016-12-07 12:01:22 +02:00
Arik Fraimovich
6b0e45441c Update QuerySnippets code to SQLA 2016-12-07 12:01:03 +02:00
Arik Fraimovich
74e1b3119f Remove dead code 2016-12-07 12:00:01 +02:00
Allen Short
dc6bc071f1 work around flask proxy object 2016-12-07 03:09:55 -06:00
Allen Short
4edc3e3f21 gratuitous admin query fix 2016-12-07 03:09:41 -06:00
Allen Short
8280859ad3 add test coverage for remaining queries to convert 2016-12-07 03:09:33 -06:00
Arik Fraimovich
f3d813445b Fix data source models tests 2016-12-07 03:09:33 -06:00
Allen Short
520835dad0 Fix test_cli 2016-12-07 03:09:33 -06:00
Arik Fraimovich
a5805d0700 Fix session api (used groups instead of group_ids) 2016-12-07 02:13:52 -06:00
Arik Fraimovich
03b2a416c8 Fix queries update handler 2016-12-07 02:13:52 -06:00
Arik Fraimovich
7d45812ef7 Add setting to enable SQLA echo mode 2016-12-07 02:13:52 -06:00
Arik Fraimovich
3f54799020 More destination handlers test fixes 2016-12-07 02:13:52 -06:00
Arik Fraimovich
c0f48909a7 Fix destinations handlers code 2016-12-07 02:13:52 -06:00
Allen Short
9b5aaa787d test_permissions, test_changes, test_queries 2016-12-07 02:13:20 -06:00
Allen Short
271b468bcb test_alerts 2016-12-07 02:13:20 -06:00
Allen Short
6c3d5d184e test_queries 2016-12-07 02:13:20 -06:00
Allen Short
261b374924 test_permissions 2016-12-07 02:13:20 -06:00
Allen Short
9f789d3018 test_paginate 2016-12-07 02:13:20 -06:00
Allen Short
29cdfcd7a1 test_embed, test_groups 2016-12-07 02:13:20 -06:00
Arik Fraimovich
d103e3f7bf Fix groups tests (except for delete) 2016-12-07 02:13:20 -06:00
Arik Fraimovich
c5548e9375 Fix query handlers test 2016-12-07 02:13:20 -06:00
Arik Fraimovich
802b812932 Fix query results tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
9c1450f4c9 Fix users handlers tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
4459c464ca use Query#query_text instead of Query#query 2016-12-07 02:13:20 -06:00
Arik Fraimovich
f4c76527ee Fix refresh queries tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
419234a23e Fix widget tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
b61dbfa16b Fix test_authentication tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
6b2d6a22f5 Change groups property of ApiUser to be group_ids 2016-12-07 02:13:20 -06:00
Arik Fraimovich
c355eeffb6 Fix test_permissions tests 2016-12-07 02:13:20 -06:00
Allen Short
c6ef6041cf test_data_sources passes 2016-12-07 02:13:20 -06:00
Allen Short
dff39a6849 test_dashboards passes 2016-12-07 02:13:20 -06:00
Allen Short
bb755b5c25 test_models fixes 2016-12-07 02:13:20 -06:00
Allen Short
d1fcb43562 test_alerts passes 2016-12-07 02:13:20 -06:00
Arik Fraimovich
811a4ef248 Fix accesspemrissions tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
c386ff91d6 Fix data source models tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
8680ebe96f Change Dashboard factory to generate non drafts 2016-12-07 02:13:20 -06:00
Arik Fraimovich
d59299b85a Fix Alert model tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
9210f5fb0c Remove unused code 2016-12-07 02:13:20 -06:00
Allen Short
c2378d837a test_handlers passes 2016-12-07 02:13:20 -06:00
Arik Fraimovich
90879c964f Simplify query api key generation 2016-12-07 02:13:20 -06:00
Arik Fraimovich
2a525210e4 Start fixing visualizations tests 2016-12-07 02:13:20 -06:00
Arik Fraimovich
04447e0df6 Fix: connections leaking during tests. 2016-12-07 02:13:20 -06:00
Arik Fraimovich
55cb3747ed Use db.drop_all/create_all directly 2016-12-07 02:13:20 -06:00
Arik Fraimovich
2bff12b376 Update all tests to use the same test_client 2016-12-07 02:13:20 -06:00
Arik Fraimovich
b390cd2e3d Close DB connection between tests.
Otherwise we were running out of connections.
2016-12-07 02:13:20 -06:00
Arik Fraimovich
f55b836896 Fix: fix database URL 2016-12-07 02:13:20 -06:00
Allen Short
982667ffa9 Make draft status for queries and dashboards toggleable. 2016-12-07 02:13:20 -06:00
Allen Short
f00d77dec4 auth tests wip 2016-12-07 02:13:20 -06:00
Allen Short
ea166665d3 test_models passes 2016-12-07 02:13:20 -06:00
Allen Short
d2aef544c3 properly handle view_only permission in groups API 2016-12-07 02:13:20 -06:00
Allen Short
24217d969e schema for sqlalchemy, basic test support 2016-12-07 02:13:20 -06:00
Arik Fraimovich
dde55e764b Merge pull request #1458 from washort/click
Change: switch from flask_script to click, add CLI unit tests and upgrade Flask version
2016-12-06 23:38:03 +02:00
Allen Short
80491ea4c2 Switch from flask_script to click, add CLI unit tests. 2016-12-06 15:14:44 -06:00
Arik Fraimovich
c2f9e376be Merge pull request #1460 from washort/master
Run webpack on all branches
2016-12-06 22:52:25 +02:00
Allen Short
20a0d95c1f make deps on all branches 2016-12-06 14:08:48 -06:00
Arik Fraimovich
fcd623e203 Merge pull request #1438 from someones/better_json_errors
[ElasticSearch] Change: use simplejson for better error descriptions
2016-12-06 11:47:44 +02:00
Arik Fraimovich
4b6d4c14d0 Merge pull request #1454 from getredash/fix-eprovider
Fix: eProvider not found errors
2016-12-06 11:15:02 +02:00
Arik Fraimovich
550310ea63 Fix: eProvider not found errorso 2016-12-06 11:13:47 +02:00
luke14free
e7fdc23b03 wrong check 2016-12-04 10:56:13 +01:00
luke14free
a754e58fd8 Explicitly checking undefined values 2016-12-04 10:50:03 +01:00
Arik Fraimovich
17895d09a9 Correct version. 2016-12-02 17:25:17 +02:00
Arik Fraimovich
8201509216 Update bootstrap.sh for v0.12.0
Fixes #1442.
2016-12-02 17:24:18 +02:00
Arik Fraimovich
f3df2b1d7a Merge pull request #1441 from someones/fix_angular15
Fix symlinks to /frontend. Should be /client
2016-12-02 08:40:13 +02:00
Adam Griffiths
e546592c01 Fix symlinks to /frontend. Should be /client 2016-12-02 11:14:24 +11:00
Waldemar Hummer
eaa0b5da09 fix https://github.com/getredash/redash/issues/1439 2016-12-02 10:32:41 +11:00
Arik Fraimovich
ba60bfa3b0 Update version reference in bootstrap.sh. 2016-12-01 10:54:50 +02:00
Adam Griffiths
4cd58cdacf Use simplejson for better error descriptions.
The standard json library only provides an error
that the json failed to parse.
simplejson provides actual character and line numbers
along with an expected character in it's errors.
This makes writing elasticsearch queries much easier.
2016-12-01 11:34:57 +11:00
Arik Fraimovich
196177021c Merge pull request #1435 from mattrobenolt/safe-builtins
Whitelisting more builtin primitives
2016-11-28 23:13:12 +02:00
Matt Robenolt
bce2e3323a Whitelisting more builtin primitives
This is also a slight refactor to make it easier to expand on this list
of builtins we allow.

Also, doesn't mutate the global `safe_builtins` dict every time from
`RestrictedPython`, instead, opts for copying the dict first.
2016-11-28 11:38:25 -08:00
luke14free
624a144880 Fix: add error bands to plotly only if they are set by the user 2016-11-28 11:43:08 +01:00
luke14free
870e7c200e Adding errors bands in graphs and fixing chart-edit bugs 2016-11-28 11:33:04 +01:00
Arik Fraimovich
f473e18bef Merge pull request #1376 from getredash/webpack
Change: upgrade the frontend stack
2016-11-28 10:34:38 +02:00
Arik Fraimovich
a463bad9b5 Add missing feature to the changelog. 2016-11-28 10:24:56 +02:00
Arik Fraimovich
14d46063af Make keyboard shortcuts work again 2016-11-28 10:18:17 +02:00
Arik Fraimovich
dca899883c Bring back pace 2016-11-28 09:51:51 +02:00
Arik Fraimovich
b5e2234234 Set title 2016-11-27 15:49:17 +02:00
Arik Fraimovich
b507c7cdb1 Fix authentication handling for embeds 2016-11-27 15:31:04 +02:00
Arik Fraimovich
51528508ba Make sure session is loaded before route is rendered 2016-11-27 14:02:29 +02:00
Arik Fraimovich
724b7675c7 Fix: query filters 2016-11-27 13:08:37 +02:00
Arik Fraimovich
1ea9f0e900 Fix: sometimes order of columns in table was wrong 2016-11-27 13:08:22 +02:00
Arik Fraimovich
8901079084 Fix new dashboard link in app header 2016-11-27 13:08:07 +02:00
Arik Fraimovich
c25a4e3285 Fix dashboard creation 2016-11-27 13:07:11 +02:00
Arik Fraimovich
5a3033aeb6 Add /dashboards to list of paths 2016-11-27 13:07:03 +02:00
Arik Fraimovich
cd670b677a Implement sorting for data tables 2016-11-27 12:00:47 +02:00
Arik Fraimovich
2067eab56b Fix: query snippets were broken 2016-11-27 12:00:22 +02:00
Arik Fraimovich
7c5d395736 Show correct embed URL 2016-11-27 10:55:47 +02:00
Arik Fraimovich
0a06d516e2 Remove input-errors/show-errors usage 2016-11-26 12:16:41 +02:00
Arik Fraimovich
68ccf4b13a Remove references to rd_ui 2016-11-26 12:01:42 +02:00
Arik Fraimovich
c029e13ba2 Migrate the draft functionality and fork to this branch 2016-11-26 11:54:14 +02:00
Arik Fraimovich
a874d88667 Fix tests & update CircleCI configuration 2016-11-26 11:35:21 +02:00
Arik Fraimovich
3314599be7 Webpack build notifier 2016-11-26 11:35:21 +02:00
Arik Fraimovich
bb64b17e45 Udpate webpack config 2016-11-26 11:35:21 +02:00
Arik Fraimovich
5c99175d2e change default settings to use client/dist 2016-11-26 11:35:21 +02:00
Arik Fraimovich
0a06f950d5 Working embeds & renamed frontend to client 2016-11-26 11:35:21 +02:00
Arik Fraimovich
50fcb14fda Working login/logout, real session data & public dashboard page
Fixes #1276.
2016-11-26 11:35:21 +02:00
Arik Fraimovich
73e5ed4a07 use clientconfig in datetime filter 2016-11-26 11:34:43 +02:00
Arik Fraimovich
4ef4f98a66 Load currentUser/clientConfig from server 2016-11-26 11:34:43 +02:00
Arik Fraimovich
8676eb000d Change queries/format call to return JSON object 2016-11-26 11:33:49 +02:00
Arik Fraimovich
3fecc023d2 Move backend templates into redash/templates 2016-11-26 11:33:49 +02:00
Arik Fraimovich
afc31aea9a Remove unused files 2016-11-26 11:33:49 +02:00
Arik Fraimovich
3070d85789 change sourcemaps generation method 2016-11-26 11:33:49 +02:00
Arik Fraimovich
8952919f41 Pivot table visualization 2016-11-26 11:33:49 +02:00
Arik Fraimovich
c67828f48d Map visualization 2016-11-26 11:33:49 +02:00
Arik Fraimovich
8e55be9712 Cohort visualization| 2016-11-26 11:33:49 +02:00
Arik Fraimovich
2ef8ecd14a Add wordcloud and boxplot visualizations 2016-11-26 11:33:49 +02:00
Arik Fraimovich
2b9066bb49 Sankey visualization 2016-11-26 11:33:49 +02:00
Arik Fraimovich
7dbd20cb15 Cleanup eslint issues 2016-11-26 11:33:49 +02:00
Arik Fraimovich
9579c0a970 Sunburst visualization 2016-11-26 11:33:49 +02:00
Arik Fraimovich
d237943a85 remove .env.example file 2016-11-26 11:33:49 +02:00
Arik Fraimovich
ca3c934ee4 Remove old gulp file & package.json 2016-11-26 11:33:49 +02:00
Arik Fraimovich
55e3d86308 Backport changes made after creating this pull request 2016-11-26 11:33:49 +02:00
Arik Fraimovich
df5e1b51d0 Remove manual injections 2016-11-26 11:33:49 +02:00
luke14free
599fe5f4de Adding capabilities to the original script runner 2016-11-26 11:33:49 +02:00
luke14free
f7eec278c9 Adding a query runner for generic script execution 2016-11-26 11:33:49 +02:00
Arik Fraimovich
0ced011f0f Address lint issues 2016-11-26 11:33:49 +02:00
Arik Fraimovich
0ab815ba9c Remove unused logging 2016-11-26 11:33:49 +02:00
Arik Fraimovich
4b191637ea Working dashboard editor 2016-11-26 11:33:49 +02:00
luke14free
02d27c1a0b Improving security checks & removing unused log 2016-11-26 11:33:49 +02:00
luke14free
edd2a1b547 Adding correct classes for the toggle and option to stop refresh 2016-11-26 11:33:49 +02:00
luke14free
4c3de76ea1 Making select menu for refresh choice look nicer 2016-11-26 11:33:49 +02:00
luke14free
21cfa35211 Fixing stupid concatenation typo 2016-11-26 11:33:49 +02:00
luke14free
b88f36a9f9 Add: autorefresh capabilities do dashboard 2016-11-26 11:33:49 +02:00
luke14free
3743ef5611 Adding capabilities to the original script runner 2016-11-26 11:33:49 +02:00
luke14free
f9260ca60f Adding clientConfig for JS visualization 2016-11-26 11:33:49 +02:00
luke14free
a368b14a97 Fixing wrong package version and ES6 compliance 2016-11-26 11:33:49 +02:00
luke14free
e9746ac528 Removing unused pagination import 2016-11-26 11:33:49 +02:00
luke14free
b9664141d5 Removing tabs and making the changes ES6 compliant 2016-11-26 11:33:49 +02:00
luke14free
f5c43d819a finally moving variables to this 2016-11-26 11:33:49 +02:00
luke14free
ff697109c3 Remove variables with $scope and use self 2016-11-26 11:33:49 +02:00
luke14free
0e6b68d3b2 Fixing CSS 2016-11-26 11:33:49 +02:00
luke14free
21283caae6 Adding a query runner for generic script execution 2016-11-26 11:33:49 +02:00
luke14free
f44912babe Hide tabs when viz type is set to custom 2016-11-26 11:33:49 +02:00
luke14free
71be7aa1ee Fixing console log reporting and option label 2016-11-26 11:33:49 +02:00
luke14free
df11077279 Removing unused import 2016-11-26 11:33:49 +02:00
luke14free
d929226c69 Adding custom javascript charts 2016-11-26 11:33:49 +02:00
Arik Fraimovich
f372e68cb8 Add queries results page 2016-11-26 11:33:49 +02:00
luke14free
55d8f9e01c Adding dropdown menu link to the dashboards page 2016-11-26 11:33:49 +02:00
luke14free
0b6d2b4486 Unpaginated results 2016-11-26 11:33:49 +02:00
luke14free
b249b9a444 Working version of the dashboard page 2016-11-26 11:33:49 +02:00
Arik Fraimovich
00bd38771d add back the vendor scripts file 2016-11-26 11:33:49 +02:00
Arik Fraimovich
99815b7c71 autofocus directive 2016-11-26 11:33:49 +02:00
Arik Fraimovich
59c3f3859d Make create dashboard work 2016-11-26 11:33:49 +02:00
Arik Fraimovich
fece3f8269 Make ui-sortable work again 2016-11-26 11:33:49 +02:00
Arik Fraimovich
d02c4e7f8d Add widget dialog 2016-11-26 11:33:49 +02:00
Arik Fraimovich
416f7da75f Query view/edit screens 2016-11-26 11:33:49 +02:00
Arik Fraimovich
d561904aa6 First version of query pages 2016-11-26 11:33:41 +02:00
Arik Fraimovich
33834a4436 data sources pages 2016-11-26 11:33:41 +02:00
Arik Fraimovich
b76fbc2150 Destinations editor 2016-11-26 11:33:41 +02:00
Arik Fraimovich
e0aeae4541 Desitnations list 2016-11-26 11:33:41 +02:00
Arik Fraimovich
54eb2fed50 remove edit-in-place directive 2016-11-26 11:33:41 +02:00
Arik Fraimovich
cb01381dfa Migrate the group list and show page 2016-11-26 11:33:41 +02:00
Arik Fraimovich
98cc0fe1ce Fix new user form to show errors 2016-11-26 11:33:41 +02:00
Arik Fraimovich
3583f57d00 new user page 2016-11-26 11:33:41 +02:00
Arik Fraimovich
de91bb941b User show page 2016-11-26 11:33:41 +02:00
Arik Fraimovich
6eb083193f Add users list page 2016-11-26 11:33:41 +02:00
Arik Fraimovich
d49e5f9d57 Query snippets pages 2016-11-26 11:33:41 +02:00
Arik Fraimovich
0e5325ef1c Remove code from rd_ui that was already migrated to frontend 2016-11-26 11:33:41 +02:00
Arik Fraimovich
db795c7b59 Remove unused test code 2016-11-26 11:33:12 +02:00
Arik Fraimovich
bbbaa7a842 working version of chart visualization 2016-11-26 11:33:12 +02:00
Arik Fraimovich
ee31edf690 Visualzations base & table visualization 2016-11-26 11:33:12 +02:00
Arik Fraimovich
22236c7ffe Add alerts and admin pages 2016-11-26 11:33:12 +02:00
Arik Fraimovich
9c9feee7b5 Queries page 2016-11-26 11:33:12 +02:00
Arik Fraimovich
4ad53eb8dd Support for pushstate in dev server 2016-11-26 11:33:12 +02:00
Arik Fraimovich
aa529e40d3 Initial config 2016-11-26 11:33:12 +02:00
Arik Fraimovich
0318be5ed9 Separate npm modules to their own JS file 2016-11-26 11:33:12 +02:00
Arik Fraimovich
da790de60d First page implemented (home) 2016-11-26 11:33:12 +02:00
Arik Fraimovich
4e0c9af18d Migrated services & app header component 2016-11-26 11:33:12 +02:00
Arik Fraimovich
56bdea2d8d Migrate filters 2016-11-26 11:33:12 +02:00
Arik Fraimovich
a83646070f Initial Webpack setup 2016-11-26 11:33:12 +02:00
Arik Fraimovich
6f52c50adc Merge pull request #1429 from someones/es_error_propagation
Add missing error check from #1402
2016-11-25 18:19:44 +02:00
Adam Griffiths
c449bfbcf5 Add missing error check 2016-11-25 10:18:54 +11:00
Arik Fraimovich
47c1ac89f2 Merge pull request #1405 from denisov-vlad/google_analytics
[Datasources] Add: simple Google Analytics query runner
2016-11-24 22:18:02 +02:00
Vladislav Denisov
6bdc863b64 google_analytics: review fixes #2 2016-11-24 23:17:04 +03:00
Arik Fraimovich
9b6b27a002 Merge pull request #1409 from denisov-vlad/clickhouse
[Datasources] Add: Add query runner for Yandex ClickHouse
2016-11-24 21:52:26 +02:00
Arik Fraimovich
b9aeb2f419 Merge pull request #1427 from getredash/cass
[Cassandra] Fix: remove reference to non existing Error class
2016-11-24 21:50:05 +02:00
Vladislav Denisov
92dee61bcd google_analytics: added accounts and properties as schema tables 2016-11-23 17:17:05 +03:00
Arik Fraimovich
f3db250fd7 [Cassandra] Fix: remove reference to non existing Error class 2016-11-23 13:05:28 +02:00
Arik Fraimovich
9f68deefea Merge pull request #1256 from ninneko/fork_with_vis
Change: when forking a query, copy all visualizations
2016-11-23 11:49:26 +02:00
Vladislav Denisov
8eefad290b google_analytics: review fixes 2016-11-23 12:48:10 +03:00
Arik Fraimovich
0947491400 Merge pull request #1423 from getredash/cass_error
[Cassandra] Fix: cassandra.cluster.Error wasn't imported
2016-11-23 10:53:54 +02:00
Vladislav Denisov
f572315e9d clickhouse: changed exception's message type to unicode 2016-11-23 11:53:11 +03:00
Arik Fraimovich
52c71bc740 [Cassandra] Fix: cassandra.cluster.Error wasn't imported
Fixed #1422.
2016-11-23 10:51:06 +02:00
Vladislav Denisov
3a80dfff39 review fixes 2016-11-23 10:15:03 +03:00
Arik Fraimovich
e6482cffab Merge pull request #1421 from getredash/arikfr-patch-1
Change: [BigQuery] only specify useLegacySQL is it's True
2016-11-22 23:55:16 +02:00
Arik Fraimovich
971f961bcd Merge pull request #1353 from washort/draft-toggle
Change: make draft status for queries and dashboards toggleable
2016-11-22 23:38:33 +02:00
Arik Fraimovich
4cb0f910ea Change: [BigQuery] only specify useLegacySQL is it's False 2016-11-22 23:25:10 +02:00
Arik Fraimovich
265c9733ba Merge pull request #1419 from ehfeng/master
Change: use redash.utils.json_dumps instead of json.dumps in Python query runner
2016-11-22 15:27:43 +02:00
Eric Feng
a834b08603 Switching to redash.utils.json_dumps
Currently, python runner is returning datetime objects as unicode strings. `redash.utils.json_dumps` returns them as native python datetime objects.
2016-11-21 13:13:08 -08:00
Vladislav Denisov
a66136e6a4 clickhouse: removed unused code 2016-11-20 14:50:38 +03:00
Arik Fraimovich
037d196557 Merge pull request #1373 from AntoineAugusti/rate-limit-login
Add: rate limit the login page
2016-11-20 13:47:16 +02:00
Antoine Augusti
9118464970 Rate limit the login page 2016-11-20 12:44:43 +01:00
Vladislav Denisov
c94daceb5f google_analytics: added date/datetime parsing 2016-11-20 14:18:02 +03:00
Vladislav Denisov
0a0ca219d0 google_analytics: removed unused code 2016-11-20 13:54:58 +03:00
Arik Fraimovich
e65ec8cf4b Merge pull request #1402 from someones/es_error_propagation
Change: correctly propagate ElasticSearch errors to the UI
2016-11-20 12:49:39 +02:00
Vladislav Denisov
d03cafc09b clickhouse: added more column types 2016-11-20 13:14:17 +03:00
Arik Fraimovich
3b7f167861 Merge pull request #1371 from vitorbaptista/feature/show_admins_the_password_reset_link
Change: display user's password reset link to the admin when mail server disabled
2016-11-20 11:30:55 +02:00
Arik Fraimovich
a951034f4b Update release notes. 2016-11-20 11:16:38 +02:00
Arik Fraimovich
8a622fb7ca Bump version to 1.0.0. 2016-11-20 10:58:11 +02:00
Arik Fraimovich
ca39892c64 Update release date of 0.12.0. 2016-11-20 10:57:40 +02:00
Vladislav Denisov
bdee3392ec clickhouse: query runner for Yandex.Clickhouse DB 2016-11-18 15:48:01 +03:00
Adam Griffiths
8ad336ad71 Propagate elasticsearch errors to the UI
Handle and correctly print various errors which
we're being obscured as "Unable to serialise JSON"
errors.
Requests' exceptions also have non-json serializable
characters, and so have to be converted to a safer format.
2016-11-18 12:49:36 +11:00
Adam Griffiths
60a4c3de04 PEP8 updates for ES query runner 2016-11-18 12:49:19 +11:00
Vladislav Denisov
de64c4c80c simple GA query runner 2016-11-17 17:56:52 +03:00
Vitor Baptista
3ca78bebde Fix conditions to show the user reset link 2016-11-16 17:38:17 +00:00
Arik Fraimovich
2d7a497073 Merge pull request #1398 from getredash/012patches
Fix: missing images after minification
2016-11-16 08:58:47 +02:00
Arik Fraimovich
788c16ce37 Fix #1389: missing images after minification 2016-11-16 08:53:16 +02:00
Arik Fraimovich
2de4aa2a0c Merge pull request #1395 from getredash/012patches
Change: switch to requests in URL query runner
2016-11-15 18:23:06 +02:00
Arik Fraimovich
10cbb7fd52 Change: switch to requests in URL query runner 2016-11-15 18:19:44 +02:00
Arik Fraimovich
0cbbe7095d Merge pull request #1394 from getredash/012patches
Fix: conflict handling in dashboard widget editing was wrong
2016-11-15 16:05:30 +02:00
Arik Fraimovich
c88dafa4ad Fix: update version after deleting a widget 2016-11-15 15:57:34 +02:00
Arik Fraimovich
48a79fe996 Fix #1383: dashboard co-editors shuould be able to edit widgets 2016-11-15 15:53:06 +02:00
Arik Fraimovich
b70a24f6b4 Fix 1388: Wrong detection of conflict after adding a widget to the dashboard 2016-11-15 15:52:36 +02:00
Arik Fraimovich
d1b82694a6 Fix author name on #1113. 2016-11-15 15:51:46 +02:00
Arik Fraimovich
db1a941459 Merge pull request #1392 from getredash/012patches
Update documentation links to point at the new location.
2016-11-15 14:04:56 +02:00
Arik Fraimovich
e22706692a Remove old documentation. 👋 2016-11-15 14:01:15 +02:00
Arik Fraimovich
c06aeae84f Update references to documentation to point at the new one 2016-11-15 13:56:55 +02:00
Arik Fraimovich
e0617d9ad7 Merge pull request #1243 from kassyuz/patch-1
Create proxy_pass.rst
2016-11-15 13:17:54 +02:00
yohei.naruse
8c78252ea2 fix tests 2016-11-11 02:21:30 +09:00
Arik Fraimovich
29a2fb1931 Merge pull request #1382 from getredash/changelog
Add: a changelog
2016-11-10 10:06:16 +02:00
Arik Fraimovich
e21799a754 Add a changelog 📜 💥 2016-11-10 10:05:09 +02:00
yohei.naruse
1ad0c9c75f fix errors 2016-11-09 00:37:16 +09:00
Vitor Baptista
438ebb940e Fix condition to show forgotten password link and alter its message 2016-11-07 18:13:33 +00:00
Arik Fraimovich
d6febb0cb4 Merge pull request #1375 from moonami/issue-1247
Fix: Download Dataset does not work when not logged in
2016-11-07 10:38:38 +02:00
yohei.naruse
7bc71c9cb5 apply review. 2016-11-06 03:05:48 +09:00
yohei.naruse
519964a179 delete unused code 2016-11-06 03:05:48 +09:00
yohei.naruse
1d486938c1 fix bugs 2016-11-06 03:05:47 +09:00
yohei.naruse
ad3d01280a modify front scripts to use query fork api 2016-11-06 03:04:30 +09:00
yohei.naruse
3216e67b41 add query fork api 2016-11-06 03:03:04 +09:00
yohei.naruse
e5665879bd add query fork to models.py 2016-11-06 03:02:11 +09:00
Arik Fraimovich
61fe16e18e Merge pull request #1374 from washort/cors-star
Add: allow '*' in REDASH_CORS_ACCESS_CONTROL_ALLOW_ORIGIN
2016-11-05 17:46:55 +02:00
Joshua Dechant
2184f53277 JS vars should be camelCase 2016-11-04 23:46:54 -04:00
Joshua Dechant
733f245e36 This fixes #1247 2016-11-04 12:40:53 -04:00
Allen Short
6c4294b64d Allow '*' in REDASH_CORS_ACCESS_CONTROL_ALLOW_ORIGIN 2016-11-02 16:31:58 -05:00
Vitor Baptista
69c1f15ce9 Wrap "Password Reset Button" in form group to visually separate it 2016-11-02 18:23:15 +00:00
Vitor Baptista
72389b00c9 Display user's password reset link to the admin
Similarly to when we invite new users, this allows the admin to reset the
password herself (or send it manually to the user), in cases where there's some
issue sending the e-mail.
2016-11-02 18:20:05 +00:00
Allen Short
65a6385380 Make draft status for queries and dashboards toggleable. 2016-11-02 12:31:33 -05:00
Arik Fraimovich
2f090435a5 Merge pull request #1113 from whummer/feat/share-access-permissions
Add: share modify/access permissions for queries and dashboard
2016-10-28 19:11:03 +03:00
Arik Fraimovich
d9bad96e8e Remove MQL tests 2016-10-28 18:16:54 +03:00
Arik Fraimovich
b7a5d95bb8 Add JIRA connection test 2016-10-28 18:13:20 +03:00
Arik Fraimovich
ab85e43e58 Fix graphite test connection method 2016-10-28 17:50:26 +03:00
Arik Fraimovich
96553ad942 Merge pull request #1369 from someones/es_test_fix
Fix: missing format call in Elasticsearch test method
2016-10-28 09:14:10 +03:00
Adam Griffiths
c1847fbc12 Fix missing format call 2016-10-28 15:44:59 +11:00
Arik Fraimovich
dc345aa363 Fix: bring back correct timeout value 2016-10-27 19:34:00 +03:00
Arik Fraimovich
002f794f2a Merge pull request #1368 from getredash/rand
Change: added ability to disable auto update in admin views
2016-10-27 19:32:16 +03:00
Arik Fraimovich
d2c64c6da2 Ability to disable auto update in admin views 2016-10-27 19:28:43 +03:00
Arik Fraimovich
e2595e7540 Show queues data sources in a pop over 2016-10-27 19:21:42 +03:00
Arik Fraimovich
aa5d14ed02 Merge pull request #1366 from deecay/master
Change: improve error message for exception in the Python query runner
2016-10-27 09:35:00 +03:00
deecay
4ba7aa1fc0 Improve error message for exception. 2016-10-27 11:16:04 +09:00
Arik Fraimovich
fd9dc4b4e8 Update controller/view name 2016-10-26 22:17:17 +03:00
Arik Fraimovich
c57c765688 Merge pull request #1365 from washort/tz-fix
Fix: compare retrieval times in UTC timezone
2016-10-26 21:47:27 +03:00
Arik Fraimovich
52b87efb73 Add feature flag for the permissions control feature 2016-10-26 21:40:51 +03:00
Allen Short
36d01a2029 Compare retrieval times in UTC timezone 2016-10-26 10:18:33 -05:00
Arik Fraimovich
2592959550 Use version for partial query updates 2016-10-26 16:28:39 +03:00
Arik Fraimovich
6c5dd09a78 Add change tracking and fix tests 2016-10-26 16:09:55 +03:00
Arik Fraimovich
9cb9bdb515 Record events for permission changes 2016-10-26 11:47:57 +03:00
Arik Fraimovich
df17759ab4 Fix tests 2016-10-26 11:47:40 +03:00
Arik Fraimovich
028393b229 Return dashboard permission status with dashboard object 2016-10-26 11:22:51 +03:00
Arik Fraimovich
8245a667ef Return permission state with query object 2016-10-26 11:17:14 +03:00
Arik Fraimovich
6218421266 Tests for the permissions API (and rewrite) 2016-10-26 10:52:24 +03:00
Arik Fraimovich
f34471ec10 Return 409 when dashboard can't be updated due to conflict 2016-10-25 11:58:43 +03:00
Arik Fraimovich
40cc592591 Make sure error are logged in tests 2016-10-25 11:58:25 +03:00
Arik Fraimovich
bb96702ae6 Update dashboard testS 2016-10-25 10:45:00 +03:00
Arik Fraimovich
8b091129ed Use new helper for dashboards API 2016-10-24 21:33:49 +03:00
Arik Fraimovich
edea6f3a05 WIP:
- Move version/change tracking logic to mixins (the change mixin is still WIP).
- Tests for queries update API.
2016-10-24 16:58:30 +03:00
Arik Fraimovich
c51477ac93 Add tests outline 2016-10-24 13:56:39 +03:00
Arik Fraimovich
9f3bbfee13 Renames 2016-10-24 13:56:31 +03:00
Arik Fraimovich
7ba5a2062a Remove unused method 2016-10-24 13:37:32 +03:00
Arik Fraimovich
00a77f8d3a snake_case to camelCase 2016-10-24 12:57:54 +03:00
Arik Fraimovich
b9ab9135d0 Apply review to models code 2016-10-24 12:57:30 +03:00
Arik Fraimovich
19e5a0af86 Naming and indentation fixes 2016-10-24 12:40:17 +03:00
Arik Fraimovich
b748eb14f4 "Simplify" migration code 2016-10-24 12:35:52 +03:00
Waldemar Hummer
60a79cbe08 address code review comments 2016-10-24 12:33:29 +03:00
Waldemar Hummer
c0c4f453f2 fix handling of latest_version in query view 2016-10-24 12:33:29 +03:00
Waldemar Hummer
e0672f4c4d add optimistic locking for dashboard editing 2016-10-24 12:33:29 +03:00
Waldemar Hummer
6b540e03fc check for shared permissions in dashboard UI 2016-10-24 12:33:29 +03:00
Tatyana Tychshenko
95dca53b1e Finalised UI for sharing permissions 2016-10-24 12:33:29 +03:00
Waldemar Hummer
91a46ea1bb add optimistic locking for concurrent changes to queries by different users 2016-10-24 12:33:29 +03:00
Waldemar Hummer
903ba0c1e0 add backend API and tests for managing access permissions. 2016-10-24 12:33:29 +03:00
Tatyana Tychshenko
2a688200be UI for sharing edit permissions 2016-10-24 12:33:29 +03:00
Arik Fraimovich
37dff5f0a4 Merge pull request #1360 from shinji19/hotfix/mysql_connection_test
Fix: connection test was broken for MySQL
2016-10-24 12:09:07 +03:00
ichihara
6397b8ca1f fix variable name 2016-10-24 18:01:46 +09:00
Arik Fraimovich
360028c01f Merge pull request #1359 from laughingman7743/fix_schema_loading_query
Fix: schema loading query for Hive was wrong for non default schema
2016-10-23 16:12:42 +03:00
laughingman7743
6a42daffe2 Fix schema loading query for Hive query runner 2016-10-22 10:06:18 +09:00
Arik Fraimovich
7ee41d41b5 Merge pull request #1358 from getredash/add_user_id_to_run_query
Fix: make sure all calls to run_query updated with new parameter
2016-10-21 21:54:03 +03:00
Arik Fraimovich
c138d0592a Fix: make sure all calls to run_query updated with new parameter 2016-10-21 19:15:50 +03:00
Arik Fraimovich
3db0eea921 Merge pull request #1341 from zoetrope/specify-nameid-format-in-saml
Add: support for specifying SAML nameid-format
2016-10-21 08:17:11 +03:00
zoetrope
9ce211bf09 add environment variable name in doc 2016-10-21 13:58:27 +09:00
zoetrope
5610ce1721 specify nameid-format in SAML authentication 2016-10-21 13:58:12 +09:00
zoetrope
67528eeb73 Merge remote-tracking branch 'upstream/master' 2016-10-21 13:09:43 +09:00
Arik Fraimovich
880627c69c Merge pull request #1355 from getredash/add_user_id_to_run_query
Change: pass the user object to the run_query method
2016-10-21 00:06:05 +03:00
Arik Fraimovich
ae2cd5363f Change: pass the user object to the run_query method
This to allow different use cases like checking permissions
based on who is currently running the query.
2016-10-20 23:42:25 +03:00
Arik Fraimovich
b0ecd0e9a0 Merge pull request #1343 from zoetrope/use-local-metadata-in-saml
Add: support for local SAML metadata file
2016-10-20 15:39:34 +03:00
Arik Fraimovich
23c605b149 Merge pull request #1342 from zoetrope/add-entity-id-in-saml
SAML: specify entity id
2016-10-20 15:38:39 +03:00
Arik Fraimovich
464b8368bf Merge pull request #1301 from washort/connection-test
Add: "test connection" button for data sources
2016-10-20 10:21:31 +03:00
Arik Fraimovich
cb0ea7b63e Show spinner while testing connection 2016-10-20 10:11:16 +03:00
Arik Fraimovich
ef07388d2a Allow testing connection only after saving 2016-10-20 10:11:16 +03:00
Arik Fraimovich
8464d8c64a Fix the way we were calling the test API -
Previously it was overriding the content of $scope.dataSource and
resulting in a broken form.

Also updated the messages.
2016-10-20 10:11:16 +03:00
Arik Fraimovich
37a02bfe37 Make the DataSourceTest api more consistent with other APIs. 2016-10-20 10:11:16 +03:00
Arik Fraimovich
41f7791c87 Make the DataSourceList#get call more robust 2016-10-20 10:10:42 +03:00
Arik Fraimovich
9041ccabd3 Change: update Raven version (5.27.0 had a bug) 2016-10-20 10:10:42 +03:00
Arik Fraimovich
d4a1a5b239 Update CSS files in embed.html 2016-10-20 10:10:42 +03:00
Arik Fraimovich
cf7ed8fae7 Change: catch all exceptions from query runners 2016-10-20 10:10:42 +03:00
Arik Fraimovich
f63d43c3cf *Don't* anotate MSSQL queries.. 2016-10-20 10:10:42 +03:00
Arik Fraimovich
aec38614c0 Change: make visualization embeds more printer friendly 2016-10-20 10:10:42 +03:00
Arik Fraimovich
459a25bedd Revert settings screen menu to simple mode to allow extending it 2016-10-20 10:10:42 +03:00
Arik Fraimovich
14e024bca8 Add: allow changing alert email subject.
Fixes #1144.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
fc8985f689 Change: allow specifying recipient address when sending email test message.
Closes #1224.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
cecc1a9462 Fix: 0 is falsy, so need to check differently if there is value defined. 2016-10-20 10:10:42 +03:00
Arik Fraimovich
fe6497dfe7 Add: control over y axis min/max values 2016-10-20 10:10:42 +03:00
Arik Fraimovich
79df2b8d22 Add option to change the map tile layer 2016-10-20 10:10:42 +03:00
Arik Fraimovich
ef6a543850 Use group color for the marker-cluster 2016-10-20 10:10:42 +03:00
Arik Fraimovich
c17a6956dc Change: upgrade Python packages
- pytz
- funcy
- raven (Sentry client)
- xlsxwriter
2016-10-20 10:10:42 +03:00
Arik Fraimovich
6775f01684 Celery: Upgrade Celery to more recent version.
This might help with worker stopping to take new tasks after some time.

Closes #1258.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
3a4754303d Change: upgrade Requests to latest version.
Closes #643.
Related #1258.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
f9824675f1 Fix: Redis memory leak.
We were appending new QueryTaskTracker ids to query_task_trackers sorted set
but we were never removing them...

Also removed the migration to create index on org_id as it created by default
by Peewee for foreign keys.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
42ae78a017 Add: support for snapshot generation service 2016-10-20 10:10:42 +03:00
Arik Fraimovich
f56cbf051c Fix: queries API was doing N+1 queries in most cases 2016-10-20 10:10:42 +03:00
Arik Fraimovich
ef80fb1d1a Change: add more logging and information for refresh schemas task 2016-10-20 10:10:42 +03:00
Arik Fraimovich
b92f22c36e Add: collect runtime metrics for Celery tasks 2016-10-20 10:10:42 +03:00
Arik Fraimovich
fde0ba1503 Add: feature toggle to control if to report query results count 2016-10-20 10:10:42 +03:00
Arik Fraimovich
c8b62755d0 Change: remove deprecated settings 2016-10-20 10:10:42 +03:00
Arik Fraimovich
7de2d6c101 Only show BigQuery GCE option when on a GCE instance 2016-10-20 10:10:42 +03:00
Arik Fraimovich
8cc4e2bee7 Add: support for loading BigQuery schema 2016-10-20 10:10:42 +03:00
Arik Fraimovich
7b0f5a195e Add: support MongoDB SSL connections 2016-10-20 10:10:42 +03:00
Arik Fraimovich
0d8ee9ced7 Change: more flexible column width calculation 2016-10-20 10:10:42 +03:00
Arik Fraimovich
838c211198 Add: additional configuration for Celery jobs 2016-10-20 10:10:42 +03:00
Arik Fraimovich
9c3baed230 Fix: BoxPlot visualization wasn't rendering on a dashboard 2016-10-20 10:10:42 +03:00
Arik Fraimovich
435b49fa9c Change: don't annotate MSSQL queries.
(I got tired of chasing weird unicode issues)
2016-10-20 10:10:42 +03:00
Arik Fraimovich
707df82b40 Add: support for date/time with seconds parameters 2016-10-20 10:10:42 +03:00
Arik Fraimovich
8116c6140f Fix: properly render checkboxes in dynamic forms 2016-10-20 10:10:42 +03:00
Arik Fraimovich
34543e67f7 Fix: support for Unicode columns name in Google Spreadsheets 2016-10-20 10:10:42 +03:00
Arik Fraimovich
afe5cae2a9 Add: API to force refresh data source schema 2016-10-20 10:10:42 +03:00
Arik Fraimovich
94a0bddb3d Typo fix in dashboard page. 2016-10-20 10:10:42 +03:00
Kazuhito Hokamura
9786063dbb Add a comment 2016-10-20 10:10:42 +03:00
Kazuhito Hokamura
025e9d2710 Limit the editing functionality to only the text 2016-10-20 10:10:42 +03:00
Arik Fraimovich
a9562d361f Change: paginate query page & add explicit urls.
- Paginate the queries API result.
- Split the API to /api/queries (all queries) and /api/queries/my which returns
  a user's queries (or drafts).
- In the interface have explicit URLs for all queries (/queries), my queries (/queries/my)
  and drafts (/queries/drafts).
2016-10-20 10:10:42 +03:00
Kazuhito Hokamura
97ad716d5a Make it possible to edit a TextBox 2016-10-20 10:10:42 +03:00
Arik Fraimovich
95367abc91 Add JQL to default enabled query runners. 2016-10-20 10:10:42 +03:00
Tsuyoshi Tatsukawa
f7af1fa82a add Content-Type to JSON response of QueryResultResource 2016-10-20 10:10:42 +03:00
Arik Fraimovich
5321948e46 Add documentation on JIRA datasource 2016-10-20 10:10:42 +03:00
Arik Fraimovich
df437999ca Add JIRA query runner 2016-10-20 10:10:42 +03:00
Arik Fraimovich
f4b87e76a3 Change: update Slack configuration titles. 2016-10-20 10:10:42 +03:00
Arik Fraimovich
f0d0d60dc1 Change: don't annotate BigQuery queries
It's not really useful anyway and breaks support for `#StandardSQL` directive.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
26bd08bb2b Add markers cluster support & cleanup/refactor code. 2016-10-20 10:10:42 +03:00
Hirotaka Suzuki
e5146c3755 Add REDASH_FEATURE_DISABLE_REFRESH_QUERIES setting 2016-10-20 10:10:42 +03:00
IllusiveMilkman
f12d47752c Update bootstrap.sh
Check for Ubuntu 16.04 before upgrading pip.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
7683402741 Move around some functions and add support for window resize event. 2016-10-20 10:10:42 +03:00
Arik Fraimovich
ba354ce65a Remove unnecessary code. 2016-10-20 10:10:42 +03:00
Arik Fraimovich
f892a3c70a Fix: use key_as_string when available. 2016-10-20 10:10:42 +03:00
IllusiveMilkman
cc1dae8eed Update bootstrap.sh
Testing script on clean install of Ubuntu Desktop 16.04.1.

pip fails if not upgraded beforehand, whether "sudo" or "sudo -s" or "sudo -sH" is run.

After this modification it works perfectly from a clean install.  Below are my steps if anyone should want to replicate or validate:
1. Clean install of Ubuntu 16.04.1 Desktop (on VM)
2. sudo apt-get -y install git
3. mkdir ~/git
4. cd ~/git
5. git clone https://github.com/getredash/redash
6. cd ~/git/redash/setup/ubuntu
7. chmod +x bootstrap.sh
8. nano bootstrap.sh
9. added "pip install --upgrade pip" to the script above the "pip install -U..." line.
10. Saved script.
11. sudo -H ./bootstrap.sh

Note that the "-H" is necessary in order to run the script successfully, otherwise you will run into pip ownership issues.
2016-10-20 10:10:42 +03:00
Arik Fraimovich
0436c3b5b7 Use smaller Plot.ly build 2016-10-20 10:10:42 +03:00
Arik Fraimovich
e810b36496 Sepcify specific version of Plotly 2016-10-20 10:10:42 +03:00
Arik Fraimovich
50ece739d9 Remove non existing cache directory. 2016-10-20 09:16:08 +03:00
Arik Fraimovich
2d2df5c9e0 Try newer version of NodeJS for builds. 2016-10-20 08:56:19 +03:00
Allen Short
d54e9125d9 Connection-test UI 2016-10-19 12:03:28 -05:00
zoetrope
78bc42e65c add environment variable name in doc 2016-10-13 10:58:00 +09:00
zoetrope
186537d849 add environment variable name in doc 2016-10-13 10:57:13 +09:00
zoetrope
a729601dff specify entityid in AuthnRequest in SAML 2016-10-13 10:19:41 +09:00
zoetrope
07af792943 use local metadata in saml 2016-10-13 10:11:37 +09:00
Arik Fraimovich
c14d119fe7 Change: update Raven version (5.27.0 had a bug) 2016-10-10 18:08:15 +03:00
Arik Fraimovich
1c4225beff Update CSS files in embed.html 2016-10-09 22:57:34 +03:00
Arik Fraimovich
53b710ee7b Change: catch all exceptions from query runners 2016-10-09 22:52:28 +03:00
Arik Fraimovich
04398ff909 *Don't* anotate MSSQL queries.. 2016-10-09 13:50:00 +03:00
Arik Fraimovich
ce77f452c7 Change: make visualization embeds more printer friendly 2016-10-09 13:23:37 +03:00
Arik Fraimovich
7a855d1e0a Revert settings screen menu to simple mode to allow extending it 2016-10-09 13:15:14 +03:00
Arik Fraimovich
0235d37005 Merge pull request #1335 from getredash/add-yaxis-scales
Add: allow changing alert email subject.
2016-10-09 10:02:19 +03:00
Arik Fraimovich
5df4e7eb78 Add: allow changing alert email subject.
Fixes #1144.
2016-10-09 09:44:34 +03:00
Arik Fraimovich
015b1dc8fd Merge pull request #1334 from getredash/add-yaxis-scales
Change: allow specifying recipient address when sending email test message
2016-10-09 09:19:08 +03:00
Arik Fraimovich
8e9e288a1d Change: allow specifying recipient address when sending email test message.
Closes #1224.
2016-10-09 09:15:47 +03:00
Arik Fraimovich
2135dfd2e5 Merge pull request #1333 from getredash/add-yaxis-scales
Add: control over y axis min/max values
2016-10-09 09:14:58 +03:00
Arik Fraimovich
08676a3d0b Fix: 0 is falsy, so need to check differently if there is value defined. 2016-10-09 09:06:33 +03:00
Arik Fraimovich
1ac3119648 Add: control over y axis min/max values 2016-10-08 23:29:30 +03:00
Arik Fraimovich
39aaa2fd94 Merge pull request #1292 from getredash/add-cluster-marker
Change: improvements to map visualization
2016-10-08 15:37:51 +03:00
Arik Fraimovich
85fe74f3db Add option to change the map tile layer 2016-10-08 15:34:20 +03:00
Arik Fraimovich
7cbf350b73 Use group color for the marker-cluster 2016-10-08 11:59:19 +03:00
Arik Fraimovich
b22191b789 Merge pull request #1332 from getredash/small
Change: upgrade Python packages
2016-10-08 11:33:16 +03:00
Arik Fraimovich
23ba98bc94 Merge pull request #1331 from getredash/small
Celery: Upgrade Celery to more recent version.
2016-10-08 11:26:23 +03:00
Arik Fraimovich
66f8922d5b Change: upgrade Python packages
- pytz
- funcy
- raven (Sentry client)
- xlsxwriter
2016-10-08 11:25:54 +03:00
Arik Fraimovich
3283116518 Merge pull request #1330 from getredash/small
Change: upgrade Requests to latest version.
2016-10-08 11:10:09 +03:00
Arik Fraimovich
2565af604e Celery: Upgrade Celery to more recent version.
This might help with worker stopping to take new tasks after some time.

Closes #1258.
2016-10-08 11:08:28 +03:00
Arik Fraimovich
0d944794e4 Merge pull request #1329 from getredash/small
Fix: Redis memory leak.
2016-10-08 11:03:56 +03:00
Arik Fraimovich
7cc22c71a1 Change: upgrade Requests to latest version.
Closes #643.
Related #1258.
2016-10-08 11:03:43 +03:00
Arik Fraimovich
4d47583a94 Fix: Redis memory leak.
We were appending new QueryTaskTracker ids to query_task_trackers sorted set
but we were never removing them...

Also removed the migration to create index on org_id as it created by default
by Peewee for foreign keys.
2016-10-08 10:59:52 +03:00
Arik Fraimovich
49e788a1aa Merge pull request #1328 from getredash/small
Add: support for snapshot generation service
2016-10-07 17:34:10 +03:00
Arik Fraimovich
7145aa2086 Merge pull request #1325 from getredash/small
Fix: queries API was doing N+1 queries in most cases
2016-10-07 00:08:07 +03:00
Arik Fraimovich
d1a3ed312a Add: support for snapshot generation service 2016-10-07 00:07:54 +03:00
Arik Fraimovich
2db4b67505 Fix: queries API was doing N+1 queries in most cases 2016-10-07 00:00:41 +03:00
Arik Fraimovich
39091e006a Merge pull request #1324 from getredash/small
Change: add more logging and information for refresh schemas task
2016-10-06 22:20:20 +03:00
Arik Fraimovich
229ca6cb52 Merge pull request #1323 from getredash/small
Add: collect runtime metrics for Celery tasks
2016-10-06 15:54:58 +03:00
Arik Fraimovich
2ac64a7d08 Change: add more logging and information for refresh schemas task 2016-10-06 15:54:46 +03:00
Arik Fraimovich
00acaa214b Add: collect runtime metrics for Celery tasks 2016-10-06 15:30:43 +03:00
Arik Fraimovich
462faea52d Merge pull request #1316 from getredash/small
Change: remove deprecated settings
2016-10-05 17:22:02 +03:00
Arik Fraimovich
d6dd95db31 Add: feature toggle to control if to report query results count 2016-10-05 17:19:25 +03:00
Arik Fraimovich
a8fa68a563 Change: remove deprecated settings 2016-10-05 17:15:46 +03:00
Arik Fraimovich
931a1f3379 Merge pull request #1315 from getredash/small
Add: support for loading BigQuery schema
2016-10-05 17:15:13 +03:00
Arik Fraimovich
0952cf8178 Only show BigQuery GCE option when on a GCE instance 2016-10-05 17:07:01 +03:00
Arik Fraimovich
0eab12880f Add: support for loading BigQuery schema 2016-10-05 16:56:59 +03:00
Arik Fraimovich
39b4f9af22 Merge pull request #1314 from getredash/small
Add: support MongoDB SSL connections
2016-10-05 16:56:55 +03:00
Arik Fraimovich
1049d46a20 Add: support MongoDB SSL connections 2016-10-05 16:54:22 +03:00
Arik Fraimovich
73e1837469 Merge pull request #1313 from getredash/small
Change: more flexible column width calculation
2016-10-05 16:53:52 +03:00
Arik Fraimovich
ca1ca9b451 Merge pull request #1312 from getredash/small
Add: additional configuration for Celery jobs
2016-10-05 16:49:32 +03:00
Arik Fraimovich
fb30a8217c Change: more flexible column width calculation 2016-10-05 16:43:45 +03:00
Arik Fraimovich
30451bc0d9 Add: additional configuration for Celery jobs 2016-10-05 16:41:41 +03:00
Arik Fraimovich
cd2e9276fb Merge pull request #1311 from getredash/small
Fix: BoxPlot visualization wasn't rendering on a dashboard
2016-10-05 16:35:10 +03:00
Arik Fraimovich
fc00e61d49 Merge pull request #1310 from getredash/small
Add: support for date/time with seconds parameters
2016-10-05 16:34:32 +03:00
Arik Fraimovich
6a973f31b3 Fix: BoxPlot visualization wasn't rendering on a dashboard 2016-10-05 16:32:53 +03:00
Arik Fraimovich
a562ce748d Merge pull request #1309 from getredash/small
Fix: properly render checkboxes in dynamic forms
2016-10-05 16:32:20 +03:00
Arik Fraimovich
4462afc670 Change: don't annotate MSSQL queries.
(I got tired of chasing weird unicode issues)
2016-10-05 16:31:23 +03:00
Arik Fraimovich
ad5e4f46d6 Add: support for date/time with seconds parameters 2016-10-05 16:27:39 +03:00
Arik Fraimovich
d48192cb0f Merge pull request #1308 from getredash/small
Fix: support for Unicode columns name in Google Spreadsheets
2016-10-05 16:26:05 +03:00
Arik Fraimovich
1e85caa6c1 Fix: properly render checkboxes in dynamic forms 2016-10-05 16:25:34 +03:00
Arik Fraimovich
649e0bc53f Fix: support for Unicode columns name in Google Spreadsheets 2016-10-05 16:23:07 +03:00
Arik Fraimovich
d72a19894a Merge pull request #1307 from getredash/small
Add: API to force refresh data source schema
2016-10-05 16:20:45 +03:00
Arik Fraimovich
11a2b55c08 Add: API to force refresh data source schema 2016-10-05 16:17:48 +03:00
Arik Fraimovich
9cd9958827 Typo fix in dashboard page. 2016-10-05 16:14:19 +03:00
Arik Fraimovich
beb89ec657 Merge pull request #1305 from hokaccha/edit-text-box
Add: UI to edit dashboard text box widget
2016-10-05 16:12:47 +03:00
Kazuhito Hokamura
eb47d88b33 Add a comment 2016-10-05 22:08:23 +09:00
Kazuhito Hokamura
0530b5fe1e Limit the editing functionality to only the text 2016-10-05 22:03:39 +09:00
Arik Fraimovich
e8eb840d32 Merge pull request #1279 from IllusiveMilkman/patch-2
Change: update bootstrap.sh to support Ubuntu 16.04
2016-10-05 14:47:35 +03:00
Arik Fraimovich
8cf0252b07 Merge pull request #1262 from getredash/plotly_upgrade
Change: upgrade Plot.ly version and switch to smaller build
2016-10-05 14:45:26 +03:00
Arik Fraimovich
0b79fb833e Merge pull request #1306 from getredash/pagination
Change: paginate queries page & add explicit urls.
2016-10-05 14:44:01 +03:00
Arik Fraimovich
5096e4ed79 Change: paginate query page & add explicit urls.
- Paginate the queries API result.
- Split the API to /api/queries (all queries) and /api/queries/my which returns
  a user's queries (or drafts).
- In the interface have explicit URLs for all queries (/queries), my queries (/queries/my)
  and drafts (/queries/drafts).
2016-10-05 14:14:26 +03:00
Kazuhito Hokamura
83ffd915c8 Make it possible to edit a TextBox 2016-10-04 22:31:28 +09:00
Arik Fraimovich
e8582ec100 Add JQL to default enabled query runners. 2016-09-28 09:43:47 +03:00
Allen Short
6829192854 Connection-test queries 2016-09-27 18:57:47 -05:00
Arik Fraimovich
41f99f54cf Merge pull request #1299 from tatsukawa/json-contenttype
Change: send Content-Type header (application/json) in query results responses
2016-09-27 10:50:44 +03:00
Tsuyoshi Tatsukawa
3b6017495e add Content-Type to JSON response of QueryResultResource 2016-09-27 15:14:32 +09:00
Arik Fraimovich
808fdd4507 Merge pull request #1298 from getredash/add_jql
Add: JIRA (JQL) query runner
2016-09-26 17:08:39 +03:00
Arik Fraimovich
aefd2fde0a Add documentation on JIRA datasource 2016-09-26 17:03:12 +03:00
Arik Fraimovich
af56f59255 Add JIRA query runner 2016-09-26 16:48:53 +03:00
Arik Fraimovich
dfb1a204e2 Merge pull request #1297 from getredash/arikfr-patch-1
Change: update Slack configuration titles.
2016-09-26 13:34:19 +03:00
Arik Fraimovich
b711e5c4a2 Change: update Slack configuration titles. 2016-09-26 11:04:48 +03:00
Arik Fraimovich
8c1056cc4f Merge pull request #1294 from getredash/arikfr-patch-1
Change: don't annotate BigQuery queries
2016-09-26 10:15:04 +03:00
Arik Fraimovich
9d6b3f14a5 Change: don't annotate BigQuery queries
It's not really useful anyway and breaks support for `#StandardSQL` directive.
2016-09-23 18:13:42 +03:00
Arik Fraimovich
03217dd7ea Add markers cluster support & cleanup/refactor code. 2016-09-22 23:08:32 +03:00
Arik Fraimovich
ff9e844204 Merge pull request #1280 from hirotaka-s/feature/disable_refresh_queries_setting
Add: configuration flag to disable scheduled queries
2016-09-20 12:41:24 +03:00
Hirotaka Suzuki
01eb099c3d Add REDASH_FEATURE_DISABLE_REFRESH_QUERIES setting 2016-09-20 17:56:18 +09:00
IllusiveMilkman
2b25f2e80a Update bootstrap.sh
Check for Ubuntu 16.04 before upgrading pip.
2016-09-19 20:35:35 +02:00
Arik Fraimovich
6d686f03a3 Move around some functions and add support for window resize event. 2016-09-18 15:34:08 +03:00
Arik Fraimovich
de222429a1 Remove unnecessary code. 2016-09-18 15:23:29 +03:00
Arik Fraimovich
a3cf92ecf6 Merge pull request #1289 from getredash/es_parser
Change: use key_as_string when available (ElasticSearch query runner)
2016-09-18 08:49:05 +03:00
Arik Fraimovich
37b40164ab Fix: use key_as_string when available. 2016-09-17 16:50:54 +03:00
Arik Fraimovich
e155191c93 Merge pull request #1285 from falling-down/oracle-metadata
Change: do not display Oracle tablespace name in schema browser
2016-09-14 22:24:11 +03:00
Matthew Carter
b20b263ed1 Do not display Oracle tablespace name in schema browser
Does not make sense to list tablespace name to end user. 
Also include all tables visible to user for querying not just owned by user.
Do not list known system tables in schema browser.
2016-09-12 12:47:00 -04:00
Matthew Carter
8cfbf8b8bb Merge pull request #1 from getredash/master
update master from upstream
2016-09-12 11:57:50 -04:00
Arik Fraimovich
e42f93fcce Merge pull request #1283 from getredash/fix/gs_dup_columns
Fix: schema browser was unstable after opening a table
2016-09-11 15:29:35 +03:00
Arik Fraimovich
b9d1e43a8e Fix: schema browser was unstable after opening a table (closes #1261) 2016-09-11 15:26:48 +03:00
Arik Fraimovich
6cbc39cbe2 Merge pull request #1282 from getredash/fix/gs_dup_columns
Change: deduplicate Google Spreadsheet columns
2016-09-11 10:10:51 +03:00
Arik Fraimovich
09a848f524 Change: deduplicate Google Spreadsheet columns 2016-09-11 09:41:15 +03:00
Arik Fraimovich
21a9b4b03e Fix: in multi-org setup login after logout is broken 2016-09-08 15:26:56 +03:00
IllusiveMilkman
d9623faf8c Update bootstrap.sh
Testing script on clean install of Ubuntu Desktop 16.04.1.

pip fails if not upgraded beforehand, whether "sudo" or "sudo -s" or "sudo -sH" is run.

After this modification it works perfectly from a clean install.  Below are my steps if anyone should want to replicate or validate:
1. Clean install of Ubuntu 16.04.1 Desktop (on VM)
2. sudo apt-get -y install git
3. mkdir ~/git
4. cd ~/git
5. git clone https://github.com/getredash/redash
6. cd ~/git/redash/setup/ubuntu
7. chmod +x bootstrap.sh
8. nano bootstrap.sh
9. added "pip install --upgrade pip" to the script above the "pip install -U..." line.
10. Saved script.
11. sudo -H ./bootstrap.sh

Note that the "-H" is necessary in order to run the script successfully, otherwise you will run into pip ownership issues.
2016-09-08 10:28:11 +02:00
Arik Fraimovich
ef4699aca7 Merge pull request #1269 from kurtgooden/big_query_drive
Add: Google Drive federated tables support in BigQuery query runner
2016-09-07 17:55:44 +03:00
Kurt Gooden
43075f741d Reverted GCE change 2016-09-07 06:16:06 -04:00
Kurt Gooden
ddd91e37db Merge remote-tracking branch 'getredash/master' into big_query_drive 2016-09-07 06:13:48 -04:00
Arik Fraimovich
4caf2e309d Merge pull request #1277 from getredash/arikfr-patch-1
Set specific version of cryptography lib
2016-09-07 08:48:04 +03:00
Arik Fraimovich
0eb5a7d203 Set specific version of cryptography
This to avoid incompatibility with `oauth2client`.
2016-09-07 08:45:40 +03:00
Arik Fraimovich
170bd65237 Merge pull request #1272 from ariarijp/fix-treasuredata-query-runner
Fix: TreasureData get_schema method was returning array instead of string as column name
2016-09-06 08:28:00 +03:00
ariarijp
2739f04f1e Fix get_schema method 2016-09-03 22:02:16 +09:00
Kurt Gooden
4a8a67f6f4 Add Google Drive scope to Big Query
To access federated tables based off Google Drive files, an additional
scope is needed during OAuth.
2016-08-31 23:05:44 -04:00
Arik Fraimovich
4710c4193e Merge pull request #1265 from getredash/fix/dashboard_refresh
Fix: refresh modal not working for unsaved query
2016-08-30 18:32:55 +03:00
Arik Fraimovich
2e5ec26be9 Mention how to restart the services after mail configuration update. 2016-08-30 18:11:05 +03:00
Arik Fraimovich
cfbb466f92 Fix #1263: refresh modal not working for unsaved query 2016-08-30 18:04:58 +03:00
Arik Fraimovich
bc3a5ab04c Merge pull request #1264 from getredash/fix/dashboard_refresh
Fix: dashboard refresh not working
2016-08-30 17:57:56 +03:00
Arik Fraimovich
db4aec22f6 Fix #1184: dashboard refresh not working. 2016-08-30 17:55:10 +03:00
Arik Fraimovich
d22f0d44b6 Merge pull request #1216 from atsaki/noniteractive-upgrade
Change: bootstrap.sh - use non interactive dist-upgrade
2016-08-29 19:13:49 +03:00
Arik Fraimovich
03837c0659 Merge pull request #1242 from ereli/patch-1
Docs: add warning re. quotes on column names and BigQuery
2016-08-29 19:12:19 +03:00
Arik Fraimovich
2eeb94765d Merge pull request #1236 from yershalom/master
Add: query runner for Cassandra and ScyllaDB
2016-08-29 13:26:22 +03:00
Arik Fraimovich
9fef335315 Use smaller Plot.ly build 2016-08-28 23:29:58 +03:00
Arik Fraimovich
17726dbcb9 Sepcify specific version of Plotly 2016-08-28 23:29:45 +03:00
Arik Fraimovich
10b398e8e6 Merge pull request #1249 from mystelynx/override-slack-params
Add: override slack webhook parameters
2016-08-28 22:34:01 +03:00
Arik Fraimovich
2b5e34099f Merge pull request #1252 from rohanpd/get-presto-schema
Add: Schema loading support for Presto query runner (using information_schema)
2016-08-27 15:07:07 +03:00
Arik Fraimovich
e05a63db9a Update recommended instance size. 2016-08-27 14:58:33 +03:00
Arik Fraimovich
9a980759d3 Merge pull request #1255 from vishesh92/add-influxdb-documentation
Docs: add documentation for InfluxDB
2016-08-26 22:27:39 +03:00
vishesh92
8ce02d3003 Add documentation for influxdb 2016-08-25 12:39:35 +05:30
Arik Fraimovich
6202d0963d Merge pull request #1240 from easytaxibr/bugfix/public_dashboard_not_found
Fix: when shared dashboard token not found, return 404
2016-08-25 00:08:44 +03:00
syerushalmy
d41b84eb2e Fixed syntax error at _get_tables 2016-08-24 10:19:20 +03:00
Wesley Batista
e7d6ac07c9 Catch the error and respond with 404 2016-08-23 17:51:40 -03:00
Arik Fraimovich
ba30577601 Rename 0025_add_notification_destination.py to 0025_add_query_snippets_table.py 2016-08-23 23:06:36 +03:00
syerushalmy
7cce9d5d6e Added Auth importer for cassandra 2016-08-23 20:04:17 +03:00
syerushalmy
b308e0275c Removed cursor.close() from hive_ds because its not needed 2016-08-23 16:55:55 +03:00
Rohan Dhupelia
0319acc7ca add the ability to load the schema for the presto query runner 2016-08-23 21:32:12 +10:00
Arik Fraimovich
93aac14c87 Merge pull request #1251 from getredash/feature/snippets
Fix: autocomplete went crazy when database has no autocomplete.
2016-08-23 08:51:08 +03:00
Arik Fraimovich
ca6ee5e04f Fix: autocomplete went crazy when database has no autocomplete. 2016-08-23 01:43:29 +03:00
Arik Fraimovich
2aaf5dd2f0 Merge pull request #1250 from getredash/feature/snippets
Add: query snippets feature
2016-08-23 01:35:46 +03:00
Arik Fraimovich
10f5ecdb00 Add: query snippets feature 2016-08-22 23:58:00 +03:00
mystelynx
6ba76debf0 override webhook params 2016-08-22 11:12:46 +09:00
Arik Fraimovich
b8eca28e20 Merge pull request #1246 from getredash/large-schema
Fix: support large schemas in schema browser
2016-08-19 23:41:10 +03:00
Arik Fraimovich
490928d474 Fix: support large schemas in schema browser 2016-08-19 23:38:38 +03:00
Arik Fraimovich
19530f4132 Merge pull request #1245 from getredash/feature/ace
Change: switch from CodeMirror to Ace editor
2016-08-19 23:24:45 +03:00
Arik Fraimovich
2e1dce5961 Switch from CodeMirror to Ace editor 2016-08-19 23:15:34 +03:00
Cassio A. Moreto
d5b374c540 Create proxy_pass.rst
Add docpage of proxy pass configuration.
2016-08-19 15:56:34 -03:00
Ereli
94ce4b7b6e adding warning not to use quotes on column names
Bigquery  doesn't work with "Action__filter" as it doesn't support quoted field names.
2016-08-19 13:58:48 +01:00
Wesley Batista
dfb7cc1934 Catch the error and respond with 404 2016-08-18 12:27:18 -03:00
syerushalmy
37271c746c Switched to fetch_columns instead of messy code 2016-08-17 10:59:09 +03:00
syerushalmy
986dc686bb Removed unnessecery exception throw 2016-08-17 10:42:20 +03:00
syerushalmy
bd5039ad95 Fixed little syntax error 2016-08-16 16:04:21 +03:00
syerushalmy
37873196ec Fixed some syntax 2016-08-16 15:59:51 +03:00
syerushalmy
87d77d4d27 Added cassandra-driver to requirements_all_ds.txt file 2016-08-16 14:12:35 +03:00
syerushalmy
eee2e7c833 Added new DS for Cassandra and ScyllaDB 2016-08-16 14:10:50 +03:00
Arik Fraimovich
dfb92dbb4e Merge pull request #1234 from getredash/arikfr-patch-1
Change: MongoDB query runner set DB name as mandatory
2016-08-11 15:40:15 +03:00
Arik Fraimovich
5baf72a01e Change: MongoDB query runner set DB name as mandatory 2016-08-11 15:36:46 +03:00
Arik Fraimovich
b78100355c Merge pull request #1223 from toyama0919/master
Fix: Alert: when hipchat Alert.name is multibyte character, occur error.
2016-08-10 17:04:00 +03:00
Arik Fraimovich
b750843865 Merge pull request #1230 from kataring/presto-annotate_query-true
Change: annotate Presto queries with metadata
2016-08-10 17:03:31 +03:00
Arik Fraimovich
a69ee0cfe9 Merge pull request #1225 from hokaccha/fix-document
Fix: RST formatting of the Vagrant documentation
2016-08-10 16:43:47 +03:00
Arik Fraimovich
0b928e6a9b Merge pull request #1227 from hokaccha/fix-provisioning-script
Fix: Bower install fails in vagrant
2016-08-10 16:40:51 +03:00
Arik Fraimovich
a411af2512 Merge pull request #1232 from hokaccha/fix-confirm-dialog
Fix: don't show warning when query string (parameters value) changes
2016-08-10 15:53:44 +03:00
Kazuhito Hokamura
7843d2ee84 Fix: don't show warning when query string (parameters value) changes 2016-08-10 21:43:05 +09:00
Noriaki Katayama
1d693ad220 annotate_query to True 2016-08-09 19:12:49 +09:00
toyama0919
88d61e8faa apply reviews arikfr. string to unicode. 2016-08-09 19:01:13 +09:00
Kazuhito Hokamura
058b6bc37c Fix failing bower install 2016-08-06 22:21:00 +09:00
Arik Fraimovich
8d8af7386c Merge pull request #1226 from getredash/feature/sankey
Add: Sankey visualization
2016-08-05 23:00:42 +03:00
Arik Fraimovich
91ca74b46c Add: Sankey visualization 2016-08-05 22:32:20 +03:00
Kazuhito Hokamura
1e186d10a8 Fix RST formatting 2016-08-06 01:36:06 +09:00
Arik Fraimovich
14dea68e25 Update screenshots. 2016-08-04 08:30:39 +03:00
Arik Fraimovich
12896ed039 Update screenshots. 2016-08-04 08:30:04 +03:00
Arik Fraimovich
549fe8a465 Add ap-northeast-2 AMI (closes #1135) 2016-08-03 17:27:47 +03:00
Arik Fraimovich
eafe0dbe34 Update AWS images 2016-08-03 17:25:10 +03:00
Arik Fraimovich
7598048317 Update bootstrap.sh:
- Update version to 0.11.1.
- Move all apt commands to the beginning of the script and add the missing ones (lib-sasl).
- Fix the Redash Metadata data source creation command.
2016-08-03 16:52:45 +03:00
Arik Fraimovich
17fa957a91 Update Packer configuration to remove SSH keys to comply with AWS marketplace 2016-08-03 16:52:06 +03:00
toyama0919
ae3af64c09 Fix: Alert: when hipchat Alert.name is multibyte character, occur error. 2016-08-03 09:56:54 +09:00
Arik Fraimovich
a02eddabb5 Merge pull request #1222 from getredash/feature/sunburst_visualization
Add: additional results format for sunburst visualization
2016-07-31 23:10:18 +03:00
Arik Fraimovich
ca7d8699c8 Add additional results format for sunburst 2016-07-31 23:05:00 +03:00
Arik Fraimovich
3dbb5a6bfc Merge pull request #1221 from getredash/feature/sunburst_visualization
Fix: sunburst didn't handle all cases of path lengths
2016-07-31 15:48:01 +03:00
Arik Fraimovich
50419f3d8c Fix: sunburst didn't handle all cases of path lengths 2016-07-31 15:46:00 +03:00
Arik Fraimovich
0e70188cb4 Merge pull request #1213 from getredash/feature/sunburst_visualization
Add: new sunburst sequence visualization
2016-07-31 10:55:53 +03:00
Arik Fraimovich
77ce9b1d58 Add help paragraph on data shape 2016-07-31 10:53:00 +03:00
Arik Fraimovich
20206048af Redraw sunburst on window resize or options change 2016-07-31 10:48:52 +03:00
Arik Fraimovich
a7cc1eee5f Merge pull request #1218 from getredash/arikfr-patch-1
Fix: updated result not being saved when changing query text.
2016-07-28 15:30:16 +03:00
Arik Fraimovich
295ca92e44 Simplify the code. 2016-07-28 15:30:05 +03:00
Arik Fraimovich
1995fe4258 Fix: updated result not being saved when changing query text. 2016-07-28 15:26:00 +03:00
Arik Fraimovich
5b20fe21aa Merge pull request #1217 from atsaki/install-libffi-dev
Change: install libffi-dev for Cryptography (Ubuntu setup script)
2016-07-28 11:32:55 +03:00
Atsushi Sasaki
738cd1d69d non interactive dist-upgrade 2016-07-28 15:24:13 +09:00
Atsushi Sasaki
57651f177b install libffi-dev for cryptography 2016-07-28 15:23:12 +09:00
Arik Fraimovich
061783313a Merge pull request #1215 from getredash/fix/alert_email
Fix: email alerts not working
2016-07-27 16:54:02 +03:00
Arik Fraimovich
218937b175 Skip email sending if there are no recipients 2016-07-27 16:48:17 +03:00
Arik Fraimovich
c43357cc77 Fix #1212: email alerts not being sent 2016-07-27 16:47:16 +03:00
Arik Fraimovich
42e7a41fcc Typo fix. 2016-07-27 16:21:15 +03:00
Arik Fraimovich
52cbb42aaf Implement the visualization rendering logic 2016-07-26 18:06:54 +03:00
Arik Fraimovich
767fc3644a Base skeleton for the new visualization 2016-07-25 11:27:39 +03:00
Arik Fraimovich
9a6d2d7c62 Merge pull request #1204 from falling-down/vertica-metadata
Add: show views in schema browser for Vertica data sources
2016-07-25 10:43:16 +03:00
Arik Fraimovich
a9fac34560 Merge pull request #1206 from kitsuyui/update-pymssql-version
Change: update pymssql version to 2.1.3
2016-07-25 10:42:25 +03:00
kitsuyui
6a9467451a Update pymssql version. (is needed for tds_version keyword argument)
- https://github.com/pymssql/pymssql/releases/tag/v2.1.3
2016-07-25 12:15:31 +09:00
Matthew Carter
56ffec1be7 view metadata missing from Vertica 2016-07-24 15:31:11 -04:00
Arik Fraimovich
5d43cbe67f Merge pull request #1198 from mystelynx/add/bigquery-config-sql-type
Change: add support for Standard SQL in BigQuery query runner
2016-07-24 11:45:09 +03:00
mystelynx
e0e5dd3dd8 fix key name and title 2016-07-21 21:56:57 +09:00
mystelynx
2dac682e8e specify to use standard sql or not 2016-07-21 21:44:16 +09:00
mystelynx
f524dda88b add bigquery configuration to use legacy/standard sql 2016-07-21 21:13:48 +09:00
Arik Fraimovich
84d0c2294c Merge pull request #1193 from ken880guchi/modify-ken880guchi-patch-1
Change: modify the argument order of moment.add function call
2016-07-20 15:49:09 +03:00
Arik Fraimovich
e0485dec56 Merge pull request #1195 from AntoineAugusti/patch-2
Docs: fix typo in maintenance page title
2016-07-20 11:17:07 +03:00
Antoine Augusti
fb523725f6 Typo 2016-07-20 10:12:51 +02:00
Kenya Yamaguchi
1dd736d9b5 Modify the argument order of moment.add function 2016-07-20 01:19:21 +09:00
Arik Fraimovich
600afa5c82 Merge pull request #1138 from smartcanvas/feature/bigquery_udf
Add: ability to register user defined function (UDF) resources for BigQuery DataSource/Query
2016-07-15 19:17:45 +03:00
Arik Fraimovich
78f65b145a Merge pull request #1187 from getredash/arikfr-patch-3
Fix: read only users receive the permission error modal in query view
2016-07-14 22:05:57 +03:00
Arik Fraimovich
ea28e71170 Fix: read only users receive the permission error modal in query view
Closes #1153.
2016-07-14 22:03:34 +03:00
Arik Fraimovich
9193fed393 Mention Extended JSON support in MongoDB docs. 2016-07-12 09:35:44 +03:00
Arik Fraimovich
57ee9fd18b Fix formatting. 2016-07-12 09:31:52 +03:00
Arik Fraimovich
3f1d48b1f2 Update restart documentation. 2016-07-12 09:27:23 +03:00
Arik Fraimovich
7844b908de Merge pull request #1104 from kitsuyui/fix/unicode-error-with-sql-server
Fix #1101: MSSQL Query runner: query execution fails if user name has unicode characters
2016-07-11 18:17:30 +03:00
Arik Fraimovich
28ffff8930 Update Query Result Format page. 2016-07-11 16:19:55 +03:00
Arik Fraimovich
21283e2e83 Merge pull request #1181 from getredash/fix/gs
Fix: Excel file generation fails when row missing column value.
2016-07-11 11:54:25 +03:00
Arik Fraimovich
d4bfbc2c57 Fix: Excel file generation fails when row missing column value. 2016-07-11 11:51:55 +03:00
Arik Fraimovich
49d8a99bc4 Merge pull request #1176 from someones/org_groups_list
Add: 'list' command for org and groups CLI
2016-07-11 10:55:55 +03:00
Arik Fraimovich
dae2907ca3 Merge pull request #1177 from someones/users_list_fix
Fix: users list CLI command was broken
2016-07-11 10:54:50 +03:00
Arik Fraimovich
dd45fe04ee Merge pull request #1179 from kitsuyui/fix/not-shown-left-pane
Fix: schema not loading when table name has unicode characters
2016-07-11 10:54:11 +03:00
kitsuyui
74021c2d5a Fix: #1178 Left Pane is not shown when database contains table that name has unicode characters (MSSQL)
- Update table_name to be unicode (not str).
2016-07-11 16:46:17 +09:00
Adam Griffiths
87d7d9cb5d Fix a copy paste error that broke list command 2016-07-11 17:05:09 +10:00
Adam Griffiths
697e377bec Add 'manage.py groups list' command
'groups list' simply prints out groups.
--org option is provided, limits printing to groups of
the specified organization.
--org accepts organization slugs.
2016-07-11 16:57:07 +10:00
Adam Griffiths
99906c1d0d Add 'manage.py org list' command
'org list' simply prints out the organizations.
2016-07-11 16:52:17 +10:00
Arik Fraimovich
b1937aaab2 Merge pull request #1173 from smartcanvas/fix/cursor-pointer-for-table-headers
Add: add cursor:pointer to SmartTable headers to indicate it's clickable
2016-07-06 15:58:12 +03:00
fabito
cd449183bf add cursor:pointer to smart table headers 2016-07-06 09:10:01 -03:00
Arik Fraimovich
dd0d29467e Merge pull request #1159 from shyamgopal/patch-1
Docs: update mention the option of querying Google Spreadsheet with Google BigQuery
2016-07-06 09:20:02 +03:00
Arik Fraimovich
ff49d25963 Merge pull request #1170 from easytaxibr/fix/docker_create_database
Fix: change parameters for 'manage.py ds new' CLI
2016-07-06 09:17:52 +03:00
ShyamK
5a1f4d9144 Update datasources.rst 2016-07-06 09:59:11 +05:30
kitsuyui
679e44c874 Add charset to configuration. 2016-07-06 11:40:39 +09:00
kitsuyui
eaf127da71 Merge remote-tracking branch 'upstream/master' into fix/unicode-error-with-sql-server 2016-07-06 11:35:20 +09:00
Wesley Batista
628122053b Fix: change parameters for 'manage.py ds new' 2016-07-05 20:36:38 -03:00
Arik Fraimovich
8a5a71421d Merge pull request #1168 from getredash/fix/gs
Fix: improve Google Spreadsheets parsing
2016-07-05 21:50:45 +03:00
Arik Fraimovich
906365f011 Merge pull request #967 from lloydw/master
Add: extend ElasticSearch query_runner to support aggregations
2016-07-05 21:40:33 +03:00
Arik Fraimovich
bab1029c9d Merge pull request #1151 from masaedw/azuredb
Change: ability to set pymssql TDS version (to support Azure Database) #backward-incompatible
2016-07-05 21:30:06 +03:00
Arik Fraimovich
d263688da4 Merge pull request #1147 from someones/celery-worker-count
Control celery worker count with environment variables, defaults to 2
2016-07-05 13:46:51 +03:00
Adam Griffiths
7d10edd32c Replace -c2 in Procfile.heroku with env variable
Replace -c2 in Procfile.heroku with
-c${REDASH_HEROKU_CELERY_WORKER_COUNT:-2}. This reads from the
environment variable REDASH_HEROKU_CELERY_WORKER_COUNT and
uses the value of that if set, otherwise defaults to 2.
Add REDASH_HEROKU_CELERY_WORKER_COUNT to the settings page.
2016-07-05 11:16:45 +10:00
Arik Fraimovich
a34357d222 Move dateutil import higher 2016-07-04 22:34:13 +03:00
Arik Fraimovich
95fa6849b3 More robust parsing of worksheets with handling:
- handle the case of empty worksheet.
- handle the case of worksheet with no data.
2016-07-04 22:25:10 +03:00
Arik Fraimovich
4496a004e8 Meaningful message for not found spreadsheet 2016-07-04 22:21:05 +03:00
Arik Fraimovich
6905340c2d Google Spreadsheets: Add support for unicode 2016-07-04 18:31:42 +03:00
Arik Fraimovich
3ec113e8d0 Bump version. 2016-07-03 15:22:15 +03:00
ShyamK
bb2574ef0b Update datasources.rst for a new way using Google Spreadsheet. 2016-06-27 15:18:06 +05:30
Masayuki Muto
cfbffe0cce Specify tds_version 2016-06-22 16:34:34 +09:00
Masayuki Muto
991fe618b7 Update pymssql version to connect Azure Database 2016-06-22 16:19:38 +09:00
Masayuki Muto
0538fe401b Fix typo 2016-06-22 16:18:42 +09:00
fabito
58a9bedb64 add documentation for UDF Source URIs 2016-06-17 09:50:03 -03:00
fabito
ec50cf97a9 Add new optional property "UDF Source URIs" to BigQuery datasource so that users can reuse UDFs amongs queries 2016-06-17 02:02:48 -03:00
kitsuyui
91e99c42cd Fix #1101: Query execution fails if user name has unicode characters
- Encode the query with connection's charset when its type is unicode(not str).
2016-06-09 12:08:58 +09:00
Lloyd Weehuizen
3f208c03fd Add missing type parameter to collect_value call 2016-05-27 10:23:16 +12:00
Lloyd Weehuizen
203cf6e28b Style updates 2016-05-02 10:18:11 +12:00
Lloyd Weehuizen
c850acb3b9 Extend ElasticSearch query_runner to support aggregations 2016-04-01 14:06:54 +13:00
545 changed files with 22814 additions and 15581 deletions

View File

@@ -1,3 +0,0 @@
{
"directory": "rd_ui/app/bower_components"
}

22
.codeclimate.yml Normal file
View File

@@ -0,0 +1,22 @@
engines:
pep8:
enabled: true
eslint:
enabled: true
channel: "eslint-3"
config:
config: client/.eslintrc.js
checks:
import/no-unresolved:
enabled: false
ratings:
paths:
- "redash/**/*.py"
- "client/**/*.js"
exclude_paths:
- tests/**/*.py
- migrations/**/*.py
- old_migrations/**/*.py
- setup/**/*
- bin/**/*

View File

@@ -1,4 +1,4 @@
rd_ui/.tmp/
rd_ui/node_modules/
client/.tmp/
node_modules/
.tmp/
.git/
.vagrant/

14
.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.py]
indent_style = space
indent_size = 4
[*.{js,css,html}]
indent_style = space
indent_size = 2

View File

@@ -1,5 +0,0 @@
REDASH_STATIC_ASSETS_PATH="../rd_ui/app/"
REDASH_LOG_LEVEL="INFO"
REDASH_REDIS_URL=redis://localhost:6379/1
REDASH_DATABASE_URL="postgresql://redash"
REDASH_COOKIE_SECRET=veryverysecret

7
.gitignore vendored
View File

@@ -2,7 +2,7 @@
.idea
*.pyc
.coverage
rd_ui/dist
client/dist
.DS_Store
celerybeat-schedule*
.#*
@@ -20,10 +20,7 @@ venv
dump.rdb
# Docker related
docker-compose.yml
node_modules
.tmp
.sass-cache
rd_ui/app/bower_components
npm-debug.log

View File

@@ -1,2 +0,0 @@
ignore-paths:
- migrations

365
CHANGELOG.md Normal file
View File

@@ -0,0 +1,365 @@
# Change Log
## v1.0.1 - 2017-04-02
### Added
- Add: bubble charts support.
- Add "Refresh Schema" button to the datasource @44px
- [Data Sources] Add: ATSD query runner @rmakulov
- [Data Sources] Add: SalesForce query runner @msnider
- Add: scheduled query backoff in case of errors @washort
- Add: use results row count as the value for the counter visualization. @deecay
### Changed
- Moved CSV/Excel query results generation code to models. @akiray03
- Add support for filtered data in Pivot table visualization @deecay
- Friendlier labels for archived state of dashboard/query
### Fixed
- Fix: optimize queries to avoid N+1 queries.
- Fix: percent stacking math was wrong. @spasovski
- Fix: set query filter to match value from URL query string. @benmargo
- [Clickhouse] Fix: detection of various data types. @denisov-vlad
- Fix: user can't edit their own alert.
- Fix: angular minification issue in textbox editor and schema browser.
- Fixes to better support IE11 (add polyfill for Object.assign and show vertical scrollbar). @deecay
- Fix: datetime parameters were not using a date picker.
- Fix: Impala schema wasn't loading.
- Fix: query embed dialog close button wasn't working @r0fls
- Fix: make errors from Presto runner JSON-serializable @washort
- Fix: race condition in query task status reporting @washort
- Fix: remove $$hashKey from Pivot table
- Fix: map visualization had severe performance issue.
- Fix: pemrission dialog wasn't rendering.
- Fix: word cloud visualization didn't show column names.
- Fix: wrong timestamps in admin tasks page.
- Fix: page header wasn't updating on dashboards page @MichaelJAndy
- Fix: keyboard shortcuts didn't work in parameter inputs
## v1.0.0-rc.2 - 2017-02-22
### Changed
- [#1563](https://github.com/getredash/redash/pull/1563) Send events to webhook as JSON with a schema.
- [#1601] [Presto] friendlier error messages. (@aslotnick)
- Move the query runner unavailable log message to be DEBUG level instead of WARNING, as it was mainly confusing people.
- Remove "Send to Cloud" button from Plotly based visualizations.
- Change Plotly's default hover mode to "Compare".
- [#1612] Change: Improvements to the dashboards list page.
### Fixed
- [#1564] Fix: map visualization column picker wasn't populated. (@janusd)
- [#1597] [SQL Server] Fix: schema wasn't loading on case sensitive servers. (@deecay)
- Fix: dashbonard owner couldn't edit his dashboard.
- Fix: toggle_publish event wasn't logged properly.
- Fix: events with API keys were not logged.
- Fix: share dashboard dialog was broken after code minification.
- Fix: public dashboard endpoint was broken.
- Fix: public dashboard page was broken after code minification.
- Fix: visualization embed page was broken after code minification.
- Fix: schema browser has dark background.
- Fix: Google button missing on invite page.
- Fix: global parameters don't render on dashboards with text boxes.
- Fix: sunburst / Sankey visualizations have bad data.
- Fix: extra whitespace created by the filters component.
- Fix: query results cleanup task was trying to delete query objects.
- Fix: alert subscriptions were not triggered.
- [DynamoDB] Fix: count(*) queries were broken. (@kopanitsa)
- Fix: Redash is using too many database connections.
- Fix: download links were not working in dashboards.
- Fix: the first selection in multi filters was broken in dashboards.
### Other
- [#1555] Change sourcemaps to generate a sourcemap per module. (@44px)
- [#1570] Fix Docker Compose configuration for nginx. (@btmc)
- [#1582] Update Dockerfile to build frontend assets and update the folder ownership.
- Dockerfile: change the uid of the redash user to match host user uid.
- Update npm-shrinkwrap.json file to use http proctocol instead of git. (@deecay)
## v1.0.0-rc.1 - 2017-01-31
This version has two big changes behind the scenes:
* Refactor the frontend to use latest (at the time) Angular version (1.5) along with better frontend pipeline based on
WebPack.
* Refactor the backend code to use SQLAlchemy and Alembic, for easier migrations/upgrades.
Along with that we have many fixes, additions, new data sources (Google Analytics, ClickHouse, Amazon Athena, Snowflake)
and fixes to the existing ones (mainly ElasticSearch and Cassandra).
When upgrading make sure to upgrade from version 0.12.0 and update your .env file:
1. If you have local PostreSQL database, you will need to update the URL from `postgresql://redash` to `postgresql:///redash`.
2. Remove the `REDASH_STATIC_ASSETS_PATH` definition.
Make sure to make these changes before running upgrade as otherwise it will fail.
We're releasing a new upgrade script -- see [here](https://redash.io/help-onpremise/maintenance/how-to-upgrade-redash.html) for details.
### Added
- [#1546](https://github.com/getredash/redash/pull/1546) Add: API docstrings (@washort)
- [#1504](https://github.com/getredash/redash/pull/1504) Add: global parameters for dashboards (Tyler Rockwood)
- [#1508](https://github.com/getredash/redash/pull/1508) [Jira JQL] Add: support custom JIRA fields and enhance value mapping (@sseifert)
- [#1530](https://github.com/getredash/redash/pull/1530) Add: Docker based developer workflow (Arik Fraimovich)
- [#1515](https://github.com/getredash/redash/pull/1515) [Python] Add: get_source_schema method (Vladislav Denisov)
- [#1512](https://github.com/getredash/redash/pull/1512) [Python] Add: define more safe_builtins (Vladislav Denisov)
- [#1513](https://github.com/getredash/redash/pull/1513) Add: get_by_id & get_by_name methods for Query and DataSource classes (Vladislav Denisov)
- [#1482](https://github.com/getredash/redash/pull/1482) [Cassandra] Add: schema browser support & explicit protocol version (@yershalom)
- [#1488](https://github.com/getredash/redash/pull/1488) [Data Sources] Add: Snowflake query runner (@arikfr)
- [#1479](https://github.com/getredash/redash/pull/1479) [ElasticSearch] Add: enable schema browser (@adamlwgriffiths)
- [#1475](https://github.com/getredash/redash/pull/1475) [Cassnadra] Added set_keyspace for easier query cassandra (@yershalom)
- [#1468](https://github.com/getredash/redash/pull/1468) [Datasources] Add: Amazon Athena query runner (@arikfr)
- [#1433](https://github.com/getredash/redash/pull/1433) [Charts] Add: errors bands in graphs (@luke14free)
- [#1405](https://github.com/getredash/redash/pull/1405) [Datasources] Add: simple Google Analytics query runner (@denisov-vlad)
- [#1409](https://github.com/getredash/redash/pull/1409) [Datasources] Add: Add query runner for Yandex ClickHouse (@denisov-vlad)
- [#1373](https://github.com/getredash/redash/pull/1373) Add: rate limit the login page (@AntoineAugusti)
### Changed
- [#1549](https://github.com/getredash/redash/pull/1549) Change: disable version counter for queries: (Arik Fraimovich)
- [#1548](https://github.com/getredash/redash/pull/1548) Change: improve UI in small resolution: (Arik Fraimovich)
- [#1547](https://github.com/getredash/redash/pull/1547) Change: Improve drafts UX (Arik Fraimovich)
- [#1540](https://github.com/getredash/redash/pull/1540) [MySQL] Change: faster retrieval of schema (Yaning Zhu)
- [#1517](https://github.com/getredash/redash/pull/1517) [ClickHouse] Change: convert UInt64 columns to integer type (Vladislav Denisov)
- [#1528](https://github.com/getredash/redash/pull/1528) [Vertica] Change: set longer read_timeout (lab79)
- [#1522](https://github.com/getredash/redash/pull/1522) Change: move package.json/webpack.config to root directory (Arik Fraimovich)
- [#1514](https://github.com/getredash/redash/pull/1514) [Athena] Change: enable query annotations (Gaurav Awadhwal)
- [#1525](https://github.com/getredash/redash/pull/1525) Change: update amazon linux bootstrap.sh (Karri Niemelä)
- [#1509](https://github.com/getredash/redash/pull/1509) [Presto/Athena] Change: remove special rule around public schema (@GAwadhwalAtlassian)
- [#1485](https://github.com/getredash/redash/pull/1485) Close #1453: more minimal notification of draft status for query/dashboard (@arikfr)
- [#1474](https://github.com/getredash/redash/pull/1474) [Cassandra] Change: test connection query (@yershalom)
- [#1464](https://github.com/getredash/redash/pull/1464) [Clickhouse] Change: use UTF-8 encoding for POST data (@jaykelin)
- [#1417](https://github.com/getredash/redash/pull/1417) Change: Replace Peewee with SQLAlchemy/Alembic (@arikfr, @washort)
- [#1458](https://github.com/getredash/redash/pull/1458) Change: switch from flask_script to click, add CLI unit tests and upgrade Flask version (@washort)
- [#1438](https://github.com/getredash/redash/pull/1438) [ElasticSearch] Change: use simplejson for better error descriptions (@adamlwgriffiths)
- [#1435](https://github.com/getredash/redash/pull/1435) Whitelisting more builtin primitives (@mattrobenolt)
- [#1376](https://github.com/getredash/redash/pull/1376) Change: upgrade the frontend stack (@arikfr, @luke14free)
- [#1429](https://github.com/getredash/redash/pull/1429) Add missing error check from #1402 (@adamlwgriffiths)
- [#1256](https://github.com/getredash/redash/pull/1256) Change: when forking a query, copy all visualizations (@ninneko)
- [#1421](https://github.com/getredash/redash/pull/1421) Change: [BigQuery] only specify useLegacySQL is it's True (@arikfr)
- [#1353](https://github.com/getredash/redash/pull/1353) Change: make draft status for queries and dashboards toggleable (@washort)
- [#1419](https://github.com/getredash/redash/pull/1419) Change: use redash.utils.json_dumps instead of json.dumps in Python query runner (@ehfeng)
- [#1402](https://github.com/getredash/redash/pull/1402) Change: correctly propagate ElasticSearch errors to the UI (@adamlwgriffiths)
- [#1371](https://github.com/getredash/redash/pull/1371) Change: display user's password reset link to the admin when mail server disabled (@vitorbaptista)
### Fixed
- [#1551](https://github.com/getredash/redash/pull/1551) Fix: flask-admin - exclude created_at/updated_at so models can be saved (Arik Fraimovich)
- [#1545](https://github.com/getredash/redash/pull/1545) [ElasticSearch] Fix: query fails when properties key is missing (hgs847825)
- [#1526](https://github.com/getredash/redash/pull/1526) [ElasticSearch] Fix for #1521 (Adam Griffiths)
- [#1521](https://github.com/getredash/redash/pull/1521) [ElasticSearch] Fix: wrong variable name. (Arik Fraimovich)
- [#1497](https://github.com/getredash/redash/pull/1497) Fix #16: when updating dashboard name refresh dashboards dropdown (@arikfr)
- [#1491](https://github.com/getredash/redash/pull/1491) Fix: DynamoDB test connection was broken (@arikfr)
- [#1487](https://github.com/getredash/redash/pull/1487) Fix #1432: delete visualization sends full visualization body insteadĶ (@arikfr)
- [#1484](https://github.com/getredash/redash/pull/1484) Fix #1457: sort was using the string value (@arikfr)
- [#1478](https://github.com/getredash/redash/pull/1478) [ElasticSearch] Fix: connection test was always succesfful (@adamlwgriffiths)
- [#1440](https://github.com/getredash/redash/pull/1440) Fix: API errors for dashboards with invalid layout data (@whummer)
- [#1427](https://github.com/getredash/redash/pull/1427) [Cassandra] Fix: remove reference to non existing Error class (@arikfr)
- [#1423](https://github.com/getredash/redash/pull/1423) [Cassandra] Fix: cassandra.cluster.Error wasn't imported (@arikfr)
- Fix #1001: queries with a column named "length" were not rendered.
- Fix #578: dashboard list not scrollable.
- Fix #137: add direction indicators when sorting query results.
## v0.12.0 - 2016-11-20
### Added
61fe16e #1374: Add: allow '*' in REDASH_CORS_ACCESS_CONTROL_ALLOW_ORIGIN (Allen Short)
2f09043 #1113: Add: share modify/access permissions for queries and dashboard (whummer)
3db0eea #1341: Add: support for specifying SAML nameid-format (zoetrope)
b0ecd0e #1343: Add: support for local SAML metadata file (zoetrope)
0235d37 #1335: Add: allow changing alert email subject. (Arik Fraimovich)
2135dfd #1333: Add: control over y axis min/max values (Arik Fraimovich)
49e788a #1328: Add: support for snapshot generation service (Arik Fraimovich)
229ca6c #1323: Add: collect runtime metrics for Celery tasks (Arik Fraimovich)
931a1f3 #1315: Add: support for loading BigQuery schema (Arik Fraimovich)
39b4f9a #1314: Add: support MongoDB SSL connections (Arik Fraimovich)
ca1ca9b #1312: Add: additional configuration for Celery jobs (Arik Fraimovich)
fc00e61 #1310: Add: support for date/time with seconds parameters (Arik Fraimovich)
d72a198 #1307: Add: API to force refresh data source schema (Arik Fraimovich)
beb89ec #1305: Add: UI to edit dashboard text box widget (Kazuhito Hokamura)
808fdd4 #1298: Add: JIRA (JQL) query runner (Arik Fraimovich)
ff9e844 #1280: Add: configuration flag to disable scheduled queries (Hirotaka Suzuki)
ef4699a #1269: Add: Google Drive federated tables support in BigQuery query runner (Kurt Gooden)
2eeb947 #1236: Add: query runner for Cassandra and ScyllaDB (syerushalmy)
10b398e #1249: Add: override slack webhook parameters (mystelynx)
2b5e340 #1252: Add: Schema loading support for Presto query runner (using information_schema) (Rohan Dhupelia)
2aaf5dd #1250: Add: query snippets feature (Arik Fraimovich)
8d8af73 #1226: Add: Sankey visualization (Arik Fraimovich)
a02edda #1222: Add: additional results format for sunburst visualization (Arik Fraimovich)
0e70188 #1213: Add: new sunburst sequence visualization (Arik Fraimovich)
9a6d2d7 #1204: Add: show views in schema browser for Vertica data sources (Matthew Carter)
600afa5 #1138: Add: ability to register user defined function (UDF) resources for BigQuery DataSource/Query (fabito)
b410410 #1166: Add: "every 14 days" refresh option (Arik Fraimovich)
906365f #967: Add: extend ElasticSearch query_runner to support aggregations (lloydw)
### Changed
2de4aa2 #1395: Change: switch to requests in URL query runner (Arik Fraimovich)
db1a941 #1392: Change: Update documentation links to point at the new location. (Arik Fraimovich)
002f794 #1368: Change: added ability to disable auto update in admin views (Arik Fraimovich)
aa5d14e #1366: Change: improve error message for exception in the Python query runner (deecay)
880627c #1355: Change: pass the user object to the run_query method (Arik Fraimovich)
23c605b #1342: SAML: specify entity id (zoetrope)
015b1dc #1334: Change: allow specifying recipient address when sending email test message (Arik Fraimovich)
39aaa2f #1292: Change: improvements to map visualization (Arik Fraimovich)
b22191b #1332: Change: upgrade Python packages (Arik Fraimovich)
23ba98b #1331: Celery: Upgrade Celery to more recent version. (Arik Fraimovich)
3283116 #1330: Change: upgrade Requests to latest version. (Arik Fraimovich)
39091e0 #1324: Change: add more logging and information for refresh schemas task (Arik Fraimovich)
462faea #1316: Change: remove deprecated settings (Arik Fraimovich)
73e1837 #1313: Change: more flexible column width calculation (Arik Fraimovich)
e8eb840 #1279: Change: update bootstrap.sh to support Ubuntu 16.04 (IllusiveMilkman)
8cf0252 #1262: Change: upgrade Plot.ly version and switch to smaller build (Arik Fraimovich)
0b79fb8 #1306: Change: paginate queries page & add explicit urls. (Arik Fraimovich)
41f99f5 #1299: Change: send Content-Type header (application/json) in query results responses (Tsuyoshi Tatsukawa)
dfb1a20 #1297: Change: update Slack configuration titles. (Arik Fraimovich)
8c1056c #1294: Change: don't annotate BigQuery queries (Arik Fraimovich)
a3cf92e #1289: Change: use key_as_string when available (ElasticSearch query runner) (Arik Fraimovich)
e155191 #1285: Change: do not display Oracle tablespace name in schema browser (Matthew Carter)
6cbc39c #1282: Change: deduplicate Google Spreadsheet columns (Arik Fraimovich)
4caf2e3 #1277: Set specific version of cryptography lib (Arik Fraimovich)
d22f0d4 #1216: Change: bootstrap.sh - use non interactive dist-upgrade (Atsushi Sasaki)
19530f4 #1245: Change: switch from CodeMirror to Ace editor (Arik Fraimovich)
dfb92db #1234: Change: MongoDB query runner set DB name as mandatory (Arik Fraimovich)
b750843 #1230: Change: annotate Presto queries with metadata (Noriaki Katayama)
5b20fe2 #1217: Change: install libffi-dev for Cryptography (Ubuntu setup script) (Atsushi Sasaki)
a9fac34 #1206: Change: update pymssql version to 2.1.3 (kitsuyui)
5d43cbe #1198: Change: add support for Standard SQL in BigQuery query runner (mystelynx)
84d0c22 #1193: Change: modify the argument order of moment.add function call (Kenya Yamaguchi)
### Fixed
d6febb0 #1375: Fix: Download Dataset does not work when not logged in (Joshua Dechant)
96553ad #1369: Fix: missing format call in Elasticsearch test method (Adam Griffiths)
c57c765 #1365: Fix: compare retrieval times in UTC timezone (Allen Short)
37dff5f #1360: Fix: connection test was broken for MySQL (ichihara)
360028c #1359: Fix: schema loading query for Hive was wrong for non default schema (laughingman7743)
7ee41d4 #1358: Fix: make sure all calls to run_query updated with new parameter (Arik Fraimovich)
0d94479 #1329: Fix: Redis memory leak. (Arik Fraimovich)
7145aa2 #1325: Fix: queries API was doing N+1 queries in most cases (Arik Fraimovich)
cd2e927 #1311: Fix: BoxPlot visualization wasn't rendering on a dashboard (Arik Fraimovich)
a562ce7 #1309: Fix: properly render checkboxes in dynamic forms (Arik Fraimovich)
d48192c #1308: Fix: support for Unicode columns name in Google Spreadsheets (Arik Fraimovich)
e42f93f #1283: Fix: schema browser was unstable after opening a table (Arik Fraimovich)
170bd65 #1272: Fix: TreasureData get_schema method was returning array instead of string as column name (ariarijp)
4710c41 #1265: Fix: refresh modal not working for unsaved query (Arik Fraimovich)
bc3a5ab #1264: Fix: dashboard refresh not working (Arik Fraimovich)
6202d09 #1240: Fix: when shared dashboard token not found, return 404 (Wesley Batista)
93aac14 #1251: Fix: autocomplete went crazy when database has no autocomplete. (Arik Fraimovich)
b8eca28 #1246: Fix: support large schemas in schema browser (Arik Fraimovich)
b781003 #1223: Fix: Alert: when hipchat Alert.name is multibyte character, occur error. (toyama0919)
0b928e6 #1227: Fix: Bower install fails in vagrant (Kazuhito Hokamura)
a411af2 #1232: Fix: don't show warning when query string (parameters value) changes (Kazuhito Hokamura)
3dbb5a6 #1221: Fix: sunburst didn't handle all cases of path lengths (Arik Fraimovich)
a7cc1ee #1218: Fix: updated result not being saved when changing query text. (Arik Fraimovich)
0617833 #1215: Fix: email alerts not working (Arik Fraimovich)
78f65b1 #1187: Fix: read only users receive the permission error modal in query view (Arik Fraimovich)
bba801f #1167: Fix the version of setuptools on bootstrap script for Ubuntu (Takuya Arita)
ce81d69 #1160: Fix indentation in docker-compose-example.yml (Hirofumi Wakasugi)
dd759fe #1155: Fix: make all configuration values of Oracle required (Arik Fraimovich)
### Docs
a69ee0c #1225: Fix: RST formatting of the Vagrant documentation (Kazuhito Hokamura)
03837c0 #1242: Docs: add warning re. quotes on column names and BigQuery (Ereli)
9a98075 #1255: Docs: add documentation for InfluxDB (vishesh92)
e0485de #1195: Docs: fix typo in maintenance page title (Antoine Augusti)
7681d3e #1164: Docs: update permission documentation (Daniel Darabos)
bcd3670 #1156: Docs: add SSL parameters to nginx configuration (Josh Cox)
## v0.11.1.b2095 - 2016-08-02
This is a hotfix release, which fixes an issue with email alerts in v0.11.0.
## v0.11.0.b2016 - 2016-07-03
The main features of this release are:
- Alert Destinations: ability to define multiple destinations for alert notifications (currently implemented: HipChat, Slack, Webhook and email).
- The long-awaited UI for query parameters (see example in #1069).
Also, this release includes numerous smaller features, improvements, and bug fixes.
A big thank you goes to all who contributed code and documentation in this release: @AntoineAugusti, @James226, @adamlwgriffiths, @alexdebrie, @anthony-coble, @ariarijp, @dheerajrav, @edwardsharp, @machira, @nabilblk, @ninneko, @ordd, @tomerben, @toru-takahashi, @vishesh92, @vorakumar and @whummer.
### Added
d5e5b24 #1136: Feature: add --org option to all relevant CLI commands. (@adamlwgriffiths)
87e25f2 #1129: Feature: support for JSON query formatting (Mongo, ElasticSearch) (@arikfr)
6bb2716 #1121: Show error when failing to communicate with server (@arikfr)
f21276e #1119: Feature: add UI to delete alerts (@arikfr)
8656540 #1069: Feature: UI for query parameters (@arikfr)
790128c #1067: Feature: word cloud visualization (@anthony-coble)
8b73a2b #1098: Feature: UI for alert destinations & new destination types (@alexdebrie)
1fbeb5d #1092: Add Heroku support (@adamlwgriffiths)
f64622d #1089: Add support for serialising UUID type within MSSQL #961 (@James226)
857caab #1085: Feature: API to pause a data source (@arikfr)
214aa3b #1060: Feature: support configuring user's groups with SAML (@vorakumar)
e20a005 #1007: Issue#1006: Make bottom margin editable for Chart visualization (@vorakumar)
6e0dd2b #1063: Add support for date/time Y axis (@tomerben)
b5a4a6b #979: Feature: Add CLI to edit group permissions (@ninneko)
6d495d2 #1014: Add server-side parameter handling for embeds (@whummer)
5255804 #1091: Add caching for queries used in embeds (@whummer)
### Changed
0314313 #1149: Presto QueryRunner supports tinyint and smallint (@toru-takahashi)
8fa6fdb #1030: Make sure data sources list ordered by id (@arikfr)
8df822e #1141: Make create data source button more prominent (@arikfr)
96dd811 #1127: Mark basic_auth_password as secret (@adamlwgriffiths)
ad65391 #1130: Improve Slack notification style (@AntoineAugusti)
df637e3 #1116: Return meaningful error when there is no cached result. (@arikfr)
65635ec #1102: Switch to HipChat V2 API (@arikfr)
14fcf01 #1072: Remove counter from the tasks Done tab (as it always shows 50). #1047 (@arikfr)
1a1160e #1062: DynamoDB: Better exception handling (@arikfr)
ed45dcb #1044: Improve vagrant flow (@staritza)
8b5dc8e #1036: Add optional block for more scripts in template (@arikfr)
### Fixed
dbd48e1 #1143: Fix: use the email input type where needed (@ariarijp)
7445972 #1142: Fix: dates in filters might be duplicated (@arikfr)
5d0ed02 #1140: Fix: Hive should use the enabled variable (@arikfr)
392627d #1139: Fix: Impala data source referencing wrong variable (@arikfr)
c5bfbba #1133: Fix: query scrolling issues (@vishesh92)
c01d266 #1128: Fix: visualization options not updating after changing type (@arikfr)
6bc0e7a #1126: Fix #669: save fails when doing partial save of new query (@arikfr)
3ce27b9 #1118: Fix: remove alerts for archived queries (@arikfr)
4fabaae #1117: Fix #1052: filter not working for date/time values (@arikfr)
c107c94 #1077: Fix: install needed dependencies to use Hive in Docker image (@nabilblk)
abc790c #1115: Fix: allow non integers in alert reference value (@arikfr)
4ec473c #1110: Fix #1109: mixed group permissions resulting in wrong permission (@arikfr)
1ca5262 #1099: Fix RST syntax for links (@adamlwgriffiths)
daa6c1c #1096: Fix typo in env variable VERSION_CHECK (@AntoineAugusti)
cd06d27 #1095: Fix: use create_query permission for new query button. (@ordd)
2bc0b27 #1061: Fix: area chart stacking doesn't work (@machira)
8c21e91 #1108: Remove potnetially concurrency not safe code form enqueue_query (@arikfr)
e831218 #1084: Fix #1049: duplicate alerts when data source belongs to multiple groups (@arikfr)
6edb0ca #1080: Fix typo (@jeffwidman)
64d7538 #1074: Fix: ElasticSearch wasn't using correct type names (@toyama0919)
3f90dd9 #1064: Fix: old task trackers were not really removed (@arikfr)
e10ecd2 #1058: Bring back filters if dashboard filters are enabled (@AntoineAugusti)
701035f #1059: Fix: DynamoDB having issues when setting host (@arikfr)
2924d4f #1040: Small fixes to visualizations view (@arikfr)
fec0d5f #1037: Fix: multi filter wasn't working with __ syntax (@dheerajrav)
b066ce4 #1033: Fix: only ask for notification permissions if wasn't denied (@arikfr)
960c416 #1032: Fix: make sure we return dashboards only for current org only (@arikfr)
b3844d3 #1029: Hive: close connection only if it exists (@arikfr)
### Docs
6bb09d8 #1146: Docs: add a link to settings documentation. (@adamlwgriffiths)
095e759 #1103: Docs: add section about monitoring (@AntoineAugusti)
e942486 #1090: Contributing Guide (@arikfr)
3037c4f #1066: Docs: command type-o fix. (@edwardsharp)
2ee0065 #1038: Add an ISSUE_TEMPLATE.md to direct people at the forum (@arikfr)
f7322a4 #1021: Vagrant docs: add purging the cache step (@ariarijp)
---
For older releases check the GitHub releases page:
https://github.com/getredash/redash/releases

View File

@@ -9,7 +9,7 @@ The following is a set of guidelines for contributing to Redash. These are guide
- [Feature Roadmap](https://trello.com/b/b2LUHU7A/re-dash-roadmap)
- [Feature Requests](https://discuss.redash.io/c/feature-requests)
- [Gitter Chat](https://gitter.im/getredash/redash) or [Slack](https://slack.redash.io)
- [Documentation](http://docs.redash.io)
- [Documentation](https://redash.io/help/)
- [Blog](http://blog.redash.io/)
- [Twitter](https://twitter.com/getredash)
@@ -18,7 +18,7 @@ The following is a set of guidelines for contributing to Redash. These are guide
---
## Table of Contents
[How can I contribute?](#how-can-i-contribute)
@@ -28,12 +28,12 @@ The following is a set of guidelines for contributing to Redash. These are guide
- [Pull Requests](#pull-requests)
- [Documentation](#documentation)
- Design?
[Addtional Notes](#additional-notes)
- [Release Method](#release-method)
- [Code of Conduct](#code-of-conduct)
## How can I contribute?
### Reporting Bugs
@@ -43,26 +43,24 @@ When creating a new bug report, please make sure to:
- Search for existing issues first. If you find a previous report of your issue, please update the existing issue with additional information instead of creating a new one.
- If you are not sure if your issue is really a bug or just some configuration/setup problem, please start a discussion in [the support forum](https://discuss.redash.io/c/support) first. Unless you can provide clear steps to reproduce, it's probably better to start with a thread in the forum and later to open an issue.
- If you still decide to open an issue, please review the template and guidelines and include as much details as possible.
### Suggesting Enhancements / Feature Requests
If you would like to suggest an enchancement or ask for a new feature:
- Please check [the roadmap](https://trello.com/b/b2LUHU7A/re-dash-roadmap) for existing Trello card for what you want to suggest/ask. If there is, feel free to upvote it to signal interest or add your comments.
- If there is no existing card, open a thread in [the forum](https://discuss.redash.io/c/feature-requests) to start a discussion about what you want to suggest. Try to provide as much details and context as possible and include information about *the problem you want to solve* rather only *your proposed solution*.
### Pull Requests
- **Code contributions are welcomed**. For big changes or significant features, it's usually better to reach out first and discuss what you want to implement and how (we recommend reading: [Pull Request First](https://medium.com/practical-blend/pull-request-first-f6bb667a9b6#.ozlqxvj36)). This to make sure that what you want to implement is aligned with our goals for the project and that no one else is already working on it.
- Include screenshots and animated GIFs in your pull request whenever possible.
- Please add [documentation](#documentation) for new features or changes in functionality along with the code.
- Please follow existing code style. We use PEP8 for Python and sensible style for Javascript.
### Documentation
The project's documentation can be found at [docs.redash.io](http://docs.redash.io/). The [documentation sources](https://github.com/getredash/redash/tree/master/docs) are managed along with the code and to contribute edits / new pages, you can use GitHub's interface. Click the "Edit on GitHub" link on the documentation page to quickly open the edit interface.
The pages are written in *reStructuredText* format, which is very similar to Markdown.
The project's documentation can be found at [https://redash.io/help/](https://redash.io/help/). The [documentation sources](https://github.com/getredash/website/tree/master/user-guide) are hosted on GitHub. To contribute edits / new pages, you can use GitHub's interface. Click the "Edit on GitHub" link on the documentation page to quickly open the edit interface.
## Additional Notes

View File

@@ -1,53 +1,13 @@
FROM ubuntu:trusty
FROM redash/base:latest
# Ubuntu packages
RUN apt-get update && \
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core wget \
# Postgres client
libpq-dev \
# Additional packages required for data sources:
libssl-dev libmysqlclient-dev freetds-dev libsasl2-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# We first copy only the requirements file, to avoid rebuilding on every file
# change.
COPY requirements.txt requirements_dev.txt requirements_all_ds.txt ./
RUN pip install -r requirements.txt -r requirements_dev.txt -r requirements_all_ds.txt
# Users creation
RUN useradd --system --comment " " --create-home redash
COPY . ./
RUN npm install && npm run build && rm -rf node_modules
RUN chown -R redash /app
USER redash
# Pip requirements for all data source types
RUN pip install -U setuptools==23.1.0 && \
pip install supervisor==3.1.2
COPY . /opt/redash/current
RUN chown -R redash /opt/redash/current
# Setting working directory
WORKDIR /opt/redash/current
ENV REDASH_STATIC_ASSETS_PATH="../rd_ui/dist/"
# Install project specific dependencies
RUN pip install -r requirements_all_ds.txt && \
pip install -r requirements.txt
RUN curl https://deb.nodesource.com/setup_4.x | bash - && \
apt-get install -y nodejs && \
sudo -u redash -H make deps && \
rm -rf node_modules rd_ui/node_modules /home/redash/.npm /home/redash/.cache && \
apt-get purge -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Setup supervisord
RUN mkdir -p /opt/redash/supervisord && \
mkdir -p /opt/redash/logs && \
cp /opt/redash/current/setup/docker/supervisord/supervisord.conf /opt/redash/supervisord/supervisord.conf
# Fix permissions
RUN chown -R redash /opt/redash
# Expose ports
EXPOSE 5000
EXPOSE 9001
# Startup script
CMD ["supervisord", "-c", "/opt/redash/supervisord/supervisord.conf"]
ENTRYPOINT ["/app/bin/docker-entrypoint"]

View File

@@ -1,4 +1,4 @@
Copyright (c) 2013-2016, Arik Fraimovich.
Copyright (c) 2013-2017, Arik Fraimovich.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

View File

@@ -6,17 +6,15 @@ BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz
deps:
if [ -d "./rd_ui/app" ]; then npm install; fi
if [ -d "./rd_ui/app" ]; then npm run bower install; fi
if [ -d "./rd_ui/app" ]; then npm run build; fi
if [ -d "./client/app" ]; then npm install; fi
if [ -d "./client/app" ]; then npm run build; fi
pack:
sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" --exclude="rd_ui/dist/bower_components" --exclude="rd_ui/app" *
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" *
upload:
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)
test:
nosetests --with-coverage --cover-package=redash tests/
#grunt test

View File

@@ -1,2 +0,0 @@
web: ./manage.py runserver -p $PORT --host 0.0.0.0
worker: ./bin/run celery worker --app=redash.worker --beat -Qqueries,celery,scheduled_queries

View File

@@ -1,2 +0,0 @@
web: ./manage.py runserver -d -r -p $PORT --host 0.0.0.0
worker: celery worker --app=redash.worker -c2 --beat -Q queries,celery,scheduled_queries

View File

@@ -1,42 +1,36 @@
More details about the future of re:dash : http://bit.ly/journey-first-step
---
<p align="center">
<img title="re:dash" src='http://redash.io/static/old_img/redash_logo.png' width="200px"/>
<img title="Redash" src='https://redash.io/assets/images/logo.png' width="200px"/>
</p>
<p align="center">
<img title="Build Status" src='https://circleci.com/gh/getredash/redash.png?circle-token=8a695aa5ec2cbfa89b48c275aea298318016f040'/>
</p>
[![Join the chat at https://gitter.im/getredash/redash](https://badges.gitter.im/getredash/redash.svg)](https://gitter.im/getredash/redash?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation](https://img.shields.io/badge/docs-redash.io-brightgreen.svg)](http://docs.redash.io)
[![Documentation](https://img.shields.io/badge/docs-redash.io/help-brightgreen.svg)](https://redash.io/help/)
**_re:dash_** is our take on freeing the data within our company in a way that will better fit our culture and usage patterns.
**_Redash_** is our take on freeing the data within our company in a way that will better fit our culture and usage patterns.
Prior to **_re:dash_**, we tried to use traditional BI suites and discovered a set of bloated, technically challenged and slow tools/flows. What we were looking for was a more hacker'ish way to look at data, so we built one.
Prior to **_Redash_**, we tried to use traditional BI suites and discovered a set of bloated, technically challenged and slow tools/flows. What we were looking for was a more hacker'ish way to look at data, so we built one.
**_re:dash_** was built to allow fast and easy access to billions of records, that we process and collect using Amazon Redshift ("petabyte scale data warehouse" that "speaks" PostgreSQL).
Today **_re:dash_** has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite,
**_Redash_** was built to allow fast and easy access to billions of records, that we process and collect using Amazon Redshift ("petabyte scale data warehouse" that "speaks" PostgreSQL).
Today **_Redash_** has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite,
Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
**_re:dash_** consists of two parts:
**_Redash_** consists of two parts:
1. **Query Editor**: think of [JS Fiddle](http://jsfiddle.net) for SQL queries. It's your way to share data in the organization in an open way, by sharing both the dataset and the query that generated it. This way everyone can peer review not only the resulting dataset but also the process that generated it. Also it's possible to fork it and generate new datasets and reach new insights.
2. **Dashboards/Visualizations**: once you have a dataset, you can create different visualizations out of it, and then combine several visualizations into a single dashboard. Currently it supports charts, pivot table and cohorts.
**_re:dash_** is a work in progress and has its rough edges and way to go to fulfill its full potential. The Query Editor part is quite solid, but the visualizations need more work to enrich them and to make them more user friendly.
## Demo
<img src="https://cloud.githubusercontent.com/assets/71468/12611424/1faf4d6a-c4f5-11e5-89b5-31efc1155d2c.gif" width="60%"/>
<img src="https://cloud.githubusercontent.com/assets/71468/17391289/8e83878e-5a1d-11e6-8938-af9054a33b19.gif" width="60%"/>
You can try out the demo instance: http://demo.redash.io/ (login with any Google account).
## Getting Started
* [Setting up re:dash instance](http://redash.io/deployment/setup.html) (includes links to ready made AWS/GCE images).
* [Documentation](http://docs.redash.io).
* [Setting up Redash instance](https://redash.io/help-onpremise/setup/setting-up-redash-instance.html) (includes links to ready made AWS/GCE images).
* [Documentation](https://redash.io/help/).
## Getting Help
@@ -49,8 +43,8 @@ You can try out the demo instance: http://demo.redash.io/ (login with any Google
## Reporting Bugs and Contributing Code
* Want to report a bug or request a feature? Please open [an issue](https://github.com/getredash/redash/issues/new).
* Want to help us build **_re:dash_**? Fork the project, edit in a [dev environment](http://docs.redash.io/en/latest/dev/vagrant.html), and make a pull request. We need all the help we can get!
* Want to help us build **_Redash_**? Fork the project, edit in a [dev environment](https://redash.io/help-onpremise/setup/setting-up-development-environment-using-vagrant.html), and make a pull request. We need all the help we can get!
## License
See [LICENSE](https://github.com/getredash/redash/blob/master/LICENSE) file.
BSD-2-Clause.

15
Vagrantfile vendored
View File

@@ -1,15 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "redash/dev"
config.vm.synced_folder "./", "/opt/redash/current"
config.vm.network "forwarded_port", guest: 5000, host: 9001
config.vm.provision "shell" do |s|
s.inline = "/opt/redash/current/setup/vagrant/provision.sh"
s.privileged = false
end
end

78
bin/docker-entrypoint Executable file
View File

@@ -0,0 +1,78 @@
#!/bin/bash
set -e
worker() {
WORKERS_COUNT=${WORKERS_COUNT:-2}
QUEUES=${QUEUES:-queries,scheduled_queries,celery}
echo "Starting $WORKERS_COUNT workers for queues: $QUEUES..."
exec /usr/local/bin/celery worker --app=redash.worker -c$WORKERS_COUNT -Q$QUEUES -linfo --maxtasksperchild=10 -Ofair
}
scheduler() {
WORKERS_COUNT=${WORKERS_COUNT:-1}
QUEUES=${QUEUES:-celery}
echo "Starting scheduler and $WORKERS_COUNT workers for queues: $QUEUES..."
exec /usr/local/bin/celery worker --app=redash.worker --beat -c$WORKERS_COUNT -Q$QUEUES -linfo --maxtasksperchild=10 -Ofair
}
server() {
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w4 redash.wsgi:app
}
help() {
echo "Redash Docker."
echo ""
echo "Usage:"
echo ""
echo "server -- start Redash server (with gunicorn)"
echo "worker -- start Celery worker"
echo "scheduler -- start Celery worker with a beat (scheduler) process"
echo ""
echo "shell -- open shell"
echo "dev_server -- start Flask development server with debugger and auto reload"
echo "create_db -- create database tables"
echo "manage -- CLI to manage redash"
}
tests() {
export REDASH_DATABASE_URL="postgresql://postgres@postgres/tests"
exec make test
}
case "$1" in
worker)
shift
worker
;;
server)
shift
server
;;
scheduler)
shift
scheduler
;;
dev_server)
exec /app/manage.py runserver --debugger --reload -h 0.0.0.0
;;
shell)
exec /app/manage.py shell
;;
create_db)
exec /app/manage.py database create_tables
;;
manage)
shift
exec /app/manage.py $*
;;
tests)
tests
;;
*)
help
;;
esac

236
bin/upgrade Executable file
View File

@@ -0,0 +1,236 @@
#!/usr/bin/env python
import os
import argparse
import subprocess
import sys
from collections import namedtuple
from fnmatch import fnmatch
import requests
try:
import semver
except ImportError:
print("Missing required library: semver.")
exit(1)
REDASH_HOME = os.environ.get('REDASH_HOME', '/opt/redash')
CURRENT_VERSION_PATH = '{}/current'.format(REDASH_HOME)
def run(cmd, cwd=None):
if not cwd:
cwd = REDASH_HOME
return subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.STDOUT)
def confirm(question):
reply = str(raw_input(question + ' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return confirm("Please use 'y' or 'n'")
def version_path(version_name):
return "{}/{}".format(REDASH_HOME, version_name)
END_CODE = '\033[0m'
def colored_string(text, color):
if sys.stdout.isatty():
return "{}{}{}".format(color, text, END_CODE)
else:
return text
def h1(text):
print(colored_string(text, '\033[4m\033[1m'))
def green(text):
print(colored_string(text, '\033[92m'))
def red(text):
print(colored_string(text, '\033[91m'))
class Release(namedtuple('Release', ('version', 'download_url', 'filename', 'description'))):
def v1_or_newer(self):
return semver.compare(self.version, '1.0.0-alpha') >= 0
def is_newer(self, version):
return semver.compare(self.version, version) > 0
@property
def version_name(self):
return self.filename.replace('.tar.gz', '')
def get_latest_release_from_ci():
response = requests.get('https://circleci.com/api/v1.1/project/github/getredash/redash/latest/artifacts')
if response.status_code != 200:
exit("Failed getting releases (status code: %s)." % response.status_code)
tarball_asset = filter(lambda asset: asset['url'].endswith('.tar.gz'), response.json())[0]
filename = tarball_asset['pretty_path'].replace('$CIRCLE_ARTIFACTS/', '')
version = filename.replace('redash.', '').replace('.tar.gz', '')
release = Release(version, tarball_asset['url'], filename, '')
return release
def get_release(channel):
if channel == 'ci':
return get_latest_release_from_ci()
response = requests.get('https://version.redash.io/api/releases?channel={}'.format(channel))
release = response.json()[0]
filename = release['download_url'].split('/')[-1]
release = Release(release['version'], release['download_url'], filename, release['description'])
return release
def link_to_current(version_name):
green("Linking to current version...")
run('ln -nfs {} {}'.format(version_path(version_name), CURRENT_VERSION_PATH))
def restart_services():
# We're doing this instead of simple 'supervisorctl restart all' because
# otherwise it won't notice that /opt/redash/current pointing at a different
# directory.
green("Restarting...")
run('sudo /etc/init.d/redash_supervisord restart')
def update_requirements(version_name):
green("Installing new Python packages (if needed)...")
new_requirements_file = '{}/requirements.txt'.format(version_path(version_name))
install_requirements = False
try:
run('diff {}/requirements.txt {}'.format(CURRENT_VERSION_PATH, new_requirements_file)) != 0
except subprocess.CalledProcessError as e:
if e.returncode != 0:
install_requirements = True
if install_requirements:
run('sudo pip install -r {}'.format(new_requirements_file))
def apply_migrations(release):
green("Running migrations (if needed)...")
if not release.v1_or_newer():
return apply_migrations_pre_v1(release.version_name)
run("sudo -u redash bin/run ./manage.py db upgrade", cwd=version_path(release.version_name))
def find_migrations(version_name):
current_migrations = set([f for f in os.listdir("{}/migrations".format(CURRENT_VERSION_PATH)) if fnmatch(f, '*_*.py')])
new_migrations = sorted([f for f in os.listdir("{}/migrations".format(version_path(version_name))) if fnmatch(f, '*_*.py')])
return [m for m in new_migrations if m not in current_migrations]
def apply_migrations_pre_v1(version_name):
new_migrations = find_migrations(version_name)
if new_migrations:
green("New migrations to run: ")
print(', '.join(new_migrations))
else:
print("No new migrations in this version.")
if new_migrations and confirm("Apply new migrations? (make sure you have backup)"):
for migration in new_migrations:
print("Applying {}...".format(migration))
run("sudo sudo -u redash PYTHONPATH=. bin/run python migrations/{}".format(migration), cwd=version_path(version_name))
def download_and_unpack(release):
directory_name = release.version_name
green("Downloading release tarball...")
run('sudo wget --header="Accept: application/octet-stream" -O {} {}'.format(release.filename, release.download_url))
green("Unpacking to: {}...".format(directory_name))
run('sudo mkdir -p {}'.format(directory_name))
run('sudo tar -C {} -xvf {}'.format(directory_name, release.filename))
green("Changing ownership to redash...")
run('sudo chown redash {}'.format(directory_name))
green("Linking .env file...")
run('sudo ln -nfs {}/.env {}/.env'.format(REDASH_HOME, version_path(directory_name)))
def current_version():
real_current_path = os.path.realpath(CURRENT_VERSION_PATH).replace('.b', '+b')
return real_current_path.replace(REDASH_HOME + '/', '').replace('redash.', '')
def verify_minimum_version():
green("Current version: " + current_version())
if semver.compare(current_version(), '0.12.0') < 0:
red("You need to have Redash v0.12.0 or newer to upgrade to post v1.0.0 releases.")
green("To upgrade to v0.12.0, run the upgrade script set to the legacy channel (--channel legacy).")
exit(1)
def show_description_and_confirm(description):
if description:
print(description)
if not confirm("Continue with upgrade?"):
red("Cancelling upgrade.")
exit(1)
def verify_newer_version(release):
if not release.is_newer(current_version()):
red("The found release is not newer than your current deployed release ({}). Aborting upgrade.".format(current_version()))
exit(1)
def deploy_release(channel):
h1("Starting Redash upgrade:")
release = get_release(channel)
green("Found version: {}".format(release.version))
if release.v1_or_newer():
verify_minimum_version()
verify_newer_version(release)
show_description_and_confirm(release.description)
try:
download_and_unpack(release)
update_requirements(release.version_name)
apply_migrations(release)
link_to_current(release.version_name)
restart_services()
green("Done! Enjoy.")
except subprocess.CalledProcessError as e:
red("Failed running: {}".format(e.cmd))
red("Exit status: {}\nOutput:\n{}".format(e.returncode, e.output))
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--channel", help="The channel to get release from (default: stable).", default='stable')
args = parser.parse_args()
deploy_release(args.channel)

View File

@@ -1,21 +0,0 @@
#!/bin/bash
set -e
help() {
echo "Usage: "
echo "`basename "$0"` {start, test}"
}
case "$1" in
start)
vagrant up
vagrant ssh -c "cd /opt/redash/current; bin/run honcho start -f Procfile.dev;"
;;
test)
vagrant up
vagrant ssh -c "cd /opt/redash/current; make test"
;;
*)
help
;;
esac

View File

@@ -1,47 +0,0 @@
{
"name": "redash",
"version": "0.11.0",
"dependencies": {
"angular": "1.2.18",
"angular-resource": "1.2.18",
"angular-route": "1.2.18",
"angular-growl": "0.4.0",
"json3": "3.2.4",
"jquery": "1.9.1",
"bootstrap": "3.3.6",
"es5-shim": "2.0.8",
"angular-moment": "0.10.3",
"moment": "~2.8.0",
"codemirror": "4.8.0",
"underscore": "1.5.1",
"pivottable": "2.0.2",
"cornelius": "https://github.com/restorando/cornelius.git",
"gridster": "0.2.0",
"mousetrap": "~1.4.6",
"jquery-ui": "~1.10.4",
"underscore.string": "~2.3.3",
"marked": "~0.3.2",
"pace": "~0.5.1",
"font-awesome": "~4.2.0",
"mustache": "~1.0.0",
"canvg": "gabelerner/canvg",
"angular-ui-bootstrap-bower": "~0.12.1",
"leaflet": "~0.7.3",
"angular-base64-upload": "~0.1.11",
"angular-ui-select": "~0.13.2",
"angular-bootstrap-show-errors": "~2.3.0",
"angular-sanitize": "1.2.18",
"d3": "3.5.6",
"angular-ui-sortable": "~0.13.4",
"angular-resizable": "^1.2.0",
"material-design-iconic-font": "^2.2.0",
"plotly.js": "^1.9.0"
},
"devDependencies": {
"angular-mocks": "1.2.18",
"angular-scenario": "1.2.18"
},
"resolutions": {
"angular": "1.2.18"
}
}

View File

@@ -1,22 +1,18 @@
machine:
services:
- docker
- redis
node:
version:
0.12.4
python:
version:
2.7.3
6.9.1
dependencies:
pre:
override:
- pip install --upgrade setuptools
- pip install -r requirements_dev.txt
- pip install -r requirements.txt
- pip install pymongo==3.2.1
- if [ "$CIRCLE_BRANCH" = "master" ]; then make deps; fi
- make deps
cache_directories:
- node_modules/
- rd_ui/node_modules/
- rd_ui/app/bower_components/
test:
override:
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/junit.xml --with-coverage --cover-package=redash tests/
@@ -25,11 +21,12 @@ deployment:
branch: master
commands:
- make pack
- make upload
- echo "rd_ui/app" >> .dockerignore
- docker pull redash/redash:latest
- docker build -t redash/redash:$(./manage.py version | sed -e "s/\+/./") .
# Skipping uploads for now, until master is stable.
# - make upload
#- echo "client/app" >> .dockerignore
#- docker pull redash/redash:latest
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build -t redash/redash:$(./manage.py version | sed -e "s/\+/./") .
- docker push redash/redash:$(./manage.py version | sed -e "s/\+/./")
notify:
webhooks:

4
client/.babelrc Normal file
View File

@@ -0,0 +1,4 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-object-assign"]
}

2
client/.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
build/*.js
config/*.js

15
client/.eslintrc.js Normal file
View File

@@ -0,0 +1,15 @@
module.exports = {
root: true,
extends: 'airbnb-base',
env: {
"browser": true,
"node": true
},
rules: {
// allow debugger during development
'no-param-reassign': 0,
'no-mixed-operators': 0,
'no-underscore-dangle': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}

1
client/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
dist

View File

View File

@@ -160,16 +160,13 @@ a.navbar-brand img {
/* Gridster */
.gridster ul {
list-style-type: none;
}
li.widget {
/*background-color:grey;*/
border-width: 1px;
border-style: solid;
border-color: grey;
opacity: 0.7;
cursor: move;
}
li.widget:hover {
@@ -188,18 +185,20 @@ li.widget:hover {
background: rgba(0, 0, 0, 0.5) !important;
}
/* CodeMirror */
.CodeMirror {
.gridster li .heading {
border: #ddd;
background-color: #f5f5f5;
padding: 5px;
}
/* Editor */
.ace_editor {
border: 1px solid #eee;
height: 100%;
margin-bottom: 10px;
}
.CodeMirror-scroll {
overflow-y: auto;
overflow-x: auto;
}
/* Support for Font-Awesome in btn-xs */
.btn-xs > .fa {
@@ -313,7 +312,7 @@ to add those CSS styles here. */
}
.rd-form-control {
width: 100%;
width: 90%;
}
pivot-table-renderer > table, grid-renderer > div, visualization-renderer > div {
@@ -416,6 +415,16 @@ counter-renderer counter-name {
background-color: white;
}
.schema-control {
display: flex;
padding: 5px 0;
}
.schema-control .form-control {
height: 30px;
margin-right: 5px;
}
.schema-browser {
height: calc(100% - 45px);
overflow-y: auto;
@@ -440,10 +449,6 @@ div.table-name:hover {
padding: 30px;
}
.log-container {
margin-bottom: 50px;
}
/* Footer */
.footer {
@@ -481,17 +486,6 @@ div.table-name:hover {
display: none !important;
}
/* Smart Table */
.smart-table {
margin-bottom: 0px;
}
.smart-table .pagination {
margin-bottom: 5px;
margin-top: 10px;
}
.voffset {
margin-top: 2px;
}
@@ -613,9 +607,16 @@ div.table-name:hover {
.collapsing,
.collapse.in {
background: #f4f4f4;
padding: 5px 10px;
transition: all 0.35s ease;
padding: 5px 10px;
transition: all 0.35s ease;
}
.schema-browser .collapse.in {
background: #f4f4f4;
}
.navbar .collapse.in {
background: #222;
}
/* Fixes for SuperFlat */
@@ -663,3 +664,32 @@ div.table-name:hover {
.t-header.widget {
padding: 5px;
}
/* Sankey Visualization */
.sankey .node rect {
fill-opacity: .9;
shape-rendering: crispEdges;
stroke-width: 0;
}
.sankey .node text {
text-shadow: 0 1px 0 #fff;
}
.sankey .link {
fill: none;
stroke: #000;
stroke-opacity: .2;
}
/*Dashboard list view */
.m-2{
margin:2px;
}
.dropdown-menu > .disabled{
cursor: not-allowed;
}
/* The real magic ;) */
.dropdown-menu > .disabled > a{
pointer-events: none;
}

View File

@@ -254,809 +254,6 @@ th {
border: 1px solid #ddd !important;
}
}
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.glyphicon-asterisk:before {
content: "\2a";
}
.glyphicon-plus:before {
content: "\2b";
}
.glyphicon-euro:before,
.glyphicon-eur:before {
content: "\20ac";
}
.glyphicon-minus:before {
content: "\2212";
}
.glyphicon-cloud:before {
content: "\2601";
}
.glyphicon-envelope:before {
content: "\2709";
}
.glyphicon-pencil:before {
content: "\270f";
}
.glyphicon-glass:before {
content: "\e001";
}
.glyphicon-music:before {
content: "\e002";
}
.glyphicon-search:before {
content: "\e003";
}
.glyphicon-heart:before {
content: "\e005";
}
.glyphicon-star:before {
content: "\e006";
}
.glyphicon-star-empty:before {
content: "\e007";
}
.glyphicon-user:before {
content: "\e008";
}
.glyphicon-film:before {
content: "\e009";
}
.glyphicon-th-large:before {
content: "\e010";
}
.glyphicon-th:before {
content: "\e011";
}
.glyphicon-th-list:before {
content: "\e012";
}
.glyphicon-ok:before {
content: "\e013";
}
.glyphicon-remove:before {
content: "\e014";
}
.glyphicon-zoom-in:before {
content: "\e015";
}
.glyphicon-zoom-out:before {
content: "\e016";
}
.glyphicon-off:before {
content: "\e017";
}
.glyphicon-signal:before {
content: "\e018";
}
.glyphicon-cog:before {
content: "\e019";
}
.glyphicon-trash:before {
content: "\e020";
}
.glyphicon-home:before {
content: "\e021";
}
.glyphicon-file:before {
content: "\e022";
}
.glyphicon-time:before {
content: "\e023";
}
.glyphicon-road:before {
content: "\e024";
}
.glyphicon-download-alt:before {
content: "\e025";
}
.glyphicon-download:before {
content: "\e026";
}
.glyphicon-upload:before {
content: "\e027";
}
.glyphicon-inbox:before {
content: "\e028";
}
.glyphicon-play-circle:before {
content: "\e029";
}
.glyphicon-repeat:before {
content: "\e030";
}
.glyphicon-refresh:before {
content: "\e031";
}
.glyphicon-list-alt:before {
content: "\e032";
}
.glyphicon-lock:before {
content: "\e033";
}
.glyphicon-flag:before {
content: "\e034";
}
.glyphicon-headphones:before {
content: "\e035";
}
.glyphicon-volume-off:before {
content: "\e036";
}
.glyphicon-volume-down:before {
content: "\e037";
}
.glyphicon-volume-up:before {
content: "\e038";
}
.glyphicon-qrcode:before {
content: "\e039";
}
.glyphicon-barcode:before {
content: "\e040";
}
.glyphicon-tag:before {
content: "\e041";
}
.glyphicon-tags:before {
content: "\e042";
}
.glyphicon-book:before {
content: "\e043";
}
.glyphicon-bookmark:before {
content: "\e044";
}
.glyphicon-print:before {
content: "\e045";
}
.glyphicon-camera:before {
content: "\e046";
}
.glyphicon-font:before {
content: "\e047";
}
.glyphicon-bold:before {
content: "\e048";
}
.glyphicon-italic:before {
content: "\e049";
}
.glyphicon-text-height:before {
content: "\e050";
}
.glyphicon-text-width:before {
content: "\e051";
}
.glyphicon-align-left:before {
content: "\e052";
}
.glyphicon-align-center:before {
content: "\e053";
}
.glyphicon-align-right:before {
content: "\e054";
}
.glyphicon-align-justify:before {
content: "\e055";
}
.glyphicon-list:before {
content: "\e056";
}
.glyphicon-indent-left:before {
content: "\e057";
}
.glyphicon-indent-right:before {
content: "\e058";
}
.glyphicon-facetime-video:before {
content: "\e059";
}
.glyphicon-picture:before {
content: "\e060";
}
.glyphicon-map-marker:before {
content: "\e062";
}
.glyphicon-adjust:before {
content: "\e063";
}
.glyphicon-tint:before {
content: "\e064";
}
.glyphicon-edit:before {
content: "\e065";
}
.glyphicon-share:before {
content: "\e066";
}
.glyphicon-check:before {
content: "\e067";
}
.glyphicon-move:before {
content: "\e068";
}
.glyphicon-step-backward:before {
content: "\e069";
}
.glyphicon-fast-backward:before {
content: "\e070";
}
.glyphicon-backward:before {
content: "\e071";
}
.glyphicon-play:before {
content: "\e072";
}
.glyphicon-pause:before {
content: "\e073";
}
.glyphicon-stop:before {
content: "\e074";
}
.glyphicon-forward:before {
content: "\e075";
}
.glyphicon-fast-forward:before {
content: "\e076";
}
.glyphicon-step-forward:before {
content: "\e077";
}
.glyphicon-eject:before {
content: "\e078";
}
.glyphicon-chevron-left:before {
content: "\e079";
}
.glyphicon-chevron-right:before {
content: "\e080";
}
.glyphicon-plus-sign:before {
content: "\e081";
}
.glyphicon-minus-sign:before {
content: "\e082";
}
.glyphicon-remove-sign:before {
content: "\e083";
}
.glyphicon-ok-sign:before {
content: "\e084";
}
.glyphicon-question-sign:before {
content: "\e085";
}
.glyphicon-info-sign:before {
content: "\e086";
}
.glyphicon-screenshot:before {
content: "\e087";
}
.glyphicon-remove-circle:before {
content: "\e088";
}
.glyphicon-ok-circle:before {
content: "\e089";
}
.glyphicon-ban-circle:before {
content: "\e090";
}
.glyphicon-arrow-left:before {
content: "\e091";
}
.glyphicon-arrow-right:before {
content: "\e092";
}
.glyphicon-arrow-up:before {
content: "\e093";
}
.glyphicon-arrow-down:before {
content: "\e094";
}
.glyphicon-share-alt:before {
content: "\e095";
}
.glyphicon-resize-full:before {
content: "\e096";
}
.glyphicon-resize-small:before {
content: "\e097";
}
.glyphicon-exclamation-sign:before {
content: "\e101";
}
.glyphicon-gift:before {
content: "\e102";
}
.glyphicon-leaf:before {
content: "\e103";
}
.glyphicon-fire:before {
content: "\e104";
}
.glyphicon-eye-open:before {
content: "\e105";
}
.glyphicon-eye-close:before {
content: "\e106";
}
.glyphicon-warning-sign:before {
content: "\e107";
}
.glyphicon-plane:before {
content: "\e108";
}
.glyphicon-calendar:before {
content: "\e109";
}
.glyphicon-random:before {
content: "\e110";
}
.glyphicon-comment:before {
content: "\e111";
}
.glyphicon-magnet:before {
content: "\e112";
}
.glyphicon-chevron-up:before {
content: "\e113";
}
.glyphicon-chevron-down:before {
content: "\e114";
}
.glyphicon-retweet:before {
content: "\e115";
}
.glyphicon-shopping-cart:before {
content: "\e116";
}
.glyphicon-folder-close:before {
content: "\e117";
}
.glyphicon-folder-open:before {
content: "\e118";
}
.glyphicon-resize-vertical:before {
content: "\e119";
}
.glyphicon-resize-horizontal:before {
content: "\e120";
}
.glyphicon-hdd:before {
content: "\e121";
}
.glyphicon-bullhorn:before {
content: "\e122";
}
.glyphicon-bell:before {
content: "\e123";
}
.glyphicon-certificate:before {
content: "\e124";
}
.glyphicon-thumbs-up:before {
content: "\e125";
}
.glyphicon-thumbs-down:before {
content: "\e126";
}
.glyphicon-hand-right:before {
content: "\e127";
}
.glyphicon-hand-left:before {
content: "\e128";
}
.glyphicon-hand-up:before {
content: "\e129";
}
.glyphicon-hand-down:before {
content: "\e130";
}
.glyphicon-circle-arrow-right:before {
content: "\e131";
}
.glyphicon-circle-arrow-left:before {
content: "\e132";
}
.glyphicon-circle-arrow-up:before {
content: "\e133";
}
.glyphicon-circle-arrow-down:before {
content: "\e134";
}
.glyphicon-globe:before {
content: "\e135";
}
.glyphicon-wrench:before {
content: "\e136";
}
.glyphicon-tasks:before {
content: "\e137";
}
.glyphicon-filter:before {
content: "\e138";
}
.glyphicon-briefcase:before {
content: "\e139";
}
.glyphicon-fullscreen:before {
content: "\e140";
}
.glyphicon-dashboard:before {
content: "\e141";
}
.glyphicon-paperclip:before {
content: "\e142";
}
.glyphicon-heart-empty:before {
content: "\e143";
}
.glyphicon-link:before {
content: "\e144";
}
.glyphicon-phone:before {
content: "\e145";
}
.glyphicon-pushpin:before {
content: "\e146";
}
.glyphicon-usd:before {
content: "\e148";
}
.glyphicon-gbp:before {
content: "\e149";
}
.glyphicon-sort:before {
content: "\e150";
}
.glyphicon-sort-by-alphabet:before {
content: "\e151";
}
.glyphicon-sort-by-alphabet-alt:before {
content: "\e152";
}
.glyphicon-sort-by-order:before {
content: "\e153";
}
.glyphicon-sort-by-order-alt:before {
content: "\e154";
}
.glyphicon-sort-by-attributes:before {
content: "\e155";
}
.glyphicon-sort-by-attributes-alt:before {
content: "\e156";
}
.glyphicon-unchecked:before {
content: "\e157";
}
.glyphicon-expand:before {
content: "\e158";
}
.glyphicon-collapse-down:before {
content: "\e159";
}
.glyphicon-collapse-up:before {
content: "\e160";
}
.glyphicon-log-in:before {
content: "\e161";
}
.glyphicon-flash:before {
content: "\e162";
}
.glyphicon-log-out:before {
content: "\e163";
}
.glyphicon-new-window:before {
content: "\e164";
}
.glyphicon-record:before {
content: "\e165";
}
.glyphicon-save:before {
content: "\e166";
}
.glyphicon-open:before {
content: "\e167";
}
.glyphicon-saved:before {
content: "\e168";
}
.glyphicon-import:before {
content: "\e169";
}
.glyphicon-export:before {
content: "\e170";
}
.glyphicon-send:before {
content: "\e171";
}
.glyphicon-floppy-disk:before {
content: "\e172";
}
.glyphicon-floppy-saved:before {
content: "\e173";
}
.glyphicon-floppy-remove:before {
content: "\e174";
}
.glyphicon-floppy-save:before {
content: "\e175";
}
.glyphicon-floppy-open:before {
content: "\e176";
}
.glyphicon-credit-card:before {
content: "\e177";
}
.glyphicon-transfer:before {
content: "\e178";
}
.glyphicon-cutlery:before {
content: "\e179";
}
.glyphicon-header:before {
content: "\e180";
}
.glyphicon-compressed:before {
content: "\e181";
}
.glyphicon-earphone:before {
content: "\e182";
}
.glyphicon-phone-alt:before {
content: "\e183";
}
.glyphicon-tower:before {
content: "\e184";
}
.glyphicon-stats:before {
content: "\e185";
}
.glyphicon-sd-video:before {
content: "\e186";
}
.glyphicon-hd-video:before {
content: "\e187";
}
.glyphicon-subtitles:before {
content: "\e188";
}
.glyphicon-sound-stereo:before {
content: "\e189";
}
.glyphicon-sound-dolby:before {
content: "\e190";
}
.glyphicon-sound-5-1:before {
content: "\e191";
}
.glyphicon-sound-6-1:before {
content: "\e192";
}
.glyphicon-sound-7-1:before {
content: "\e193";
}
.glyphicon-copyright-mark:before {
content: "\e194";
}
.glyphicon-registration-mark:before {
content: "\e195";
}
.glyphicon-cloud-download:before {
content: "\e197";
}
.glyphicon-cloud-upload:before {
content: "\e198";
}
.glyphicon-tree-conifer:before {
content: "\e199";
}
.glyphicon-tree-deciduous:before {
content: "\e200";
}
.glyphicon-cd:before {
content: "\e201";
}
.glyphicon-save-file:before {
content: "\e202";
}
.glyphicon-open-file:before {
content: "\e203";
}
.glyphicon-level-up:before {
content: "\e204";
}
.glyphicon-copy:before {
content: "\e205";
}
.glyphicon-paste:before {
content: "\e206";
}
.glyphicon-alert:before {
content: "\e209";
}
.glyphicon-equalizer:before {
content: "\e210";
}
.glyphicon-king:before {
content: "\e211";
}
.glyphicon-queen:before {
content: "\e212";
}
.glyphicon-pawn:before {
content: "\e213";
}
.glyphicon-bishop:before {
content: "\e214";
}
.glyphicon-knight:before {
content: "\e215";
}
.glyphicon-baby-formula:before {
content: "\e216";
}
.glyphicon-tent:before {
content: "\26fa";
}
.glyphicon-blackboard:before {
content: "\e218";
}
.glyphicon-bed:before {
content: "\e219";
}
.glyphicon-apple:before {
content: "\f8ff";
}
.glyphicon-erase:before {
content: "\e221";
}
.glyphicon-hourglass:before {
content: "\231b";
}
.glyphicon-lamp:before {
content: "\e223";
}
.glyphicon-duplicate:before {
content: "\e224";
}
.glyphicon-piggy-bank:before {
content: "\e225";
}
.glyphicon-scissors:before {
content: "\e226";
}
.glyphicon-bitcoin:before {
content: "\e227";
}
.glyphicon-btc:before {
content: "\e227";
}
.glyphicon-xbt:before {
content: "\e227";
}
.glyphicon-yen:before {
content: "\00a5";
}
.glyphicon-jpy:before {
content: "\00a5";
}
.glyphicon-ruble:before {
content: "\20bd";
}
.glyphicon-rub:before {
content: "\20bd";
}
.glyphicon-scale:before {
content: "\e230";
}
.glyphicon-ice-lolly:before {
content: "\e231";
}
.glyphicon-ice-lolly-tasted:before {
content: "\e232";
}
.glyphicon-education:before {
content: "\e233";
}
.glyphicon-option-horizontal:before {
content: "\e234";
}
.glyphicon-option-vertical:before {
content: "\e235";
}
.glyphicon-menu-hamburger:before {
content: "\e236";
}
.glyphicon-modal-window:before {
content: "\e237";
}
.glyphicon-oil:before {
content: "\e238";
}
.glyphicon-grain:before {
content: "\e239";
}
.glyphicon-sunglasses:before {
content: "\e240";
}
.glyphicon-text-size:before {
content: "\e241";
}
.glyphicon-text-color:before {
content: "\e242";
}
.glyphicon-text-background:before {
content: "\e243";
}
.glyphicon-object-align-top:before {
content: "\e244";
}
.glyphicon-object-align-bottom:before {
content: "\e245";
}
.glyphicon-object-align-horizontal:before {
content: "\e246";
}
.glyphicon-object-align-left:before {
content: "\e247";
}
.glyphicon-object-align-vertical:before {
content: "\e248";
}
.glyphicon-object-align-right:before {
content: "\e249";
}
.glyphicon-triangle-right:before {
content: "\e250";
}
.glyphicon-triangle-left:before {
content: "\e251";
}
.glyphicon-triangle-bottom:before {
content: "\e252";
}
.glyphicon-triangle-top:before {
content: "\e253";
}
.glyphicon-console:before {
content: "\e254";
}
.glyphicon-superscript:before {
content: "\e255";
}
.glyphicon-subscript:before {
content: "\e256";
}
.glyphicon-menu-left:before {
content: "\e257";
}
.glyphicon-menu-right:before {
content: "\e258";
}
.glyphicon-menu-down:before {
content: "\e259";
}
.glyphicon-menu-up:before {
content: "\e260";
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@@ -7233,7 +6430,7 @@ a {
}
html {
overflow-x: hidden\0/;
-ms-overflow-style: none;
-ms-overflow-style: auto;
}
html,
body {

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,7 @@
.menu-search {
margin-top: 3px;
}
.menu-search input[type="text"] {
height: 30px;
}

View File

@@ -0,0 +1,82 @@
<nav class="navbar navbar-inverse navbar-fixed-top app-header" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" ng-click="isNavOpen = !isNavOpen">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><img ng-src="{{$ctrl.logoUrl}}"/></a>
</div>
<div class="collapse navbar-collapse" uib-collapse="!isNavOpen">
<ul class="nav navbar-nav">
<li class="dropdown" ng-show="$ctrl.showDashboardsMenu" uib-dropdown>
<a href="#" class="dropdown-toggle" uib-dropdown-toggle title="Dashboards">
<span class="visible-xs visible-md visible-lg">Dashboards <b class="caret"></b></span>
<span class="visible-sm"><i class="zmdi zmdi-view-dashboard"></i> <b class="caret"></b></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu>
<li><a ng-show="$ctrl.currentUser.hasPermission('create_dashboard')" ng-click="$ctrl.newDashboard()">New Dashboard</a></li>
<li><a href="dashboards">Dashboards</a></li>
<li class="divider" ng-if="$ctrl.dashboards | notEmpty"></li>
<li ng-repeat="dashboard in $ctrl.dashboards">
<a href="dashboard/{{dashboard.slug}}" ng-bind="dashboard.name"></a>
</li>
</ul>
</li>
<li class="dropdown" ng-show="$ctrl.showQueriesMenu" uib-dropdown>
<a href="#" class="dropdown-toggle" uib-dropdown-toggle>Queries <b class="caret"></b></a>
<ul class="dropdown-menu" uib-dropdown-menu>
<li ng-show="$ctrl.showNewQueryMenu"><a href="queries/new">New Query</a></li>
<li><a href="queries">Queries</a></li>
</ul>
</li>
<li>
<a href="alerts">Alerts</a>
</li>
</ul>
<form class="navbar-form navbar-left" role="search" ng-submit="$ctrl.searchQueries()">
<div class="input-group menu-search">
<input type="text" ng-model="$ctrl.term" class="form-control" placeholder="Search queries...">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="zmdi zmdi-search"></span></button>
</span>
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li ng-show="$ctrl.currentUser.isAdmin">
<a href="data_sources" title="Data Sources"><i class="fa fa-database"></i></a>
</li>
<li ng-show="$ctrl.showSettingsMenu">
<a href="users" title="Settings"><i class="fa fa-cog"></i></a>
</li>
<li class="dropdown" uib-dropdown>
<a href="#" class="dropdown-toggle" uib-dropdown-toggle><span ng-bind="$ctrl.currentUser.name"></span> <span
class="caret"></span></a>
<ul class="dropdown-menu" dropdown-menu>
<li style="width:300px">
<a ng-href="users/{{$ctrl.currentUser.id}}">
<div class="row">
<div class="col-sm-2">
<img ng-src="{{$ctrl.currentUser.gravatar_url}}" size="40px" class="img-circle"/>
</div>
<div class="col-sm-10">
<p><strong>{{$ctrl.currentUser.name}}</strong></p>
</div>
</div>
</a>
</li>
<li class="divider" ng-if="$ctrl.currentUser.hasPermission('super_admin')">
<li ng-if="$ctrl.currentUser.hasPermission('super_admin')"><a href="admin/status">System Status</a></li>
<li class="divider">
</li>
<li>
<a ng-click="$ctrl.logout()">Log out</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>

View File

@@ -0,0 +1,50 @@
import debug from 'debug';
import template from './app-header.html';
import logoUrl from '../../assets/images/redash_icon_small.png';
import './app-header.css';
const logger = debug('redash:appHeader');
function controller($rootScope, $location, $uibModal, Auth, currentUser, Dashboard) {
// TODO: logoUrl should come from clientconfig
this.logoUrl = logoUrl;
this.currentUser = currentUser;
this.showQueriesMenu = currentUser.hasPermission('view_query');
this.showNewQueryMenu = currentUser.hasPermission('create_query');
this.showSettingsMenu = currentUser.hasPermission('list_users');
this.showDashboardsMenu = currentUser.hasPermission('list_dashboards');
this.reloadDashboards = () => {
logger('Reloading dashboards.');
this.dashboards = Dashboard.recent();
};
this.reloadDashboards();
$rootScope.$on('reloadDashboards', this.reloadDashboards);
this.newDashboard = () => {
$uibModal.open({
component: 'editDashboardDialog',
resolve: {
dashboard: () => ({ name: null, layout: null }),
},
});
};
this.searchQueries = () => {
$location.path('/queries/search').search({ q: this.term });
};
this.logout = () => {
Auth.logout();
};
}
export default function (ngModule) {
ngModule.component('appHeader', {
template,
controller,
});
}

View File

@@ -8,15 +8,29 @@
<select name="type" class="form-control" ng-options="type.type as type.name for type in types" ng-model="target.type"></select>
</div>
<div class="form-group" ng-class='{"has-error": !inner.input.$valid}' ng-form="inner" ng-repeat="(name, input) in type.configuration_schema.properties">
<label>{{input.title || name | capitalize}}</label>
<label ng-if="input.type !== 'checkbox'">{{input.title || name | capitalize}}</label>
<input name="input" type="{{input.type}}" class="form-control" ng-model="target.options[name]" ng-required="input.required"
ng-if="input.type !== 'file'" accesskey="tab" placeholder="{{input.default}}">
ng-if="input.type !== 'file' && input.type !== 'checkbox'" accesskey="tab" placeholder="{{input.default}}">
<label ng-if="input.type=='checkbox'">
<input name="input" type="{{input.type}}" ng-model="target.options[name]" ng-required="input.required"
ng-if="input.type !== 'file'" accesskey="tab" placeholder="{{input.default}}">
{{input.title || name | capitalize}}
</label>
<input name="input" type="file" class="form-control" ng-model="files[name]" ng-required="input.required && !target.options[name]"
base-sixty-four-input
ng-if="input.type === 'file'">
</div>
<button class="btn btn-primary" ng-disabled="!dataSourceForm.$valid" ng-click="saveChanges()">Save</button>
<span ng-repeat="action in actions">
<button class="btn"
ng-class="action.class"
ng-if="target.id"
ng-disabled="(action.disableWhenDirty && dataSourceForm.$dirty) || inProgressActions[action.name]"
ng-click="action.callback()" ng-bind-html="action.name"></button>
</span>
<span ng-transclude>
</span>

View File

@@ -0,0 +1,108 @@
import { each, contains, find } from 'underscore';
import endsWith from 'underscore.string/endsWith';
import template from './dynamic-form.html';
function DynamicForm($http, toastr, $q) {
return {
restrict: 'E',
replace: 'true',
transclude: true,
template,
scope: {
target: '=',
type: '@type',
actions: '=',
},
link($scope) {
function setType(types) {
if ($scope.target.type === undefined) {
$scope.target.type = types[0].type;
}
$scope.type = find(types, t => t.type === $scope.target.type);
}
$scope.inProgressActions = {};
if ($scope.actions) {
$scope.actions.forEach((action) => {
const originalCallback = action.callback;
const name = action.name;
action.callback = () => {
action.name = `<i class="zmdi zmdi-spinner zmdi-hc-spin"></i> ${name}`;
$scope.inProgressActions[action.name] = true;
function release() {
$scope.inProgressActions[action.name] = false;
action.name = name;
}
originalCallback(release);
};
});
}
$scope.files = {};
$scope.$watchCollection('files', () => {
each($scope.files, (v, k) => {
// THis is needed because angular-base64-upload sets the value to null at initialization,
// causing the field to be marked as dirty even if it wasn't changed.
if (!v && $scope.target.options[k]) {
$scope.dataSourceForm.$setPristine();
}
if (v) {
$scope.target.options[k] = v.base64;
}
});
});
const typesPromise = $http.get(`api/${$scope.type}/types`);
$q.all([typesPromise, $scope.target.$promise]).then((responses) => {
const types = responses[0].data;
setType(types);
$scope.types = types;
types.forEach((type) => {
each(type.configuration_schema.properties, (prop, name) => {
if (name === 'password' || name === 'passwd') {
prop.type = 'password';
}
if (endsWith(name, 'File')) {
prop.type = 'file';
}
if (prop.type === 'boolean') {
prop.type = 'checkbox';
}
prop.required = contains(type.configuration_schema.required, name);
});
});
});
$scope.$watch('target.type', (current, prev) => {
if (prev !== current) {
if (prev !== undefined) {
$scope.target.options = {};
}
setType($scope.types);
}
});
$scope.saveChanges = () => {
$scope.target.$save(() => {
toastr.success('Saved.');
$scope.dataSourceForm.$setPristine();
}, () => {
toastr.error('Failed saving.');
});
};
},
};
}
export default function (ngModule) {
ngModule.directive('dynamicForm', DynamicForm);
}

View File

@@ -0,0 +1,7 @@
dynamic-table > div {
overflow: auto;
}
th.sortable-column {
cursor: pointer;
}

View File

@@ -0,0 +1,30 @@
<div>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th ng-repeat="column in $ctrl.columns" ng-click="$ctrl.orderBy(column)" class="sortable-column">
{{column.title}} <span ng-if="$ctrl.sortIcon(column)"><i class="fa fa-sort-{{$ctrl.sortIcon(column)}}"></i></span>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in $ctrl.rows">
<td ng-repeat="column in $ctrl.columns" ng-bind-html="$ctrl.sanitize(column.formatFunction(row[column.name]))">
</td>
</tr>
</tbody>
</table>
</div>
<div class="text-center">
<ul uib-pagination total-items="$ctrl.rowsCount"
items-per-page="$ctrl.itemsPerPage"
ng-model="$ctrl.page"
max-size="6"
class="pagination"
boundary-link-numbers="true"
rotate="false"
next-text='>'
previous-text='<'
ng-change="$ctrl.pageChanged()"></ul>
</div>

View File

@@ -0,0 +1,77 @@
import { sortBy } from 'underscore';
import template from './dynamic-table.html';
import './dynamic-table.css';
function DynamicTable($sanitize) {
'ngInject';
this.itemsPerPage = this.count = 15;
this.page = 1;
this.rowsCount = 0;
this.orderByField = undefined;
this.orderByReverse = false;
this.pageChanged = () => {
const first = this.count * (this.page - 1);
const last = this.count * (this.page);
this.rows = this.allRows.slice(first, last);
};
this.$onChanges = (changes) => {
if (changes.columns) {
this.columns = changes.columns.currentValue;
}
if (changes.rows) {
this.allRows = changes.rows.currentValue;
}
this.rowsCount = this.allRows.length;
this.pageChanged();
};
this.orderBy = (column) => {
if (column === this.orderByField) {
this.orderByReverse = !this.orderByReverse;
} else {
this.orderByField = column;
this.orderByReverse = false;
}
if (this.orderByField) {
this.allRows = sortBy(this.allRows, this.orderByField.name);
if (this.orderByReverse) {
this.allRows = this.allRows.reverse();
}
this.pageChanged();
}
};
this.sanitize = value => $sanitize(value);
this.sortIcon = (column) => {
if (column !== this.orderByField) {
return null;
}
if (this.orderByReverse) {
return 'desc';
}
return 'asc';
};
}
export default function (ngModule) {
ngModule.component('dynamicTable', {
template,
controller: DynamicTable,
bindings: {
rows: '<',
columns: '<',
count: '<',
},
});
}

View File

@@ -0,0 +1,94 @@
import $ from 'jquery';
import { isEmpty } from 'underscore';
// From: http://jsfiddle.net/joshdmiller/NDFHg/
function EditInPlace() {
return {
restrict: 'E',
scope: {
value: '=',
ignoreBlanks: '=',
editable: '=',
done: '=',
},
template(tElement, tAttrs) {
const elType = tAttrs.editor || 'input';
const placeholder = tAttrs.placeholder || 'Click to edit';
let viewMode = '';
if (tAttrs.markdown === 'true') {
viewMode = '<span ng-click="editable && edit()" ng-bind-html="value|markdown" ng-class="{editable: editable}"></span>';
} else {
viewMode = '<span ng-click="editable && edit()" ng-bind="value" ng-class="{editable: editable}"></span>';
}
const placeholderSpan = `<span ng-click="editable && edit()"
ng-show="editable && !value"
ng-class="{editable: editable}">${placeholder}</span>`;
const editor = '<{elType} ng-model="value" class="rd-form-control"></{elType}>'.replace('{elType}', elType);
return viewMode + placeholderSpan + editor;
},
link($scope, element) {
// Let's get a reference to the input element, as we'll want to reference it.
const inputElement = $(element.children()[2]);
// This directive should have a set class so we can style it.
element.addClass('edit-in-place');
// Initially, we're not editing.
$scope.editing = false;
// ng-click handler to activate edit-in-place
$scope.edit = () => {
$scope.oldValue = $scope.value;
$scope.editing = true;
// We control display through a class on the directive itself. See the CSS.
element.addClass('active');
// And we must focus the element.
// `angular.element()` provides a chainable array, like jQuery so to access
// a native DOM function, we have to reference the first element in the array.
inputElement[0].focus();
};
function save() {
if ($scope.editing) {
if ($scope.ignoreBlanks && isEmpty($scope.value)) {
$scope.value = $scope.oldValue;
}
$scope.editing = false;
element.removeClass('active');
if ($scope.value !== $scope.oldValue) {
if ($scope.done) {
$scope.done();
}
}
}
}
$(inputElement).keydown((e) => {
// 'return' or 'enter' key pressed
// allow 'shift' to break lines
if (e.which === 13 && !e.shiftKey) {
save();
} else if (e.which === 27) {
$scope.value = $scope.oldValue;
$scope.$apply(() => {
$(inputElement[0]).blur();
});
}
}).blur(() => {
save();
});
},
};
}
export default function (ngModule) {
ngModule.directive('editInPlace', EditInPlace);
}

View File

@@ -0,0 +1,13 @@
function controller(clientConfig, currentUser) {
this.showMailWarning = clientConfig.mailSettingsMissing && currentUser.isAdmin;
}
export default function (ngModule) {
ngModule.component('emailSettingsWarning', {
bindings: {
function: '<',
},
template: '<p class="alert alert-danger" ng-if="$ctrl.showMailWarning">It looks like your mail server isn\'t configured. Make sure to configure it for the {{$ctrl.function}} to work.</p>',
controller,
});
}

View File

@@ -0,0 +1,20 @@
const ErrorMessagesComponent = {
template: `
<div class="help-block" ng-messages="$ctrl.input.$error" ng-show="$ctrl.input.$touched || $ctrl.form.$submitted">
<span class="error" ng-message="required">This field is required.</span>
<span class="error" ng-message="minlength">This field is too short.</span>
<span class="error" ng-message="email">This needs to be a valid email.</span>
</div>
`,
replace: true,
bindings: {
input: '<',
form: '<',
},
controller() {
},
};
export default function (ngModule) {
ngModule.component('errorMessages', ErrorMessagesComponent);
}

View File

@@ -1,14 +1,14 @@
<div class="container bg-white p-5" ng-show="filters">
<div class="row" ng-show="filters">
<div class="col-sm-6 m-t-5" ng-repeat="filter in filters">
<ui-select ng-model="filter.current" ng-if="!filter.multiple">
<div class="container bg-white p-5" ng-show="$ctrl.filters | notEmpty">
<div class="row">
<div class="col-sm-6 m-t-5" ng-repeat="filter in $ctrl.filters">
<ui-select ng-model="filter.current" ng-if="!filter.multiple" on-select="$ctrl.filterChangeListener(filter, $model)" on-remove="$ctrl.filterChangeListener(filter, $model)">
<ui-select-match placeholder="Select value for {{filter.friendlyName}}...">{{filter.friendlyName}}: {{$select.selected | filterValue:filter}}</ui-select-match>
<ui-select-choices repeat="value in filter.values | filter: $select.search">
{{value | filterValue:filter }}
</ui-select-choices>
</ui-select>
<ui-select ng-model="filter.current" multiple ng-if="filter.multiple">
<ui-select ng-model="filter.current" multiple ng-if="filter.multiple" on-select="$ctrl.filterChangeListener(filter, $model)" on-remove="$ctrl.filterChangeListener(filter, $model)">
<ui-select-match placeholder="Select value for {{filter.friendlyName}}...">{{filter.friendlyName}}: {{$item | filterValue:filter}}</ui-select-match>
<ui-select-choices repeat="value in filter.values | filter: $select.search">
{{value | filterValue:filter }}
@@ -17,3 +17,4 @@
</div>
</div>
</div>

View File

@@ -0,0 +1,21 @@
import template from './filters.html';
const FiltersComponent = {
template,
bindings: {
onChange: '&',
filters: '<',
},
controller() {
'ngInject';
this.filterChangeListener = (filter, modal) => {
this.onChange({ filter, $modal: modal });
};
},
};
export default function (ngModule) {
ngModule.component('filters', FiltersComponent);
}

View File

@@ -0,0 +1,8 @@
<div id="footer">
<a href="http://redash.io">Redash</a> <span ng-bind="$ctrl.version"></span> <small ng-if="$ctrl.newVersionAvailable" ng-cloak class="ng-cloak"><a href="https://version.redash.io/">(New Redash version available)</a></small>
<ul class="f-menu">
<li><a href="https://redash.io/help/">Documentation</a></li>
<li><a href="http://github.com/getredash/redash">Contribute</a></li>
</ul>
</div>

View File

@@ -0,0 +1,13 @@
import template from './footer.html';
function controller(clientConfig, currentUser) {
this.version = clientConfig.version;
this.newVersionAvailable = clientConfig.newVersionAvailable && currentUser.isAdmin;
}
export default function (ngModule) {
ngModule.component('footer', {
template,
controller,
});
}

View File

@@ -0,0 +1,20 @@
export { default as appHeader } from './app-header';
export { default as footer } from './footer';
export { default as pageHeader } from './page-header';
export { default as tabNav } from './tab-nav';
export { default as emailSettingsWarning } from './email-settings-warning';
export { default as rdTab } from './rd-tab';
export { default as queryLink } from './query-link';
export { default as parameters } from './parameters';
export { default as permissionsEditor } from './permissions-editor';
export { default as dynamicTable } from './dynamic-table';
export { default as paginator } from './paginator';
export { default as settingsScreen } from './settings-screen';
export { default as errorMessages } from './error-messages';
export { default as editInPlace } from './edit-in-place';
export { default as dynamicForm } from './dynamic-form';
export { default as rdTimer } from './rd-timer';
export { default as rdTimeAgo } from './rd-time-ago';
export { default as overlay } from './overlay';
export { default as routeStatus } from './route-status';
export { default as filters } from './filters';

View File

@@ -0,0 +1,16 @@
const Overlay = {
template: `
<div>
<div class="overlay"></div>
<div style="width: 100%; position:absolute; top:50px; z-index:2000">
<div class="well well-lg" style="width: 70%; margin: auto;" ng-transclude>
</div>
</div>
</div>
`,
transclude: true,
};
export default function (ngModule) {
ngModule.component('overlay', Overlay);
}

View File

@@ -0,0 +1,16 @@
import template from './page-header.html';
function controller() {
}
export default function (ngModule) {
ngModule.component('pageHeader', {
template,
controller,
transclude: true,
bindings: {
title: '@',
},
});
}

View File

@@ -1,6 +1,6 @@
<div class="row bg-white p-10 p-l-15 p-r-15 m-b-10">
<div class="col-sm-9">
<h3>{{title}}</h3>
<h3>{{$ctrl.title}}</h3>
</div>
<div class="col-sm-3 text-right">
<h3 ng-transclude>

View File

@@ -0,0 +1,31 @@
class PaginatorCtrl {
constructor() {
this.page = this.paginator.page;
}
pageChanged() {
this.paginator.setPage(this.page);
}
}
export default function (ngModule) {
ngModule.component('paginator', {
template: `
<div class="text-center">
<ul uib-pagination total-items="$ctrl.paginator.totalCount"
items-per-page="$ctrl.paginator.itemsPerPage"
ng-model="$ctrl.page"
max-size="6"
class="pagination"
boundary-link-numbers="true"
rotate="false"
next-text='>'
previous-text='<'
ng-change="$ctrl.pageChanged()"></ul>
</div>
`,
bindings: {
paginator: '<',
},
controller: PaginatorCtrl,
});
}

View File

@@ -1,21 +1,26 @@
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="close()"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{{parameter.name}}</h4>
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.close()"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{{$ctrl.parameter.name}}</h4>
</div>
<div class="modal-body">
<div class="form">
<div class="form-group">
<label>Title</label>
<input type="text" class="form-control" ng-model="parameter.title">
<input type="text" class="form-control" ng-model="$ctrl.parameter.title">
</div>
<div class="form-group">
<label>Type</label>
<select ng-model="parameter.type" class="form-control">
<select ng-model="$ctrl.parameter.type" class="form-control">
<option value="text">Text</option>
<option value="number">Number</option>
<option value="date">Date</option>
<option value="datetime-local">Date and Time</option>
<option value="datetime-with-seconds">Date and Time (with seconds)</option>
</select>
</div>
<div class="form-group">
<label>Global</label>
<input type="checkbox" class="form-inline" ng-model="$ctrl.parameter.global">
</div>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<div class="form-inline bg-white p-5" ng-if="parameters | notEmpty" ui-sortable="{ 'ui-floating': true, 'disabled': !editable }" ng-model="parameters">
<div class="form-group" ng-repeat="param in parameters">
<label>{{param.title}}</label>
<button class="btn btn-default btn-xs" ng-click="showParameterSettings(param)" ng-if="editable"><i class="zmdi zmdi-settings"></i></button>
<span ng-switch="param.type">
<input ng-switch-when="datetime-with-seconds" type="datetime-local" step="1" class="form-control" ng-model="param.ngModel">
<input ng-switch-when="datetime-local" type="datetime-local" class="form-control" ng-model="param.ngModel">
<input ng-switch-when="date" type="date" class="form-control" ng-model="param.ngModel">
<input ng-switch-default type="{{param.type}}" class="form-control" ng-model="param.ngModel">
</span>
</div>
</div>

View File

@@ -0,0 +1,59 @@
import template from './parameters.html';
import parameterSettingsTemplate from './parameter-settings.html';
const ParameterSettingsComponent = {
template: parameterSettingsTemplate,
bindings: {
resolve: '<',
close: '&',
dismiss: '&',
},
controller() {
'ngInject';
this.parameter = this.resolve.parameter;
},
};
function ParametersDirective($location, $uibModal) {
return {
restrict: 'E',
transclude: true,
scope: {
parameters: '=',
syncValues: '=?',
editable: '=?',
changed: '&onChange',
},
template,
link(scope) {
// is this the correct location for this logic?
if (scope.syncValues !== false) {
scope.$watch('parameters', () => {
if (scope.changed) {
scope.changed({});
}
scope.parameters.forEach((param) => {
if (param.value !== null || param.value !== '') {
$location.search(`p_${param.name}`, param.value);
}
});
}, true);
}
scope.showParameterSettings = (param) => {
$uibModal.open({
component: 'parameterSettings',
resolve: {
parameter: param,
},
});
};
},
};
}
export default function (ngModule) {
ngModule.directive('parameters', ParametersDirective);
ngModule.component('parameterSettings', ParameterSettingsComponent);
}

View File

@@ -0,0 +1,79 @@
import { contains, each } from 'underscore';
import template from './permissions-editor.html';
const PermissionsEditorComponent = {
template,
bindings: {
resolve: '<',
close: '&',
dismiss: '&',
},
controller($http, User) {
'ngInject';
this.grantees = [];
this.newGrantees = {};
this.aclUrl = this.resolve.aclUrl.url;
// List users that are granted permissions
const loadGrantees = () => {
$http.get(this.aclUrl).success((result) => {
this.grantees = [];
each(result, (grantees, accessType) => {
grantees.forEach((grantee) => {
grantee.access_type = accessType;
this.grantees.push(grantee);
});
});
});
};
loadGrantees();
// Search for user
this.findUser = (search) => {
if (search === '') {
return;
}
if (this.foundUsers === undefined) {
User.query((users) => {
const existingIds = this.grantees.map(m => m.id);
users.forEach((user) => { user.alreadyGrantee = contains(existingIds, user.id); });
this.foundUsers = users;
});
}
};
// Add new user to grantees list
this.addGrantee = (user) => {
this.newGrantees.selected = undefined;
const body = { access_type: 'modify', user_id: user.id };
$http.post(this.aclUrl, body).success(() => {
user.alreadyGrantee = true;
loadGrantees();
});
};
// Remove user from grantees list
this.removeGrantee = (user) => {
const body = { access_type: 'modify', user_id: user.id };
$http({ url: this.aclUrl,
method: 'DELETE',
data: body,
headers: { 'Content-Type': 'application/json' },
}).success(() => {
this.grantees = this.grantees.filter(m => m !== user);
if (this.foundUsers) {
this.foundUsers.forEach((u) => { if (u.id === user.id) { u.alreadyGrantee = false; } });
}
});
};
},
};
export default function (ngModule) {
ngModule.component('permissionsEditor', PermissionsEditorComponent);
}

View File

@@ -0,0 +1,39 @@
<div class="modal-header">
<button type="button" class="close" aria-label="Close" ng-click="$ctrl.close()"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Manage Permissions</h4>
</div>
<div class="modal-body">
<div style="overflow: auto; height: 300px">
<ui-select ng-model="$ctrl.newGrantee.selected" on-select="$ctrl.addGrantee($item)">
<ui-select-match placeholder="Add New User"></ui-select-match>
<ui-select-choices repeat="user in $ctrl.foundUsers | filter:$select.search"
refresh="$ctrl.findUser($select.search)"
refresh-delay="0"
ui-disable-choice="user.alreadyGrantee">
<div>
<img ng-src="{{user.gravatar_url}}" height="24px">&nbsp;{{user.name}}
<small ng-if="user.alreadyGrantee">(already has permission)</small>
</div>
</ui-select-choices>
</ui-select>
<br/>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th></th>
<th>User</th>
<th>Permission</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="grantee in $ctrl.grantees">
<td width="50px"><img ng-src="{{grantee.gravatar_url}}" height="40px"/></td>
<td>{{grantee.name}} </td>
<td>{{grantee.access_type}}</td>
<td><button class="pull-right btn btn-sm btn-danger" ng-click="$ctrl.removeGrantee(grantee)">Remove</button></td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,25 @@
function QueryLinkController() {
let hash = null;
if (this.visualization) {
if (this.visualization.type === 'TABLE') {
// link to hard-coded table tab instead of the (hidden) visualization tab
hash = 'table';
} else {
hash = this.visualization.id;
}
}
this.link = this.query.getUrl(false, hash);
}
export default function (ngModule) {
ngModule.component('queryLink', {
bindings: {
query: '<',
visualization: '<',
},
template: '<a ng-href="{{$ctrl.link}}" class="query-link">{{$ctrl.query.name}}</a>',
controller: QueryLinkController,
});
}

View File

@@ -0,0 +1,25 @@
function rdTab($location) {
return {
restrict: 'E',
scope: {
tabId: '@',
name: '@',
basePath: '=?',
},
transclude: true,
template: '<li class="rd-tab" ng-class="{active: tabId==selectedTab}"><a href="{{basePath}}#{{tabId}}">{{name}}<span ng-transclude></span></a></li>',
replace: true,
link(scope) {
scope.basePath = scope.basePath || $location.path().substring(1);
scope.$watch(() =>
scope.$parent.selectedTab
, (tab) => {
scope.selectedTab = tab;
});
},
};
}
export default function (ngModule) {
ngModule.directive('rdTab', rdTab);
}

View File

@@ -0,0 +1,15 @@
const RdTimeAgo = {
bindings: {
value: '=',
},
controller() {
},
template: '<span>' +
'<span ng-show="$ctrl.value" am-time-ago="$ctrl.value"></span>' +
'<span ng-hide="$ctrl.value">-</span>' +
'</span>',
};
export default function (ngModule) {
ngModule.component('rdTimeAgo', RdTimeAgo);
}

View File

@@ -0,0 +1,30 @@
import moment from 'moment';
function rdTimer() {
return {
restrict: 'E',
scope: { timestamp: '=' },
template: '{{currentTime}}',
controller($scope) {
$scope.currentTime = '00:00:00';
// We're using setInterval directly instead of $timeout, to avoid using $apply, to
// prevent the digest loop being run every second.
let currentTimer = setInterval(() => {
$scope.currentTime = moment(moment() - moment($scope.timestamp)).utc().format('HH:mm:ss');
$scope.$digest();
}, 1000);
$scope.$on('$destroy', () => {
if (currentTimer) {
clearInterval(currentTimer);
currentTimer = null;
}
});
},
};
}
export default function (ngModule) {
ngModule.directive('rdTimer', rdTimer);
}

View File

@@ -0,0 +1,19 @@
export default function (ngModule) {
ngModule.component('routeStatus', {
template: '<overlay ng-if="$ctrl.permissionDenied">You do not have permission to load this page.',
controller($rootScope) {
this.permissionDenied = false;
$rootScope.$on('$routeChangeSuccess', () => {
this.permissionDenied = false;
});
$rootScope.$on('$routeChangeError', (event, current, previous, rejection) => {
if (rejection.status === 403) {
this.permissionDenied = true;
}
});
},
});
}

View File

@@ -8,6 +8,7 @@
<li ng-class="{'active': usersPage }" ng-if="showUsersLink"><a href="users">Users</a></li>
<li ng-class="{'active': groupsPage }" ng-if="showGroupsLink"><a href="groups">Groups</a></li>
<li ng-class="{'active': destinationsPage }" ng-if="showDestinationsLink"><a href="destinations">Alert Destinations</a></li>
<li ng-class="{'active': snippetsPage }"><a href="query_snippets">Query Snippets</a></li>
</ul>
<div ng-transclude>

View File

@@ -0,0 +1,24 @@
import startsWith from 'underscore.string/startsWith';
import template from './settings-screen.html';
export default function (ngModule) {
ngModule.directive('settingsScreen', $location =>
({
restrict: 'E',
transclude: true,
template,
controller($scope, currentUser) {
$scope.usersPage = startsWith($location.path(), '/users');
$scope.groupsPage = startsWith($location.path(), '/groups');
$scope.dsPage = startsWith($location.path(), '/data_sources');
$scope.destinationsPage = startsWith($location.path(), '/destinations');
$scope.snippetsPage = startsWith($location.path(), '/query_snippets');
$scope.showGroupsLink = currentUser.hasPermission('list_users');
$scope.showUsersLink = currentUser.hasPermission('list_users');
$scope.showDsLink = currentUser.hasPermission('admin');
$scope.showDestinationsLink = currentUser.hasPermission('admin');
},
})
);
}

View File

@@ -0,0 +1,23 @@
import startsWith from 'underscore.string/startsWith';
function controller($location) {
this.tabs.forEach((tab) => {
if (tab.isActive) {
tab.active = tab.isActive($location.path());
} else {
tab.active = startsWith($location.path(), `/${tab.path}`);
}
});
}
export default function (ngModule) {
ngModule.component('tabNav', {
template: '<ul class="tab-nav bg-white">' +
'<li ng-repeat="tab in $ctrl.tabs" ng-class="{\'active\': tab.active }"><a ng-href="{{tab.path}}">{{tab.name}}</a></li>' +
'</ul>',
controller,
bindings: {
tabs: '<',
},
});
}

View File

@@ -0,0 +1,15 @@
function VisualizationName(Visualization) {
return {
restrict: 'E',
scope: {
visualization: '=',
},
template: '{{name}}',
replace: false,
link(scope) {
if (Visualization.visualizations[scope.visualization.type].name !== scope.visualization.name) {
scope.name = scope.visualization.name;
}
},
};
}

View File

@@ -0,0 +1,78 @@
import debug from 'debug';
const logger = debug('redash:directives');
function compareTo() {
return {
require: 'ngModel',
scope: {
otherModelValue: '=compareTo',
},
link(scope, element, attributes, ngModel) {
const validate = (value) => {
ngModel.$setValidity('compareTo', value === scope.otherModelValue);
};
scope.$watch('otherModelValue', () => {
validate(ngModel.$modelValue);
});
ngModel.$parsers.push((value) => {
validate(value);
return value;
});
},
};
}
function autofocus($timeout) {
return {
link(scope, element) {
$timeout(() => {
element[0].focus();
});
},
};
}
function TitleService($rootScope) {
const Title = {
title: 'Redash',
set(newTitle) {
this.title = newTitle;
$rootScope.$broadcast('$titleChange');
},
get() {
return this.title;
},
};
return Title;
}
function title($rootScope, Title) {
return {
restrict: 'E',
link(scope, element) {
function updateTitle() {
const newTitle = Title.get();
logger('Updating title to: %s', newTitle);
element.text(newTitle);
}
$rootScope.$on('$routeChangeSuccess', (event, to) => {
if (to.title) {
Title.set(to.title);
}
});
$rootScope.$on('$titleChange', updateTitle);
},
};
}
export default function (ngModule) {
ngModule.factory('Title', TitleService);
ngModule.directive('title', title);
ngModule.directive('compareTo', compareTo);
ngModule.directive('autofocus', autofocus);
}

View File

@@ -0,0 +1,15 @@
import moment from 'moment';
export default function (ngModule) {
ngModule.filter('toMilliseconds', () => value => value * 1000.0);
ngModule.filter('dateTime', clientConfig =>
function dateTime(value) {
if (!value) {
return '-';
}
return moment(value).format(clientConfig.dateTimeFormat);
}
);
}

106
client/app/filters/index.js Normal file
View File

@@ -0,0 +1,106 @@
import moment from 'moment';
import _capitalize from 'underscore.string/capitalize';
import { isEmpty } from 'underscore';
// eslint-disable-next-line
const urlPattern = /(^|[\s\n]|<br\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi;
export function durationHumanize(duration) {
let humanized = '';
if (duration === undefined) {
humanized = '-';
} else if (duration < 60) {
const seconds = Math.round(duration);
humanized = `${seconds}s`;
} else if (duration > 3600 * 24) {
const days = Math.round(parseFloat(duration) / 60.0 / 60.0 / 24.0);
humanized = `${days}days`;
} else if (duration >= 3600) {
const hours = Math.round(parseFloat(duration) / 60.0 / 60.0);
humanized = `${hours}h`;
} else {
const minutes = Math.round(parseFloat(duration) / 60.0);
humanized = `${minutes}m`;
}
return humanized;
}
export function scheduleHumanize(schedule) {
if (schedule === null) {
return 'Never';
} else if (schedule.match(/\d\d:\d\d/) !== null) {
const parts = schedule.split(':');
const localTime = moment.utc()
.hour(parts[0])
.minute(parts[1])
.local()
.format('HH:mm');
return `Every day at ${localTime}`;
}
return `Every ${durationHumanize(parseInt(schedule, 10))}`;
}
export function toHuman(text) {
return text.replace(/_/g, ' ').replace(/(?:^|\s)\S/g, a =>
a.toUpperCase()
);
}
export function colWidth(widgetWidth) {
if (widgetWidth === 0) {
return 0;
} else if (widgetWidth === 1) {
return 6;
} else if (widgetWidth === 2) {
return 12;
}
return widgetWidth;
}
export function capitalize(text) {
if (text) {
return _capitalize(text);
}
return null;
}
export function linkify(text) {
return text.replace(urlPattern, "$1<a href='$2' target='_blank'>$2</a>");
}
export function remove(items, item) {
if (items === undefined) {
return items;
}
let notEquals;
if (item instanceof Array) {
notEquals = other => item.indexOf(other) === -1;
} else {
notEquals = other => item !== other;
}
const filtered = [];
for (let i = 0; i < items.length; i += 1) {
if (notEquals(items[i])) {
filtered.push(items[i]);
}
}
return filtered;
}
export function notEmpty(collection) {
return !isEmpty(collection);
}
export function showError(field, form) {
return (field.$touched && field.$invalid) || form.$submitted;
}

View File

@@ -0,0 +1,18 @@
import marked from 'marked';
export default function (ngModule) {
ngModule.filter('markdown', ($sce, clientConfig) =>
function markdown(text) {
if (!text) {
return '';
}
let html = marked(String(text));
if (clientConfig.allowScriptsInUserInput) {
html = $sce.trustAsHtml(html);
}
return html;
}
);
}

19
client/app/index.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html ng-app="app">
<head lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<base href="/">
<title>Redash</title>
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="./assets/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/images/favicon-16x16.png">
</head>
<body>
<section>
<div ng-view></div>
</section>
</body>
</html>

118
client/app/index.js Normal file
View File

@@ -0,0 +1,118 @@
import 'material-design-iconic-font/dist/css/material-design-iconic-font.css';
import 'font-awesome/css/font-awesome.css';
import 'ui-select/dist/select.css';
import 'angular-toastr/dist/angular-toastr.css';
import 'angular-resizable/src/angular-resizable.css';
import 'angular-gridster/dist/angular-gridster.css';
import 'pace-progress/themes/blue/pace-theme-minimal.css';
import 'pace-progress';
import debug from 'debug';
import angular from 'angular';
import ngSanitize from 'angular-sanitize';
import ngRoute from 'angular-route';
import ngResource from 'angular-resource';
import uiBootstrap from 'angular-ui-bootstrap';
import uiSelect from 'ui-select';
import ngMessages from 'angular-messages';
import toastr from 'angular-toastr';
import ngUpload from 'angular-base64-upload';
import vsRepeat from 'angular-vs-repeat';
import 'angular-moment';
import 'brace';
import 'angular-ui-ace';
import 'angular-resizable';
import ngGridster from 'angular-gridster';
import { each } from 'underscore';
import './sortable';
import './assets/css/superflat_redash.css';
import './assets/css/redash.css';
import './assets/css/main.scss';
import * as pages from './pages';
import * as components from './components';
import * as filters from './filters';
import * as services from './services';
import registerDirectives from './directives';
import registerVisualizations from './visualizations';
import markdownFilter from './filters/markdown';
import dateTimeFilter from './filters/datetime';
const logger = debug('redash');
const requirements = [
ngRoute, ngResource, ngSanitize, uiBootstrap, ngMessages, uiSelect, 'angularMoment', toastr, 'ui.ace',
ngUpload, 'angularResizable', vsRepeat, 'ui.sortable', ngGridster.name,
];
const ngModule = angular.module('app', requirements);
function registerComponents() {
each(components, (register) => {
register(ngModule);
});
}
function registerServices() {
each(services, (register) => {
register(ngModule);
});
}
function registerPages() {
each(pages, (registerPage) => {
const routes = registerPage(ngModule);
ngModule.config(($routeProvider) => {
each(routes, (route, path) => {
logger('Route: ', path);
// This is a workaround, to make sure app-header and footer are loaded only
// for the authenticated routes.
// We should look into switching to ui-router, that has built in support for
// such things.
route.template = `<app-header></app-header><route-status></route-status>${route.template}<footer></footer>`;
route.authenticated = true;
$routeProvider.when(path, route);
});
});
});
}
function registerFilters() {
each(filters, (filter, name) => {
ngModule.filter(name, () => filter);
});
}
registerDirectives(ngModule);
registerServices();
registerFilters();
markdownFilter(ngModule);
dateTimeFilter(ngModule);
registerComponents();
registerPages();
registerVisualizations(ngModule);
ngModule.config(($routeProvider, $locationProvider, $compileProvider,
uiSelectConfig, toastrConfig) => {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|http|data):/);
$locationProvider.html5Mode(true);
uiSelectConfig.theme = 'bootstrap';
Object.assign(toastrConfig, {
positionClass: 'toast-bottom-right',
timeOut: 2000,
});
});
// Update ui-select's template to use Font-Awesome instead of glyphicon.
ngModule.run(($templateCache, OfflineListener) => { // eslint-disable-line no-unused-vars
const templateName = 'bootstrap/match.tpl.html';
let template = $templateCache.get(templateName);
template = template.replace('glyphicon glyphicon-remove', 'fa fa-remove');
$templateCache.put(templateName, template);
});
export default ngModule;

View File

@@ -0,0 +1,10 @@
import registerStatusPage from './status';
import registerOutdatedQueriesPage from './outdated-queries';
import registerTasksPage from './tasks';
export default function (ngModule) {
const routes = Object.assign({}, registerStatusPage(ngModule),
registerOutdatedQueriesPage(ngModule),
registerTasksPage(ngModule));
return routes;
}

View File

@@ -0,0 +1,45 @@
import moment from 'moment';
import { Paginator } from '../../../utils';
import template from './outdated-queries.html';
function OutdatedQueriesCtrl($scope, Events, $http, $timeout) {
Events.record('view', 'page', 'admin/outdated_queries');
$scope.autoUpdate = true;
this.queries = new Paginator([], { itemsPerPage: 50 });
const refresh = () => {
if ($scope.autoUpdate) {
$scope.refresh_time = moment().add(1, 'minutes');
$http.get('/api/admin/queries/outdated').success((data) => {
this.queries.updateRows(data.queries);
$scope.updatedAt = data.updated_at * 1000.0;
});
}
const timer = $timeout(refresh, 59 * 1000);
$scope.$on('$destroy', () => {
if (timer) {
$timeout.cancel(timer);
}
});
};
refresh();
}
export default function (ngModule) {
ngModule.component('outdatedQueriesPage', {
template,
controller: OutdatedQueriesCtrl,
});
return {
'/admin/queries/outdated': {
template: '<outdated-queries-page></outdated-queries-page>',
title: 'Outdated Queries',
},
};
}

View File

@@ -0,0 +1,46 @@
<page-header title="Admin">
</page-header>
<div class="container">
<div class="container bg-white p-5">
<ul class="tab-nav">
<li><a href="admin/status">System Status</a></li>
<li><a href="admin/queries/tasks">Queries Queue</a></li>
<li class="active"><a href="admin/queries/outdated">Outdated Queries</a></li>
</ul>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>Name</th>
<th>Created By</th>
<th>Runtime</th>
<th>Last Executed At</th>
<th>Created At</th>
<th>Update Schedule</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in $ctrl.queries.getPageRows()">
<td>
{{row.data_source_id}}
</td>
<td>
<a ng-href="queries/{{row.id}}">{{row.name}}</a>
</td>
<td>{{row.user.name}}</td>
<td>{{row.runtime | durationHumanize}}</td>
<td>{{row.retrieved_at | dateTime}}</td>
<td>{{row.created_at | dateTime }}</td>
<td>{{row.schedule | scheduleHumanize}}</td>
</tr>
</tbody>
</table>
<paginator paginator="$ctrl.queries"></paginator>
<div class="badge">
Last update: <span am-time-ago="updatedAt"></span>
</div>
(<label><input type="checkbox" ng-model="autoUpdate"> Auto Update</label>)
</div>
</div>

View File

@@ -0,0 +1,40 @@
import template from './status.html';
// TODO: switch to $ctrl instead of $scope.
function AdminStatusCtrl($scope, $http, $timeout, currentUser, Events) {
Events.record('view', 'page', 'admin/status');
const refresh = () => {
$http.get('/status.json').success((data) => {
$scope.workers = data.workers;
delete data.workers;
$scope.manager = data.manager;
delete data.manager;
$scope.status = data;
});
const timer = $timeout(refresh, 59 * 1000);
$scope.$on('$destroy', () => {
if (timer) {
$timeout.cancel(timer);
}
});
};
refresh();
}
export default function (ngModule) {
ngModule.component('statusPage', {
template,
controller: AdminStatusCtrl,
});
return {
'/admin/status': {
template: '<status-page></status-page>',
title: 'System Status',
},
};
}

View File

@@ -39,7 +39,7 @@
<li class="list-group-item active">Queues</li>
<li class="list-group-item" ng-repeat="(name, value) in manager.queues">
<span class="badge">{{value.size}}</span>
{{name}} ({{value.data_sources}})
{{name}} <span uib-popover="{{value.data_sources}}" popover-trigger="'mouseenter'"><i class="fa fa-question-circle"></i></span>
</li>
</ul>
</div>

View File

@@ -0,0 +1,32 @@
function cancelQueryButton() {
return {
restrict: 'E',
scope: {
queryId: '=',
taskId: '=',
},
transclude: true,
template: '<button class="btn btn-default" ng-disabled="inProgress" ng-click="cancelExecution()"><i class="zmdi zmdi-spinner zmdi-hc-spin" ng-if="inProgress"></i> Cancel</button>',
replace: true,
controller($scope, $http, currentUser, Events) {
$scope.inProgress = false;
$scope.cancelExecution = () => {
$http.delete(`api/jobs/${$scope.taskId}`).success(() => {
});
let queryId = $scope.queryId;
if ($scope.queryId === 'adhoc') {
queryId = null;
}
Events.record('cancel_execute', 'query', queryId, { admin: true });
$scope.inProgress = true;
};
},
};
}
export default function (ngModule) {
ngModule.directive('cancelQueryButton', cancelQueryButton);
}

View File

@@ -0,0 +1,63 @@
import moment from 'moment';
import { Paginator } from '../../../utils';
import template from './tasks.html';
import registerCancelQueryButton from './cancel-query-button';
function TasksCtrl($scope, $location, $http, $timeout, Events) {
Events.record('view', 'page', 'admin/tasks');
$scope.autoUpdate = true;
$scope.selectedTab = 'in_progress';
$scope.tasks = {
waiting: [],
in_progress: [],
done: [],
};
this.tasksPaginator = new Paginator([], { itemsPerPage: 50 });
$scope.setTab = (tab) => {
$scope.selectedTab = tab;
this.tasksPaginator.updateRows($scope.tasks[tab]);
};
$scope.setTab($location.hash() || 'in_progress');
const refresh = () => {
if ($scope.autoUpdate) {
$scope.refresh_time = moment().add(1, 'minutes');
$http.get('/api/admin/queries/tasks').success((data) => {
$scope.tasks = data;
this.tasksPaginator.updateRows($scope.tasks[$scope.selectedTab]);
});
}
const timer = $timeout(refresh, 5 * 1000);
$scope.$on('$destroy', () => {
if (timer) {
$timeout.cancel(timer);
}
});
};
refresh();
}
export default function (ngModule) {
ngModule.component('tasksPage', {
template,
controller: TasksCtrl,
});
registerCancelQueryButton(ngModule);
return {
'/admin/queries/tasks': {
template: '<tasks-page></tasks-page>',
title: 'Running Queries',
},
};
}

View File

@@ -0,0 +1,54 @@
<page-header title="Admin">
</page-header>
<div class="container">
<div class="container bg-white p-5">
<ul class="tab-nav">
<li><a href="admin/status">System Status</a></li>
<li class="active"><a href="admin/queries/tasks">Queries Queue</a></li>
<li><a href="admin/queries/outdated">Outdated Queries</a></li>
</ul>
<ul class="tab-nav">
<rd-tab tab-id="in_progress" name="In Progress ({{tasks.in_progress.length}})" ng-click="setTab('in_progress')"></rd-tab>
<rd-tab tab-id="waiting" name="Waiting ({{tasks.waiting.length}})" ng-click="setTab('waiting')"></rd-tab>
<rd-tab tab-id="done" name="Done" ng-click="setTab('done')"></rd-tab>
</ul>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>Data Source ID</th>
<th>Username</th>
<th>State</th>
<th>Query ID</th>
<th>Query Hash</th>
<th>Runtime</th>
<th>Created At</th>
<th>Started At</th>
<th>Updated At</th>
<th ng-if="selectedTab === 'in_progress'"></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in $ctrl.tasksPaginator.getPageRows()">
<td>{{row.data_source_id}}</td>
<td>{{row.username}}</td>
<td>{{row.state}} <span ng-if="row.state === 'failed'" uib-popover="{{row.error}}" popover-trigger="mouseenter" class="zmdi zmdi-help"></span></td>
<td>{{row.query_id}}</td>
<td>{{row.query_hash}}</td>
<td>{{row.run_time | durationHumanize}}</td>
<td>{{row.created_at | toMilliseconds | dateTime }}</td>
<td>{{row.started_at | toMilliseconds | dateTime }}</td>
<td>{{row.updated_at | toMilliseconds | dateTime }}</td>
<td ng-if="selectedTab === 'in_progress'">
<cancel-query-button query-id="dataRow.query_id" task-id="dataRow.task_id"></cancel-query-button>
</td>
</tr>
</tbody>
</table>
<paginator paginator="$ctrl.tasksPaginator"></paginator>
<label><input type="checkbox" ng-model="autoUpdate"> Auto Update</label>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More