Compare commits

...

2035 Commits

Author SHA1 Message Date
Rob DiCiuccio
489d341688 fix: Stabilize and deprecate legacy alerts module (#12627)
* Add deprecation notice to superset.tasks.schedules

* Reduce retries and schedule window for alerts

(cherry picked from commit e4ae17def5)
2021-01-21 10:08:23 -08:00
Duy Nguyen Hoang
6e8d360525 fix: chart disappears in standalone slice (#12606) 2021-01-20 17:32:28 +00:00
Duy Nguyen Hoang
d237cd63c0 fix: error while parsing invalid json form_data (#12586)
* Fix error while parsing invalid json form_data

* Refine error returned
2021-01-20 17:32:12 +00:00
Beto Dealmeida
233135e8ec fix: ignore system files on import (#12526) 2021-01-20 17:32:03 +00:00
Ville Brofeldt
1d2bf882f9 add rc4 changelog entries
(cherry picked from commit 5719fefdd4)
2021-01-19 12:40:09 -08:00
Kamil Gabryjelski
8833a6e37e fix: Select options overflowing Save chart modal on Explore view (#12522)
* Fix select options overflowing modal

* fix unit test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-01-15 19:04:51 +02:00
Beto Dealmeida
2cab564bb7 fix: lowercase all columns in examples (#12530) 2021-01-15 19:04:38 +02:00
Jesse Yang
f0e7b8b7a1 fix(explore): Add Time section back to FilterBox (#12537) 2021-01-15 19:04:26 +02:00
Jesse Yang
e981a18afd fix(explore): time table control panel (#12532) 2021-01-15 19:04:08 +02:00
Geido
f2f22638de fix: Popover closes on change of dropdowns values (#12410) 2021-01-15 19:03:34 +02:00
Michael S. Molina
75a329abb3 Fix list filters vertical alignment (#12497) 2021-01-15 19:01:48 +02:00
Bogdan
52ba82fb8b Add owner field to the alerts list (#12420)
Co-authored-by: Bogdan Kyryliuk <bogdankyryliuk@dropbox.com>
2021-01-13 10:54:30 -08:00
Moriah Kreeger
628a9b2b7b keep modal open on error, utilize useEffect (#12360) 2021-01-13 10:53:31 -08:00
Lily Kuang
908c0f2b52 remove crontab guru link (#12467) 2021-01-13 10:49:54 -08:00
Daniel Vaz Gaspar
a078296330 fix: impose dataset ownership check on old API (#12491)
* fix: impose dataset ownership check on old API

* update UPDATING.md

* partially protect the old MVC also

* prevent metric and column add and update
2021-01-13 18:06:41 +00:00
Hugh A. Miles II
7ac6e61b96 fix: styling for change dataset confirmation (#12471) 2021-01-13 12:48:15 -05:00
Beto Dealmeida
086b3a66a0 fix (SQL Lab): disappearing results on tab switch (#12472)
* fix (SQL Lab): disappearing results on tab switch

* Remove state

* Fix test
2021-01-13 19:10:04 +02:00
Jesse Yang
f8270b0b80 fix(dashboard): use datasource id from slice metadata (#12483) 2021-01-13 18:49:51 +02:00
Yongjie Zhao
b22e458108 fix(timepicker): make pyparsing thread safe (#12489)
* fix: make pyparsing thread safe

* remove parenthesis for decorator
2021-01-13 17:25:58 +02:00
Ville Brofeldt
40a334aacf feat(db-engine-specs): add support for Postgres root cert (#11720)
* feat(db-engine-specs): add support for Postgres root cert

* remove logging of json decode exception message

* fix error message

* fix error message
2021-01-13 13:39:28 +02:00
Ville Brofeldt
407b194b15 fix(releasing): svn dockerfile requirements path (#12461) 2021-01-13 12:40:53 +02:00
Evan Rusackas
7aba4c246a chore: bump superset-ui deckgl plugin (#12466) 2021-01-13 00:10:47 -08:00
Michael S. Molina
551a3e4373 Fix uneven list header padding (#12029) (#12412) 2021-01-12 23:29:43 -08:00
Jesse Yang
5fe4173a5d build: add cancel-workflow-runs action locally (#12394) 2021-01-12 22:11:51 -08:00
Grace Guo
e9d66e904f fix: do not show vertical scrollbar for charts in dashboard (#12478)
* fix: do not show vertical scrollbar for charts in dashboard

* Proper fix for #11419

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2021-01-12 17:16:25 -08:00
Beto Dealmeida
8f83afcf49 feat: new Slack dashboard (#12415)
* feat: new Slack dashboard

* Add ASL license

* Fix test
2021-01-12 15:24:44 -08:00
Beto Dealmeida
e47350ef96 fix: import ZIP files that have been modified (#12425)
* fix: import ZIP files that have been modified

* Add unit test
2021-01-12 12:56:26 -08:00
Kasia Kucharczyk
5f93a14f5d fix(dashboard): artefacts shown while drag and dropping deck.gl charts (#12418)
* [12181] Fix artifacts while drag and dropping deck.gl charts.

* Run prettier
2021-01-12 12:06:48 -08:00
Michael S. Molina
6731cd0be6 chore: apply capitalization guidelines - iteration 1 (#12447)
Apply capitalization guidelines defined in #12343 

Use sentence casing for most places.
2021-01-12 10:47:55 -08:00
Kamil Gabryjelski
ed53b0090e feat: Resizable dataset and controls panels on Explore view (#12411)
* Implement resizable panels on explore view

* Optimize chart rendering while resizing

* Make dataset column narrower

Co-authored-by: Evan Rusackas <evan@preset.io>
2021-01-12 10:39:56 -08:00
Phillip Kelley-Dotson
d8f4443c10 bump superset-ui packages for rolling window change (#12426) 2021-01-12 09:50:01 -08:00
Junlin Chen
fe01e2d88d fix(explore): fixed table header in chrome (#12432) 2021-01-12 09:17:00 -08:00
Hugh A. Miles II
1e527d54e7 fix: update savedatasetmodal message (#12433) 2021-01-12 11:58:29 -05:00
Daniel Vaz Gaspar
0f731f27e4 fix(api): prefix class names on events actions (#12354)
* fix(api): prefix class names on events actions

* fix bulk delete
2021-01-12 10:52:35 +00:00
Ville Brofeldt
078a8a17a1 fix(native-filters): incorrect queriesData state (#12409) 2021-01-12 09:01:16 +02:00
Michael S. Molina
75f927b9eb Fixes control panel fields styling (#12236) (#12326) 2021-01-11 16:47:10 -08:00
Yongjie Zhao
9b0e6d0cc0 refactor: from superset.utils.core break down date_parser (#12408) 2021-01-11 14:16:42 -08:00
Phillip Kelley-Dotson
321444bfd5 docs: fix styles and add algolia search classes (#12267)
* fix styles and add angolia search classes

* add class

* fix black
2021-01-11 14:13:51 -08:00
Geido
376723a1f5 chore: Show datasets when search input is empty (#12391) 2021-01-11 14:06:57 -08:00
Agata Stawarz
ddbcf5b0e9 fix: Refresh Interval Modal dropdown (#12406) 2021-01-11 11:58:28 -08:00
Grace Guo
9618f0786c [explore] Prevent duplicated query by data table (#12404) 2021-01-11 11:37:54 -08:00
Amit Miran
4cf3f99ee8 chore: remove additional incubator references (#12336)
* chore: remove additional incubator references
remove incubator.png from the main docs page

* fix: improve text for contributing-page.mdx

* fix: lint no-unused-vars
2021-01-11 06:09:10 -08:00
dependabot[bot]
c61167d2f7 build(deps): bump ini from 1.3.5 to 1.3.8 in /docs (#12020)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-11 06:07:03 -08:00
dependabot[bot]
ee53d82184 build(deps): bump urijs from 1.19.1 to 1.19.4 in /superset-frontend (#12232)
Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.1 to 1.19.4.
- [Release notes](https://github.com/medialize/URI.js/releases)
- [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md)
- [Commits](https://github.com/medialize/URI.js/compare/v1.19.1...v1.19.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-11 05:58:33 -08:00
Karol Kostrzewa
2ab490a101 test: birth names (#12226)
* add birth names fixture

* fix birth names related tests

* fix test_import_v0_dataset_cli_export columns order

* fix celery tests drop table

* fix mysql datetime type

* fix mysql typo in charts/api_tests

* refactor

* add licence

* fix use fixture for presto

* fix presto, hive query

* fix flaky metadata

* fix mysql bigint type

* fix run query

* fix hive datatype in metadata

* fix slice owner for cypress

* refactor num_boys num_girls

* fix is_dttm column

* debug logging

* fix query offset

* fix presto ds type in metadata

* fix presto ds type

* clean up debug logging
2021-01-11 05:57:55 -08:00
Jesse Yang
ff7b789931 docs: reword and cleanup docs for local dev server (#11869) 2021-01-10 23:36:01 -08:00
Yongjie Zhao
23263da9f3 feat(explore): add tooltip to timepicker label (#12401) 2021-01-10 21:52:02 -08:00
Yongjie Zhao
c327cb911e fix(explore): long metric name display (#12387)
* fix(explore): long metric name display

* add tooltip to control
2021-01-11 09:42:38 +08:00
Jesse Yang
9acf48fd1e chore: upgrade eslint, babel, and prettier (#12393) 2021-01-10 17:26:35 -08:00
Junlin Chen
6bee3a0581 chore: change Datasource to Dataset in Explore ui (#12402)
* chore(explore):change dataset to datasource in ui

* modal

* Add space

* Changing it back🤦🏾‍♀️

* Chargeback
2021-01-10 12:53:51 -08:00
Amit Miran
37f648c41b chore: rename docker image in build_docker_image.sh, docker-compose.yml and helm values.yaml (#12337) 2021-01-10 09:29:17 -08:00
Junlin Chen
f13f2e2ed3 chore: Fix typo “Rest” to “Reset” (#12392) 2021-01-09 19:40:28 -08:00
Duy Nguyen Hoang
99de8a49b6 fix: explore replace wrong standalone slice url (#12359) 2021-01-09 13:32:06 -08:00
Geido
3eb0470a2f Closes #12389 (#12390) 2021-01-09 22:18:59 +02:00
Kamil Gabryjelski
5d04f7dbce fix: Data tables styling issues on Explore view (#12383)
* Fix sort icons wrapping

* Fix large table stretching chart section container

* Implement sticky paginattion

* Display "loading" when data is loading

* Lint fix
2021-01-09 18:04:53 +02:00
Kamil Gabryjelski
14ccbe43b3 Fix new metric popover showing previous popover's title (#12385) 2021-01-09 16:05:25 +02:00
Yongjie Zhao
64b49778c5 fix(explore): adhoc metric label and control value not consistent (#12381)
* fix(explore): adhoc metric label and control value not consistent

* minor fix

* fix lint
2021-01-09 17:59:09 +08:00
Ville Brofeldt
662b64960f fix(explore): clear custom label if removed (#12382) 2021-01-09 01:41:41 -08:00
Kamil Gabryjelski
6a3103ff49 Fix filter popover under data table (#12377) 2021-01-09 00:54:39 -08:00
Kamil Gabryjelski
41751529a6 Update samples table when datasource changes (#12378) 2021-01-09 10:11:42 +02:00
Hugh A. Miles II
12504264e7 fix: datasets populating after user creation (#12368) 2021-01-08 21:04:00 -05:00
Phillip Kelley-Dotson
9c5be8e4d8 chore: make datasource search input sticky (#12365) 2021-01-08 17:08:07 -08:00
Kamil Gabryjelski
77b80c9431 fix: Fix chart resizing when using split view (#12362)
* Fix chart resizing when using split view

* Fix z-index issues
2021-01-08 15:20:51 -08:00
Daniel Vaz Gaspar
f642aea683 ci(docker): fix release published event checkout tag-sha (#12096)
* release: push 0.38.0 image and fix

* fix

* remove manual action
2021-01-08 14:59:59 -08:00
Jesse Yang
2210015aab test: rename column names for birth_names dataset (#12082) 2021-01-08 14:13:20 -08:00
Daniel Vaz Gaspar
f354bb3d1b fix(load examples): load examples creating unnecessary main database (#12351)
* fix(load examples): load examples creating unnecessary main database connection

* fix lint
2021-01-08 21:57:35 +00:00
Kamil Gabryjelski
1d2789944c Fix running query on every change in chart controls (#12361) 2021-01-08 12:56:45 -08:00
Hugh A. Miles II
7c8ead85c1 fix: Fix dataset condition to allow query for datasets in sqllab (#12357) 2021-01-08 15:36:19 -05:00
Kamil Gabryjelski
fd15dff60e perf: Optimize performance of Results and Samples tables on Explore (#12257) 2021-01-08 12:07:51 -08:00
Michael S. Molina
76b06b215f Fix CSS injection order (#12265) (#12353) 2021-01-08 11:08:34 -08:00
Nikola Gigić
737e6b4aee chore(dashboard): Add ErrorBoudary for AdhocFilter components (#12352)
* Add ErrorBoudary for AdhocFilter components

* Add tests

* typo fix
2021-01-08 20:58:26 +02:00
Ville Brofeldt
78d3557757 fix(explore): improve filter translation (#12350)
* fix(explore): improve filter translation

* address review comments
2021-01-08 20:57:21 +02:00
Victor Malai
4d279935df fix: Set width to pseudoelement to wrap filter box (#12306)
* fix: set width pseudoelement to wrap

* Fix

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2021-01-08 10:09:37 -08:00
Elizabeth Thompson
466a7c8693 fix: south pane scrolling issues (#12318)
* remove extra scrollbars

* fix sql lab south pane bottom margin

* Update superset-frontend/src/SqlLab/components/SouthPane.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/SqlLab/components/SouthPane.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* move styles to component

Co-authored-by: Evan Rusackas <evan@preset.io>
2021-01-08 09:52:33 -08:00
Evan Rusackas
d1767b9065 chore: bumping nvd3 plugin (and thus, nvd3-fork) (#12349) 2021-01-08 16:08:31 +02:00
Daniel Vaz Gaspar
c685c9ea8f refactor: test connection raises only command exceptions (#12307)
* refactor: test connection raises only command exceptions

* fix tests

* fix tests

* fix tests

* lint fix
2021-01-08 13:10:11 +00:00
simchaNielsen
fecfc34cd3 feat: move filters from superset-ui to incubator (#12154)
* feat: move filters from superset-ui to incubator

* refactor: add safety check

* refactor: move extraForm data utils

* refactor: move extraForm data utils

* lint: fix lint

* chore: add license

* chore: undo changes to file

* refactor: fix CR notes / add tests

* test: update tests

* fix: fix range logic

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
2021-01-08 14:44:25 +02:00
Evan Rusackas
d760e885d7 window.location > history.push (#12347) 2021-01-07 22:26:31 -08:00
ʈᵃᵢ
cbda599406 feat: provide support for an overridable template to be included in every view (#12315) 2021-01-07 18:52:46 -08:00
Phillip Kelley-Dotson
a30064b2e8 remove datataset from title (#12344) 2021-01-08 09:51:38 +08:00
Beto Dealmeida
f83afb44c8 feat: new COVID vaccination dashboard (#12338) 2021-01-07 17:48:10 -08:00
Lily Kuang
627642162b chore: change order of tab on explore data panel (#12335) 2021-01-07 16:50:11 -08:00
Beto Dealmeida
24fccdb2bc fix: append orphan charts (#12320)
* fix: append orphan charts

* Add unit tests
2021-01-07 14:05:08 -08:00
Hugh A. Miles II
9997abeab6 feat: SQL Toolbar (#12067)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Lily Kuang <lily@preset.io>
Co-authored-by: Victor Malai <malai9696@gmail.com>
Co-authored-by: Agata Stawarz <47450693+agatapst@users.noreply.github.com>
Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Nikola Gigić <nik.gigic@gmail.com>
Co-authored-by: Jagadish <jagadishmts@gmail.com>
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2021-01-07 17:04:43 -05:00
Geido
5088e570bf Reduce z-index (#12334) 2021-01-07 12:59:11 -08:00
Geido
547c356b4c Fix menuPortal dropdown z-index (#12330) 2021-01-07 12:08:36 -08:00
Lily Kuang
076c31da22 fix(alert/report): add/edit modal can't be saved (#12311)
* api error from previous prevent the new get api endpoint to be called

* add clear error to hooks
2021-01-07 09:38:13 -08:00
Michael S. Molina
ca07c8cd39 Fix select overlap by aggregate button (#12312) (#12327) 2021-01-07 23:35:38 +08:00
Jesse Yang
f48284909d build: try to speed up Github workflows (#12090) 2021-01-07 00:47:00 -08:00
Jesse Yang
bcb8db621c build: improve webpack configs for npm link (#12313) 2021-01-06 23:36:24 -08:00
Amit Miran
8214237638 feat: Custom color schemes support (#12210)
* feat: setupColors.ts support
docs: add FAQ to custom color schemes

* fix: delete mistake lines

* fix: CR note

* feat: support for SETUP_EXTRA

* fix: remove after cr

* fix: CR note

* fix: after CR migrate from SETUP_EXTRA into 2 color scheme array

* fix: typing issues

* fix: python generic typing

* chore: add neat code examples
2021-01-07 09:07:00 +02:00
Agata Stawarz
1459b34390 chore: improve styles for collapsed Native Filter sidebar (#12282)
* Improve styles for collapsed Native Filter sidebar

* Replace width for Wrapper with gridUnits
2021-01-06 22:57:25 -08:00
Geido
4e6613d11f fix(explore): metrics caret not expanding in datasource panel (#12305)
* Closes #12233

* Remove accordion and set both sections open
2021-01-06 22:48:22 -08:00
Phillip Kelley-Dotson
506edf432d fix: update search in datasource panel to use matchSorter (#12319)
* update search to use matchSorter

* remove conosles
2021-01-06 21:55:57 -08:00
dependabot[bot]
8f7c7d43a3 build(deps): bump ini in /superset-frontend/cypress-base (#12019)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-06 14:55:40 -08:00
ʈᵃᵢ
176f54da7a docs: remove (some) references to incubating/incubation (#12284) 2021-01-06 13:40:40 -08:00
Robert H Stolz
0e514c184c docs: Added release notes and associated media for 0.38 (#12022)
* Added release notes and associated media for 0.38

* Added ASF license header to release notes

* refactored the release notes directory structure. Re-added media to the 0.38 release notes.

* fixed broken image and hyperlink

* fixed broken image and hyperlink pt 2

* Swapped out media embed tags

Swapped out github style markdown embed tags with html style ones for more control.

* Fixing small inconsistencies

Fixed a couple small inconsistencies in the feature tags

* Resize media, update embed style

Seems like GitHub does not any but the most basic css in the embed tag.

* Spelling nit

* Fixed some formatting nits

Added a box around the images to clearly distinguish them from the whitespace. Images are now embedded on the same indentation tier as their associated bullet point.

* Rebase to hopefully fix cypres problems

* May the cypress gods be pleased with this commit.
2021-01-06 13:03:54 -08:00
dependabot[bot]
eb3c2b2b11 build(deps): bump ini from 1.3.5 to 1.3.8 in /superset-frontend (#12021)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-06 12:22:30 -08:00
Yongjie Zhao
9eb911dca3 fix(explore): refine previous calendar range (#12308) 2021-01-06 10:09:13 -08:00
Moriah Kreeger
90ac8d02c6 add related field filter to queries/user (#12261) 2021-01-06 09:36:48 -08:00
Yongjie Zhao
1f8347228e fix(explore): timepicker show human readable string in pill (#12300)
* fix(explore): timepicker show human readable string in pill

* fix lint
2021-01-06 22:37:35 +08:00
Kamil Gabryjelski
e660723a2f fix(explore): bugs in Custom SQL editor in filter popover (#12278)
* Fix Save button disabled until clause is switched

* Fix 'undefined undefined' when sql query is empty

* fix test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-01-06 15:08:20 +02:00
Amit Miran
b221417e19 chore: remove harmless incubator refs (#12289)
* chore: migrate all harmless incubator refs like comments and documentation files

* chore: migrate all superset.incubator.apache.org to superset.apache.org to

* chore: migrate dist.apache.org refs

* chore: removing incubating and Disclaimer

* fix: linting issues
2021-01-06 13:45:19 +02:00
Daniel Vaz Gaspar
2b6a58780a fix(database): OpenAPI spec for test_connection (#12274)
* fix(database): OpenAPI spec for test_connection

* updated OpenAPI spec on superset docs

* EOL
2021-01-06 10:29:05 +00:00
Daniel Vaz Gaspar
0171a6bee4 fix(reports): don't log user errors and state change has errors (#12277) 2021-01-06 08:57:10 +00:00
Jesse Yang
cf1c57a6d4 build: ignore github actions from dependabot (#12291) 2021-01-05 22:45:44 -08:00
Moriah Kreeger
b01276808e fix null check for condition threshold to allow 0 values (#12295) 2021-01-05 21:50:21 -08:00
Kamil Gabryjelski
d0668fa7e4 Bump superset-ui deps (#12280) 2021-01-05 21:48:21 -08:00
Kamil Gabryjelski
c8ad5c90bd fix: Fixed width for dataset panel (#12221) 2021-01-05 21:08:03 -08:00
Maxwell Amante
6df8224381 chore(home): add ErrorBoundary to Charts section (#12239) 2021-01-05 20:39:56 -08:00
Beto Dealmeida
6b2b208b3b fix: load example data into correct DB (#12292)
* fix: load example data into correct DB

* Fix force_data

* Fix lint
2021-01-05 17:52:42 -08:00
Rob DiCiuccio
b4f6d353c9 Cypress: ignore unrelated ResizeObserver client errors (#12297) 2021-01-05 17:44:02 -08:00
Karol Kostrzewa
1a2680d4a1 test: fix flaky Python unit tests (#12253) 2021-01-05 16:40:01 -08:00
Michael S. Molina
1b908ab9f1 Fix tests errors and warnings - iteration 1 (#12212) (#12213) 2021-01-05 16:24:57 -08:00
Geido
147605cb40 fix: Issue #12004 timegrain not visibile (#12258)
* Fix hidden dropdown when overflowing

* Remove unnecessary space

* Remove unused var
2021-01-05 16:17:56 -08:00
Victor Malai
553b440e4b fix: Show Data panel on resize (#12250)
* Show Data panel on resize

* Revert back tableSectionHeight

* FIx lint
2021-01-05 16:13:07 -08:00
Victor Malai
2bf06d666b fix: Add visibility to box for viewing menu items (#12153)
* Add visibility to box for viewing menu items

* Add scroll visibility
2021-01-05 16:05:26 -08:00
Jesse Yang
4149ab4e5e build: remove parallelization for E2E tests (#12290) 2021-01-05 15:46:52 -08:00
Geido
66349d86a4 fix: Add min-height for loading indicator to show up (#12288)
* Add min-height for loading indicator to show up

* Remove unnecessary height
2021-01-05 15:36:17 -08:00
dependabot[bot]
230c0c2357 build(deps-dev): bump storybook-addon-paddings in /superset-frontend (#12192)
Bumps [storybook-addon-paddings](https://github.com/rbardini/storybook-addon-paddings) from 2.0.2 to 3.2.0.
- [Release notes](https://github.com/rbardini/storybook-addon-paddings/releases)
- [Commits](https://github.com/rbardini/storybook-addon-paddings/compare/v2.0.2...v3.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-05 15:08:37 -08:00
Hugh A. Miles II
95f0ead8eb fix: SaveDatasetModal save state on back button (#12205) 2021-01-05 15:07:23 -08:00
Daniel Vaz Gaspar
673dea76f1 docs: fix build status badge to github actions (#12251) 2021-01-05 13:48:09 +00:00
Victor Malai
d4a854e84b fix : Style caret for profile page (#12215)
* Add flex to panel

* Remove hover effect, remove undeline

* FIx lint
2021-01-04 23:31:52 -08:00
Kamil Gabryjelski
d204b024b7 Set datasource panel open by default (#12211) 2021-01-04 22:41:50 -08:00
Ville Brofeldt
8afc4c4a44 fix(explore): bump superset-ui to 0.16.3 and fix DeckGL bug (#12242) 2021-01-04 22:01:09 -08:00
Yongjie Zhao
b349edef29 feat(explore): Time picker enhancement follow up (#12208)
* refactor layout

* WIP

* fix typing

* styling

* fix lint

* frontend IT

* rename variable

* added quarter

* typos

* refine code structure
2021-01-04 18:29:17 -08:00
Kamil Gabryjelski
811e1b273b fix: Altered button crashing and title not updating on Explore view (#11960)
* Fix chart name not updating

* Fix AlteredSliceTag crashing

* Update name after it's changed in another modal
2021-01-04 16:14:06 -08:00
Victor Malai
8ecf82de5a Remove uppercase for tab names (#12217) 2021-01-04 14:58:45 -08:00
dependabot[bot]
95296df507 build(deps): bump node-fetch in /.github/actions/file-changes-action (#12248)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-04 14:40:01 -08:00
dependabot[bot]
e853c16a3d build(deps): bump @actions/core in /.github/actions/file-changes-action (#12246)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-04 14:08:53 -08:00
Rob DiCiuccio
62e7706035 docs(api): Script to generate API docs (openapi.json) (#12050)
* update_api_docs CLI command for regenerating openapi.json

* Fix /api/v1/async_events spec

* Regenerate openapi.json (docs)

* Pylint fixes
2021-01-04 13:47:01 -08:00
Hugh A. Miles II
7d88e6b891 fix: Change Datasource styling fixes (#12165) 2021-01-04 14:51:15 -05:00
Beto Dealmeida
164db3e5a1 fix: CTAS on multiple statements (#12188)
* WIP

* Add unit tests for sql_parse

* Add unit tests for sql_lab
2021-01-04 09:22:35 -08:00
Lily Kuang
ff0fe434e4 feat(report): add/edit modal improvements (#12183)
* alert/report modal improvements

* update spec for alert report modal
2021-01-04 09:15:55 -08:00
Jesse Yang
a3bbbf8ea3 build: inline external Github Actions to unblock CI (#12241)
* build: inline cached-dependencies to unblock CI

* Run E2E on pull_request on;y

* Inline all external actions

* Checkout needed for internal actions

Also fixes pre-commit

* Add missing files
2021-01-04 14:16:07 +02:00
Kamil Gabryjelski
7cc0de1694 Refetch samples only when filters change (#11999) 2021-01-01 16:08:19 -08:00
Kamil Gabryjelski
f3ab1f41ee feat: Implement drag & drop for metrics and filters labels (#12184) 2020-12-24 20:46:37 -08:00
Daniel Vaz Gaspar
74f3faf1cd fix(reports): make name unique between alerts and reports (#12196)
* fix(reports): make name unique between alerts and reports

* add missing migration

* make it work for mySQL and PG only (yet)

* fixing sqlite crazy unique drop

* fixing sqlite missing one col
2020-12-24 09:18:46 +00:00
Victor Malai
b75a1ec71e fix: align submenu items (#12193) 2020-12-23 16:58:55 -08:00
Beto Dealmeida
3acfd826de feat: add new dashboard with FCC data (#12163) 2020-12-23 14:54:50 -08:00
ʈᵃᵢ
3fb4e54690 fix(alerts/reports): ensure correct type is sent to api (#12189)
* fix(alerts/reports): ensure correct type is sent to api

* fix: chane actions labels to generic Edit/Delete

* fix: ts-ignore

* fix: add more dependencies to callback functions

* fix: remove duplicate api calls when toggling between types

* lint
2020-12-23 12:38:11 +00:00
Daniel Vaz Gaspar
e5e9a5f05c docs: update UPDATING.md with security simplification info (#12097)
* docs: update UPDATING.md with security simplification info

* update docs better readability
2020-12-23 12:24:59 +00:00
Daniel Vaz Gaspar
09a381da1d fix(reports): notification without standalone link back to superset (#12174)
* fix(reports): notification without standalone link back to superset

* fix comment
2020-12-23 11:31:08 +00:00
Jagadish
732d1ed40b updated SQLAlchemy=1.3.21 is incompatible in setup.py file. (#12191) 2020-12-23 13:23:29 +02:00
Agata Stawarz
4ac00a0954 fix(chart): rendering standalone chart and errors (#12179) 2020-12-23 11:06:08 +00:00
Agata Stawarz
93af329078 chore: Add Loading icon to Filter Bar (#12158)
* Add Loading icon to Filter Bar

* Change Loading Box height to gridUnits
2020-12-22 18:19:18 -08:00
Jesse Yang
d2da25a621 refactor: remove queryFields in QueryObject and update chart control configs (#12091)
* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
2020-12-22 17:10:19 -08:00
Beto Dealmeida
de61859e98 fix: SQL Lab vertical space (#12187) 2020-12-22 17:05:52 -08:00
Beto Dealmeida
ca680cf976 fix: append ID to filename when exporting chart (#12166) 2020-12-22 14:19:05 -08:00
Beto Dealmeida
a85bb4a3f2 fix: remove uniqueness for MySQL (#12185) 2020-12-22 13:39:56 -08:00
Beto Dealmeida
8e3f71df4d fix: specify VARCHAR size when loading examples (#12186) 2020-12-22 13:39:40 -08:00
Ville Brofeldt
41fac6b0d9 fix(explore): save chart not working (#12178)
* fix(explore): save to dashboard not working

* fix test
2020-12-22 23:18:36 +02:00
Nikola Gigić
a52031a55e chore: Change chart_is_fav to chart_is_favorite (#12075)
* Change chart_is_fav to chart_is_favorite

* Trigger cypress tests

* Retrigger cypress tests

* Retrigger all tests

* Dashboard

* Additions
2020-12-22 10:03:26 -08:00
Victor Malai
9b110b2aa5 refactor: Refresh interval typescript (#12168)
* Refresh interval

* WIP
2020-12-22 09:55:42 -08:00
Beto Dealmeida
c281e52f81 feat: add new dashboard with video game sales (#12162) 2020-12-22 08:53:18 -08:00
Agata Stawarz
942e3210b5 Fix Filter Bar scrolling (#12156) 2020-12-22 12:09:13 +02:00
Michael S. Molina
8682c6fc1c refactor: Fix anchor-is-valid lint warnings (#12010)
* Fix anchor-is-valid lint warnings

* Change IconTooltip to use named exports
2020-12-21 23:58:05 -08:00
Jesse Yang
e2f676445b test(dashboard): fix flaky Cypress test (#12151) 2020-12-21 20:40:33 -08:00
Beto Dealmeida
ce1abc98df chore: rename variable for clarity (#12159) 2020-12-21 13:39:13 -08:00
Daniel Vaz Gaspar
2f0add3aec fix: database alpha permissions (#12136)
* fix: database alpha permissions

* add test
2020-12-21 19:17:58 +00:00
Daniel Vaz Gaspar
8d5dcc5784 fix(report): fix last_eval_dttm sort and more tests (#12121)
* fix(report): fix last_eval_dttm sort and more tests

* remove unnecessary permissions and split code path

* remove SIP_34_ALERTS_UI

* disabling an alert that is working will turn it to not triggered
2020-12-21 19:07:30 +00:00
Agata Stawarz
17769ca96e Fix Reset All filters button (#12157) 2020-12-21 20:11:39 +02:00
Victor Malai
eecdd20301 refactor: Explore SaveModal to typescript (#11997)
* Explore SaveModal to typescript

* Fix test

* Fix

* Fix lint

* update SaveModal without any type

* Update

* Fix lint

* Fix lint

* Fix test

* Fix

* Fix

* Fix lint

* Refactor

* Fix
2020-12-21 08:56:36 -08:00
Lily Kuang
0d9c863b6e fix(report): fix start date format and paginated query (#12132)
* fix: start date format for executation log

* fix: paginated query
2020-12-21 13:01:47 +00:00
ʈᵃᵢ
ba952ba39d fix(database): adjust column sizing for list view (#12146) 2020-12-20 21:26:20 -08:00
David Aaron Suddjian
b5dd0f32cc feat: Dynamically imported viz plugins (#10288)
* first attempts at dynamic plugin loading

* dynamic import working for explore

* memoize appropriately

* add a backend for dynamic plugins

* hack at getting dynamic plugins working with dashboards

* more work on making it work, + feature flag

* lint

* actions to fix explore state when plugins load

* handle dynamic control panel, functionify ExploreViewContainer

* fix: rearrange migrations branch

* fix: name and key as strings with length 50

* bundle url length 2000

* bundle url to text
for some reason not supported on my sql

* fix: too long varchart

* fix: pre-commit typing

* fix: licenses

* fix: add slice container was not initing feature flags

* fix: undo linting issue

* fix: adjust down revision again

* fix: adjust down revision again

* isort

* pylint

* god damn linters

* remove unnecessary(?) loading message

* only log non-standard errors

* testing

* python is terrible

* see above commit message

* fix imports in DynamicPluginProvider

* fix

* shift migration forward

* lint

* fix form data calculations to handle missing control config

* temp commit - waiting for superset-ui changes and crud fixes

* remove unnecessary todo

* use new superset-ui shared module function

* fetch the plugins instead of hardcoding the test one

* migration sort

* remove duplicated import statement

* format

* try moving the import 🙄

* copy

* fix frontend tests

* safe access

* comment out dead code

* isort

* disable pylint on necessary lines

* use @superset-ui/logging instead of console

* remove temp code

* rearrange some code

* try triggering mouseover in cypress before click

* use loading spinner instead of text

* trying to fix cypress

* attempt cypress fix

* customize permissions

* update package lock

* only admins can write to plugins by default

* better copy

* disable flaky tests

* use makeApi

* flaky tests

* cleanup code

* flaaaakkkyyyyyy

* dry

Co-authored-by: amitNielsen <amit.miran@nielsen.com>
2020-12-19 07:06:11 -08:00
Evan Rusackas
4a471b8c71 feat: Native filters fast-follow (#12138)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* sleeker filter removal UX

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* fix package

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* Add Parent Filter input field to Config Modal

* Create Cascade Filter & display children filters

* Add Cascade Popover

* Display Filter value both in Filter Bar and in Cascade Popover

* Display the youngest filter value label in the Filter bar

* Add styles to Cascade Popover and filters

* Force to apply changes instantly for parent filters and refactor styles

* Show error for no cyclical hierarchy and refactor

* Add validation for parent filter to be applied instantly

* Add Error Boundary to Filter Config Modal

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* Improve styling of Filter Config Modal

* Improve styles for whole native filters feature

* Add styles for active filter tab

* Fix text for scoping

* Clean up Filter Bar and Config Modal styles

* Remove fractional gridUnits. Change name for CheckboxFormItem. Add placeholder to Parent Filter select.

* Remove unnecessary button size for Config Modal

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* Add Cache Wrapper helper to avoid datasets requests deduplication

* Add license to new Cache Wrapper helper

* Add Cache Wrapper tests

* Fix expanding Filter Bar

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* removing emotion/react and going old school on css animation

* fxing css glitch on scoping disclaimer

* src paths.

* using gridUnits

* nixing unnecessary diamonds

* linting

* fix type errors

* Inverting collapsed icons... closer to data src selector design

* restoring feature flag to proper default setting

* missing condition

* fix tests

* patching test

* just a button

* flaky tests

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-19 01:57:06 -08:00
ʈᵃᵢ
de047c6c31 fix(chart): replace viz_type with viz name from registry for list view (#12144) 2020-12-18 23:22:47 -08:00
Phillip Kelley-Dotson
585c8acd75 fix height (#12145) 2020-12-18 22:33:40 -08:00
David Aaron Suddjian
865beae3d8 feat(dashboard): Dashboard-Native Filters (#11814)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* fix cypress tests

* add in nativefilters to form data

* fix lint and test

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-18 17:06:37 -08:00
Beto Dealmeida
877b153331 feat: estimate query cost in Postgres (#12130)
* feat: estimate query cost in Postgres

* Add example in config

* Fix lint
2020-12-18 16:08:53 -08:00
Beto Dealmeida
fa27ed1147 feat: display suggestions when query has missing parameters (#12113)
* WIP

* camelCase everything

* Hide 'fix did you mean?'
2020-12-18 16:08:30 -08:00
Beto Dealmeida
81f5631fe5 fix: make example table name safe (#12135) 2020-12-18 15:16:38 -08:00
ʈᵃᵢ
210fd251c5 fix: remove SIP_34_ALERTS_UI from config (#12127) 2020-12-18 14:52:42 -08:00
Evan Rusackas
f653a8de30 fix(explore): overflow issue with metric options (#12129)
* fixing overflow issue

* lint!
2020-12-18 14:14:07 -08:00
Michael S. Molina
a6ac2c1245 Improves chart save and go button (#12125)
Resolves #11748
2020-12-18 13:17:31 -08:00
Geido
f4ce831a10 feat: View all fav charts and dashboards (#12060)
* Add fav filter - tentative

* Closes #11984

* Fix tests

* Delete trailing spaces

* Fix spec btns length

* Fix mock test

* Add urlDisplay option

* Redirect with history

* Catch initial fav filter
2020-12-18 13:16:07 -08:00
Kamil Gabryjelski
2a23744223 feat: Add Saved Metrics tab to metrics popover (#12123)
* Implement saved metrics

* Fix bug in sql editor

* Fix unit tests

* Fix outlines in popovers

* Add types for saved metrics

* Add translations

* Move savedMetricType to a separate file
2020-12-18 11:11:49 -08:00
Jesse Yang
8e625e0a64 fix: properly render booleans in FilterBox and explore page data preview (#12116) 2020-12-18 10:40:56 -08:00
Jesse Yang
d543ca87fb fix: fix the flaky FilterBox test re-introduced by #12114 (#12124) 2020-12-18 10:31:33 -08:00
simchaNielsen
49ec13c68c feat: Support multiple queries per request (#11880)
* refactor: add queriesData fields for multiple queries

* feat: support multi queries request

* lint: fix lint

* lint: fix lint

* lint: fix lint

* fix: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

* fix: fix error case for multi queries

* feat: change queryResponse to queriesResponse

* fix: revert webpack

* test: fix tests

* chore: lint

* chore: adjust asyncEvent to multiple results

* fix: lint

* fix: eslint

* fix: another eslint rule

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2020-12-18 09:15:27 -08:00
Beto Dealmeida
4ae21bf30b fix: remove keys in dashboard export (#12115) 2020-12-18 07:54:11 -08:00
Ville Brofeldt
1a5f61b133 feat(chart-data-api): ignore unknown fields on QueryObject (#12118) 2020-12-18 14:32:55 +02:00
Daniel Vaz Gaspar
6621557af2 fix: security cleanup annotation and refresh permissions (#12119) 2020-12-18 12:06:08 +00:00
Daniel Vaz Gaspar
fa10035dce docs(releasing): update release automation and docs for Apache graduation (#12117) 2020-12-18 12:04:33 +00:00
Phillip Kelley-Dotson
35addee3ae feat(explore-datasource): add new datasource tab to explore view (#12008)
* update to datsource tab

* second update

* style updates

* update style and fix metrics bug

* updates to datsource panel

* backgrounds and borders

* more updates

* shuffling some paddings around

* more updates

* moving some more paddings around!

* Fixing sidebar width

* using Global to adjust body layout

* update test and fix bug

* removing hotkeys

* layout fixes for short content, simplifying some class names

* more styles

* add tooltip to collapse and div clickable

* more updates

* more updates for styles and add list component

* update from comments

* vising cosmetic issue with line-wrapping drop down caret on controls sections

* controls area scrolling properly again.

* change lists to old list and updates from comments

* border radius from theme

* add length field and updates from comments

* more changes from comments

* integrate health with new control

* change callapse back from stylsheet more udpates

* substitution string

* more substitution strings

* fix tests

* datasource alignment

* taking margin off the search input

* update input to flex

* fix lint

* adjusting column/metric label stylng

* fixing scrollable area layout, one more color variable

* simplifying some styles

* nixing a bad left margin

* Using gridunit for padding

* using gridUnit for padding

* define types for datsource panel

* fixing a padding issue

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-12-18 01:49:05 -08:00
Jesse Yang
af130ea5e9 fix: FilterBox select lose focus when focused (#12114) 2020-12-18 00:45:27 -08:00
Moriah Kreeger
1cf4a1b3ea fix: updates to alert/report modal + more tests (#12045)
Co-authored-by: Tai Dupree <tdupreetan@gmail.com>
2020-12-17 23:50:17 -08:00
Moriah Kreeger
17cd174bbf feat(alerts/reports): remove SIP_34_UI feature flag (#12085) 2020-12-17 23:03:03 -08:00
ʈᵃᵢ
ddd2ec59af fix(alerts/reports): modal submit button, copy changes, select apis (#12110) 2020-12-17 23:02:04 -08:00
Beto Dealmeida
6e7f276775 feat: initial custom error messages for SQL Lab (#12080) 2020-12-17 22:58:21 -08:00
Yongjie Zhao
b592cc7e73 feat(explore): time picker enhancement (#11418) 2020-12-17 18:27:21 -08:00
Lily Kuang
92fdf54aa3 feat: update alert/report icons and column order (#12081)
* update alert/report icons and column order

* add alert solid small

* update status icon tooltip placement
2020-12-17 15:27:19 -08:00
Kamil Gabryjelski
b61e243f39 feat(explore): metrics and filters controls redesign (#12095)
* Redesign metrics control

* Redesign filters control

* Bugfixes

* Fix unit tests

* Fix tests

* Code review fixes
2020-12-18 00:13:37 +02:00
ʈᵃᵢ
d1dfe82d6c feat(alerts/reports): add refresh action (#12071) 2020-12-17 11:29:46 -08:00
Elizabeth Thompson
895fa19d8d chore: add latest tag action (#11148)
* add latest tag action

* update documentation with latest tag info

* Python in docs doesn't need v3 reference

* add check that latest tag is truly a later version

* remove rc from acceptable tags

* move tag script to seperate file

* add a check that the tag exists
2020-12-17 20:50:44 +02:00
Daniel Vaz Gaspar
1a20552c2b fix(reports): increase crontab size and alert fixes (#12056)
* fix(reports): increase crontab size

* update to current alembic revision

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* lint

* update alembic revision

* fix related fields

* fix test
2020-12-17 18:03:05 +00:00
Alan LaMielle
a3be325b99 Small typo fix in Athena connection docs (#12099) 2020-12-17 09:22:24 -08:00
Daniel Vaz Gaspar
5d9721e6ba feat(queries): security perm simplification (#12072)
* feat(queries): security perm simplification

* fix mig

* update alembic down revision
2020-12-17 14:27:14 +00:00
Daniel Vaz Gaspar
790ac5ef87 feat(databases): security perm simplification (#12036)
* feat(databases): security perm simplification

* fix tests

* fix JS tests
2020-12-17 12:37:05 +00:00
Daniel Vaz Gaspar
dd5cdb1b5f feat(dashboards): security permissions simplification (#12012)
* feat(dashboards): security perm simplification

* fix tests

* fix tests

* remove unnecessary mapping

* fix JS tests

* fix cypress test and explore endpoint

* update alembic down revision

* Merge branch 'master' into feat/security-converge-dashboards

# Conflicts:
#	superset/constants.py
#	tests/security_tests.py
2020-12-17 09:53:13 +00:00
Kasia Kucharczyk
700dee6db6 feat(logs): security permissions simplification (#12061)
* Added migration for logs security converge

* Changed class permission name and method permission in LogModelView and LogRestApi

* Updated recent revision and filename

* Changed name of Log perm in manager. Updated TestRolePermission to have correct menu and permission.

* Updated latest migration revision

* Updated latest migration revision
2020-12-17 00:50:31 -08:00
Victor Malai
51c3b7156c chore: Remove unused CodeModal (#11972)
* Transform code modal to tsx

* Fix

* Fix

* Remove unused modal

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-16 23:44:58 -08:00
Jesse Yang
02c6a0befc Fix typescript error (#12074) 2020-12-16 21:50:56 -08:00
Beto Dealmeida
dd0c53158f fix: handle context-dependent feature flags in CLI (#12088) 2020-12-16 21:34:23 -08:00
Hugh A. Miles II
655834b25c fix: Fix "View in SQLLab" bug (#12086) 2020-12-16 21:59:46 -05:00
Moriah Kreeger
08b3ebea5e feat(alert/report): add 'not null' condition option to modal (#12077) 2020-12-16 17:13:37 -08:00
Evan Rusackas
90ca49f3d6 bumping superset ui to 15.18 and deckgl to 0.3.2 (#12078) 2020-12-16 15:46:37 -08:00
John Bodley
c306368f3c fix: Python dependencies in #11499 (#12079)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-12-17 11:52:21 +13:00
Moriah Kreeger
8d29381446 reset active tab on open (#12048) 2020-12-16 14:38:29 -08:00
Beto Dealmeida
69185eed67 fix: improve import flow UI/UX (#12070)
* fix: improve import flow UI/UX

* Reset modal after import

* Adjust margin before overwrite text
2020-12-16 13:08:39 -08:00
ʈᵃᵢ
e299dbf797 feat(alerts/reports): delete and bulk delete actions (#12053) 2020-12-16 12:57:29 -08:00
Evan Rusackas
9be9034f1a feat: Global nav menus open on hover (#12025)
* hover opens menus

* hover opens menus

* linting, removing some styles I added

* moving useState up (non-conditional)

* just a tweak to prevent a conflict.
2020-12-16 11:55:38 -08:00
Rob DiCiuccio
148a0017b7 Remove e2e pull_request event trigger (#12076) 2020-12-16 11:38:55 -08:00
Rob DiCiuccio
8fe9ee04c8 build(cypress): Use pull_request_target event to run cypress (#11750)
* Use pull_request_target event to run cypress in order to access repo secrets

* Summary job for branch protection requirements

* Restore pull_request trigger

* Use merge base for e2e tests

* Restore push trigger for all branches
2020-12-16 10:45:21 -08:00
Nikola Gigić
48fb8c0b77 fix(dataset): Page blanks on large data load (#11979)
* Implement pagination in <TableView> for Samples preview

* Increase page size

* Fix lint

* Render cells based on width

* Fix lint errors

* Additional tests and changes

* Search bar fix

* Additional fixes

* Suggested changes
2020-12-16 16:35:12 +02:00
Daniel Vaz Gaspar
2302adb61a feat(datasets): security perm simplification (#12000)
* feat(datasets): security perm simplification

* feat(datasets): security perm simplification

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* include SqlMetricInlineView converge and fix JS tests

* update to current alembic revision
2020-12-16 11:49:03 +00:00
Kasia Kucharczyk
9c8b65d03f feat(annotations): security permissions simplification (#12014)
* Changed security permissions for annotations and annotation layers

* Updated permissions in annotation layers list

* Created test for retrieving premissions info. Updated uris from f-strings to strings

* Updated annotations in security_tests and added annotations to NEW_SECURITY_CONVERGE_VIEWS

* Added migration for annotations security converge

* Updated current revision after rebase master

* Updated migration name to annotations security converge

* Updated annotations permissions names in AnnotationLayersList and updated test since 'can_write' has wider permissions

* Updated annotations migration to current
2020-12-16 09:08:06 +00:00
Geido
0ee03ae440 fix: Closes #11864 - Duplicate PropertiesModal (#12038)
* Closes #11864

* Fix typo
2020-12-16 10:01:34 +02:00
Kamil Gabryjelski
794d318989 refactor: Migrate react-select to Antd Select in Metrics and Filters popovers (#12042)
* Migrate react-select to Antd select in Metrics popover

* Fix tests

* Migrate react-select to Antd select in Filters popover

* Migrate SelectControl to Antd Select

* Add label with number of options left
2020-12-15 21:20:10 -08:00
Beto Dealmeida
8bda6b0bd9 feat: show missing parameters in query (#12049)
* feat: show missing parameters in query

* Fix lint

* Address comments

* Simplify error message

* Use f-string in helper function
2020-12-15 18:47:40 -08:00
Grace Guo
8da1900d8a feat: add hook for dataset health check (#11970)
* feat: add hook for dataset health check

* add event log

* optimize datasource json data like certified data

* add unit test

* fix review comments

* extra code review comments
2020-12-15 18:12:06 -08:00
Jesse Yang
76f9f185fb refactor: optimize backend log payload (#11927) 2020-12-15 17:22:23 -08:00
Beto Dealmeida
77cae64ccd feat: Add new default dashboard (#12044)
* feat: Add new default dashboard

* Fix license

* Update data URL
2020-12-15 14:21:51 -08:00
Beto Dealmeida
5e811a14ef feat: load examples from config instead of code (#12026)
* feat: load examples from config instead of code

* Remove database

* Update data URL
2020-12-15 13:44:23 -08:00
Beto Dealmeida
e0079bb5ae fix: small fixes to the new import/export (#12064) 2020-12-15 12:24:24 -08:00
Moriah Kreeger
52e970a520 fix(annotation layers): remove redirect on layer edit (#12063) 2020-12-15 12:21:10 -08:00
Beto Dealmeida
862c251924 feat: handle new export in CLI (#11803)
* feat: handle new export in CLI

* Fix imports

* Fix lint

* Set options based on feature flag

* Fix lint

* Fix lint

* Add better error messages
2020-12-15 11:21:13 -08:00
adam-stasiak-polidea
7dac150dc6 fixed CONTRIBUTING typos (#12057) 2020-12-15 09:07:34 -08:00
Victor Malai
12e086dc61 refactor: Transform URLShortLinkModal to Typescript (#11971)
* Transform jsx modal to tsx modal

* Change required type

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-15 08:12:00 -08:00
Daniel Vaz Gaspar
f79e52f48e feat(charts): security perm simplification (#11981)
* feat(charts): security perm simplification

* fix superset explore

* fix JS test

* fix cypress test

* fix split heads

* fix favorite permission

* fix permission

* update with new async permission

* fix new permission coming from master

* fix core permission assert

* black

* update alembic down revision
2020-12-15 11:27:06 +00:00
Ville Brofeldt
821b01737d fix(viz): remove orderby from sample request (#12055) 2020-12-15 12:54:32 +02:00
Evan Rusackas
2df519eab0 upgrade react-split (#12054) 2020-12-15 00:54:35 -08:00
Daniel Vaz Gaspar
0f979dea06 feat(reports): security perm simplification (#11853)
* feat: security converge report

* black

* fix: comment

* add frontend changes and rebase

* fix multiple heads
2020-12-15 08:48:00 +00:00
Daniel Vaz Gaspar
832267c776 fix(reports): log duration and sort column (#12039) 2020-12-15 08:44:30 +00:00
Daniel Vaz Gaspar
20b1aa7d6c fix(reports): apply owners security validation (#12035)
* fix(reports): apply owners security validation

* fix pylint
2020-12-15 08:43:31 +00:00
Victor Malai
329dcc314e fix: Fix style for error modal (#11996)
* Fix style for error alert

* Revert test code
2020-12-15 00:03:53 -08:00
Evan Rusackas
7a7da27253 chore: bumping plugin packages to latest (#11957)
* chore: bumping plugin packages to latest

* new package-lock.json
2020-12-14 23:19:35 -08:00
ʈᵃᵢ
6fcda5dac1 feat: add cron picker to AlertReportModal (#12032)
* humanize cron display in list view
2020-12-14 22:29:31 -08:00
ʈᵃᵢ
fda3a2fe7c fix: disable browser autocomplete for DeleteModal (#12043) 2020-12-14 14:10:55 -08:00
Hugh A. Miles II
3d56f58ef5 fix: Explore "Change Dataset" UX Enhancements (#12006) 2020-12-14 13:17:20 -05:00
Lily Kuang
d5b16bcd85 fix schema datasource modal (#12018) 2020-12-14 08:44:47 -08:00
adam-stasiak-polidea
6311a9ec8c feat: Added setup for running Cypress tests in docker locally (#11207)
* Working configuration

* Fixes

* Set database volume directory. Added info in CONTRIBUTING how to avoid malformed database in tests.
2020-12-14 08:06:19 -08:00
Geido
1afe91579e refactor: Existing Antd Collapse to enhanced (#12013)
* Move ProgressBar to Antd

* Remove trailing space

* Fix linting issues

* Export enhanced Progress only

* Move existing antd Collapse to enhanced Collapse

* Move enhanced props up to Collapse only

* Add stories for enhanced Collapse

* Add 100% height for overflow

* Improve text light story
2020-12-13 22:57:08 -08:00
Evan Rusackas
fee9bbe57b style: Restoring menu highlights (#12024)
* restoring highlights

* fixing copypasta
2020-12-13 22:48:26 -08:00
Srini Kadamati
3e22668f8d docs: restored page on roles in security, executed other touchups, and… (#11978)
* Restored docs page on roles in security, executed other touchups, and renamed docs readme.txt to readme.md

* missed a url anchor on the security page

* fixed licensing issue and limited char width to 80

* fixed licensing issue and limited char width to 80

* whitespace experiments

* removed 2 periods

* staging whitespace

* addressed Robs feedback

* implemented robs second round of feedback on public_role_like
2020-12-13 14:06:14 -08:00
Victor Malai
022d755640 refactor : Change menu name and reorder items (#11993)
* Change menu name and reorder items

* change type

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-12 21:58:57 -08:00
Victor Malai
90ed3267e4 fix: Change url & add check for active item in menu (#11915)
* Change url & add check for active item in menu

* Refactor to pass lint validation

* Fix lint

* Revert back and remove underline
2020-12-11 20:25:29 -08:00
Beto Dealmeida
45703a1dea feat: update IDs when importing dashboards (#11991)
* feat: update IDs when importing dashboards

* Fix typos
2020-12-11 18:19:36 -08:00
Beto Dealmeida
9277a54a12 feat: add confirmation dialog for imports (#11983)
* feat: add confirmation dialog for imports

* Small fixes

* Clean return
2020-12-11 17:23:43 -08:00
Moriah Kreeger
696308715d feat: alerts/reports add/edit modal (#11770) 2020-12-11 15:50:08 -08:00
Beto Dealmeida
5d8ecc01b7 fix: add default position to dash export (#12007)
* fix: add default position to dash export

* Add constants
2020-12-11 11:55:33 -08:00
Beto Dealmeida
2769de3731 chore: remove generic type (#12003)
* chore: remove generic type

* Make resourceName type stricter

* Fix type

* Fix type

* Fix lint
2020-12-11 10:52:26 -08:00
Daniel Vaz Gaspar
916f7e923a fix(dataset): fetch metadata on dataset creation may raise broad exceptions (#11973)
* fix(dataset): fetch metadata on dataset creation may raise broad driver exceptions
2020-12-11 11:07:43 +00:00
Victor Malai
12d9d1eccb refactor : Transform SaveModal to typescript (#11951)
* Transform SaveModal to typescript

* Revert title

* Resolve code review

* Refactor

* Refactor

* Change

* Call method

* Fix test

* ShouldPersist default false

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-10 23:02:03 -08:00
Rob DiCiuccio
4d329071a1 feat(SIP-39): Async query support for charts (#11499)
* Generate JWT in Flask app

* Refactor chart data API query logic, add JWT validation and async worker

* Add redis stream implementation, refactoring

* Add chart data cache endpoint, refactor QueryContext caching

* Typing, linting, refactoring

* pytest fixes and openapi schema update

* Enforce caching be configured for async query init

* Async query processing for explore_json endpoint

* Add /api/v1/async_event endpoint

* Async frontend for dashboards [WIP]

* Chart async error message support, refactoring

* Abstract asyncEvent middleware

* Async chart loading for Explore

* Pylint fixes

* asyncEvent middleware -> TypeScript, JS linting

* Chart data API: enforce forced_cache, add tests

* Add tests for explore_json endpoints

* Add test for chart data cache enpoint (no login)

* Consolidate set_and_log_cache and add STORE_CACHE_KEYS_IN_METADATA_DB flag

* Add tests for tasks/async_queries and address PR comments

* Bypass non-JSON result formats for async queries

* Add tests for redux middleware

* Remove debug statement

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Skip force_cached if no queryObj

* SunburstViz: don't modify self.form_data

* Fix failing annotation test

* Resolve merge/lint issues

* Reduce polling delay

* Fix new getClientErrorObject reference

* Fix flakey unit tests

* /api/v1/async_event: increment redis stream ID, add tests

* PR feedback: refactoring, configuration

* Fixup: remove debugging

* Fix typescript errors due to redux upgrade

* Update UPDATING.md

* Fix failing py tests

* asyncEvent_spec.js -> asyncEvent_spec.ts

* Refactor flakey Python 3.7 mock assertions

* Fix another shared state issue in Py tests

* Use 'sub' claim in JWT for user_id

* Refactor async middleware config

* Fixup: restore FeatureFlag boolean type

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-10 20:21:56 -08:00
Grace Guo
0fdf026cbc feat: add invisible layer on loading chart (#11994) 2020-12-10 16:15:10 -08:00
Lily Kuang
df6efb6aa2 feat: alert/report execution log list view (#11937) 2020-12-10 15:15:13 -08:00
Beto Dealmeida
475f59cb1c feat: confirm overwrite when importing (#11982)
* feat: confirm overwrite when importing

* Skip flaky test
2020-12-10 14:50:10 -08:00
Beto Dealmeida
9e07e10055 chore: move passwords needed message (#12002) 2020-12-10 11:47:54 -08:00
Michael S. Molina
3a6254184a refactor: Removes hard coded colors (#11977)
* Removes hard coded colors

Removes hard coded colors defined in src/components/styles.ts. The colors defined in this file were used only in the Select component so they were migrated to src/components/Select/styles.tsx and ajusted to conform to the theme colors.

* Use theme context for Select styles

* Includes Theme Provider in tests with Select
2020-12-10 11:43:57 -08:00
Beto Dealmeida
9256b6fb3d chore: consolidate common code in importers (#11936)
* chore: consolidate common code in importers

* Small fixes

* Small fixes
2020-12-10 10:11:58 -08:00
Victor Malai
38bb6f3f20 fix : Fix style for header (sqllab) (#11980)
* Fix style for header

* flex

* Refactor

* Remove styled from import

* Change width of container

* Add tooltip and set fixed width of sidebar

* Fix lint

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 23:34:43 -08:00
Mayur Newase
8cc566792a fix(explore): changing metric aggregate doesn't update label (#11946)
* fix: [chart]heatmap selecting metrics does not update the query results
fixes issue #11866
title's label is overriding metric label.

* Using custom label to decide label of metrics.

* lint

* Tests fixed

* early metric label check while saving from ui

* early custom label check

* removed extra space

* no state mutations

* simplify

* removed log

* nned to fix linting issue

* Lint fixed
2020-12-10 09:30:57 +02:00
Evan Rusackas
c73904b02e fixing rounded corners (#11990) 2020-12-09 21:07:23 -08:00
Victor Malai
5435064807 refactor : Transform FilterScopeModal to Typescript (#11964)
* Transform from jsx to tsx

* replace any with void

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 15:46:06 -08:00
Victor Malai
e62cf0d84d fix : adhoc filter dropdown (#11963)
* Add z-index to popover

* Fix prettier

* Fix closing popover on select from dropdown

* Fix prettier

* Fix visibility change

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-09 15:44:20 -08:00
Kamil Gabryjelski
6fe1f9d78a Debounce TextControl if change runs immediately after input (#11985) 2020-12-09 15:41:44 -08:00
Kamil Gabryjelski
a4b06d23fd Change paddings on ListView and SubMenu (#11975) 2020-12-09 15:08:59 -08:00
Elizabeth Thompson
3c177e550b add user to sql lab state (#11986) 2020-12-09 14:53:15 -08:00
Beto Dealmeida
36976d17f7 fix: make "DELETE" confirmation work in other languages (#11987)
* Confirm delete i18n

* Make DELETE a parameter
2020-12-09 14:40:07 -08:00
Kasia Kucharczyk
4da47f1635 tests: added fixture with energy usage instead of example (#11308)
* Added energy usage fixture. Updated dashboard utils and unicode fixture with new method parameters.

* Add energy fixture to tests/access_tests.py

* Add energy fixture to tests/core_tests.py

* Add energy fixture to tests/dashboard_tests.py

* Add energy fixture to tests/datasets/api_tests.py

* Add energy fixture to tests/db_engine_specs/base_engine_spec_tests.py

* Add energy fixture to tests/import_export_tests.py

* Add energy fixture to tests/model_tests.py

* Add energy fixture to tests/query_context_tests.py

* Add energy fixture to tests/security_tests.py

* Add energy fixture to tests/charts/api_tests.py

* Changed formatting of slices' parameters in energy usage fixture

* Removed loading energy udage data from test conf file

* Add energy fixture to tests/databases/api_tests.py

* Fixes after review: removed isort:skip, load_charts->load_energy_charts, removed unused import.

* Added energy fixture to tests/charts/commands_tests.py and retrieving proper Slice by name

* Fixed charts/api_tests.py to use energy_usage from fixtures

* Fixed datasets/commands_tests.py to retrieve dataset by name and use energy_usage fixture

* Changed energy usage data to generated data and fixed chart tests which was checking energy usage data
2020-12-09 12:02:29 -08:00
David Aaron Suddjian
6270fa2026 refactor: Upgrade Redux (#11967)
* upgrade redux and react-redux, adjust types

* first round of test fixes

* fix rest of unit tests

* lint

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
2020-12-09 11:58:42 -08:00
Jesse Yang
9121482479 refactor: move enums to the beginning of utiuls/core.py (#11883) 2020-12-09 11:04:09 -08:00
Daniel Vaz Gaspar
1e3aaab590 fix(reports): validator_config, report state machine, working_timeout (#11890)
* fix(reports): expect more exceptions and fix validator config

* use a state pattern on command reports

* use a state pattern on command reports continue

* fix multiple heads

* fix unittests

* add more tests

* fix api tests after enum rename

* fix alembic multiple heads

* fix tests

* fix fixture cleanup

* fix mysql tests

* fix initial and not found state

* fix schema, and private public methods, addressing comments

* add new col to the API
2020-12-09 18:19:07 +00:00
Maxime Beauchemin
150c8e36b1 fix: always fetch database list on bootstrap payload (#11934)
There was this weird bug happening only when `SQLLAB_BACKEND_PERSISTENCE
= False` where if no database had been selected, there would be some
issue.

This makes sure that the store is populated consistently with the list
of database connections regardless of `SQLLAB_BACKEND_PERSISTENCE`. It
also uses the DAO to fetch database and will apply the RBAC-related
filters if any, the same way that the API does.
2020-12-09 09:36:18 -08:00
Hugh A. Miles II
cc44a2c01b feat: Sqllab to Explore UX improvements (#11755)
* create boiler modal component

* hello world modal

* setup modal flow

* setup savemodal for components

* flake8

* fix onclick reference

* working create datasource boiler

* saving spot for callback on text input

* working dataset with input box

* working redirect on completion

* get data for owners dropdown

* fix build with pull from master

* fix the filteroption

* 💯

* move state to upper component

* add overwrite state

* hacked overwrite process

* linting

* fix filter

* cleaning up the coe

* Delete preset.code-workspace

* remove unused code

* remove visualize

* update default value

* remove unneeded vars

* checkout package-lock.json

* linting

* get user id

* remove page filter

* setup proper call for updating columns in dataset

* add move to explore flow

* linting

* add param for overriding columns

* linting

* change title

* fix some tings

* cleanup

* linting

* add types in some places

* save toast

* use moment

* add error toast

* create enum for radio states

* initial state for saving query

* add tpying

* addressing concerns

* update propTypes

* add functionality for CTAS explor btn

* handle CTAS state

* fix onclick to reference upper level component

* formatting

* reset state after closing

* add error message when user doesn't pick an already selected dataset

* remove unneeded todo

* remove styling

* move async calls to api directory

* remove console.log

* add user id param

* typing

* littty

* move put to seperate file

* save

* dsf

* fix typing errors

* adding more types

* fix typing erros

* linting

* add basic spec test

* create dataset modal

* add components reference

* Rename SaveDatasetModal_spec.jsx to SaveDatasetModal_spec.tsx

* remove sinon for now

* fix typing errors on modal files

* fix linting

* address comments

* attempt to fix linting

* add props

* fix test

* fix the linting

* yerp

* fix this references

* spaces

* handleOverwriteCancel reference cleanup

* rename bool value for shouldOverwriteDataset

* fix typing for onChange

* you still the best in the world

* fix spec

* align branches

* push

* fix key names

* fix dataset reference

* lowercase

* fix save bug with tiem

* fixed styling

* fix date state after push to explore

* add disabling states

* plz refactor this

* this is working fully now

* do some renaming

* renaming

* remove console.logs

* still refactoring

* remove unneeded code

* remove unneeded variables

* still cleaning

* added interface

* fix typing issues

* cleanup unused code

* fix npm lnit

* fix initial problems

* add props to test

* remove unneeded files

* skip linting

* saving

* this works

* remove old test

* remove old test

* fix linting

* fix broken test

* remove jsx file

* refactoring

* cleanup

* remove comments

* reset user object

* fix functions

* fix this

* reverting CTAS btn flow

* remove onclick

* save frontend work

* allow for database id to be passed as param in body

* use enum

* fix linting

* style alignment

* get rid of .then

* add function to compute default value with tiem

* lit

* remove ts-error

* fix typing
2020-12-08 17:29:41 -08:00
Jesse Yang
8164aeafb1 build: cancel previous github action runs (#11940) 2020-12-08 15:27:08 -08:00
Daniel Vaz Gaspar
7e6f04fce4 fix(alerts, thumbnails): celery tasks using flask-sqlalchemy sessions (#11950)
* fix(alerts, thumbnails): celery tasks using flask-sqlalchemy sessions

* selenium user is case sensitive
2020-12-08 13:03:32 +00:00
Victor Malai
05258ebc6c fix(event-flow-viz): handle null metadata selection (#11885)
* Initialize object with empty array if is multiselect, fix 500 BE error

* modify data coming
2020-12-08 08:53:26 +02:00
Beto Dealmeida
8f1ac7ead1 feat: add modal to import dashboards (#11924) 2020-12-07 21:26:14 -08:00
Beto Dealmeida
33325f9fa6 feat: add modal to import charts (#11956)
* WIP

* Splat props
2020-12-07 18:33:59 -08:00
Beto Dealmeida
fbb458fa8b feat: add modal to import datasets (#11910) 2020-12-07 16:20:25 -08:00
Beto Dealmeida
2b9695c520 feat: add modal to import databases (#11884)
* feat: add modal to import databases

* Fix test

* Improve hook

* Remove log and needless store.

* Change JS functions
2020-12-07 11:22:45 -08:00
Krist Wongsuphasawat
a7bba92469 chore: bump nvd3 plugin version (#11947) 2020-12-07 12:19:03 +07:00
Daniel Vaz Gaspar
14ea444e58 fix(charts): screenshot API declaring an unnecessary rison arg (#11931) 2020-12-05 08:57:44 +00:00
Daniel Vaz Gaspar
f98ae014fa feat(releasing): support changelog csv export (#11893)
* feat(releasing): support changelog csv export

* fix lint and type annotations
2020-12-05 08:55:31 +00:00
Kamil Gabryjelski
41738df77d feat: Results table on Explore view (#11854)
* Upgrade react-split

* Implement split on ExploreChartPanel

* Implement tabs with collapse

* Fix run query button

* Fix copy to clipboard button

* Move table controls to separate file

* Make component more generic to handle samples

* Remove samples from DisplayQueryButton

* Move data tables to separate file

* Make split dynamically controlled

* Fix unit test

* Fix arrow not centered

* fixup! Fix arrow not centered

* Change copy button paddings

* Use translations

* Fix grammar in a comment

* Fix imports

* Use grid units

* Convert new files to typescript

* Fix after rebase

* Remove forceRender

* Fix big_number test

* Delay making request until panel is opened

* White background in south panel

* fixup! White background in south panel

* Lint fix

* Lint fix

* Remove redundant prop types

* Remove console log

* Delay loading samples until user switches tab

* Add debounce to filter input

* Use gridUnit for gutter sizes

* Change types object to Record<string, any>
2020-12-04 19:49:24 -08:00
Beto Dealmeida
66cd565bff feat: add Postgres SQL validator (#11538)
* Add Postgres SQL validator

* Strip line number from message

* Add unit tests

* Run tests only with postgres backend

* Add dep

* Add dep to bashlib
2020-12-04 19:17:23 -08:00
Geido
2c323426d1 refactor: Move Badge to Antdesign (#11899)
* Move Badge to Antdesign

* Export enhanced badge only

* Center number in badge
2020-12-04 17:06:54 -08:00
Victor Malai
64d6fb9f6f refactor: Extract copy functionality to utils (#11928)
* Extract copy functionality to utils

* Refactor

* Revert bind

* WIP

* Absolute path

* Fix lint

* Remove unused resolve
2020-12-04 17:04:41 -08:00
Erik Ritter
fa68288d61 fix: make sure we log the logs (#11939) 2020-12-04 16:50:16 -08:00
Craig Rueda
8adc8b8866 Quick fix for branch names in tags (#11930) 2020-12-04 14:27:25 -08:00
Kasia Kucharczyk
98dc65722c Added check if SQL query is empty and disable shortcut for run query (#11877) 2020-12-04 10:45:43 -08:00
Lily Kuang
60122a2b2d feat: filters for alerts and reports list view (#11900) 2020-12-04 09:58:34 -08:00
Erik Ritter
77d362d306 fix: Remove expensive logs table migration (#11920) 2020-12-04 07:59:28 -08:00
Ville Brofeldt
327a2817d3 feat: add event and interval annotation support to chart data ep (#11665)
* feat: add event and interval annotation support to chart data ep

* add tests + refactor fixtures

* use chart dao
2020-12-04 14:40:31 +02:00
Hugh A. Miles II
41d4fb9cb3 fix: Forgot to remove bad comments from SaveDatasetModal (#11919) 2020-12-03 17:03:40 -08:00
Beto Dealmeida
e0288bf76b chore: add unit tests for the current import functionality (#11786)
* chore: add unit tests for the current import functionality

* Improve comment

* Fix unit test
2020-12-03 14:48:43 -08:00
Geido
5b1939802d refactor: Move ProgressBar to Antd (#11875)
* Move ProgressBar to Antd

* Remove trailing space

* Fix linting issues

* Export enhanced Progress only
2020-12-03 13:28:06 -08:00
Beto Dealmeida
54bf70733f feat: run BQ queries as single statement (#11904)
* feat: run BQ queries as single statement

* Update deps

* Fix lint

* Update superset/sql_lab.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-03 13:20:23 -08:00
Elizabeth Thompson
04f993e222 fix: adjust width for non multi select inputs (#11911) 2020-12-03 11:27:17 -08:00
Hugh A. Miles II
9ae2f95b34 feat: Adding SaveDatasetModal component (#11861) 2020-12-03 11:14:44 -08:00
Bogdan
0396c705d4 chore: Support SET & SHOW commands as read only SQL commands (#11868)
* Support SET & SHOW commands as read only SQL commands

* Move is_readonly definition into the engine spec

* Rename & use super()

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-12-03 10:44:11 -08:00
Agata Stawarz
38d21acff6 fix: Check if annotation type is supported by the given chart type (#11876)
* Check if annotation type is supported by this kind of chart

* Check if annotation type exists
2020-12-03 10:23:23 -08:00
Evan Rusackas
53017e5a35 fix: Button storybook component size knob (#11912) 2020-12-03 10:20:24 -08:00
Evan Rusackas
38b720b0a7 style: eslint curly rule (#11913)
* style: eslint curly rule

* curly for ts
2020-12-03 10:20:05 -08:00
ʈᵃᵢ
8c063efa75 fix(query): sorting by user for Query History list view (#11897)
* fix: sorting by user for Query History list view

* fix filter exception
2020-12-03 09:12:58 +00:00
Daniel Vaz Gaspar
71c567bf3a feat(css templates): security perm simplification (#11856)
* feat: security converge css templates

* fix security tests

* fix JS test

* add migration

* black and fix migration
2020-12-03 08:45:32 +00:00
Grace Guo
61064b9634 add fix for extra comments for #11781 (#11902) 2020-12-02 18:13:42 -08:00
Nikola Gigić
721f9119e1 chore: Enable jsx-a11y/anchor-is-valid (#11891)
* Enabling ancor-is-valid

* Remove comments since no longer applies
2020-12-02 10:14:56 -08:00
Hugh A. Miles II
0c10f9ee3f chore: Update sqllab types (#11887) 2020-12-02 10:11:26 -08:00
Will Barrett
1842c56209 Capture error when celery back-end does not support forgetting tasks (#10770) 2020-12-02 09:47:02 -08:00
Erik Ritter
f2d9f00013 feat: allow user to view their profile again (#11816) 2020-12-02 09:14:23 -08:00
Victor Malai
07288789e2 fix: Show copy icon (#11847)
* Show copy icon

* Fix eslint

* Fix copy button on view query modal

* Remove comments
2020-12-01 23:40:02 -08:00
Victor Malai
618a73d56e Align icon (#11848) 2020-12-01 22:44:55 -08:00
Nikola Gigić
9514be5daf style: remove react bootstrap fade component (#11843)
* Replace Bootstrap Fade component with custom Emotion Fade component

* Fix lint errors

* Added test

* Fixing front-end build errors

* Fix lint errors
2020-12-01 22:43:30 -08:00
Lily Kuang
a76eadd838 feat: report/alert list CRUD view (#11802) 2020-12-01 17:57:15 -08:00
Erik Ritter
d041d3a7f1 fix: certification icon order (#11881) 2020-12-01 17:11:09 -08:00
Grace Guo
f292015ccd fix (dataset editor): allow Source tab readOnly mode (#11781)
* fix (dataset editor) add read-only mode for Source tab

* add feature flag, add unit tests

* rebase and fix comment

* add message for padlock

* move padlock to the bottom of tab
2020-12-01 17:10:33 -08:00
Daniel Vaz Gaspar
ac9761c730 fix: dashboard iframe to markdown db migration (#11845)
* fix: dashboard iframe to markdown db migration

* Update superset/migrations/versions/978245563a02_migrate_iframe_to_dash_markdown.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-01 20:50:35 +00:00
Jesse Yang
a5af2ade0a test: add React Testing Library (#11771) 2020-12-01 11:14:37 -08:00
Kasia Kucharczyk
3035090915 fix: filters push out apply button on dashboard (#11580)
* Changed height of slices in dashboard into 100%-padding, so there is no scroll appearing anymore

* Added scroll to the block on dashboard, when filters are too high

* Applied lint
2020-12-01 10:43:50 -08:00
ʈᵃᵢ
ffa32cde14 chore: remove SIP_34_QUERY_SEARCH_UI feature flag (#11863) 2020-12-01 09:29:16 -08:00
Agata Stawarz
44e80e0175 chore: Add home link to navbar (#11851)
* Add Home link to Navbar

* Change test text for rendering elements in the main navbar

* Display Home link only when Logo Target Path is set
2020-11-30 23:14:42 -08:00
Elizabeth Thompson
84e0606a90 chore: move fixtures and helpers to root (#11812) 2020-11-30 14:23:56 -08:00
ʈᵃᵢ
011724750f feat: list view filters for Query History (#11702) 2020-11-30 14:21:53 -08:00
Hugh A. Miles II
3cd94d6da9 feat: Create api abstraction layer for dataset network calls (#11855)
* add datasets api file

* Update dataset.ts

* Update dataset.ts

* Update dataset.ts
2020-11-30 13:27:27 -08:00
Hugh A. Miles II
a0b81357cd fix(datasets): renaming openAPI columns (#11858) 2020-11-30 12:01:11 -08:00
Phillip Kelley-Dotson
0e9898cb96 feat(welcome): add SQL snippets to saved queries card (#11678)
* update savedqueries card to new layout

* update card

* update card to latest mock

* update empty state

* remove fallback

* fix query statement

* update card styles

* remove double import

* use fallbackurl prop for emptystate

* update line lenth

* Update superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* update styles and svg

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-11-30 11:53:12 -08:00
Kamil Gabryjelski
a4f44255aa Fix chart select borders in BuilderComponentPane (#11766) 2020-11-30 09:51:54 -08:00
Daniel Vaz Gaspar
b1a963b93f fix: security converge downgrade procedure (#11852) 2020-11-30 17:50:12 +00:00
Kasia Kucharczyk
462b39d762 fix: update chart doesn't remove all connections to dashboards (#11830)
* Added possibility to not change dashboards connection when chart is changed

* Added two chart unit tests which checks if dashboards properly change on update
2020-11-30 09:48:14 -08:00
adam-stasiak-polidea
16e69f1131 feat: Option to run npm dev-server (hot reload) while calling docker-compose up (#11238)
* Configured docker to be able running dev-server instead of frontend dev script

* reverted changes

* license fix
2020-11-30 09:35:58 -08:00
Hugh A. Miles II
0689738e7c feat: Sqllab to Explore UX improvements api changes (#11836) 2020-11-30 09:23:11 -08:00
Kamil Gabryjelski
5ebc09b339 fix: Download as image not working on Dashboard view (#11778)
* Fix download as image not working on Dashboard view

* Fix menu not closing before making a screenshot

* Move hardcoded selectors to variables

* Fix linting issue

* Add comments

* Close menu before taking a screenshot on Explore view

* Use style.visibility instead of timeout to hide menu for screenshot

* Change const name to uppercase

* Move variable declarations to case
2020-11-30 09:16:38 -08:00
Daniel Vaz Gaspar
9dd33d5566 feat(saved queries): security perm simplification (#11764)
* feat(saved queries): security perm simplification

* migration script and frontend

* add downgrade procedure

* downgrade procedure, inferred from the upgrade data

* fix JS test

* improve code

* add tests for role migration

* more tests and a short description for each one

* Improve readability

* simplify dataclass creation

* fix dataclass
2020-11-30 13:07:39 +00:00
Erik Ritter
46664452a7 chore: type a couple easy to type files (#11838) 2020-11-29 21:52:41 -08:00
Kamil Gabryjelski
19e5ce0ac7 chore: Move styles of Dashboard and FilterScopeSelector modals to Emotion (#11779)
* Remove unused component

* Move styles from dashboard.less and filter-scope-selector.less to Emotion

* Write padding style short-hand way
2020-11-29 21:20:03 -08:00
Agata Stawarz
e974b0be05 Change subtabs order for Data tab (#11834) 2020-11-29 20:16:47 -08:00
Erik Ritter
671ff6c053 fix: improve Avatar text size consistency (#11837) 2020-11-29 20:08:47 -08:00
Amit Miran
ec01691e22 fix: wrong key used FEATURE_FLAGS[LISTVIEW_DEFAULT_CARD_VIEW] (#11824)
* fix:  FEATURE_FLAGS[LISTVIEW_DEFAULT_CARD_VIEW] wrong keyword used by default

* the opposite change

* chore: rename comment as well

Co-authored-by: Amit Miran <47772523+amitNielsen@users.noreply.github.com>
2020-11-29 19:39:16 -08:00
Agata Stawarz
43c69d52a4 fix: Adding and removing annotations (#11811)
* Fix creating new annotation layer and refactor AnnotationLayer component

* Refactor checking overrides keys in AnnotationLayer

* Fix adding and editing annotations. Refactor AnnotationLayer submit and remove functions

* Remove unused parent prop from AnnotationLayer

* Fix toggling annotation layer popover

* Revert extracting annotation props to nested object

* Clean up AnnotationLayer component

* Remove unnecessary import

* Use original name for identifying annotations in add/remove actions

* Change props order and rename removeAnnotation function

* Compare annotations by reference instead of name
2020-11-28 10:59:16 +02:00
Daniel Vaz Gaspar
f121107bbe ci(docker): build image on release (#11828)
* feat(docker): build image on release

* separate trigger separate handling

* fix triggers

* less states for docker build on PR's
2020-11-27 09:38:38 +00:00
Daniel Vaz Gaspar
35784106dd docs(release): small fixes and deprecate apache docs (#11827)
* docs(release): small fixes and deprecate apache docs

* remove last 0.38 reference
2020-11-26 11:49:59 +00:00
Daniel Vaz Gaspar
1591d75d2f fix(setup): disallow python 3.6 for pip install (#11825)
* fix(setup): disallow python 3.6 for pip install

* remove old py constraint
2020-11-26 11:49:12 +00:00
Daniel Vaz Gaspar
bac84a3aac fix: delete chart, dashboards, dbs with assoc reports (#11801)
* fix: delete chart or dashboards with assoc reports

* database constraint to reports and tests

* add tests for dashboards and database

* fix exceptions default text
2020-11-26 08:45:49 +00:00
John Bodley
13c51d5211 chore: Fix TableModelView super call (#11815) 2020-11-26 11:37:42 +13:00
Lily Kuang
9c69679e14 feat: filter by me on CRUD list view (#11683) 2020-11-25 11:56:48 -08:00
Beto Dealmeida
c354e7e0ab fix: remove root dir from ZIP bundle (#11805)
* fix: remove root dir from ZIP bundle

* Fix lint

* Fix tests

* Improve tests

* Fix dashboard as well
2020-11-25 11:47:48 -08:00
Grace Guo
4cbf482194 fix: add feature flag for domain sharding (#11797)
* fix: add feature flag for domain sharding

* fix review comment

* add comment for speical case
2020-11-25 11:47:18 -08:00
Maxime Beauchemin
0504cf1a00 chore: improve analytics (#11714)
* chore: improve analytics

* lint

* log more events, add note in UPDATING.md

* handling base class

* more events\!

* get ref through

* right before @expose

* fix context

* touchups
2020-11-25 08:45:02 -08:00
Erik Ritter
9215a31fa2 chore: type src/logger (#10815) 2020-11-25 08:21:44 -08:00
Daniel Vaz Gaspar
84c8a627b2 docs: 0.38.0 CHANGELOG and UPDATING (#11809) 2020-11-25 11:36:50 +00:00
auxten
ac0dd3fa32 fix: attachment filename error in sqllab with i18n (#11762)
* Fix attachment filename error in sqllab

* Fix line too long lint

* Fix black lint
2020-11-25 13:05:30 +02:00
Ville Brofeldt
38f67a44ca fix: mutating input df in viz.py (#11795) 2020-11-25 12:55:00 +02:00
Daniel Vaz Gaspar
f27ebc4be5 feat: new reports scheduler (#11711)
* feat(reports): scheduler and delivery system

* working version

* improvements and fix grace_period

* add tests and fix bugs

* fix report API test

* test MySQL test fail

* delete-orphans

* fix MySQL tests

* address comments

* lint
2020-11-25 08:50:30 +00:00
Beto Dealmeida
501b9d47c5 feat: API endpoint to import dashboards (#11751)
* ImportChartsCommand

* feat: add a command to import dashboards

* feat: API endpoint to import dashboards

* Add dispatcher

* Raise specific exception

* Fix test

* Remove print calls

* Add logging when passing
2020-11-24 22:45:35 -08:00
Erik Ritter
e4d02881d2 chore: unbreak frontend ci (#11806) 2020-11-24 21:43:02 -08:00
Kamil Gabryjelski
9b68b65568 refactor: Replace react-bootstrap tooltips with Antd tooltips (#11737)
* Refactor tooltip in ColumnElement

* Refactor tooltip for Button 

* Remove redundant import

* Refactor tooltip in SqlEditor

* Increase line height in tooltip so that the text is centered

* Refactor tooltip in Link

* Refactor tooltip in AdhocMetricEditPopoverTitle

* Refactor tooltip from ControlHeader

* Refactor tooltip in DateFilterControl

* Refactor tooltip in VizTypeControl

* fixup! Refactor tooltip in AdhocMetricEditPopoverTitle

* Refactor tooltip in QueryAndSaveBtns

* fixup! Refactor tooltip in DateFilterControl

* Refactor tooltip in CopyToClipboard, fix cursor pointer

* Refactor tooltip in TooltipWrapper

* Refactor tooltip in Field/DatasourceEditor

* Remove redundant import

* Fix typing for placement prop

* Decrease margin in ColumnElement divider

* Change default export to named

* Move SqlLab Tooltip styles to Emotion

* Fix tests
2020-11-24 13:04:55 -08:00
PM Extra
75086f8979 fix: docker healthcheck (#11798)
* Fix docker healthcheck.

* Update Dockerfile
2020-11-24 12:39:10 -08:00
Erik Ritter
c0224aa928 feat: add certification info to table selector (#11785) 2020-11-24 12:13:52 -08:00
Elizabeth Thompson
302357f3e7 update docs around email reports (#11783) 2020-11-24 11:43:43 -08:00
Erik Ritter
67c44479b5 build: split python CI jobs (#11794)
* build: split python CI jobs

* Rename superset-python.yml to superset-python-misc.yml
2020-11-24 11:40:16 -08:00
Moriah Kreeger
6019113bc6 refactor: use rison for list view filters stateful urls (#11675) 2020-11-24 11:19:48 -08:00
Agata Stawarz
91bcbc8350 refactor: Replace SqlLab components' styles using Emotion & theme variables (#11780)
* Replace inline styles for SqlLab components using Emotion and Theme variables

* Replace styles classnames for SqlLab components using Emotion

* Remove unnecessary styles & round padding value
2020-11-24 10:53:51 -08:00
adam-stasiak-polidea
6cb820583b chore: controls.test supporting v1 charts and added force=true to url when r… (#11754)
* controls.test supporting v1 charts and added force=true to url when refreshin chart with force an option

* Added verification for isCached

* added using global alias prefix

* fixed typescript error
2020-11-24 10:50:33 -08:00
Phillip Kelley-Dotson
d364d0354c add tool tip to cards (#11791) 2020-11-24 10:20:27 -08:00
adam-stasiak-polidea
f49525f03e chore: enabled v1 verification in filter and url_params test files (#11712)
* enabled v1 verification in filter test file

* added v1 support in url_params tests

* review fix
2020-11-24 13:09:57 +02:00
Maxime Beauchemin
872a54d304 fix: annotation layer crashes when clearing type select (#11787) 2020-11-23 21:46:26 -08:00
Beto Dealmeida
25345bea64 feat: add a command to import dashboards (#11749)
* feat: add a command to import dashboards

* Fix lint

* Remove print()
2020-11-23 16:28:26 -08:00
H Shashank Koppar
2566319554 docs: add Xite to users list (#11775)
* Update INTHEWILD.md

* put in alphabetical order
2020-11-23 15:49:40 -08:00
Elizabeth Thompson
fd7e6c77fc fix: style multiselect input (#11732)
* style multiselect input

* add autocomplete and move input styles to styles file
2020-11-23 14:15:11 -08:00
PM Extra
a062cbbf5d Fix docker healthcheck. (#11747) 2020-11-23 13:17:19 -08:00
Erik Ritter
db7386910e chore: fix typo (#11772)
* chore: fix typo

* Update utils.tsx
2020-11-20 19:23:37 -08:00
ʈᵃᵢ
fbe4a6622e feat: SQL preview modal for Query History (#11634) 2020-11-20 16:01:06 -08:00
Beto Dealmeida
a3a2a68f01 feat: API endpoint to import charts (#11744)
* ImportChartsCommand

* feat: API endpoint to import charts

* Add dispatcher

* Fix docstring
2020-11-20 14:40:27 -08:00
Beto Dealmeida
2f4f87795d feat: add a command to import charts (#11743)
* ImportChartsCommand

* Fix type
2020-11-20 14:20:13 -08:00
Craig Rueda
141cb45b5a fix: Fixing issue around requirements-local.txt (#11769)
* Fixing issue around requirements-local.txt

* Fixing license

* Linting
2020-11-20 14:18:17 -08:00
Hugh A. Miles II
1ef3a02e7a feat: Add user info to sqllab via bootstrap data (#11760) 2020-11-19 18:32:51 -08:00
Kamil Gabryjelski
cdd01f4851 fix: Null error when deleting the last owner label in DatasourceEditor/settings (#11752)
* Fix null error when deleting the last owner in SelectAsyncControl

* Replace "||" with "??"
2020-11-19 14:10:34 -08:00
Kamil Gabryjelski
63ef649d1d Make spacings in Settings menu more consistent (#11709) 2020-11-19 13:01:53 -08:00
Evan Rusackas
31eaa0ca20 style: dark filter popover background (#11611)
* style: dark filter popover background

* Story to test and demonstrate the pitfalls of global styles

* nixing the story... not going to be reusing this anyway

* adding a class to isolate dark styles

* now supports all arrow directions

* placing at the bottom rather than bottom right

* adding colors, adjusting spacing

* linting
2020-11-19 10:54:49 -08:00
Amit Miran
c79dc4763b chore: Text change Allow Data Upload (#11736)
* chore: Text change Allow CSV/Excel Upload

today there are 2 ways of uploading data CSV or Excel
config on the database allow_csv_upload applies to both options
so the client facing text should also indicate that

* Allow Data Upload
2020-11-19 12:05:14 +02:00
Craig Rueda
8bdf943687 fix: Adding __init__.py in superset.commands.importers (#11740)
* Adding __init__.py in superset.commands.importers

* Linting

* Linting again...
2020-11-18 13:19:04 -08:00
Ville Brofeldt
7ae8cd07cc fix: do not drop calculated column on metadata sync (#11731) 2020-11-18 08:33:14 -08:00
David Aaron Suddjian
676e0bb282 docs: fix docker config paths (#11703)
* docs: fix config paths for docker

* xit bad cypress tests
2020-11-17 22:00:12 -08:00
Kamil Gabryjelski
1371939921 Fix missing styles in FilterScopeSelector modal (#11726) 2020-11-17 16:48:55 -08:00
Beto Dealmeida
cce716a821 feat: API endpoints to upload dataset/db (#11728)
* feat: API endpoints to upload dataset/db

* Fix method call
2020-11-17 14:49:33 -08:00
Lily Kuang
b3ead231cc chore: remove SIP_34_ANNOTATIONS_UI feature flag (#11727) 2020-11-17 14:11:11 -08:00
Rob DiCiuccio
01d15f5368 feat(templating): Safer Jinja template processing (#11704)
* Enable safer Jinja template processing

* Allow JINJA_CONTEXT_ADDONS with SAFE_JINJA_PROCESSING

* Make template processor initialization less magical, refactor classes

* Consolidat Jinja logic, remove config flag in favor of sane defaults

* Restore previous ENABLE_TEMPLATE_PROCESSING default

* Add recursive type checking, update tests

* remove erroneous config file

* Remove TableColumn models from template context

* pylint refactoring

* Add entry to UPDATING.md

* Resolve botched merge conflict

* Update docs on running single python test

* Refactor template context checking to support engine-specific methods
2020-11-17 11:55:47 -08:00
Evan Rusackas
c241c6f00b fix: prior npm font source had a glitch (#11724) 2020-11-16 21:23:54 -08:00
Kamil Gabryjelski
8a39f2799a Fix "Select all" option in SelectControl (#11692) 2020-11-16 17:23:32 -08:00
Kamil Gabryjelski
274420bc5a Fix ModalTriggers styling in SqlLab (#11719) 2020-11-16 17:13:37 -08:00
Beto Dealmeida
7bc353f8a8 feat: new import commands for dataset and databases (#11670)
* feat: commands for importing databases and datasets

* Refactor code
2020-11-16 17:11:20 -08:00
Evan Rusackas
871a98abe2 refactor: Load fonts from packages rather than local binaries (#11718)
* removing binaries

* adding npm packages

* nixing unused specimen sheet

* deleting specimen sheets

* using imported css sheets from npm

* package lock

* fixing webpack issue with font loading

* raising specificity on ACE editor fonts

* linting 
2020-11-16 17:10:48 -08:00
Kamil Gabryjelski
3e6bcbb98d Remove "required" from SaveModal Add to dashboard field (#11693) 2020-11-16 15:07:24 -08:00
Evan Rusackas
86651cd451 fix: default dashboard/chart cards are vector with perfect corners (#11684)
* fix: default dashboard/chart cards are vector with perfect corners

* fix: adding licenses
2020-11-16 09:26:07 -08:00
Craig Rueda
5700f8d363 Switching Docker compose over to the official image (#11707) 2020-11-16 07:54:44 -08:00
Bogdan
a16a2b87c7 chore: statds metrics for cache invalidation (#11701)
* Add more logging to the cache invalidation

* Address linter & tests

* Fix linter

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-11-16 06:48:26 -08:00
adam-stasiak-polidea
2f036e9359 chore: V1 charts load cypress tests (#11685)
* Enabled assertion on v1 chart request

* added missing code after rebase

* extracted alias logic to function

* modified v1 requests to contain form data, added assertion on ui elements using slice id from request
2020-11-16 09:08:35 +02:00
Rob DiCiuccio
700c7c524e build(cypress): Fix issue with cypress code-coverage plugin when running locally (#11698)
* Update @cypress/code-coverage to latest

* Set nyc reporter to html/text

* Revert dashboard list test changes from #11613

* Update codecov reporting to summary format

* Add json reporter for codecov.io

* Silence inline coverage reports
2020-11-15 13:16:34 -08:00
Grace Guo
7d27996867 chore: remove a few obsolete logic (#11676) 2020-11-13 23:16:05 -08:00
Kamil Gabryjelski
2b107ed33d Fix overflow hidden issues in Dashboard Builder tabs (#11691) 2020-11-13 23:14:02 -08:00
Jesse Yang
4cfcaebb61 feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG (#11509)
* feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG

The corresponding cache will now also cache the query results.

* Slice use DATA_CACHE_CONFIG CACHE_DEFAULT_TIMEOUT

* Add test for default cache timeout

* rename FAR_FUTURE to ONE_YEAR_IN_SECS
2020-11-13 22:35:10 -08:00
Craig Rueda
68693c7c0a feat: Helm improvements (#11700)
* Adding docker build/push

* Adding build script

* Trying username

* Updating build script

* Fixing script path?

* Lising envvars

* Pulling HEAD

* Actually pushing

* Fixing build / SHA

* Logout before login

* updating docker login

* Fixing docker login

* Trying stdin pwd

* Adding check for forks

* Fixing tagging

* Fixing refspec

* Updating Dockerfile-dev

* Adding license to script

* Fixing Cypress tests

* Adding Helm hooks and force reload option

* Adding worker pod

* Removing head SHA checkout in docker.yml
2020-11-13 15:17:52 -08:00
ʈᵃᵢ
218f58edb7 fix(saved query): handle null sql field (#11679) 2020-11-13 13:15:24 -10:00
Craig Rueda
95246e8812 feat: Adding docker build/push (#11616)
* Adding docker build/push

* Adding build script

* Trying username

* Updating build script

* Fixing script path?

* Lising envvars

* Pulling HEAD

* Actually pushing

* Fixing build / SHA

* Logout before login

* updating docker login

* Fixing docker login

* Trying stdin pwd

* Adding check for forks

* Fixing tagging

* Fixing refspec

* Updating Dockerfile-dev

* Adding license to script

* Fixing Cypress tests
2020-11-13 11:32:18 -08:00
Jesse Yang
ec8ccd4cf1 feat: keep modal open when saving database failed (#11618) 2020-11-12 16:10:14 -08:00
Kamil Gabryjelski
3ad65bc163 fix: Dropdown menu not closing on Dashboard view (#11671) 2020-11-12 14:48:48 -08:00
Maxime Beauchemin
5cb6c25ca0 docs: add support for Google Analytics on superset.apache.org (#11613)
* docs: add support for Google Analytics

* fix failing cypress test in list_view.test.ts

* xit some tests
2020-11-12 13:57:05 -08:00
ʈᵃᵢ
432e5ab460 feat: Query History CRUD list view (#11574) 2020-11-12 11:55:13 -10:00
Daniel Vaz Gaspar
12cb27f5cb feat: new reports models api (#11606)
* feat: new report schedule models

* lint and unique constraint

* support sqlite

* fix sqlite

* add audit mixin and minor fixes

* feat(api): alerts and reports REST API

* feat: new report schedule models

* lint and unique constraint

* support sqlite

* fix sqlite

* add audit mixin and minor fixes

* feat(api): alerts and reports REST API

* draft working version

* add tests

* test

* black

* remove copy pasta

* solve dashboard object representation being used on cache

* tests and custom filter

* fix PUT has PATCH on active field

* create feature flag

* fix lint

* address comments
2020-11-12 13:21:01 -08:00
ʈᵃᵢ
1dc4c4746e fix(dashboard): ordering for add chart widget (#11672) 2020-11-12 11:10:45 -10:00
Grace Guo
0338b48fdd fix (dashboard): remove default filters parameters in dashboard url (#11661) 2020-11-12 13:00:27 -08:00
Kasia Kucharczyk
4af7264a2c fix: make higher chart box resizable (#11673)
* Added visible resizible icon to all types of blocks in tabs

* Adjusted position of hovered framwes and edited markdown
2020-11-12 11:53:48 -08:00
Elizabeth Thompson
b277f19808 keep placeholder on multiselect (#11289) 2020-11-12 11:36:24 -08:00
Jesse Yang
542d2e3b06 chore: clean up a debug line from #11653 (#11663) 2020-11-12 08:37:49 -08:00
Ville Brofeldt
2718909314 feat: add ECharts BoxPlot chart (#11199)
* feat: add ECharts BoxPlot chart

* lint

* fix cypress tests

* lint

* remove viz.py shim

* bump plugin package

* skip non-legacy plugin cypress dashboard tests

* fix cypress tests

* disable cypress tests for non-leagcy charts

* fix bad rebase

* use midpoint interpolation for quartile calculation

* bump packages and add support for no groupby

* whitespace

* whitespace

* linting

* fix tests

* xit mathjs load test

* bump mathjs to 8.0.1

* disable cypress filter test for v1 charts
2020-11-12 10:01:04 +02:00
Jesse Yang
302c9603c4 fix: database connection validation when creation (#11653) 2020-11-12 08:00:38 +00:00
Beto Dealmeida
45738ffc1d chore: consolidate datasource import logic (#11533)
* Consolidate dash import logic

* WIP

* Add license

* Fix lint

* Retrigger tests

* Fix lint
2020-11-11 22:04:16 -08:00
Kamil Gabryjelski
6ef4d2a991 Restructure chart header to wrap nicely (#11643) 2020-11-11 20:18:04 -08:00
Beto Dealmeida
4a070cfceb chore: consolidate dashboard import logic (#11529)
* Consolidate dash import logic

* Fix lint

* Remove Slice.import_obj

* Remove unused import

* Fix log
2020-11-11 14:50:18 -08:00
Elizabeth Thompson
f3b68cbbbe add import icon (#11652) 2020-11-11 13:48:53 -08:00
Jesse Yang
7cbf21c39f build: set actions/setup-python to v2 (#11644)
This upgrades the `setup-python` action and pins it to the latest v2,
which suppresses the warnings about set-env and add-path:

    Error: The `set-env` command is deprecated and will be disabled on November 16th. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-11-11 13:15:05 -08:00
Jesse Yang
4f21dea55f feat(dev): dont override asset manifest in dev-server (#11648)
Override manifest.json only when `npm run dev`, not `npm run
dev-server`.  This allows developers to compare between the
current version of Superset with what they are working on
without switching back and forth between branches.

All they need to do is to first start the current version with
production build:

```
npm run build
superset run -p 8088
```

Then start the dev server in another window:

```
npm run dev-server
```
2020-11-11 13:14:45 -08:00
Grace Guo
a9f9c4bbd5 [fix] handle null value in date filter (#11655) 2020-11-11 09:32:26 -08:00
Ville Brofeldt
77dff0e4e0 fix(chart-data): ignore orderby on sample result type (#11656) 2020-11-11 16:27:56 +02:00
ʈᵃᵢ
329e72885c fix(saved-query): handle case where sql_tables in undefined (#11649) 2020-11-10 15:26:29 -10:00
Evan Rusackas
73cc938358 style: various little tweaks to home screen stylin' (#11650)
* adding bottom padding

* making light gray backgrounds match

* vertical centering of empty state content.

* linting 

* fixing card radii

* fixing corner radius... thumb was covering corner border.
2020-11-10 17:20:31 -08:00
Jesse Yang
75245177e9 chore: pin node and npm versions (#11646) 2020-11-10 15:58:54 -08:00
Jesse Yang
339d0d73bc feat(sankey-viz): allow sort by metric and bump superset-ui packages (#11626) 2020-11-10 15:58:00 -08:00
Rob DiCiuccio
14aa729e66 build(deps-dev): update cypress to 5.5.0, improvements for running locally (#11603)
* reduce numTestsKeptInMemory to 0 to prevent Chrome OOM crash

* Add cypress-run-chrome script, update docs and cypress_build.sh

* Upgrade Cypress to latest version

* tox: add missing 'cypress' env, cleanup flask server

* Fix failing dashboard edit test syntax

* Reduce retry count to 1

* Prettier test
2020-11-10 15:51:47 -08:00
adam-stasiak-polidea
4eff80c3f3 chore: enabled cypress test in filter file (#11458)
* enabled cypress test in filter file

* added delay to typing

* additional assertion and timeout

* Modified test logic - changed user's action to selection from list instead of typing (unstable with cypress)
2020-11-10 15:18:20 -08:00
Kamil Gabryjelski
98d1c6964c refactor: Remove reactable arc (#11535)
* Refactor DisplayQueryButton into functional component and use react-table

* Refactor EstimateQueryCostButton to functional component

* Use react-table instead of reactable-arc

* Remove reactable-arc dependency

* Add margin for copy button

* Make search case insensitive
2020-11-10 15:13:29 -08:00
adam-stasiak-polidea
777a84cdbf Enabled artifacts for failing tests (#11584) 2020-11-10 12:42:54 -08:00
Beto Dealmeida
cf868891be chore: rename IMPORT_EXPORT_VERSION (#11636) 2020-11-10 09:45:45 -08:00
Evan Rusackas
3b89d2307a fix: card thumbnails now always show border. (#11638)
Co-Authored-By: Evan Rusackas <evan@preset.io>
2020-11-10 08:58:39 -08:00
Yongjie Zhao
cd0198a878 Chore: simplify Apache Kylin datetime convert (#11521) 2020-11-10 18:46:18 +02:00
Beto Dealmeida
51712bf7ce fix: CommandInvalidError had invalid init (#11635) 2020-11-10 07:41:03 -08:00
adam-stasiak-polidea
4d41cf900d Disabled bubble test (#11630) 2020-11-09 18:58:28 -08:00
Grace Guo
966a826720 fix: js unit test when save dash (#11632) 2020-11-09 17:56:30 -08:00
Evan Rusackas
d315dd96f0 style: fixing tall filter indicators (#11631)
Co-Authored-By: Evan Rusackas <evan@preset.io>
2020-11-09 16:17:32 -08:00
David Aaron Suddjian
5be1dbe28b feat(dashboard): leaner filter indicator panel with wrapped text (#11592)
* feat(dashboard): leaner filter indicator panel with wrapped text

* remove summary from filter indicator panel
2020-11-09 14:23:43 -08:00
Kamil Gabryjelski
0c6aeef927 Fix datetime picker issues (#11621) 2020-11-09 14:13:27 -08:00
Grace Guo
b9284d3a3c fix(dashboard): use server-side lastModifiedTime for co-edit check (#11614)
* fix: [dashboard][co-edit] Round client-side lastModifiedTime

* another try: server-side returns last_updated_time in save_dash response
2020-11-09 13:30:40 -08:00
Lily Kuang
dda95ed250 feat: annotation delete modal, bulk delete and empty state (#11540) 2020-11-09 11:25:16 -10:00
Jesse Yang
92a9acd5c9 fix: minor style touch on dashboards (#11570) 2020-11-08 21:26:56 -08:00
Jesse Yang
6ab03feed8 chore: clean up mountedTab (#11569) 2020-11-08 21:09:27 -08:00
adam-stasiak-polidea
24ba5301d1 Fixed unstable test (#11583) 2020-11-08 17:53:43 -08:00
Kasia Kucharczyk
ea0abbffb4 fix: extended droppable area on the top of dashboards (#11525)
* Extended droppable area on the top

* Empty dashboard detects almost whole area to place first element
2020-11-08 17:35:39 -08:00
dependabot[bot]
849e7e9668 build(deps-dev): bump less from 3.9.0 to 3.12.2 in /superset-frontend (#11597)
Bumps [less](https://github.com/less/less.js) from 3.9.0 to 3.12.2.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-08 10:02:54 -08:00
Evan Rusackas
d86117331d chore: cleaning out old deckgl controls (#11564) 2020-11-06 22:41:08 -08:00
Phillip Kelley-Dotson
d8373f2bb9 chore(home-screen): fixes for loading states, flicker issue, and reduction of api calls (#11557)
* fixes for loading states, flicker issue, api calls

* fix filter bug

* add high res images

* bug fixes for cards and face pile, change imgs to svgs, and address comments

* update from comments

* add stopprop

* fix tests

* add liscenses

* remove unused type

* fix types

* add license

* fix lint
2020-11-06 19:35:13 -08:00
Kamil Gabryjelski
a6bf95e30b fix: Filter and Metric popovers not closing after clicking Save (#11607)
* Fix filter popover not closing

* Fix metric popover not closing

* Add e2e tests
2020-11-06 14:23:12 -08:00
Evan Rusackas
32e52e94e0 style: Wrap chart titles again (#11602)
* style: letting chart titles wrap again

* deleting comment
2020-11-06 11:10:45 -08:00
ʈᵃᵢ
79a6e9b0d2 fix(dashboard): order charts by changed_on (#11594) 2020-11-06 11:02:03 -08:00
Daniel Vaz Gaspar
bd79bd2a54 feat: new report schedule models (#11550)
* feat: new report schedule models

* lint and unique constraint

* support sqlite

* fix sqlite

* add audit mixin and minor fixes

* fix FK's

* address comments

* lint
2020-11-06 09:33:32 +00:00
Kamil Gabryjelski
6d5d92a6fe fix: Issues with filters and metrics popovers (#11578)
* Fix bugs in AdhocFilterEditPopover

* Fix bugs in AdhocMetricEditPopover

* Remove handleMultiComparatorInputHeightChange function

* Fix tests
2020-11-05 20:00:43 -08:00
Kamil Gabryjelski
1490f3074d refactor: Replace react-bootstrap MenuItems with Antd Menu (#11554)
* Refactor SliceHeaderControls

* Refactor DisplayQueryButton

* Fix duplicate keys

* Refactor SliceAdder

* Move css from styles to Emotion

* Fix e2e test
2020-11-05 13:30:03 -08:00
Kasia Kucharczyk
091432ea8e Changed top overflow for charts. (#11579) 2020-11-05 11:35:41 -08:00
dependabot[bot]
094360392b build(deps): bump @emotion/core in /superset-frontend (#11518)
Bumps [@emotion/core](https://github.com/emotion-js/emotion) from 10.0.28 to 10.0.35.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/core@10.0.28...@emotion/core@10.0.35)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-05 10:26:15 -08:00
dependabot[bot]
39a4a62940 build(deps-dev): bump @storybook/addon-essentials in /superset-frontend (#11573)
Bumps [@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/addons/essentials) from 6.0.13 to 6.0.28.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.0.28/addons/essentials)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-05 10:25:10 -08:00
Ville Brofeldt
600a6fa92a chore(rls): move to feature flag and disable related view (#11575)
* chore(rls): move to feature flag and disable related view

* rename feature flag
2020-11-05 12:19:48 +02:00
dependabot[bot]
52145f8683 build(deps): bump core-js from 3.2.1 to 3.6.5 in /superset-frontend (#11522)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.2.1 to 3.6.5.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.2.1...v3.6.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-04 22:37:53 -08:00
adam-stasiak-polidea
280ba95e46 chore: Cypress dashboard list selectors refactor (#11314)
* cypress selectors refactor in dasboard list tests

* fixed tests

* fixes after rebase
2020-11-04 14:34:21 -08:00
Kamil Gabryjelski
3e35ddd609 refactor: Replace react-bootstrap MenuItems with Antd Menu (#11555)
* Remove MenuItem from SubMenu

* Fix tests

* Refactor PopoverDropdown

* Refactor Button

* Remove redundant Menu import
2020-11-04 14:32:38 -08:00
David Aaron Suddjian
ef7087adb6 fix(dashboard): properly unset mountedTab in reducer (#11558) 2020-11-04 14:27:32 -08:00
Beto Dealmeida
d999802795 Front end for VERSIONED_EXPORT (#11559) 2020-11-04 14:22:12 -08:00
Kamil Gabryjelski
128ddfabb6 fix: Pasting text issues in MetricsControl and AdhocFilterControl inputs (#11445)
* Fix paste not working in Metrics and Filter inputs

* Use noOp instead of empty function

* Use default Select component instead of OnPasteSelect

* Revert onPaste override
2020-11-04 13:48:48 -08:00
Kamil Gabryjelski
ad98981d9d refactor: Replace react-bootstrap MenuItems with Antd Menu (#11487)
* Remove MenuItem from CopyToClipboard

* Refactor DateFilterControl

* fixup! Remove MenuItem from CopyToClipboard

* Remove console log

* Refactor LanguagePicker

* Refactor HeaderActionsDropdown

* Remove dir with Menu component

* Add imports to common/components/index

* Fix after rebase
2020-11-04 13:47:25 -08:00
Moriah Kreeger
69810170f7 style: database modal updates (#11311) 2020-11-04 11:03:39 -08:00
Moriah Kreeger
094359cc5b fix: add sort option to filters, sort chart list filter options (#11370) 2020-11-04 11:02:33 -08:00
Dharamkumar Gajera
ec054e1fac docs: add Avesta to users list (#11551) 2020-11-04 14:34:53 +02:00
Kamil Gabryjelski
937f9ca277 refactor: Replace react-bootstrap dialogs with Antd dialogs (#11527)
* Refactor Dialogs in dashboard properties modal

* Refactor Dialogs in explore properties modal

* Refactor dialogs in DatasourceModal

* Refactor dialogs in ExploreResultsButton

* Remove react-bootstrap-dialog from ExploreCtasResultsButton

* Remove react-bootstrap-dialog dependency

* Remove unnecessary functions from Modal

* Bump antd version to fix a bug

* Fix unit tests

* Fix e2e test

* Change antd version to 4.5.4 to fix tests

* Reenable all tests in control

* Another version bump to fix tests
2020-11-03 22:07:21 -08:00
Beto Dealmeida
1ebeffa104 chore: remove directory importexport (#11531) 2020-11-03 17:10:52 -08:00
Kamil Gabryjelski
15111db6c5 refactor: Use Antd Menu in Menu component (#11528)
* Menu dropdown refactored

* MenuObject refactored

* Fix unit tests

* Style menu

* Use theme variables
2020-11-03 16:19:15 -08:00
Moriah Kreeger
536346ff5e feat: annotation layers delete logic + linking w/ annotation view (#11530) 2020-11-03 13:01:20 -08:00
Lily Kuang
eef4809978 feat: annotation edit modal with antd datepicker (#11500) 2020-11-03 12:59:13 -08:00
Daniel Vaz Gaspar
6f2e36dd1b fix(tests): flaky test with dttm on Query API (#11526)
* fix(tests): flaky test wirh dttm on Query API
2020-11-03 09:01:17 +00:00
Albert Lie Adrian
5e32235041 docs: add Xendit to users list (#11361)
* docs: add Xendit to users list

* docs: add Github alias next to Xendit
2020-11-03 09:25:07 +02:00
ʈᵃᵢ
edb9619731 refactor: reduce number of api calls needed to fetch favorite status for charts and dashboards (#11502) 2020-11-02 21:26:14 -08:00
Beto Dealmeida
fd10c47bc6 chore: remove sanitize (#11532)
* chore: remove sanitize

* Fix lint
2020-11-02 15:13:44 -08:00
Jesse Yang
fac29f9dff refactor: rewrite and enhance chart control withVerification (#11435)
* refactor: rewrite and enhance chart control withVerification

* Add toasts for failed messages; fixes popover render
2020-11-02 15:06:20 -08:00
David Aaron Suddjian
d7aa3d792b fix(dashboard): multiple lines and indentation when editing json (#11501)
* multiple lines and indentation when editing json

* fix tests, address pr feedback

* remove json minification
2020-11-02 13:39:04 -08:00
Kamil Gabryjelski
a874b14a8a refactor: Replace react-bootstrap Tabs with Antd Tabs in DashboardBuilder (#11160)
* Replace tabs in DashboardBuilder

* Fix tests

* Fix styling of anchor

* Fix

* Fix cypress test

* Fix tests

* Fix e2e tests

* Use data-tests

* Move tabs styles from superset.less to Emotion

* Restyle tabs in DashboardBuilder

* Test fix

* Fix styling
2020-11-02 13:31:55 -08:00
Hugh A. Miles II
6c6ded139b fix: Update "View In SQL Lab" Flow to render source query from datasource object (#11476) 2020-11-02 11:44:20 -08:00
Jesse Yang
5d9448f3fe feat: globally disable underscore for links in menu items (#11491) 2020-11-02 00:03:18 -08:00
Kamil Gabryjelski
19f2deb27f refactor: Replace react-bootstrap Modals with Antd in Explore (#11389)
* VizTypeControl

* SaveModal

* explore/PropertiesModal

* Fix e2e tests

* Remove console logs

* Fix tests

* Fix test

* Fix e2e test

* Remove unnecessary fragment

* Fix e2e tests

* Fix e2e test
2020-11-01 23:04:53 -08:00
Maxime Beauchemin
854a4614a8 feat: make logo link point to welcome page (#11519) 2020-11-01 09:22:09 -08:00
Maxime Beauchemin
e3b6dbe62d chore: run 'npm audit fix', bump react-syntax-highlighter (#11512) 2020-10-31 15:21:46 -07:00
Maxime Beauchemin
2d61d684d1 chore: add dependabot.yml config file (#11510) 2020-10-31 15:21:13 -07:00
Maxime Beauchemin
9a1fcc70bc chore: bump pypi cryptography from 2.4.2 to 3.2.1 (#11511) 2020-10-31 13:28:19 -07:00
Daniel Vaz Gaspar
34ae29e59b feat: query REST API more fields and tests (#11482)
* feat: query REST API more fields and tests

* fix missing field
2020-10-31 10:18:34 +00:00
Kamil Gabryjelski
55a3404b71 refactor: Replace react-bootstrap tabs with Antd tabs (#11118)
* Replace tabs in BuilderComponentPane

* Replace tabs in ControlPanelsContainer

* Replace tabs in AdhocMetricEditPopover

* Replace Tabs in DatasourceEditor

* Replace tabs in AdhocFilterEditPopover

* Replace tabs in DateFilterControl

* Bug fix

* Change Tab styles

* Fix tests

* Fix cypress tests

* Lint fix

* Fix tests

* Change Tabs style in ControlPanelsContainer

* Change tabs content height

* Lint fix

* Add data test

* Fix e2e test

* Move Tabs file to separate dir

* Fix after rebase

* Fix e2e tests

* Fix after rebase
2020-10-30 22:05:31 -07:00
Moriah Kreeger
01ddbd0697 feat: annotation layers modal + filters (#11494) 2020-10-30 15:51:46 -07:00
dependabot[bot]
5d9560c408 build(deps-dev): bump node-fetch in /superset-frontend (#11485)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-30 14:19:44 -07:00
dependabot[bot]
9c832440b9 build(deps): bump object-path from 0.11.4 to 0.11.5 in /docs (#11484)
Bumps [object-path](https://github.com/mariocasciaro/object-path) from 0.11.4 to 0.11.5.
- [Release notes](https://github.com/mariocasciaro/object-path/releases)
- [Commits](https://github.com/mariocasciaro/object-path/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-30 14:19:24 -07:00
dependabot[bot]
fe3fdd27e7 build(deps): bump lodash in /superset-frontend/cypress-base (#11483)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-30 14:19:09 -07:00
Phillip Kelley-Dotson
cd1d89b2b1 fix: import for moment in ActivityTable (#11506) 2020-10-30 13:20:10 -07:00
Jesse Yang
29554a9f02 fix: show recent visited dashboards and charts in recent_activity (#11481) 2020-10-30 11:59:08 -07:00
Beto Dealmeida
fbcfaacda3 feat: create base class for export commands (#11463)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format

* Rename ImportMixin to ImportExportMixin

* Create base class for exports

* Add saved queries as well

* Add constant, small fixes

* Fix wrong import

* Fix lint
2020-10-30 11:52:11 -07:00
Erik Ritter
ca40877640 feat: add certifications to tables (#11450) 2020-10-30 11:28:01 -07:00
Beto Dealmeida
f2b8d6aef8 chore: rename ImportMixin to ImportExportMixin (#11460)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format

* Rename ImportMixin to ImportExportMixin
2020-10-30 09:11:56 -07:00
Beto Dealmeida
21f722c9bc feat: add endpoint to export saved queries using new format (#11447)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format
2020-10-30 08:32:16 -07:00
Daniel Vaz Gaspar
5674309080 docs: fix db drivers PG and ES (#11504) 2020-10-30 12:53:13 +00:00
Daniel Vaz Gaspar
bf3e41d006 fix(api): don't log db conn failures on db create/update (#11503) 2020-10-30 12:52:52 +00:00
Daniel Vaz Gaspar
66fc267280 docs(release): script to generate a CHANGELOG.md (#11469)
* docs(release): script to generate a CHANGELOG.md

* remove preset cache

* black

* lint typing

* Update RELEASING/changelog.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update RELEASING/changelog.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* address comments

* remove duplicated import and EOL print

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-30 07:50:54 +00:00
Phillip Kelley-Dotson
f7051eaade feat: home screen mvp (#11206)
* step 1: broken stuff!

* first steps

* more adding and slicing

* step 1: broken stuff!

* can now filter dashboards/charts for "Edited" tabs (filter by changed_by o_m)

* more updates

* update recent card

* add icon

* Adding Expand Icon to Collapse component

* more updates

* clean up code

* remove lock file

* remove consoles

* fixing subnav button height shift

* lil' ascii arrows

* update branch

* update test part 1

* remove consoles

* fix typescript

* add images and update emptystate

* add changes

* update chart card

* fix css issues from rebase

* add suggestions

* more changes

* update tests and clear typescript errors

* Update superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* update from comments

* more updates..

* fix rebase

* fix pesky type errors

* test fixes

* lint fix

* Update superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/views/CRUD/welcome/EmptyState.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/Menu/SubMenu.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* add suggestions

* fix lint

* remove unused code

* toast getrecentActivityobjs

* add some suggestions

* remove types for now

* cypress fix

* remove unused type

Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-10-29 21:59:31 -07:00
John Bodley
a8eb3fe8e7 chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config (#11496)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-29 16:47:11 -07:00
Jesse Yang
93693690a3 feat: disable save button when saving datasource (#11493) 2020-10-29 16:13:47 -07:00
David Aaron Suddjian
074f8c2e8c other: Improvements to bug report template (#11307)
* Update bug_report.md

* more detail!

* Update bug_report.md
2020-10-29 15:44:03 -07:00
Grace Guo
b1263ad568 Revert "fix: change chart title by clicking (#11335)" (#11497)
This reverts commit 1f04db79f7.
2020-10-29 15:13:29 -07:00
Beto Dealmeida
1d9d905497 fix: prevent race condition when canceling query (#11449) 2020-10-29 14:34:58 -07:00
ʈᵃᵢ
f918ca14aa fix(datasets): add custom filter for virtual datasets based on sql attribute (#11452) 2020-10-29 13:11:33 -07:00
Kasia Kucharczyk
ed3dca420f Added z index to resizible char (#11456) 2020-10-29 10:39:35 -07:00
Jesse Yang
e0503408de feat(explore): change save button text when users cannot override (#11281) 2020-10-29 09:41:29 -07:00
Evan Rusackas
68d493ebf5 fix: dashboard tab only shows move cursor when editing (#11480) 2020-10-29 00:35:32 -07:00
Tony Klin
62629eceab Add IBM Cloud deployment guide (#11473) 2020-10-28 22:01:39 -07:00
Evan Rusackas
e024267447 fix: Unwinds icon fallout that came along with filters PR (#11474)
* Unwinds icon revamp that came along with filters PR.

* cleanup/linting

* removing unused import
2020-10-28 19:44:39 -07:00
David Aaron Suddjian
18658f45be feat(dashboards): Filter status indicators (#10936)
* Initial commit of new filters badge.

* refactor applied/rejected filters code

* finished filter indicators

* filter badge tested

* unnecessary imports

* formatting and types

* fixes

* license

* code quality tweaks

* state management for showing focused filter scope

* clean up filter key extraction code

* remove unnecessary styles

* temp css to demonstrate highlighting

* fix focused filter logic

* no more color badges

* new toys for highlighting dash components (#11144)

* tweak style for the filter chart when filter is focused

* style: Filters p0 css2 (#11151)

* nixing background tweak

* src paths

* another quick theme color

* src paths, adjusting pill icon color, changing icons, showing applied/busted counts

* linting stuff

* fixing and tweaking tests

* show filter indicator when filters are not active

* chart title bar cleanup

* open the right panel when popover opens

* unused import

* fix EditableTitle tests

* margin on dashboard header

* show the chart dropdown menu

* fix blur filter breaking dropdowns

* style tweak - no pointer events when irrelevant charts are blurred

* fix box shadow on filter highlight

* it's an array

* attempt fixing e2e

* style: filters p0 icon churn (#11215)

* new filters icon

* icon styling

* bigger icons in list views

* better sizing of table actions and favStars

* more icon sizing...

* fixing more button size jankiness

* linting

* Filters performance (#11255)

* fixing time filter "ok" button

* making unset filter menu collapsible

* sort alphabetically

* fix highlighting when removing items

* try a flex layout (for browser render perf)

* more specific transitioning

* temp: comment out some code as a test

* temp: comment out more code

* temp: remove possibly expensive computations from ChartHolder

* Revert "temp: comment out some code as a test"

This reverts commit 309b880e90.

* Revert "temp: comment out more code"

This reverts commit 64c88b2cba.

* Revert "temp: remove possibly expensive computations from ChartHolder"

This reverts commit 37ce0214f0.

* experiment: upgrade react-select to v3

* Revert "experiment: upgrade react-select to v3"

This reverts commit c3972ba486.

* fix the damn problem

* remove code used for testing purposes

* awful hack to avoid adding a class to a container

* approaching infinity... and not beyond!

* fix ref forwarding

* add theme to tests as necessary

* fix(extra-filters): add logic for identifying applied extra filters (#11325)

* fix: use dashboard id for stable cache key (#11293)

* fix: button translations missing (#11187)

* button translations missing

* blank space before text

* feat: update time_compare description and choices (#11294)

* feat: update time_compare description and choices

* Update sections.jsx

* fix(extra-filters): add logic for identifying applied extra filters

* lint

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>

* address design feedback

* slight tweak to panel logic, keep panels open that user has opened

* rearrange code to be more graceful

* fix: bump superset-ui/core (#11385)

* use is_dttm instead of is_temporal

* types, names

* only show unset filter panel if there are unset filters

* fix highlighting the filter control

* fix filterbox layout

* translations

* fix cypress

* actually add the test attribute

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* formatting

* add link comment to hack

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* stop importing lodash

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* skip broken test

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* adjust colors of titles

* linting

* no indicators when chart is loading

* support all time fields

* fix lock file

Co-authored-by: Natalie Ruhe <natalie@preset.io>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2020-10-28 15:46:24 -07:00
Moriah Kreeger
e9dba18466 feat: annotation layers CRUD list view (#11432) 2020-10-28 15:45:07 -07:00
Kamil Gabryjelski
52294c836a refactor: Replace react-bootstrap Modals with Antd in Datasource (#11390)
* ChangeDatasourceModal

* DatasourceModal

* DeleteModal, AddDatasetModal

* Fix tests

* Remove unused file

* Fix e2e tests

* Fix test

* Remove it.only

* Fix after rebase

* Fix e2e tests

* Fix data-test in modal

* Lint fix
2020-10-28 14:42:13 -07:00
Ville Brofeldt
e230865216 chore(chart-data): add annotations and url params to chart data schema (#11393)
* chore(chart-data): add annotations to chart data schema

* bump superset-ui packages

* xit flaky cypress tests
2020-10-28 23:41:39 +02:00
Lily Kuang
e5e35634de feat: annotations list CRUD view (#11446)
* annotations list CRUD view

* comment out modal

* update test

* fix lint
2020-10-28 12:19:50 -07:00
Kasia Kucharczyk
d4d547c30a Disabled chaning caret (#11459) 2020-10-28 11:22:26 -07:00
Daniel Vaz Gaspar
81a0526072 docs: improve docs and update apache release scripts (#11457) 2020-10-28 18:17:33 +00:00
adam-stasiak-polidea
894b94a345 enabled skipped tests in AdhocMetrics Cypress (#11455) 2020-10-28 10:06:16 -07:00
Kamil Gabryjelski
b2636f01bb fix: Explore popovers issues (#11428)
* Fix spaces and comas not working in filter popover

* Fix popup not opening automatically

* Add e2e test

* Remove only from test

* Remove redundant test, add checking label content

* Add comments to e2e test

* Fix unit test

* Use destructuring

* Always open popup for functions and saved metrics, too

* Fix popover for adhoc metrics too

* Small refactor to consistency

* Refactor for consistency

* Remove redundant functions

* Test fix

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-10-28 09:38:52 -07:00
Bogdan
88e5e9855d fix: add init.py to the annotations module (#11437)
* Add init.py to the annotations module

* Update superset/annotation_layers/annotations/api.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Pylint

* License

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-28 07:36:28 -07:00
Evan Rusackas
eecabf9b2e fix: a space adds the space. (#11401)
* fix: a space adds the space.

* linting. Ugh.
2020-10-27 23:47:42 -07:00
Evan Rusackas
68411677e9 fix: Fixing broken Cypress test (#11453)
* fixing bad data-test selector

* linting

* typo... because I got all excited.
2020-10-27 22:51:38 -07:00
Kamil Gabryjelski
155b5edec1 refactor: Use Antd Modals instead of react-bootstrap Modals (#11366)
* Make Modal responsive

* ErrorAlert

* OmniContainer

* dashboard/PropertiesModal

* Fix e2e tests

* Lint fix

* E2E test fix

* Fix test

* Use grid units

* Change padding to padding-left/right
2020-10-27 13:08:04 -07:00
adam-stasiak-polidea
a99d795eaf chore: cypress selectors refactor in explore module (#11309)
* cypress selectors refactor in explore module

* added delay to typing to make test more stable

* fixed missing click
2020-10-27 13:01:45 -07:00
adam-stasiak-polidea
4bebf51453 chore: Cypress chart selectors refactor (#11312)
* cypress selectors refactor in chart list tests

* fixed wrong selector
2020-10-27 11:38:05 -07:00
Grace Guo
014fe9fd8c fix: [email report] add multiple schedules per hour (#11414) 2020-10-27 09:37:42 -07:00
Beto Dealmeida
98daf0a435 feat: add UUID column to saved_query for export/import (#11397)
* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head
2020-10-27 08:49:09 -07:00
David Aaron Suddjian
055781f4a9 fix filter highlighting (#11439) 2020-10-27 08:38:24 -07:00
Daniel Vaz Gaspar
427058b4dc fix: bump FAB to 3.1.1 (#11444) 2020-10-27 14:54:29 +00:00
Kasia Kucharczyk
b49fd65cf7 fix: added meaningful exception for loading births error (#11407)
* Added exception for loading data without previous loaded test users.

* Changed general exception to NoDataException

* Changed import to absolute path
2020-10-27 06:28:52 -07:00
John Bodley
8ee6493233 chore: Update testconn logic (#11315)
* chore: Update testconn logic

* [databases] Address @dpgaspar's comments

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-27 09:15:05 +00:00
Ville Brofeldt
ecdff724ea feat: enable metadata sync for virtual tables (#10645)
* feat: enable metadata sync for virtual tables

* add migration and check for empty schema name

* simplify request

* truncate trailing column attributes for MySQL

* add unit test

* use db_engine_spec func to truncate collation and charset

* Remove redundant migration

* add more tests

* address review comments and apply templating to query

* add todo for refactoring

* remove schema from tests

* check column datatype
2020-10-27 07:58:38 +02:00
Ville Brofeldt
8575439f48 fix: is_temporal should be overridden by is_dttm value (#11429) 2020-10-27 07:22:27 +02:00
Kasia Kucharczyk
94e0f0cc2a Moved css of inline inputs of DateFilterControl to css of FilterBox where it appears. (#11427) 2020-10-26 21:50:27 -07:00
Maxime Beauchemin
5b968e9651 fix: multiple issues with FilterPopover (#11412)
* fix: Custom SQL in FilterPopover

* Also fix #11394

* linting

* fix tests
2020-10-26 21:48:06 -07:00
adam-stasiak-polidea
df15a6fc51 Configured babel plugin for removing data-test from production code (#11327) 2020-10-26 21:16:02 -07:00
Hugh A. Miles II
fd8f4e9215 feat(explore): update the order of datasource dropdown menu (#11424) 2020-10-26 20:44:44 -07:00
Hugh A. Miles II
81f77fd28e feat: hide datasource legacy based on featureflag (#11371) 2020-10-26 17:31:29 -07:00
ʈᵃᵢ
2227b13b52 fix: better error messages for dashboard properties modal (#11382) 2020-10-26 16:36:37 -07:00
ʈᵃᵢ
59885c4dea fix: saved query list sort by database (#11430) 2020-10-26 16:36:03 -07:00
ʈᵃᵢ
8a2ca84775 build: disable pr reviews for pr-lint action (#11433) 2020-10-26 16:32:54 -07:00
ʈᵃᵢ
910791b00b fix: better error message for chart properties modal (#11381) 2020-10-26 13:33:19 -07:00
Evan Rusackas
af337b9e5a Let the header wrap! (#10724) 2020-10-26 13:15:16 -07:00
Kamil Gabryjelski
894ca3c09b refactor: Use Modals from Antd instead of react-bootstrap (#11330)
* Refactor ModalTrigger to use antd modal

* Refactor a few components

* dynamic width

* Fix unit tests

* Use i18n for button text
2020-10-26 11:20:10 -07:00
Daniel Vaz Gaspar
144b279aa2 feat: saved queries with execution info (#11391)
* feat: add rows and last_run info to saved queries

* feat: add rows to saved query

* refactor and tests

* lint

* fix tests
2020-10-26 11:20:07 -07:00
Kasia Kucharczyk
604a519d8b fix: keeping Markdown content while resizing window on Dashboard (#11392)
* Fix: keeping markup content while resizing it

* Added bind and fixed linter

* Added resize case in Markdown editor to cypress test
2020-10-26 11:12:49 -07:00
Kasia Kucharczyk
ba314c0f6f Moved frame from below to currently focused window (#11423)
Thanks for the fix!
2020-10-26 11:11:51 -07:00
Kamil Gabryjelski
6acae9ab6d refactor: Replace usages of reactable in TimeTable (#11239)
* Refactor TimeTable to use react-table

* Fix import

* Refactor TimeTable into functional component
2020-10-26 10:25:41 -07:00
Maxime Beauchemin
10a54b52ac fix(examples): specify 'time_range_endpoints' to prevent toast warning (#11417) 2020-10-26 08:42:57 -07:00
Naren
2e6afdf7e7 docs: Update Dremio doc with Arrow Flight connection details (#11422)
* update dremio doc w arrow flight connection

* Add connection string via Arrow Flight
* Modify the connector link

* Update dremio.mdx
2020-10-26 17:01:16 +02:00
Jesse Yang
ac498ddd23 chore: upgrade TypeScript (3.8.3 -> 4.0.3) (#11421)
* chore: upgrade TypeScript (3.8.3 -> 4.0.3)

* Refactor the button component
2020-10-25 22:01:41 -07:00
Maxime Beauchemin
0ab15373fa style: fix labels vertical align (#11415)
* style: fix labels vertical align

* addressed comments

* just adding the space for now

* fix timer
2020-10-25 17:55:22 -07:00
Jesse Yang
70ea7ae776 fix: error handling for webpack proxy (#11420) 2020-10-25 17:14:56 -07:00
Jesse Yang
8aecffd83b refactor: typing for explore Control and messageToasts (#11416) 2020-10-24 21:40:36 -07:00
ʈᵃᵢ
d02a61f21c feat(dashboard): fetch charts by owners instead of created_by (#11336) 2020-10-24 14:43:20 -07:00
adam-stasiak-polidea
f2c89af83f chore: Fixed skipped cypress test - refresh dashboard function (#11375)
* Fixed skipped cypress dashboard/controls.test.js and fixed MenuItem setting state to 'loading' while refreshing

* fixed wrong cypress command in test
2020-10-24 11:29:30 -07:00
Evan Rusackas
efdda8b69e chore: Button cruft cleanup (#11342)
* toggleSchedule

* cleaning up run query button

* removing unnecessary (subtle!) style overrides

* bulk action classname to button style prop

* nixing btn-primary

* nixing cancelQuery class

* togglesave

* nixing autocomplete class

* linting

* nixing button classes of 'ok' and 'reset'

* unoing diagnostic test

* begrudgingly adding an m-r-3 class... for now

* this is not a class to worry about

* test fixes for limit control

* updating TODO notes, calling it a day for now.

* gah... copy paste error.
2020-10-23 10:42:29 -07:00
Kamil Gabryjelski
ad88a06d61 refactor: Use Antd Dropdown instead of react-bootstrap in DatasourceControl (#11395)
* Create Tooltip component

* Refactor DatasourceControl

* Bug fix

* Lint fix

* E2E test fix

* Move menu item keys to constants

* Remove LESS file

* Test fix

* Test fix

* Lint fix
2020-10-23 09:08:35 -07:00
Daniel Vaz Gaspar
6f69212f28 feat: annotations REST API (#11344)
* feat(api): annotations and layers CRUD REST API

* lint

* annotations API and tests

* fix openapi spec

* fix openapi spec

* fix openapi spec

* annotations bulk delete

* fix openapi spec

* fix older tests

* fix older tests

* small lint fixes

* layer_id to pk to keep broad coherence on openapi spec

* fix openapi spec

* one more test and validation

* fix test name

* fix test

* fix bulk delete

* add name validation

* annotation uniqueness validation

* lint

* add sorting reqs and tests

* add statsd metrics

* Update superset/annotation_layers/annotations/dao.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update tests/core_tests.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* address comments

* address my comment :)

* fix, address comments

* lint

Co-authored-by: riahk <moar.riah@gmail.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-23 09:41:17 +01:00
Lily Kuang
93d9bd9a04 fix dataset editor for saving schema (#11396) 2020-10-22 21:59:04 -07:00
Beto Dealmeida
c81204aeef feat: export dashboards as ZIP files (#11351)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Export datasets as ZIP files

* Export charts as Zip file

* Export dashboards as a Zip file

* Add logging
2020-10-22 20:02:40 -07:00
Evan Rusackas
d64260fc0e fix: long labels now truncate with ellipsis (#11400) 2020-10-22 18:35:37 -07:00
Rob DiCiuccio
2f0c1a8402 docs: Add semantic prefix info for PR titles (#11398) 2020-10-22 18:34:41 -07:00
Lily Kuang
1f04db79f7 fix: change chart title by clicking (#11335) 2020-10-22 18:33:13 -07:00
ʈᵃᵢ
3a2ae6454a build: bump pr-lint-action (#11403) 2020-10-22 18:00:11 -07:00
Pavel T
6f85d8d85c docs: fix typo (#11129) 2020-10-22 16:18:44 -07:00
Elizabeth Thompson
43b92b220f fix: dashboard edit/save errors (#10834)
* use conditional operator for lookup

* editing dashboard title should update after save

* uncomment test

* fix json metadata save

* json metadata color scheme should overwrite state

* test's functionality is no longer applicable

* add lastModifiedTime to DashboardInfo
2020-10-22 14:33:22 -07:00
Kamil Gabryjelski
30c71fd794 refactor: Replace react-bootstrap tabs with Antd tabs on Profile (#11211)
* Create styled Antd Tabs and Dropdown

* Replace Tabs in Profile view

* Change some hard coded variables to theme

* Lint fix
2020-10-22 14:19:37 -07:00
Kamil Gabryjelski
dc5e5a978b refactor: Replace usages of reactable in TableLoader (#11240)
* Refactor TableLoader to use react-bootstrap

* Remove unnecessary css classes

* Fix import

* Fix styling for no data

* Refactor TableLoader into functional component

* Convert TableLoader to typescript
2020-10-22 14:00:02 -07:00
Jesse Yang
04ee4a2d08 build: let webpack proxy server handle more content encoding (#11376) 2020-10-22 13:25:17 -07:00
Jesse Yang
b89a5d6660 fix: dashboard cache invalid join query (#11369)
* bugfix: dashboard cache invalid join query

* Use engine instead of session
2020-10-22 12:47:59 -07:00
Beto Dealmeida
633355ab00 feat: export charts as ZIP files (#11349)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Export charts as Zip file

* Fix lint
2020-10-22 12:06:58 -07:00
Beto Dealmeida
00e394451f feat: export datasets as ZIP files (#11332)
* Export datasets as ZIP files

* Add logging when failing to parse extra

* Fix logging
2020-10-22 10:32:08 -07:00
Maxime Beauchemin
64b5aae6bc style: improve the "Create New Chart" screen's usability (#11383)
* style: make disabled buttons more readable

* making more of a CTA for VizControl
2020-10-22 10:16:58 -07:00
Ibrahim Ercan
5a3d23dc01 docs: add VLMedia to users list (#11386)
* Update INTHEWILD.md

VLMedia added to user list

* Update INTHEWILD.md

github alias added
2020-10-22 07:26:04 -07:00
Daniel Vaz Gaspar
b86f779dc1 feat: add statsd metrics to FAB rest API post, put and delete (#11362) 2020-10-22 08:56:26 +01:00
Daniel Vaz Gaspar
85e28dd04c perf(api): improve API info performance (#11346) 2020-10-22 08:55:13 +01:00
Evan Rusackas
6c5da18926 removing outlines on a few key elements (#11372) 2020-10-21 22:02:54 -07:00
Philip Q Nguyen
a366a340df docs: Fix typo in installing from scratch (#11026)
Change insode to inside.
2020-10-21 21:49:45 -07:00
Ville Brofeldt
dcf12762b3 chore(prophet): ignore logged warning for missing plotly package (#11334)
* chore(prophet): ignore logged warning for missing plotly package

* reset log level after import
2020-10-22 07:27:02 +03:00
Moriah Kreeger
a2a614d760 feat: CSS Templates List Actions (#11271) 2020-10-21 20:32:59 -07:00
Kamil Gabryjelski
9dfe9aef39 Fix overflowing tabs (#11367) 2020-10-21 20:10:52 -07:00
Rob DiCiuccio
c4effe1261 Log warning for failure to get table/view names from DB (#11374) 2020-10-21 20:09:24 -07:00
Maxime Beauchemin
69046f08d4 style(sqllab): wrap text in monospace db-provided error messages (#11354) 2020-10-21 17:35:20 -07:00
Maxime Beauchemin
f6436b7652 fix: 'Save Chart' modal's dashboard dropdown isn't sticky (#11338)
It appears that the logic that makes the dashboard selection sticky
in the 'Save Chart' modal (explore) was broken at some time.

While working on a dashboard, it's nice if this modal can remember the
dashboard selection.
2020-10-21 17:30:19 -07:00
Maxime Beauchemin
6dd5d5cf26 style: make <Label/> not uppercase (#11355) 2020-10-21 17:29:28 -07:00
Evan Rusackas
6fe7b4a202 feat: adding feature flags to escape/hide html in markdown (#11340)
* utilizing feature flag for html escapement

* use src alias

* Feature flag to allow hiding of HTML tags

* strips js attr

* better feature flag naming

* simplifying

* Adding comments to new feature flags

* shorter comment, because pylint,

* pedantic change to get black to format a file
2020-10-21 15:07:27 -07:00
Daniel Vaz Gaspar
f14cf9d6dc fix: saved_query search on schema and database not working (#11286)
* fix: saved_query search on schema and database not working

* add tests
2020-10-21 21:17:25 +01:00
Hugh A. Miles II
dfbcbcce67 fix: Allow "EXPLAIN" queries when "Allow DML" setting is False (#11348)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2020-10-21 12:58:57 -07:00
serenajiang
54c2ad4308 fix(sqla): allow 'unknown' type queries in explore view (#11365) 2020-10-21 10:24:52 -07:00
ʈᵃᵢ
225c905bd5 fix(listview): hide actions column if no actions are allowed (#11337) 2020-10-21 09:27:48 -07:00
Evan Rusackas
cae54ac00e style: using correct + icon on New Query button (#11353)
* style: using correct + icon on New Query button

* non-meaningful whitespace removed.
2020-10-20 22:44:11 -07:00
Maxime Beauchemin
43aca6a26c docs: add a roadmap page pointing to SIP-53 (#11169)
* docs: add a roadmap page pointing to SIP-53

* large file
2020-10-20 21:36:06 -07:00
Maxime Beauchemin
796a2a6924 fix: error around latest partition in BigQuery (#11274)
* fix: error around latest partition in BigQuery

* lint

* Going with a backend-first approach

* fix test

* add an extra test
2020-10-20 21:34:46 -07:00
Maxime Beauchemin
c360413fc2 style(menu): clean up right menu - leaving only "Settings" (#11227)
* style(menu): clean up right menu - leaving only settings

* bring pre-commit back

* fix frontend tests

* pre-commit

* re-introduce subtle '+'
2020-10-20 21:33:28 -07:00
Kamil Gabryjelski
3a0fcdacd3 Fix tabs switching in SouthPane (#11343) 2020-10-20 14:24:27 -07:00
Lily Kuang
6f3d4c131f feat: css template add/edit modal (#11296) 2020-10-20 12:15:39 -07:00
Lily Kuang
9f8d0e7a06 fix: update table_name and schema on dataset editor (#11218)
* fix dataset editor for updating table_name and schema

* update test

* remove table_name from restrict list

* fix pylint

* fix cypress test

* fix test
2020-10-20 09:38:57 -07:00
hnle
7369039713 tests: Parameterize some tests in alerts_tests.py (#11313)
* SO-1099 Parameterize some tests in alerts_tests.py

* Update alerts_tests.py

Remove commented out line

* Update alerts_tests.py

Reformatted using black
2020-10-19 23:05:04 -07:00
adam-stasiak-polidea
55ae259b13 chore: Dashboard cypress refactor (#11280)
* moved dashboard tests to use data-test attributes

* linter

* fix for unstable save test
2020-10-19 21:36:20 -07:00
Kamil Gabryjelski
9266f0a4a8 refactor: Replace usages of reactable in ChangeDatasourceModal (#11241)
* Refactor ChangeDatasourceModal to use react-table

* Fix import

* Moved columns declaration out of component scope
2020-10-19 20:44:21 -07:00
Kamil Gabryjelski
901a42b1df refactor: Replace usages of Popover from react-bootstrap with Antd (#11163)
* New popover component

* LimitControl

* Moar components migrated

* TimeSeriesColumnControl

* Hotkeys

* ColorPicker

* FilterBoxItemCOntrol

* AdhocFilterEditPopover

* AdhocMetric

* AnnotationLayerControl

* DateFilterControl

* Tests fix

* Fix linting issue

* Fix tests

* Bug fix

* Test fix

* Remove Antd global stylesheet

* Fix linting

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test
2020-10-19 20:42:33 -07:00
ʈᵃᵢ
4208ca76e0 refactor: replace AvatarIcon instances with FacePile (#11279) 2020-10-19 20:23:16 -07:00
Kasia Kucharczyk
0e97c4f66c tests: added fixtures to created dashboards and updated test with proper value (#11290)
* Added fixtures for hidden and published dashboards. Added fixture to restore copied dashboard in dashboard tests. Changed number of dashboards in datasets/api_tests.py because copied dashboard is removed.

* Changed number of dashboards in database api tests after cleanup of dashboards in dashboards_tests
2020-10-19 15:07:26 -07:00
Kasia Kucharczyk
55c2892e9b Fix: bring back type ignore for config import (#11333) 2020-10-19 23:11:07 +03:00
Ville Brofeldt
917d02efbd fix(chart-api): cached-indicator always shows value is cached (#11326) 2020-10-19 16:46:42 +03:00
Kamil Gabryjelski
735123d1f5 refactor: Refactor QueryTable to use react-table (#11216)
* Refactor QueryTable to use react-table

* Fix lodash import

* Fix tests

* Fix imports and QuerySearch styles

* Update superset-frontend/src/SqlLab/components/QuerySearch.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/SqlLab/components/QuerySearch.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Lint fix

* Refactored QueryTable into functional component

* Remove calculating content height

* Lint fix

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-10-18 22:32:13 -07:00
Maxime Beauchemin
a1f8429b4e chore: make config ENABLE_REACT_CRUD_VIEWS = True by default (#11259)
React CRUD views have been maturing for a while and are ready for prime
time!
2020-10-18 21:37:41 -07:00
Kamil Gabryjelski
31e4a90440 Fix overflowing tab's styling in TabbedSqlEditors (#11303) 2020-10-16 14:23:21 -07:00
Beto Dealmeida
94e23bfc82 feat: export databases as a ZIP bundle (#11229)
* Export databases as Zip file

* Fix tests

* Address comments

* Implement mulexport for database

* Fix lint

* Fix lint
2020-10-16 11:10:39 -07:00
Grace Guo
8863c939ad fix: should update last_modified_time in client-side after save dash (#11305) 2020-10-16 10:54:35 -07:00
Yongjie Zhao
afee008a10 fix CTAS and CVAS buttons invisible (#11300) 2020-10-16 08:02:39 -07:00
Erik Ritter
9856f99620 feat: update time_compare description and choices (#11294)
* feat: update time_compare description and choices

* Update sections.jsx
2020-10-15 21:28:09 -07:00
rubenSastre
4f0a06dda5 fix: button translations missing (#11187)
* button translations missing

* blank space before text
2020-10-15 21:27:26 -07:00
Jesse Yang
dde69d82b3 fix: use dashboard id for stable cache key (#11293) 2020-10-15 17:09:03 -07:00
ʈᵃᵢ
233e67a854 fix: add schema name to datasource field in chart list (#11278) 2020-10-15 14:12:21 -07:00
Jesse Yang
a720bba40e chore: upgrade vis plugins npm packages (#11272)
https://github.com/apache-superset/superset-ui/compare/v0.15.4...v0.15.8
2020-10-15 10:41:10 -07:00
Kamil Gabryjelski
9aef9c5764 fix: Fix styling in SqlLab when tabs overflow (#11287)
* Fix styling in SqlLab when tabs overflow

* Use theme variables
2020-10-15 08:38:13 -07:00
adam-stasiak-polidea
fc03549299 chore: Added data-test attributes for testing (#11254)
* Added data-test attributes for testing

* fixed incorrect naming change

* review changes
2020-10-14 16:12:01 -07:00
Jesse Yang
0262daa228 fix: delete the correct dashboard cache key (#11273)
* bugfix: delete dashboard cache key correctly

* update version number
2020-10-14 15:37:59 -07:00
ʈᵃᵢ
a6224a2ed2 fix(query search): use new api to fetch users (#11260) 2020-10-14 13:52:48 -07:00
Erik Ritter
fc74b5d4a2 Revert "fix: keep placeholder in multivalue select when a value exists (#11181)" (#11270)
This reverts commit 31cc4155b7.
2020-10-14 12:58:58 -07:00
Kasia Kucharczyk
9caf875263 Refactored api_tests in charts. Split filter test into several unit tests cases. Added table id based on database id (#11249) 2020-10-14 12:41:37 -07:00
Kamil Gabryjelski
820fa473a7 refactor: Implement TableView component (#11217) 2020-10-14 11:15:34 -07:00
Jesse Yang
634676d467 refactor: use contextmanager for event_logger decorators (#11222) 2020-10-14 10:44:06 -07:00
Beto Dealmeida
bb2e6cfca9 docs: add note about migration in #11098 to Changelog (#11256)
* Add note about #11098

* Update UPDATING.md

Better description

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-10-14 09:55:32 -07:00
Ville Brofeldt
2a4ca9fa98 fix(crud): set default extra value (#11262) 2020-10-14 19:05:20 +03:00
Yongjie Zhao
22d8171dd6 chore(engine): adapt postgres backend connection URI (#11233)
* chore(engine): adapt postgres backend connection URI

* fix tests

* Update superset/db_engine_specs/__init__.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-14 18:57:41 +03:00
Dmitriy
5cbef88217 docs: Add utair to list of companies using Apache Superset (#11261)
* Add utair to list of companies using Apache Superset

* add GitHub handle and correct order

Co-authored-by: dmkir <dk@utair.digital>
2020-10-14 07:57:17 -07:00
Beto Dealmeida
7594161856 fix: do not import superset_config on tests (#11193)
* Do not import superset_config on tests

* Use strtobool
2020-10-14 07:54:31 -07:00
Lily Kuang
cd7392e618 update dashboard edit modal (#11258) 2020-10-13 20:50:02 -07:00
Jesse Yang
2c649ac20f perf: cache dashboard bootstrap data (#11234) 2020-10-13 18:43:06 -07:00
Jesse Yang
eb389ba8d4 build: update webpack for npm linking plugins (#11253) 2020-10-13 16:54:06 -07:00
Erik Ritter
16f7b2b525 fix: improve time compare range error (#11252) 2020-10-13 16:00:39 -07:00
Maxime Beauchemin
8676c3ebd6 docs: don't link to database engine pages (#11242)
* docs: don't link to database engine pages

* making the linter happy

* updating database installation link

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-10-13 14:10:06 -07:00
Elizabeth Thompson
31cc4155b7 fix: keep placeholder in multivalue select when a value exists (#11181) 2020-10-13 13:45:31 -07:00
Jesse Yang
d7eb1d476f perf: speed up uuid column generation (#11209) 2020-10-13 13:29:49 -07:00
Jesse Yang
6d8541e3b6 test: add admin to the owners of birth_names slices (#11228) 2020-10-13 10:31:49 -07:00
John Bodley
51fec1ab16 fix: Ensure consistent naming for testconn (#11246)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-13 09:53:03 -07:00
Grace Guo
88af85ac53 fix: show TIME COLUMN options in dashboard (#11210)
* fix: show TIME COLUMN options in dashboard

* add unit test
2020-10-12 21:43:30 -07:00
Grace Guo
4f4367edf3 feat: prevent co-edit dashboard collision (#11220)
* feat: prevent co-edit dashboard collision

* fix comments
2020-10-12 17:58:32 -07:00
Erik Ritter
6cf698cc6a chore: deprecate REDUCE_DASHBOARD_BOOTSTRAP_PAYLOAD (#11244) 2020-10-12 17:31:56 -07:00
Maxime Beauchemin
ae87b0c767 fix: questioning a few lines that force an ORDER clause (#11153)
* draft: questioning a few lines that force an ORDER clause

* sorting by main metric DESC by default
2020-10-12 14:53:37 -07:00
Naren
dcdf15f4d7 docs: Added Dremio to superset home page (#11231)
* add dremio

* dremio logo
2020-10-12 13:02:50 -07:00
Lily Kuang
8e58730092 fix(dataset): update user list endpoint (#11221) 2020-10-12 17:11:00 +01:00
Daniel Vaz Gaspar
9e9dac68f7 feat(datasets): REST API bulk delete (#11237)
* feat(datasets): REST API bulk delete

* doc HTTP 400
2020-10-12 13:40:05 +01:00
Ville Brofeldt
9f3d089655 chore(sqla): assert query is single read-only statement (#11236) 2020-10-12 15:11:43 +03:00
Ville Brofeldt
e647286393 chore(sql-lab): catch PyArrow deserialization error (#11201) 2020-10-12 10:16:00 +03:00
John Bodley
513bf10a38 chore: Leverage SQLALchemy ping rather than explicit SELECT 1 for testconn (#11223) 2020-10-11 12:44:15 -07:00
Yongjie Zhao
16d36a776c fix(cypress): table viz failed to run in postgres12 (#11230) 2020-10-11 11:28:13 -07:00
Evan Rusackas
fa9963519e fix: adding nofollow (#11225) 2020-10-09 23:47:57 -07:00
Kamil Gabryjelski
b071344531 refactor: Replace react-bootstrap tabs with Antd tabs in SqlLab (#11212)
* Create styled Antd Tabs and Dropdown

* Replace Tabs in SqlLab
2020-10-09 23:11:25 -07:00
Bogdan
cb3f649a7f chore: simplify alerting data model to leverage a single class (#11179)
* Collapse alerting models into a single one

Fixing upgrade migration & tests

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-10-09 19:20:12 -07:00
Moriah Kreeger
a6fc3d2384 feat: CSS Templates List (#11189) 2020-10-09 16:32:31 -07:00
ʈᵃᵢ
7b0dabd7aa style(listview): various changes to get closer to SIP-34 designs (#11101) 2020-10-09 13:06:26 -07:00
Kasia Kucharczyk
56d5e8a1cb Changed cache uid to be depending on table in test_csv_response_format (#11214) 2020-10-09 09:01:26 -07:00
Kasia Kucharczyk
d93b1afe79 test: test_cache_logging is not depending on other dashboard (#11213)
* Changed test_cache_logging to be idempotent and not depending on other data than tested one

* Changed cache uid to be depending on table, not datashource
2020-10-09 09:00:41 -07:00
Jesse Yang
761e6dbf52 chore: Add __pycache__ to gitignore (#11208) 2020-10-08 19:51:26 -07:00
jharding-blw
5561b429f3 Fix typo "insode" -> "inside" (#11204) 2020-10-08 13:58:58 -07:00
Grace Guo
a10e86ab31 fix: revert eTag cache feature for dashboard (#11203)
* revert #11137

* revert #10963
2020-10-08 12:15:08 -07:00
Beto Dealmeida
b6728d87a0 fix: skip unit test that is failing in master for test-postgres-hive (#11196)
* Get full diff

* Test

* Test

* Test

* Test

* Test

* Explicitly detect backend to skip test
2020-10-08 09:17:09 -07:00
Daniel Vaz Gaspar
7c60939429 chore: turn SQL templating off by default (#11172)
* feat: possible to turn off SQL templating

* turn SQL templating off by default

* Update UPDATING.md

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* fix missing PR number

* fix missing PR number

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-08 11:55:39 +01:00
John Bodley
2a447ff466 Revert "refactor: Replace react-bootstrap tabs with Antd tabs (#11090)" (#11194)
This reverts commit 4fd993c4e0.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-07 16:21:24 -07:00
Beto Dealmeida
9785667a0d feat: add UUID column to ImportMixin (#11098)
* Add UUID column to ImportMixin

* Fix default value

* Fix lint

* Fix order of downgrade

* Add logging when downgrade fails

* Migrate position_json to contain UUIDs, and add schedule tables

* Save UUID when adding charts to dashboard

* Fix heads

* Rename migration file

* Fix dashboard serialization

* Fix migration script with Postgres

* Fix unique contraint name

* Handle UUID when exporting dashboard

* Fix Dataset PUT

* Add UUID JSON serialization

* Fix tests

* Simplify logic

* Try binary=True
2020-10-07 09:00:55 -07:00
John Bodley
6e0d1b8409 chore: cleanup FAB update perms (#11155)
* chore: Using cache factory method

* chore: Deprecate outdated FAB_UPDATE_PERMS information

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-10-07 08:33:41 -07:00
Kasia Kucharczyk
32e174d4b8 test: removed unicode_test example from unit tests (#11131)
* Removed depemdency to unicode example in tests config.

* Added common methods for creating dashboards for tests.

* Added fixtures to all tests which were using unicode example.

* Added cleanup for unicode_test table

* Removed unnecessary fixture parts of unicode dashboard tests

* Parametrized creating slice for tests

* Moved fixtures for unicode test to separate file and refactored to several methods. Added param types and return types.

* Cleandup after fix

* Changed variable names to more readable

* Added cleanup for dashboards and slices

* Applied unicode fixture to charts api tests

* Update schema variable to dtype in dashboard utils

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Changed variable schema to dtype in dashboards. Replaced accessing first element with one_or_none

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-10-07 18:29:37 +03:00
Ville Brofeldt
1fa8bf7d7b fix(viz): downgrade exception for missing viz/datasource (#11173)
* fix(viz): downgrade exception for missing datasource

* add translations
2020-10-07 15:16:51 +03:00
Lily Kuang
a0713938b3 fixed undefined names error (#11180) 2020-10-06 22:11:16 -07:00
Moriah Kreeger
21c8d672a8 fix: save query modal/button styling + convert to ant-d modal (#11164) 2020-10-06 16:55:17 -07:00
Maxime Beauchemin
fb8320f7fe fix: cosmetic issue template (#11176) 2020-10-06 16:26:48 -07:00
Lily Kuang
2eb400a2fc chore: remove SIP_34_SAVED_QUERIES_UI feature flag (#11175) 2020-10-06 15:13:41 -07:00
Maxime Beauchemin
ad250637eb chore: add issue template for 'Cosmetic Issue' (#11174)
* chore: add issue template for 'Cosmetic Issue'

* addressing comment
2020-10-06 14:17:34 -07:00
Maxime Beauchemin
071c81f82e fix: 📜 /docs/api won't render (#11168)
* fix: docs/api won't render

    fix: docs/api won't render

    It's unclear to me exactly why, but docz is flimsy with the way
    things are named and runs into odd collision and error messages.

    Somehow renaming the route seem to help. Jut rolling with it after many
    `gatsby clean`

* kill paths-ignore on github-actions

* trigger
2020-10-06 13:51:40 -07:00
Maxime Beauchemin
c8a5dec84d style(dashboard): minor improvements to chart context menu (#11170)
Bumping "Explore/edit chart" as the first option. Getting rid of the
old "edit chart properties" deprecated CRUD link
2020-10-06 12:55:13 -07:00
Maxime Beauchemin
f109f11ceb style: fix too light form labels in DatabaseModal + DRY css (#11056)
eventually should be moved away from bootstrap and onto a DRY
ControlLabel component in our design system.
2020-10-06 12:51:00 -07:00
Maxime Beauchemin
b2af0c0e22 style(sqllab): make database errors more clear and render as monospace (#11075)
* style(sqllab): make database errors more clear and render as monospace

In SQL Lab, when a database error message is returned, generally because
of a user error in the SQL, it's identified as an "Unexpected Error" and
some of the text formatting of the error message (\n, spaces, tabs, ...)
are lost as they are rendered in html.

This PR identifies the error as a "Database Error", and renders like
more like a <pre>, using a monospace font.

* fix the build

* addressing comments

* addressed comments

* lint + removing cruft

* addressing comments
2020-10-06 12:50:38 -07:00
Grace Guo
13963acefb fix: Fix Time Column dropdown for date filter (#11149) 2020-10-06 11:51:10 -07:00
Jesse Yang
38dccf9e12 fix: enable consistent etag across workers and force no-cache for dashboards (#11137)
* fix: enable consistent etag across workers

* Use CACHE_DEFAULT_TIMEOUT instead of 0

* Change timeout to 0 and set expires header even for no-cache

* Reduce number of if branches to appease Pylint

* Fix mypy error
2020-10-06 09:43:43 -07:00
Maxime Beauchemin
3d7b805755 chore: more 'datasource' -> 'dataset' renaming (#11055)
* chore: more 'datasource' -> 'dataset' renaming

* fix build

* explicitely setting disabled to false to avoid cypress confusion

* fix tests

* RAT
2020-10-05 20:04:17 -07:00
Rob DiCiuccio
6f619829d2 Remove erroneous package-lock.json (#11108) 2020-10-05 18:31:40 -07:00
Lily Kuang
152315d0f4 feat: saved query preview modal (#11135) 2020-10-05 16:21:59 -07:00
Amit Miran
63579b3049 allow passing bash args into the pytest (#11040)
this can be used in local environment when for example you want to pass specific *mark* to run against
2020-10-05 15:46:25 -07:00
Johannes Lange
3a0446f00d docs: typo (#11152)
* docs: typo

* docs: consistent two-line gap before sections in README

this is merely to touch something outside of docs/ to work around a CI
issue (comment in #11152), while not creating diff-noise only
2020-10-05 13:29:47 -07:00
Maxime Beauchemin
6358a7f1b5 docs: add API page to docs using Swagger UI (#11154)
* docs: add API page to docs using Swagger UI

* silence fossa
2020-10-04 22:01:36 -07:00
John Bodley
5e0603f957 chore: Remove obsolete creating missing metric permissions (#11143) 2020-10-04 09:16:29 -07:00
Erik Ritter
3d76f81bf7 Revert "refactor: Remove usages of reactable from TimeTable (#11046)" (#11150)
This reverts commit f01b8a30f7.
2020-10-02 22:21:10 -07:00
henryyeh
e9f4fcb4d9 fix: fixing CI workflow (#11145)
* dummy commit to trigger jenkins pipeline

* removing unused workflow

Co-authored-by: Henry Yeh <henry@preset.io>
2020-10-02 17:33:40 -07:00
Kamil Gabryjelski
07f87149e6 fix: Enable ESLint rule default-props-match-prop-types (#11058)
* Re-enable ESLint rule default-props-match-props-types

* Add cypress test for switching tabs

* fix

* Typo fix

* Test fix
2020-10-02 15:54:56 -07:00
Elizabeth Thompson
d95b7c2a73 fix: clean up prop type errors in jest tests (#11120) 2020-10-02 14:59:04 -07:00
Ville Brofeldt
662fb43350 fix(examples): missing expressions in birth_names (#11141)
* fix(examples): missing expressions in birth_names

* disable flaky tests
2020-10-02 23:47:38 +03:00
Kamil Gabryjelski
4fd993c4e0 refactor: Replace react-bootstrap tabs with Antd tabs (#11090)
* Replace tabs in profile

* Replace tabs in SouthPane

* Replace tabs in TabbedSqlEditors

* Add typing for dropdown

* Add license

* Remove isSelected

* Fixes

* Add data-test

* Fix test

* Remove unnecessary style

* Remove unnecessary style

* Tests fix

* Tests fix

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Tabs.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/common/components/Dropdown.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Remove inModal prop

* Remove inModal from storybook

* Move inline style to styled component

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-10-02 13:07:52 -07:00
Jesse Yang
53cd05d74a perf(explore): render datasource details only when needed (#10924) 2020-10-02 12:15:06 -07:00
ʈᵃᵢ
269644d18e style: override ace edit error icon (#11139) 2020-10-02 09:45:36 -07:00
John Bodley
e90c63fc7b fix: Alembic migration 18532d70ab98 (#11136) 2020-10-02 09:12:03 +01:00
Evan Rusackas
2cb2a0093d docs: docs site footer link tweak (#11140)
* rescinding htaccess rewrite

* Changing License link title to make Apache happy

* Revert "rescinding htaccess rewrite"

This reverts commit 0ee153ef08.

* changing url in asf.yaml
2020-10-01 23:31:52 -07:00
Maxime Beauchemin
d578d8133f docs: comply to ASF requirements (#11133)
* docs: comply to ASF requirements

* touch something out of docs/

* Just a few more things...

* messing with .htaccess

* SEO
2020-10-01 22:15:36 -07:00
Elizabeth Thompson
a4e1dc9c27 add info about case sensitive search (#11124) 2020-10-01 21:30:39 -07:00
ʈᵃᵢ
017e5acd14 style(listview): dynamic card size and grid spacing (#11111) 2020-10-01 15:44:42 -07:00
Maxime Beauchemin
5f55d94b9b style: rename label 'table name'->'dataset name' (#11126) 2020-10-01 15:13:01 -07:00
Daniel Vaz Gaspar
4c85d33109 feat: custom favorite filter for dashboards, charts and saved queries (#11083)
* feat: custom favorite filter for dashboards

* lint and sort

* add favored for charts

* fix tests and lint

* more tests and saved query filter

* fix tests

* fix tests

* lint

* lint and fix conflict

* remove unnecessary prop

* separate tests
2020-10-01 15:08:40 -07:00
Phillip Kelley-Dotson
07716ffd76 chore: refactor submenu's right nav to accept list of buttons (#11102)
* submenu right-nav button refactor

* undo changes

* fix lint

* fix test

* update pr with suggested changes and test

* fix lint

* use enum to define btn style props

* add suggestions

* update savedquery buttons
2020-10-01 15:05:49 -07:00
Maxime Beauchemin
2a906bc9d1 docs: use the Apache-Superset logo on README / pypi (#11132) 2020-10-01 14:23:56 -07:00
Elizabeth Thompson
33906c6895 fix: remove extra flash import (#11121)
* remove extra flash import

* remove yml from accepted file types
2020-10-01 14:09:30 -07:00
ʈᵃᵢ
7a72082d31 fix: Revert "Replace reactable with DataTable from superset-ui in QueryTable (#10981)" (#11125)
This reverts commit e93d92e8ac.
2020-10-01 10:06:22 -07:00
Daniel Vaz Gaspar
50d80405a9 fix: alembic migration error msg trying to delete constraint on tables (#11115)
* fix: alembic migration fails by deleting non existent constraint on tables

* Revert "fix: alembic migration fails by deleting non existent constraint on tables"

This reverts commit 3a359b0577.

* mantain migration but just for MySQL and add downgrade procedure

* skip the downgrade
2020-10-01 12:35:12 +01:00
Daniel Vaz Gaspar
fdb26f6131 feat: CRUD REST API for CSS Templates (#11114)
* feat: CSS Template CRUD API

* fix API docs

* fix copy pasta

* lint
2020-10-01 11:46:25 +01:00
Maxime Beauchemin
c4d96f64ff fix: SpatialControl popover won't open (#11127)
Recently a change related to emotion styling not properly working through
react-bootstrap's popover broke the SpatialControl.

This PR makes SpatialControl use antd's equivalent, and addresses the
issue as a result: emotion's styling context is preserved through
this superior popover.
2020-09-30 23:12:51 -07:00
Moriah Kreeger
e7a4265c30 feat: saved query list actions (#11109) 2020-09-30 18:18:34 -07:00
Lily Kuang
5b284e67eb feat: add created by chart CRUD view (#11067) 2020-09-30 13:53:04 -07:00
Kalyan
0bcc9d77a7 fix: Disabling timezone of dataframe before passing Prophet (#11107)
* fix: Disabling timezone of dataframe before passing Prophet 

While running forecasting with Druid. Prophet throws the following exception. This PR removes the timezone info. 
ValueError: Column ds has timezone specified, which is not supported. Remove timezone
https://github.com/apache/incubator-superset/issues/11106

@villebro

* Update pandas_postprocessing.py

* Update superset/utils/pandas_postprocessing.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-09-30 21:38:37 +03:00
Ville Brofeldt
ada66e30dd fix(chart-data-api): ignore missing filters (#11112) 2020-09-30 09:34:23 +01:00
Erik Ritter
fa5dab85c4 feat: more specific presto error messages (#11099) 2020-09-29 21:50:58 -07:00
Bogdan
94d4d55908 Fix alembic migration (#11110)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-29 16:35:00 -07:00
Bogdan
03eebd3019 fix: fix table existence validation function (#11066)
* Fix table existance validation function

* Drop left over table name index in mysql db

* Do not modify model

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-29 15:01:01 -07:00
Evan Rusackas
0409b12a55 style: fix secondary label border (#11100) 2020-09-29 14:15:18 -07:00
Moriah Kreeger
b8d616a9d2 feat: saved query list view + sort/filters (#11005) 2020-09-29 13:39:10 -07:00
John Bodley
4ccba3072d chore: Remove Obsolete WARNING_MSG from config (#10972) 2020-09-29 12:33:02 -07:00
Grace Guo
6633409a15 feat: enable ETag header for dashboard GET requests (#10963)
* feat: add etag for dashboard load requests

* fix review comments
2020-09-29 10:57:16 -07:00
Kasia Kucharczyk
89bf76553e Updated lint in schedules.py in tasks: unused_import, ungrouped_import and changed argument name to remove unused-argument (#11045) 2020-09-29 08:10:46 -07:00
Daniel Vaz Gaspar
5d08a426d3 fix(api): unable to delete virtual dataset, wrong permission name (#11019)
* fix(api): unable to delete virtual dataset because of wrong permission name

* Still delete the dataset even when no permission was found

* migration script to fix possible existing faulty permissions on the db

* black

* fix db migration and one more test

* add more comments to the migration script

* freeze a partial schema of the model on the migration step

* fix mig script

* Update superset/migrations/versions/3fbbc6e8d654_fix_data_access_permissions_for_virtual_.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-09-29 12:33:07 +01:00
Ville Brofeldt
80e395559d fix: echarts timeseries groupby (#11103)
* fix: echarts timeseries groupby

* address review comment
2020-09-29 14:25:38 +03:00
Lily Kuang
8b458ac172 fix: double scroll bars on dataset editor (#11095)
* fix double scroll bar on dataset editor

* add table name to virtual tab
2020-09-28 19:28:27 -07:00
Shaik Idris
79de8f7e37 docs: Add Zeta to list of companies using Apache Superset (#11059)
* Add zeta.tech to list of companies using Apache Superset

Zeta.tech has been extensively using Apache Superset to power some of the enterprise products

* Add Zeta to list of companies using Apache Superset

At Zeta we have been using Apache Superset for over an year to power our enterprise product suite.
2020-09-28 19:28:00 -07:00
Kasia Kucharczyk
3a08fd04f3 chore: pylint fixes in files in project's root (#11064)
* Pylint rule: not necesary unused-import in extensions.py. Autofomatted

* Pylint rule: not necesary unused-import in jinja_context.py. Autofomatted

* Pylint rule: not necesary no-value-for-parameter in stats_logger.py. Autofomatted

* Pylint rule: not necesary no-member in viz.py

* Pylint rule: not necesary no-member in viz_sip38.py
2020-09-28 14:32:45 -07:00
Kasia Kucharczyk
690e27e5fd chore: updated utils with pylint rules (#11062)
* Updated pylint in cache.py in utils: unecessary bad-whitespace. Autoformatting

* Updated pylint in core.py in utils: E0202.

* Updated pylint in logging_configurator.py in utils: disable=no-member. Formatting

* Updated pylint in machine_auth.py in utils: unused-import

* Updated pylint in screenshots.py in utils: unused-import and import-error

* Updated pylint in webdriver.py in utils: unused-import
2020-09-28 14:32:06 -07:00
Lily Kuang
e337355162 refactor: table selector on dataset editor (#10914)
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-09-28 11:16:03 -07:00
Brylie Christopher Oxley
e52a399e18 Reorganize steps (#11015)
Reorganize steps to
1. run db migrations
2. create default roles/permissions
3. create admin user
4. (optional) load examples
2020-09-28 10:51:50 -07:00
ʈᵃᵢ
1dc05d4c12 feat(charts): modify custom api filter to include more fields (#11054) 2020-09-28 10:18:34 -07:00
Kamil Gabryjelski
2fd8fca207 chore: Clean up some console warnings (#11061)
* Upgrade a few packages

* Update some prop types

* Update HTML

* Moar warning fixes

* Remove wrapper div
2020-09-28 09:43:21 -07:00
Kamil Gabryjelski
f01b8a30f7 refactor: Remove usages of reactable from TimeTable (#11046)
* Use ListView instead of reactable

* Refactor TimeTable

* Spark column width fix
2020-09-28 09:42:06 -07:00
Kamil Gabryjelski
a879622e07 refactor: Remove usages of reactable from AlteredSliceTag (#11012)
* Remove usages of reactable in AlteredSliceTag

* Fix tests

* Move mocked data to fixtures file

* Use optional chaining

* Remove default value, change a unit test logic

* Code review fixes
2020-09-28 09:41:08 -07:00
Erik Ritter
0f7e90f1f7 feat: improve presto query perf (#11069) 2020-09-28 08:52:00 -07:00
Maxime Beauchemin
046bd02d65 style: improve "Datasource & Chart Type" <Label>s (#10971)
* style: improve default <Label>

* fix name-shifting icon

* adding some styles to remove the inner drop shadow from the 'more' button

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-28 08:32:25 -07:00
Ville Brofeldt
39cce712af docs: add changelog entries for 0.37.2 (#11086) 2020-09-28 11:14:09 +03:00
Evan Rusackas
497d3f3910 fix: Adding timeout to flaky cypress test, to wait for animation to complete (#11074)
* adding timeout for animation

* 1s timeout
2020-09-27 20:08:21 -07:00
Evan Rusackas
cff034e2cf chore: cleaning out unused code from utils (#11076)
* removing unused stuff (and some jquery) from utils.js

* linting
2020-09-27 20:08:05 -07:00
Maxime Beauchemin
7f1e4e441d fix: surface connection error messages on the client (#11077)
* fix: surface connection error messages on the client

* typo

* lint
2020-09-26 16:09:40 -07:00
Yongjie Zhao
1493450a6f fix(jest): using UTC mock date (#11079) 2020-09-26 14:53:41 -07:00
Evan Rusackas
23d62f37a6 removing unused component (#11072) 2020-09-25 23:02:01 -07:00
Evan Rusackas
8cba1c823d changing to the correct hex color (#11073) 2020-09-25 21:09:59 -07:00
Maxime Beauchemin
8e6f7d6598 style: remove unecessary padding (#11071) 2020-09-25 17:22:46 -07:00
Moriah Kreeger
374b06b4dd fix: database list checkboxes (#11068) 2020-09-25 16:28:22 -07:00
Evan Rusackas
eeeb21077d feat: adding all icons from the design system to the codebase (#11033)
* error -> error-solid

* warning -> warning-solid

* all the new icons mixed in!

* card-view -> card_view

* circle-check-solid -> circle_check_solid

* corrected circle-check to new name and correct (stroke) icon

* sort-asc/desc -> sort_asc/desc

* databases -> database

* compass -> nav_explore

* pencil -> edit-alt

* more pencil migrations

* easy list view rename

* star -> favorite (changed in Figma)

* removing deprecated icon

* renaming icon to mach figma

* More -> More Horiz

* forgot to change this when ranming the file

* updating some icon names in use

* adding hella icons

* fixing errant viewboxes

* removing dropdown-arrow in favor of triangle-down

* adding key to storybook map.

* fixing icon component reference

* tweaks to fave star styling to support revised icon

* fixing a bad icon inclusion

* missed a license

* touchup to virtual dataset... will tweak later.

* e2e fix

* linting
2020-09-25 14:49:30 -07:00
Erik Ritter
052d7a0a3e fix: sql lab autocomplete width (#11063) 2020-09-25 10:13:21 -07:00
Evan Rusackas
d056e3dfd3 clickable labels have outlines, storybook shows them (#11034) 2020-09-24 20:50:44 -07:00
Srini Kadamati
66e49807ef fixed routes for customer in docs (#11052) 2020-09-24 20:43:03 -07:00
Grace Guo
3467d2d8d6 Revert "style: fix checkbox color (#10970)" (#11051)
This reverts commit e4e78b66fa.
2020-09-24 16:53:02 -07:00
Lily Kuang
ea105bc23b feat: add "created by" to dashboard CRUD view (#11030) 2020-09-24 14:33:55 -07:00
Kasia Kucharczyk
92dd257ef4 Changed tags.py and helpers.py in models module: removed disabled pylint rule unused_import, changed unused arguments to private and removed disabled rule unused-argument. Removed redundant rules. (#11037) 2020-09-24 13:50:09 -07:00
Kasia Kucharczyk
63d0e801ad chore: updated lint rules in models module (#11036)
* Removed disabled pylint rule `unused_import` from `dashboards.py` in `models` module. Added missing break in too long line. Formatting.

* Changed `datasource_access_request.py` in models` module: removed disabled pylint rule `unused_import`, removed `no-member` disabled rules which aren't needed. Formatting

* Changed `slice.py` in models` module: removed disabled pylint rule `unused_import`, changed unused arguments to private and removed disabled rule `unused-argument`
2020-09-24 13:49:00 -07:00
Kasia Kucharczyk
6b318c477e Removed disable global pytlint rule standarderror-builtin which isn't appearing for Python3 (#11038) 2020-09-24 13:48:02 -07:00
Kasia Kucharczyk
eba1aa8a53 Enabled argument-differ for bulk_delete (#11039) 2020-09-24 13:47:00 -07:00
Kasia Kucharczyk
7ca4192fe6 Enabled no-self-use pylint rule in security. Formatter (#11041) 2020-09-24 13:46:21 -07:00
Kasia Kucharczyk
8bc05bda6f Changed variable name from capitals to lowercase and changed lint rule (#11044) 2020-09-24 13:45:19 -07:00
Grace Guo
f99753a800 Revert "ESLint: Re-enable rule default-props-match-prop-types (#10868)" (#11050)
This reverts commit 9f01a7fdf8.
2020-09-24 12:33:38 -07:00
ʈᵃᵢ
eded51b2f8 feat(saved_queries): add custom api filter for all string & text fields (#11031) 2020-09-24 11:05:25 -07:00
Bogdan
b2fdf12f62 Support jinja templates (#11008)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-24 10:29:44 -07:00
Ville Brofeldt
6181994084 chore: bump pandas to latest stable version (#11018)
* chore: bump pandas to latest stable version

* fix nest_values
2020-09-24 13:11:10 +03:00
Grace Guo
8e9b0b3f11 fix: dashboard edit button (again) (#11029) 2020-09-23 15:42:06 -07:00
Maxime Beauchemin
dc76a2688e style(explore): use tertiary button against gray background (#11011)
"primary" style buttons seem to expect a white background and really
look muted against the gray background. Using "tertiary" style button makes
things much better.

Eventually we may reconsider the layout and gray background and go back
to secondary, but for now this makes these important pop much more
2020-09-23 11:44:39 -07:00
Rob DiCiuccio
8b683783cc docs: add security vulnerability GH issue template (#11023)
* Add security vulnerability issue template

* Louder title
2020-09-23 11:13:13 -07:00
Grace Guo
0409393a4e fix: [dashboard] should not show edit button when user has no edit permit (#11024) 2020-09-23 10:55:32 -07:00
Jesse Yang
7549dad12d fix: timer component, fixes #10849, closes #11002 (#11004) 2020-09-23 10:53:24 -07:00
Kasia Kucharczyk
af1e8e8839 fix: enable several pylint rules partially in db_engines_specs module (#11000)
* Enabled mssql

* Enabling pylint rules in `mysql.py` from `db_engine_specs`:
- added variable to shorten line and enable `line-too-long`
- `import-error` seems not prompting anymore
- specified exception instead broad-except

* Refactored too long line in `oracle.py` from `db_engine_specs`. Enabled too-long-line pylint rule.

* Changed fstring into string `pinot.py` to reenable `f-string-without-interpolation` rule.

* Enabled `unused-import` rule and changed line to adjust to correct number of characters in `db_engine_specs/postgres.py`.

* Enabled unused-import pylint check in `db_engine_specs/presto.py`

* Enabled unused-import pylint check in `db_engine_specs/snowflake.py`

* Enabled unused-import pylint check in `db_engine_specs/sqlite.py`
2020-09-23 10:47:56 -07:00
Kasia Kucharczyk
fb6f14c469 fix: pylint checks in connectors/sqla/models.py (#10974)
* Removed unused pylint rule `too-many-instance-attributes` from SqlaTable class.

* Removed unecessary rule: `bad-whitespace` from `get_sqla_query` method

* Disabling too-many-instance-attributes since it fails on CI
2020-09-23 10:47:12 -07:00
Kasia Kucharczyk
bade279883 fix: reenable pylint rule unused-import in charts and connectors modules (#11014)
* Removed disabled pylint rule `unused_import` from `dao.py` in `charts` module

* Removed disabled pylint rule `unused_import` from `connector_registry.py` in `connectors` module
2020-09-23 10:46:44 -07:00
Kasia Kucharczyk
26fcc08906 Enabled pylint rules in db_engines module: (#11016)
- `unused_import` and `import_error` - not promting anymore
- changed unused param to private and removed `unused_argument`
2020-09-23 10:45:26 -07:00
Kasia Kucharczyk
a26f29e7c8 fix: changes a pylint check in dashboard module (#10978)
* Removed not needed disabled pylint rules from `set_dash_metadata`:
- `disable=too-many-locals`,
- `too-many-branches`,
- `too-many-statements`

* Changed broad exception to KeyError.

* Reverted broad_exception in get_col_type in utils
2020-09-23 10:26:22 -07:00
ʈᵃᵢ
345fe07d64 fix: menu shows a 0 when there are not settings (#11009) 2020-09-23 09:22:45 -07:00
Daniel Vaz Gaspar
ba009b7c09 fix: query search low privileged user search access denied (#11017) 2020-09-23 14:16:24 +01:00
ʈᵃᵢ
50852dfbbf chore: downgrade expected exception from error to info (#10994)
* chore: reduce number of error logs

* info -> warning
2020-09-23 12:05:44 +01:00
Lily Kuang
02ab5cc644 fix: Add Item Overflow on Dataset Editor (#10983)
* move add item button to the top

* fix cypress

* fix cypress
2020-09-22 22:19:41 -07:00
Beto Dealmeida
d992c306c2 Bring back import menu (#11007) 2020-09-22 19:32:44 -07:00
ʈᵃᵢ
0d1f6119a6 feat(listview): feature flag config to set default viewing mode (#10986) 2020-09-22 18:01:19 -07:00
Jesse Yang
220c410df4 build: add react-hooks linting (#11006)
Fixed a couple of criticle errors and left the warnings as is (mostly
from react-hooks/exhaustive-deps).

Let's fix the warnings in future PRs as sometimes unexhaustive deps
are intentional.
2020-09-22 15:09:22 -07:00
Erik Ritter
a491b6db41 fix: unbreak ci (#11003) 2020-09-22 14:41:15 -07:00
Kasia Kucharczyk
a6f258747b fix: enable pylint rules in db_engine_specs module (#10998)
* Athena.py: cretaed variable for too long line, removed disabled pylint rule.

* Enabled `line-too-long` in `drill.py`. Added variable for too long string.

* Reformatted hana.py:
- changed return statement into two lines to keep line lenght limit

* Enabling pylint rule in hive.py:
- `no-name-in-module` for pyhive in several places
- `line-too-long` and adding new lines
- `unused-import` is not invalid anymore

* Enabled `line-too-long` in `kylin.py`. Added variable for too long string.

* Enabled `unused_import` in `base.py` from db_engine_specs module.

* Enabled `unused_import` in `bigquery.py` from db_engine_specs module.

* Enabled `unused_import` in `druid.py` from db_engine_specs module.

* fix: athena datetime string converting
2020-09-22 13:44:45 -07:00
Kamil Gabryjelski
e93d92e8ac Replace reactable with DataTable from superset-ui in QueryTable (#10981)
* Replace reactable with DataTable from superset-ui in QueryTable

* Fix tests

* Fix pagination

* Fix tests
2020-09-22 13:24:30 -07:00
Kamil Gabryjelski
9f01a7fdf8 ESLint: Re-enable rule default-props-match-prop-types (#10868)
* Re-enable rule default-props-match-prop-types

* Restore default props and remove isRequired

* Remove unused props
2020-09-22 13:17:41 -07:00
Ville Brofeldt
a9eab33d64 feat: add ECharts Pie chart (#10966)
* feat: introduce echarts pie chart

* lint

* remove viz.py shim

* remove tests

* fix cypress test

* fix test
2020-09-22 19:27:40 +03:00
Beto Dealmeida
0554c8918e Enable subqueries in gsheetsdb (#10991) 2020-09-22 08:51:29 -07:00
Karthikeyan Singaravelan
95ba8e1fb7 fix: deprecation warnings due to invalid escape sequences. (#10710)
* fix: Fix deprecation warnings due to invalid escape sequences.

* fix: Fix black related errors.
2020-09-22 16:03:58 +01:00
Ville Brofeldt
bd140e018a fix(presto): default unknown types to string type (#10753)
* fix(presto): default unknown types to string type

* lint
2020-09-22 13:16:54 +03:00
Ville Brofeldt
448a41a4e7 feat(row-level-security): add base filter type and filter grouping (#10946)
* feat(row-level-security): add filter type and group key

* simplify tests and add custom list widget

* address comments

* use enum value to ensure case sensitive value is used
2020-09-22 08:54:10 +03:00
Maxime Beauchemin
3be8bdad9a docs: add gallery screenshot & link in README (#10988)
* docs: add gallery screenshot & link in README

* deallowing large files
2020-09-21 22:48:55 -07:00
Maxime Beauchemin
8e4a1c8356 docs: add a "Gallery" page (#10968)
* docs: add a gallery page

* Adding image gallery

* linted

* add more screenshots

* a few more screenshots
2020-09-21 22:27:03 -07:00
ʈᵃᵢ
96a61e327e build: add PR lint action (#10990) 2020-09-21 21:21:04 -07:00
Evan Rusackas
193796ca16 adding filters back that caused issues (#10989) 2020-09-21 19:12:34 -07:00
adam-stasiak-polidea
dc893fe1b3 chore: selectors refactor in SQLLab test suite (Cypress) (#10944)
* changed selectors for not skipped tests in sqllab suite

* linter fixes

* linter fixes
2020-09-21 15:49:44 -07:00
Kamil Gabryjelski
a8f5029cb1 ESLint: Remove ts-ignore comments (#10933)
* Upgrade json-bigint, add @types/json-bigint to deps

* Upgrade react-bootstrap-dialog

* Fix ts-ignore

* Fix ts-ignore

* Fix ts-ignore

* Upgrade react-syntax-highlighter, fix ts-ignore

* Fix ts-ignore

* Fix ts-ignore in styles.tsx

* Wrap Input in div to pass onPaste

* Change esm to cjs imports for highlighter to fix tests

* Add null checks
2020-09-21 15:47:33 -07:00
Maxime Beauchemin
e4e78b66fa style: fix checkbox color (#10970)
* style: fix checkbox color

* lint

* wrap test into theme
2020-09-21 13:12:12 -07:00
Kasia Kucharczyk
41dfcd4834 fix: changed disabled rules in datasets module (#10979)
* Updated `put` method in `datasets/api.py`:
- changed return statements in put method
- removed disabled pylint rule too-many-return-statements
- removed disabled pylint rule arguments-differ since arguments match

* Removed disabled pylint rule arguments-differ in `delete()` method since arguments match
2020-09-21 12:26:17 -07:00
Moriah Kreeger
4aa53244c7 fix: update the time filter for 'Last Year' option in explore (#10829)
* Update explore time filter ranges

* rm console statements

* only update moment calculation for years

* tests

* add open/close test
2020-09-21 11:39:11 -07:00
Bogdan
56d001835e fix: use nullpool even for user lookup in the celery (#10938)
* Use nullpool even for user lookup in the celery

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-21 10:34:03 -07:00
Bogdan
801fb4063c Allow empty observations in alerting (#10939)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-21 08:48:02 -07:00
Kasia Kucharczyk
74a2270d0a fix: re-enabling several globally disabled lint rules (#10957)
* Removed global pylintrc rule: bad-continuation. Black repaired it.

* Enable global pylintrc rule: duplicate-code. It might help with providing clean code and future refactors.

* Removed global rule `dict-iter-method` since Python3 doesn't support methods: dict.iterkeys(), itervalues() or iteritems()

* Removing global disabler rule `invalid-unary-operand-type`, because all unary operators are used on objects which supports those operations
2020-09-21 08:47:04 -07:00
Kasia Kucharczyk
f01c488664 fix: setting specific exceptions common/query_context.py (#10942)
* Specified an exceptions in reading cache in `get_df_payload()` method

* Reverted change after review:
- added broad exception in `get_df_payload` method
2020-09-21 08:46:08 -07:00
Kasia Kucharczyk
88a671153b Pylint disabled rule pointless-string-statement is not raising warining anymore - removing (#10975) 2020-09-21 08:45:21 -07:00
Kasia Kucharczyk
9d7b3536e1 fix: pylint disabled rules in dashboard/api.py (#10976)
* Refactored `put` method in dashboards/api.py:
- changed retun statements
- removed lint disabled rule

* `arguments-differ` disabled rule is not anymore valid - put argiments don't differ

* `delete()` method in dashboards/api has now same list of argiments:
- removing unecessary pylint check disabled

* `bulk_delete()` method in dashboards/api has now same list of argiments:
    - removing unecessary pylint check disabled
2020-09-21 16:02:41 +01:00
Kasia Kucharczyk
fd0f6e1541 fix: removed disabled lint rule too-many-locals in connectors/base/models.py (#10958) 2020-09-21 09:13:38 +01:00
Kamil Gabryjelski
4835d3b0a2 ESLint: Re-enable rule no-access-state-in-setstate (#10870)
* Re-enable rule no-access-state-in-setstate

* Move accessing event values out of async functions
2020-09-20 23:48:23 -07:00
Ville Brofeldt
3d8f757ac8 fix: simply is_adhoc_metric (#10964)
* fix: simply is_adhoc_metric

* address comment
2020-09-20 13:22:55 +03:00
Kamil Gabryjelski
557a303cc5 ESLint: Enable rule no-named-as-default (#10879)
* Enable rule no-named-as-default

* Fix wrong import
2020-09-18 13:41:01 -07:00
Kamil Gabryjelski
91fd06e093 ESLint: Remove ts-ignore (#10961)
* Fix prop types of styled

* Fix props in windowed
2020-09-18 13:33:32 -07:00
Srini Kadamati
4a4fdb1e02 docs: set up client-side redirects from previous era docs urls (#10921)
* one simple redirect, as a test

* adding license to header

* painstakingly added SEO redirects!

* addressed feedback and ran lint-fix!

* lets try newline again!

* Revert "lets try newline again!"

This reverts commit 20f89bd23c.

* Revert "Revert "lets try newline again!""

This reverts commit e441edc54a.

* wait... there were TWO newlines?

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-18 13:31:22 -07:00
Evan Rusackas
d4f33cc9de Ignore '/docs' on some GH actions, give docs its own action (#10949)
* ignore docs on several actions, give docs its own action

* Random doc change to see if the new action runs.

* umm... not paths-ignore, paths!

* eof fix

* enabling typescript checking on docs
2020-09-18 12:23:48 -07:00
Jesse Yang
4f607371e5 fix: typo in prefer typescript (#10959)
Prefer TypeScript has stopped working since #10170 because of a [typo](https://github.com/apache/incubator-superset/pull/10170/files#diff-0f1a9bbd1316e385c51f8aba1583bd99R24) in `jq` script.

Also fix the `trilom/file-changes-action` GH Action version so the process can be more predictable.
2020-09-18 12:02:09 -07:00
Kamil Gabryjelski
ccfd293227 ESLint: no-restricted-syntax (#10889)
* Enable no-restricted syntax rule

* Fix webpack.config.js

* Remove unused function from utils/common.js

* Refactor triple nested for loop

* Fix loops in src/explore components

* Fix loops in SqlLab components

* Fix loops in AlteredSliceTag

* Fix loops in FilterableTable

* Add fixtures and uinit tests for findControlItem

* Add license
2020-09-18 09:05:57 -07:00
Kasia Kucharczyk
2003442b32 fix: several disabled pylint rules in models/helpers.py (#10909)
* Removed conflicting lint and isort check in model helpers seems it's not appearing anymore

* Removed disabled linting for accessing private method. `parent_foreign_key_mappings` becomes public because it is accessed by other instance than `self`.

* Updated model's helper - removed unecessary exception and replaced with check while accessing global context to reset ownerships.

* Updated model's helper - renamed unused attribute to private in user link method.

* Updated model's helper - added specific exception for adding extra json column. Removed disabled pylint rule.

* Applied changes after review to `models/helpers.py`:
- removed unecesary function's param rename
- added extra JSON content in exception

* Removed self.extra_json content from exception message.
2020-09-18 16:32:02 +01:00
Daniel Vaz Gaspar
e375ed4678 fix(jinja): make context attrs private on SQL templates (#10934)
* fix(jinja): make SQLAlchemy models private on SQL templates

* add missing privates

* fix test
2020-09-18 12:56:07 +01:00
Kasia Kucharczyk
e21a354b3b fix: update pylint disabled checks in common/query_context.py (#10941)
* Updated common/query_context.py
- removed disabled pylint rule no-self-use from `df_metrics_to_num` since it has `@staticmethod`
- applied black on the file

* Removed disabled lint check `too-many-locals` in get_df_payload method. Applied black.

* Method `get_data()` has self param:
- removing # pylint: disable=no-self-use
- autoformatting
2020-09-17 21:30:02 -07:00
Kasia Kucharczyk
141ef4a188 Updated type: ignore in model's helper: (#10906)
- added sql alchemy mapper as a type
2020-09-17 13:49:14 -07:00
Elizabeth Thompson
ed9b50be2c chore: upgrade cypress to use retries (#10923) 2020-09-17 12:54:50 -07:00
ʈᵃᵢ
213b772368 chore: remove SIP_34_DATABASE_UI (#10926) 2020-09-17 12:53:00 -07:00
Kasia Kucharczyk
d6be977d1b fix: address all disabled pylint checks in charts/api.py (#10932)
* Refactored put in charts/api.py to have less return statement. Removed pylint rule too-many-return-statements

* Refactored data() in charts/api.py to have less return statement. Removed pylint rule too-many-return-statements

* Pylint disabled arguments-differ check is not necessary anymore in put method

* Pylint disabled arguments-differ check is not necessary anymore in delete method

* Pylint disabled arguments-differ check is not necessary anymore in bulk_delete method. Applied black
2020-09-17 17:31:44 +01:00
Kasia Kucharczyk
8735a14ea7 Removed global pylintrc rule: old-ne-operator. Which is not applicable in code anymore. (#10915) 2020-09-17 06:47:52 -07:00
Ville Brofeldt
69081009d3 fix(legacy-druid): undefined filter key (#10931) 2020-09-17 15:10:06 +03:00
Moriah Kreeger
5623cd64ca feat: update saved query backend routing + add savedquery list (#10922)
* Update saved query backend routing + add savedquery list

* add spec fileg

* add FE flag for SIP_34_SAVED_QUERIES_UI
2020-09-16 21:08:40 -07:00
Kasia Kucharczyk
cd77797802 Removed disabled linting redefined-outer-name. Url parameters are renamed where url was already defined in class attributes (#10911) 2020-09-16 20:22:46 -07:00
Yongjie Zhao
af75bee582 feat: adding dashboard toggle fullscreen button (#10840) 2020-09-16 14:20:52 -07:00
Elizabeth Thompson
a3519b42cb fix lint errors (#10918)
Co-authored-by: Elizabeth Thompson <elizabeth@preset.io>
2020-09-16 13:42:27 -07:00
Yongjie Zhao
5099dbef6b fix: babel script broken by format string (#10902) 2020-09-16 13:35:35 -07:00
Rob DiCiuccio
d74044c2e6 Update FOSSA configuration for new requirements layout (#10848)
* Update FOSSA configuration

* test FOSSA failure

* Update FOSSA files changed regex

* Revert "test FOSSA failure"

This reverts commit a97213db78.

* pre-commit linting

* remove docker.txt check
2020-09-16 13:28:04 -07:00
Kamil Gabryjelski
281305e0cf Enable anchor-has-content rule (#10908) 2020-09-16 13:27:52 -07:00
Evan Rusackas
2a5946d117 docs: Client side redirects (one POC) (#10898)
* one simple redirect, as a test

* adding license to header
2020-09-16 13:24:26 -07:00
Elizabeth Thompson
0d90bc9920 chore: update port that cypress runs on for local vs test (#10847) 2020-09-16 12:31:03 -07:00
Elizabeth Thompson
d3e9c565b7 feat: use svg for checkbox component (#10799)
* use svg for checkbox component

* add vertical align to svg

* use emotion styling

* update import to superset core

Co-authored-by: Elizabeth Thompson <elizabeth@preset.io>
2020-09-16 12:03:14 -07:00
Elizabeth Thompson
13cc1a3d2d fix: front end CI tests and test runner (#10897) 2020-09-16 11:35:18 -07:00
Bogdan
c3f1720456 fix: superset alerting misc fixes (#10891)
* Superset alerting misc fixes

* Test 0 threshold

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-16 11:09:11 -07:00
Evan Rusackas
d4ee073bfe simplifying/clarifying youtube video code/datastructures (#10882)
* simplifying/clarifying youtube video code/datastructures

* adding role to clickable div
2020-09-16 09:57:04 -07:00
Evan Rusackas
87fc425be9 Fixing docs site home screen mobile layout issues (#10886)
* fixing phone layout issues, "sqlab" -> "SQL Lab"

* fixing docs width/scrolling issues

* Revert "fixing docs width/scrolling issues"

This reverts commit 53c6482083.

* minor cherry on top-> remove nowrap and improve a link in README

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-09-16 09:56:56 -07:00
Erik Ritter
f9cfb3ed0e fix: spelling in docs homepage (#10912) 2020-09-16 09:48:08 -07:00
Maxime Beauchemin
0870d3ae2b docs: add back issue code links (#10903)
* docs: add back issue code links

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

* Addressing comments
2020-09-16 09:28:53 -07:00
Jesse Yang
d4291edffa build: optimize eslint import resolver configs (#10901)
Use `node` resolver and `node` env for `webpack.config.js`, use
`webpack` resolver only for `src`.
2020-09-16 09:26:14 -07:00
Maxime Beauchemin
3b035d2af3 docs: redirect http -> https (#10900)
* docs: redirect http -> https

* fix issues
2020-09-16 08:24:08 -07:00
Daniel Vaz Gaspar
9246c9bdaf refactor: ASF only dependencies on base.txt (#10875) 2020-09-16 14:57:41 +01:00
Ville Brofeldt
15fe04e3ef docs: add changelog entries for 0.37.1 (#10893) 2020-09-16 12:29:03 +03:00
Evan Rusackas
1f7301025a correcting 2 steps in docs deployment readme (#10899) 2020-09-15 22:09:32 -07:00
Jesse Yang
4eeee4c2eb chore: enable eslint-import-resolver-typescript (#10895)
Let eslint understand tsconfig.json when importing modules, so we
can use `compilerOption.paths` to override where to find ts modules.
2020-09-15 15:33:49 -07:00
Moriah Kreeger
c43992bec8 feat: data menu routing (#10880) 2020-09-15 14:53:31 -07:00
ʈᵃᵢ
fe9f6148d8 fix(cypress): prevent CI failure on codecov failure (#10892) 2020-09-15 14:31:43 -07:00
Jesse Yang
0129c4253d feat: move ace-editor and mathjs to async modules (#10837)
Follow up on #10831, move brace and mathjs to async modules so that the initial page load for dashboards most pages can be faster.
2020-09-15 14:12:06 -07:00
Evan Rusackas
5d529fd844 fixing broken links (#10885) 2020-09-15 13:18:42 -07:00
John Bodley
b48dd4b7d9 chore: Using cache factory method (#10887)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-15 12:48:19 -07:00
Bogdan
9c420d6efe feat: implement cache invalidation api (#10761)
* Add cache endpoints

* Implement cache endpoint

* Tests and address feedback

* Set cache config

* Address feedback

* Expose only invalidate endpoint

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-15 11:17:21 -07:00
Ville Brofeldt
838a70ea8d docs: fix ubuntu 20.04 installation instructions (#10888) 2020-09-15 21:16:57 +03:00
ʈᵃᵢ
045335a687 fix(cypress): wait for filterValues request (#10884) 2020-09-15 09:52:44 -07:00
Kasia Kucharczyk
2a6bcbb1eb Reviewed and repaired disabled pylint in dashboard file (#10877)
* Improved exceptions and unused method arguments which were disabled in linting

* Applied black to dashboard.py
2020-09-15 08:26:04 -07:00
Yongjie Zhao
38edb69d95 Feat: Adding table comment and columns comment for SQLLab (#10844)
* Adding table comment and columns comment for backend

* fix mypy

* Fix CI

* adding wider catch

* use logger

* fix lint
2020-09-14 21:11:48 -07:00
Jesse Yang
4502690ef9 chore: clean up aphrodite (#10883) 2020-09-14 17:47:39 -07:00
Kamil Gabryjelski
01f90107e1 ESLint: Re-enable rule no-unused-vars (#10865)
* Re-enable rule no-unused-vars

* fixup! Re-enable rule no-unused-vars
2020-09-14 15:42:06 -07:00
Kamil Gabryjelski
e28f3d6220 Re-enable rule line-between-class-members (#10862) 2020-09-14 15:41:32 -07:00
Kamil Gabryjelski
91b8c8afc9 Re-enable rule state-in-constructor (#10873) 2020-09-14 13:31:11 -07:00
Kamil Gabryjelski
767044bfe5 ESLint: Re-enable rule control-has-associated-label (#10866)
* Re-enable rule control-has-associated-label

* Change aria-label message in DatasourceControl

Co-authored-by: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-14 13:00:39 -07:00
Kamil Gabryjelski
2d8f4e3aaf Re-enable rule no-else-return (#10861) 2020-09-14 13:00:07 -07:00
Kamil Gabryjelski
76275ec410 Enable rule no-plusplus (#10876) 2020-09-14 11:59:32 -07:00
Maxime Beauchemin
08ec509dc9 docs(style): make more responsive for mobile (#10853)
* docs(style): make more responsive for mobile

* Make a responsive navbar

* more fixes and tweaks

* Add README instructions
2020-09-14 11:58:45 -07:00
Kamil Gabryjelski
d93b2b99b2 Re-enable rule sort-comp (#10872) 2020-09-14 10:45:05 -07:00
Kamil Gabryjelski
a75c36281d Re-enable rule jsx-curly-brace-presence (#10869) 2020-09-14 10:44:03 -07:00
Kamil Gabryjelski
c5193ca018 Re-enable rule no-non-null-assertion (#10864) 2020-09-14 10:40:20 -07:00
Kamil Gabryjelski
1908a94c7e ESLint: Re-enable rule no-restricted-globals (#10863)
* Re-enable rule no-restricted-globals

* Fix missing semicolons
2020-09-14 10:39:46 -07:00
Kamil Gabryjelski
7f1012360a Re-enable no-useless-path-segments rule (#10860) 2020-09-14 10:38:18 -07:00
Kamil Gabryjelski
906a629b33 Re-enable rule no-unused-state (#10871) 2020-09-14 10:31:16 -07:00
Kamil Gabryjelski
352e8a1afd Re-enable rule prefer-destructuring (only for objects) (#10867) 2020-09-14 10:11:20 -07:00
Kamil Gabryjelski
c51168a30a Re-enable no-confusing-arrow rule (#10874) 2020-09-14 10:03:37 -07:00
Yongjie Zhao
a324fbd2eb Adding editorconfig setting for IDE hints (#10855)
* Adding editorconfig setting for IDE hints

* adding license to new file
2020-09-14 08:19:23 -07:00
Yongjie Zhao
b4df053156 Improvement contributing.md (#10859)
* Improvement contributing.md

* update
2020-09-14 08:12:53 -07:00
Kamil Gabryjelski
8a774d59ed Eslint dependencies versions updates (#10839)
* Update eslint version to 7.8.1

* Give names to unnamed functions  to fix lint errors

* Update eslint-import-resolver-webpack

* Update eslint-plugin-cypress

* Add eslint-plugin-react-hooks

* Update necessary peer dependencies for eslint-config-airbnb

* Update eslint airbnb config and ts plugins

* Remove "this" from functional component

* Disable all rules that cause new errors

* Fix linting errors in tests

* Add licenses to .eslintrc files

* Add path and zlib to package.json

* Disable incompatible rule in eslint-plugin-cypress

* Remove redundant config for typescript linting

* Mark disabled rules with comments

* Remove path and zlib from deps, disable import rule for webpack files
2020-09-13 23:59:02 -07:00
Jesse Yang
1f31e0eb38 feat: server side dashboard css for less repaint (#10850) 2020-09-13 21:32:43 -07:00
Moriah Kreeger
686c19abcf Fix test_connection POST body (#10846) 2020-09-11 23:33:43 -07:00
Maxime Beauchemin
6cb67017a5 style: white toolbar for SQL Lab (#10851) 2020-09-11 23:27:25 -07:00
Phillip Kelley-Dotson
85a916036c docs(new docs site): removes old sphinx doc site with gatsby (#10784)
* Remove old apache sphinx doc site with refreshed gatsby

* remove rando

* add licenses

* excluing .mdx files from license checks

* fixes

* Clean up sphinx references

* Addressed comments

* colors and tweaks

* more fixes

* add dummy docs/requirements.txt to satisfy stupid fossa

* cp .prettierrc

* more licenses

* minor touchups

* reqs

* removing old videos

* add github buttons

* prettier

* tweaks

* Eugenia/Fix some of the images and modified some of database pages

* add subheadernav

* add side headers nav and more responsive design for docs

* update resources page and other styling updates

* linting

* tweaks

* removing windows and align:center

* update resources

* remove links and and card hearder

* lots of styling tweaks

* Tweaks and minor improvements

* lint

* fix CI

* trigger pre-comimt

* rererefix CI

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
Co-authored-by: Eugenia Moreno <eugenia@Eugenias-MBP.fios-router.home>
Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-11 22:59:12 -07:00
Moriah Kreeger
7cd96edcdf feat: add/edit database modal form sections UI (#10745) 2020-09-11 09:53:18 -07:00
Daniel Vaz Gaspar
7b2200437e fix(test): missing auth on tests (#10842)
* fix(test): missing auth on tests

* fix mock

* make test login more inline with other tests
2020-09-11 14:28:41 +01:00
cyw233
7c11c9ce16 update all python version in the Dockerfile to 3.7 (#10841)
* update all python version in the Dockerfile to 3.7

* update ubuntu 18.04 to ubuntu 20.04
2020-09-11 14:33:15 +03:00
Daniel Vaz Gaspar
136f90f87c feat: SavedQuery REST API for bulk delete and new API fields (#10793)
* feat: SavedQuery REST API for bulk delete

* fix, singular msg and test

* remove 403 from OpenAPI spec

* filter by current user using created_by add sql_tables field

* fixes for new filter, add user field on pre_update, pre_add

* add lru cache to property

* Revert "add lru cache to property"

This reverts commit ad0d9428
2020-09-11 09:36:47 +01:00
John Bodley
a3e2e65121 fix: Making the database read-only (#10823)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-10 16:23:24 -07:00
Jesse Yang
d80f406239 build: optimize webpack code split (#10831) 2020-09-10 15:11:21 -07:00
Lily Kuang
f0545bfe50 fix(databases): test connection api endpoint (#10824)
* fix test connection with extra

* fix lint and allow_none server_cert

* update test connection tests
2020-09-10 21:49:14 +01:00
Bogdan
ac2937a6c5 fix: use nullpool in the celery workers (#10819)
* Use nullpool in the celery workers

* Address comments

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-10 13:29:57 -07:00
Jesse Yang
dd7f3d5402 build: split hive and presto tests to separate jobs (#10821)
* build: split hive and presto tests to separate jobs

* Must install doc dependencies, too
2020-09-10 13:12:00 -07:00
Ville Brofeldt
8a9ae811d0 fix(sql-lab): relax column name restrictions (#10816) 2020-09-10 07:54:37 +03:00
Daniel Vaz Gaspar
e6a4808cb7 fix(tests): export dataset tests fails with presto (#10818)
* fix(tests): export dataset tests fails with presto

* debug

* debug

* skip dataset export test on presto

* add TODO on failing test
2020-09-09 21:46:28 -07:00
Grace Guo
c2216e029d Revert "chore: add logging for "dashboard" action (#10744)" (#10822)
This reverts commit e0ad9935c1.
2020-09-09 14:44:07 -07:00
rubenSastre
e4ffaecc72 Spanish translations (#10798)
* regenerate pot and some spanish translations

* keep apache license text

* json format

* priettier applied to json

* end of file test

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset/translations/es/LC_MESSAGES/messages.po

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* consistency for Charts translation

* json file with standarize Chart

* solve CI errors

* fix trailing-whitespace

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-09-09 13:38:18 -07:00
Lily Kuang
8a3ac70c06 feat(databases): test connection api (#10723)
* test connection api on databases

* update test connection tests

* update database api test and open api description

* moved test connection to commands

* update error message

* fix isort

* fix mypy

* fix black

* fix mypy pre commit
2020-09-09 13:37:48 -07:00
Jesse Yang
9a59bdda48 refactor: merge/upgrade superset-ui packages (#10790)
* refactor: merge/upgrade superset-ui packages

* Fix flaky big number test

* Fix Flaky AdhocFilters test
2020-09-09 13:18:55 -07:00
Fabio Guarini
3b4a992861 fix: bump node version on Dockerfile to be on par with docker-compose (#10813) 2020-09-09 07:53:03 -07:00
Daniel Vaz Gaspar
782f678732 fix: Database API missing allow none on fields (#10795)
* fix: Database API missing allow none on fields

* one missing
2020-09-09 09:35:27 +01:00
Ville Brofeldt
9a6697141d chore: deprecate python 3.6 support (#10803) 2020-09-09 08:51:55 +03:00
ʈᵃᵢ
50672bb11b feat: database delete warning (#10800) 2020-09-08 18:54:02 -07:00
Jesse Yang
cda232bf15 fix: ColorSchemeControl should not use CreatableSelect (#10814)
* fix: ColorSchemeControl should not be CreatableSelect

   Currently if you type to search in ColorSchemeControl it crashes the
whole page.

* Make it possible to filter by label

* Fix ColorSchemeControl unit test
2020-09-08 18:38:50 -07:00
Ville Brofeldt
3ae80d3b98 test: add rls jinja extra cache key test (#10810) 2020-09-08 07:42:48 +03:00
David Aaron Suddjian
1d76c5906e docs: Add a note to contributing.md on reporting security vulnerabilities (#10796)
* a note on reporting security vulnerabilities

* mention apache security guidelines
2020-09-07 15:51:24 +01:00
gtg472b
702cfe938f Fix: Include RLS filters for cache keys (#10805)
* Fix: Include RLS filters for cache keys

This fix makes sure that RLS filters are searched for templatable jinja content, ensuring cached visualizations aren't shown to the wrong user.

* Fix: Include RLS filters for cache keys

This fix makes sure that RLS filters are searched for templatable jinja content, ensuring cached visualizations aren't shown to the wrong user.

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-09-07 17:49:13 +03:00
ʈᵃᵢ
92f2353f80 feat: filters for database list view (#10772) 2020-09-04 16:23:38 -07:00
Daniel Vaz Gaspar
c1ff1c5d70 fix: MVC show saved query (#10781)
* fix: MVC show saved query

* remove it completely

* fix lint
2020-09-04 15:52:03 -07:00
Jason Davis
bc4f98e5b8 added creator column and adjusted order columns (#10789)
Co-authored-by: Jason Davis <@dropbox.com>
2020-09-04 10:29:36 -07:00
Daniel Vaz Gaspar
f6858256f4 security: disallow uuid package on jinja2 (#10794)
* fix: disallow uuid package on jinja2

* update UPDATING.md

* Update UPDATING.md

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-09-04 16:37:14 +01:00
Daniel Vaz Gaspar
5199423ad1 feat: CRUD REST API for saved queries (#10777)
* feat: CRUD REST API for saved queries

* debug test

* fix test

* use pytest fixtures
2020-09-03 15:46:27 -07:00
Grace Guo
596200528d fix: disable domain sharding on explore view (#10787) 2020-09-03 15:42:39 -07:00
Shaoqing Hu
9bcb15091c fix: can not type 0.05 in TextControl (#10778) 2020-09-03 12:11:34 -07:00
Ville Brofeldt
70c6764780 fix: pivot table timestamp grouping (#10774)
* fix: pivot table timestamp grouping

* address comments
2020-09-03 19:49:54 +03:00
Jason Davis
54ae3b044f fix: add validator information to email/slack alerts (#10762)
* added validator info to alerts

* adjusted format of messages

* added nits

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-03 08:15:05 -07:00
Evan Rusackas
824cea24ba More Label touchups (margins) (#10722)
* labels with onClick don't need .pointer. No labels need `m-r-5`

* making Timer a proper Label

* a little linting

* addresing (helpful, thanks) comment
2020-09-02 23:13:58 -07:00
John Bodley
1ee87cc4d1 fix: dashboard extra filters (#10692)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-09-02 16:03:25 -07:00
Craig Rueda
45f4c689a2 fix: re-installing local superset in cache image (#10766)
* fix: re-installing local superset in cache image

* Fixing webpack
2020-09-02 13:01:36 -07:00
ʈᵃᵢ
7bccb38a60 feat: SIP-34 table list view for databases (#10705) 2020-09-02 11:48:21 -07:00
ʈᵃᵢ
5a4370012b refactor: convert DatasetList schema filter to use new distinct api (#10746) 2020-09-02 11:07:37 -07:00
Evan Rusackas
e0deaad5e3 chore: removing fsevents dependency (#10751) 2020-09-02 10:37:23 -07:00
Will Barrett
ff60e5c62a Fix precommit hook for docs/installation.rst (#10759)
* Fix precommit hook for docs/installation.rst

* Fix underline too short
2020-09-02 10:06:51 -07:00
Daniel Vaz Gaspar
77a3167412 feat(database): POST, PUT, DELETE API endpoints (#10741)
* feat(database): POST, PUT, DELETE API endpoints

* post tests

* more tests

* lint

* lint

* debug ci

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* cleanup

* handle db connection failures

* lint

* skip hive and presto for connection fail test

* fix typo
2020-09-02 09:58:08 -07:00
Jagadish
b5aecaff5c docs: Update OAuth configuration in installation.rst (#10748)
Co-authored-by: jagadish <jagadish@nineleaps.com>
2020-09-02 16:10:49 +01:00
Ville Brofeldt
8c564fba38 feat(viz): add ECharts Timeseries chart (#10752)
* initial commit

* Change reference to new echarts plugin

* initial commit

* Change reference to new echarts plugin

* moving dependencies to plugin

* adding pie chart

* rename piechart key

* lint

* Bump packages and implement echarts colors

* remove pie for now

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-09-02 09:18:59 +03:00
Grace Guo
e0ad9935c1 chore: add logging for "dashboard" action (#10744) 2020-09-01 20:14:22 -07:00
Jason Davis
c1f2214d7c merge db migrations (#10758)
Co-authored-by: Jason Davis <@dropbox.com>
2020-09-01 17:59:02 -07:00
Vigneshkumar Chinnachamy
aeaee811cd fix: local docker deployment (#10738)
Fix issue where dependencies listed in ./docker/requirements-local.txt are not installed
2020-09-01 17:01:10 -07:00
Evan Rusackas
5a106eb8f5 moving all @types to dev dependencies (#10750) 2020-09-01 15:32:39 -07:00
kxu
68d5a2bb7f docs: Updated Docker local install instructions (#10511)
* Updated Docker local install instructions

Updated Docker local install instructions with more detail, structure, and additional info for Linus and Windows users.

* Updated with note on Windows environment
2020-09-01 13:52:22 -07:00
Jason Davis
b59f6b1833 feat: refractored SQL-based alerting framework (#10605)
* added new tables for alerting refractor

* reformatted inheritance structure

* added workflow for updated framework

* added suggested changes

* cleaned up changes

* added obervations to alert table to enable view

* added comments

* added requested changes

* fix tests

* added styling changes

* mypy

* added requested changes

* updated operator logic

* requested changes, 1 validator, styling changes

* refactored tests

* fix test alert workflow

* fixed create_alert in test

Co-authored-by: Jason Davis <@dropbox.com>
2020-09-01 13:36:02 -07:00
Bogdan
4572ebb600 chore: log cache keys to the logs (#10678)
* Log cache keys to the logs

* Add tests

* Use separate table for the cache keys

* Add migration for the cache lookup table

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-01 09:41:25 -07:00
Evan Rusackas
807bd656c6 Fix: Rejiggering some dependencies, trying to get CI to pass (#10747)
* removing two duplicate devdependencies - leaving dependencies

* bumping shuffled dependencies, making fsevents non-optional

* bumping @babel/cli

* Another bump
2020-08-31 20:50:46 -07:00
Evan Rusackas
cd144b68ac style: Tabs now support AntD compound components (+ basic stories) (#10728)
* Supporting compound coponents, adding stories

* Adding a coupe o' knobs just for fun.
2020-08-31 13:56:59 -07:00
Ville Brofeldt
4392c4608f chore: bump pyarrow (#10733)
* chore: bump pandas an pyarrow

* remove unsupported kwargs

* fix types

* move pandas back to 1.0 branch due to possible MultiIndex regression
2020-08-31 19:55:53 +03:00
chuancy
234b6bbba9 fix(db-engine-spec): execute oracle DML statement bug in sqllab (#10706)
* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-31 08:03:07 +03:00
Maxime Beauchemin
3d8857ecc8 style: rename 'Source' top nav item to 'Data' (#10715)
* style: rename 'Source' top nav item to 'Data'

* Fix tests

* tables -> datasets

* rename datasource -> dataset

* lint

* more renaming

* use npm ci
2020-08-29 18:09:47 -07:00
Evan Rusackas
9fe30ab71e style: Pass at propagating (and enhancing) Button component throughout Superset (#10649)
* getting rid of weird focus/active outline ring

* Buttons... buttons _everywhere_

* linting

* Nixing views/CRUD/dataset/Button component

* fixing 2 typing errors

* fixing more TS errors

* prefer src path for include

* one more real button, one less CSS class

* one more "button" to "Button"

* Published Status is now a proper clickable Label

* nixing the CRUD button again

* touching up stories, with SupersetButton story

* SIP-34 button colors

* adding polished package to mix colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* more abstraction from bsStyle/bsSize props

* exchanging styles for a prop

* linting

* restoring feature flag to stock

* using src alias

* last <button> replacement

* this classname would never be applied

* more linting action

* fixing unsupported bsSize 'medium', and cta typing error

* more cta action

* unnecessary styles

* errant bsSize prop

* cleanup

* tweaks to make new New button work

* Linting

* fixing a couple tests

* fixing theme based test failure

* margin tweak for NEW button

* another fixed test

* another fixed test

* fixing two more tests

* fixing last broken tests.

* always be linting

* Adding tertiary/dashed buttons

* cleaning up QueryAndSave buttons

* fixing "link" button styles

* fixing/updating link button styles

* cta buttons on Modal component

* linting.

* exporting button story knobs, making ALL knobs safe for export.

* capitalizing a file... no big whoop

* Basic button tests

* renaming button - temporarily

* renaming file to fix capitalization issue

* passing theme through to a difficult popover.

* fixin' a newly busted unit test

* lint fixin'

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* touching up stories, with SupersetButton story

* SIP-34 button colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* linting

* restoring feature flag to stock

* cleanup

* Linting

* renaming button - temporarily

* renaming file to fix capitalization issue

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* nixing new modal button

* Fixing another popover/button issue that should break cypress

* lint 

* passing classNames through to new button (should fix some tests)

* cleaning unused classes, making cypress tests use data attrs

* fixin' the test

* fixing another class-based test with data-test attr

* no longer passing theme as prop to buttons in popovers... themeprovider is better

* outline/border tweaks!
2020-08-28 17:34:28 -07:00
Bogdan
33fa9ebff1 Covert celery tests to the pytest (#10704)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-28 17:04:30 -07:00
Erik Ritter
4e01f39733 chore: update samesite config documentation (#10720) 2020-08-28 16:14:37 -07:00
ʈᵃᵢ
d3bdea3805 fix: move menu reorg logic from crud app into Menu component (#10717) 2020-08-28 13:56:01 -07:00
Ville Brofeldt
58b075bc17 fix(jinja): extract form_data from json body (#10684)
* fix(jinja): extract form_data from json body

* add test

* disable test for presto
2020-08-28 21:26:07 +03:00
Ville Brofeldt
dd0bc472e3 refactor(database): use SupersetResultSet on SqlaTable.get_df() (#10707)
* refactor(database): use SupersetResultSet on SqlaTable.get_df()

* lint

* change cypress test
2020-08-28 21:12:03 +03:00
Daniel Vaz Gaspar
3e374dab07 fix: change public role like gamma procedure (#10674)
* fix: change public role like gamma procedure

* lint and updating UPDATING with breaking change

* fix updating text

* add test and support PUBLIC_ROLE_LIKE_GAMMA

* fix, cleanup tests

* fix, new test

* fix, public default

* Update superset/config.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* add simple public welcome page

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-28 10:49:10 +01:00
Moriah Kreeger
c715cad48e feat: base tabbed modal for new database CRUD UI (#10668) 2020-08-27 14:28:06 -07:00
ʈᵃᵢ
937b868321 style: add border between menu and submenu (#10698) 2020-08-27 14:15:22 -07:00
Bogdan
6ed36552e6 Use test name for the custom macros testing: (#10695)
:

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 13:12:24 -07:00
Lily Kuang
7abdf53944 fix: card view failed cypress tests (#10699) 2020-08-27 11:33:12 -07:00
Moriah Kreeger
8d94534881 style: Move security/manage navigation tabs into a settings dropdown (#10439) 2020-08-27 10:21:51 -07:00
Grace Guo
7fc227c92d fix: shorten url with extra request parameters (#10693) 2020-08-27 09:53:20 -07:00
Bogdan
19a9bcc9c5 chore: ci Initial hive support (#10593)
* Initial hive support

* Clone hive setup

* Make hive tests work locally

* Debugging presto failure

* sleep in dataset test

* Address comments

* Address comments

* Pin ipython, exclude new pylint rules

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 09:49:18 -07:00
ʈᵃᵢ
81525c3e9d feat(listview): set default view mode based on THUMBNAIL feature flag (#10691)
* feat(listview): set default view mode based on THUMBNAIL feature flag

* add spec

* better generic typing for ListView

* lint

* fix specs
2020-08-27 09:40:32 -07:00
Lily Kuang
bb92c1f84d feat: chart and dashboard card list view e2e cypress test (#10669)
* card view cypress tests

* update test config

* chart filter cypress test

* move setting to superset test config

* update test description card view
2020-08-27 09:38:12 -07:00
Ville Brofeldt
aaf04cc344 fix(filter-box): don't add empty filter to filtersChoices (#10687)
* fix(filter-box): don't add empty filter to filtersChoices

* add test
2020-08-27 12:36:02 +03:00
John Bodley
8581bda2f1 chore: Fix indentation issue (#10690) 2020-08-26 20:09:09 -07:00
ʈᵃᵢ
6ff96cfc72 refactor: useListViewResource hook for charts, dashboards, datasets (#10680) 2020-08-26 15:39:18 -07:00
ʈᵃᵢ
bc0fc4ea25 fix: SubMenu css (#10682) 2020-08-26 14:00:20 -07:00
Evan Rusackas
a95e5c9327 fix: layout flexiness (#10681) 2020-08-26 09:49:58 -07:00
Ville Brofeldt
4251b4e294 feat(row-level-security): add hook for customizing form dropdowns (#10683) 2020-08-26 11:55:35 +03:00
henryyeh
a6101f72c9 fix: only call signal if executing on the main thread (#10677) 2020-08-25 16:57:58 -07:00
John Bodley
502f4db6f9 feature: Adding extra_filters to warm_up_cache (#10675)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-25 15:19:34 -07:00
ʈᵃᵢ
fe574fdaa7 fix(sqllab): log exceptions caused by the user as debug and not error (#10676) 2020-08-25 14:35:50 -07:00
Evan Rusackas
4b40d44b5c style: Fancier menus, more SIP-34-ish (#10423)
* style: shinier menus

* fixing mouseover glitch

* unused import

* rm emotion-reset

* restoring default config values

* lint fixes 

* a bit more pizzaz to the underlines (max's idea), fading active background

* simplifying navtitle -> label

* RBNavDropdown  -> ReactBootstrapNavDropdown

* nixing whitespace

* replacing !importants with better selector specificity

* moving Menu LESS into Emotion

* no more border!

* fixing border issue

* language picker, account dropdown now use new dropdown component

* nixing whitespace in comment

* nixing duplicate styling

* removing borders on FAB navbar

* explicit font coloring

* linting
2020-08-24 23:16:44 -07:00
Evan Rusackas
fdfb7cdfd2 Eslint error cleanup (#10657)
* moving two console errors to logger errors

* nixing unused map index

* nixing unused param

* linting

* changing an alert to a toast

* fixing tests

* lint fix

* one letter change, just to see if iti gets CI to pass this test.
2020-08-24 14:04:27 -07:00
Ville Brofeldt
9461f9c1e0 fix(db_engine_specs): improve Presto column type matching (#10658)
* fix: improve Presto column type matching

* add optional callback to type map and add tests

* lint

* change private to public
2020-08-24 22:42:07 +03:00
Ville Brofeldt
0177c2f591 fix(db_engine_specs): mysql longtext type should not be numeric (#10661) 2020-08-24 21:24:43 +03:00
Will Barrett
52d7671204 Remove incorrect comment (#10652) 2020-08-24 10:40:36 -07:00
auxten
0f44d3edf2 Fix add chart page frontend i18n issue (#9321) 2020-08-22 21:04:18 +03:00
ʈᵃᵢ
45fee60b62 fix: remove FAB rendered menu in favor of react based one (#10401) 2020-08-21 17:19:00 -07:00
Grace Guo
aa8ff8759c feat: use shorten url in standalone iframe (#10651) 2020-08-21 15:27:15 -07:00
ʈᵃᵢ
b86c0e5727 feat(listview): skeleton loading states for table and card collections (#10606) 2020-08-21 10:32:37 -07:00
Evan Rusackas
878f06d133 feat: Getting fancier with Storybook (#10647)
* Niftier paddings

* upgrading storybook, fixing glob pattern

* moving a couple storybook dependencies to dev dependencies

* fixing annoying lint issue about dev dependencies needing to be dependencies

* adds essential addons, fixes backgrounds

* newline tweaks

* comment about no-extraneous-dependencies, higher specificity on that rule, other linting stuff

* a *python* linter doesn't like this whitespace?!

* putting the linespace back

* ugh, found the space causing CI issues... I think
2020-08-20 22:41:25 -07:00
Maxime Beauchemin
82dda473b1 fix: dedup groupby in viz.py while preserving order (#10633) 2020-08-21 08:02:02 +03:00
Erik Ritter
cb1989a4fd feat: bump superset-ui for certified tag (#10650) 2020-08-20 16:56:18 -07:00
ʈᵃᵢ
7301a363c1 feat: setup react page with submenu for datasources listview (#10642) 2020-08-20 11:42:17 -07:00
Erik Ritter
38da552a57 feat: add certification to metrics (#10630) 2020-08-19 20:45:33 -07:00
Ville Brofeldt
5136c5c16e feat(viz-plugins): add date formatting to pivot-table (#10637)
* feat: make pivot table dates formattable

* Bump npm packages
2020-08-19 23:55:59 +03:00
Evan Rusackas
84d08cb8da fix: controls scroll issue (#10644) 2020-08-19 13:19:40 -07:00
Evan Rusackas
b0380befa1 feat: Allow tests files in /src (plus Label component tests) (#10634)
* allow tests in jest confg

* sample stories for Label component

* passing tests

* stories to tsx!

* excluding knobs exports from published stories

* ts fix

* ts fix

* Label test to TS

* explicitly ignoring test files in webpack bundling

* linting stuff

* adding comment about test file exclusions
2020-08-19 12:54:26 -07:00
Lily Kuang
3f5d5cc0aa fix: remove duplicated params and cache_timeout from list_columns; add viz_type to list_columns (#10643) 2020-08-19 11:59:16 -07:00
Evan Rusackas
d0953874f2 chore: splitting button stories into separate stories (#10631)
* splitting button stories into separate stories

* lint
2020-08-18 22:47:27 -07:00
Grace Guo
3bc79191c4 refactor: remove slice level label_colors from dashboard init load (#10603) 2020-08-18 18:10:06 -07:00
Lily Kuang
a3ac5061fe feat: card view bulk select (#10607) 2020-08-18 18:04:36 -07:00
Evan Rusackas
ec7874ff98 style: Label styling/storybook touchups (#10627)
* colors corrected, hover/cursory only change if there's an onClick

* adding info label, breaking gallery out to its own story

* linting

* fixing bad class name

* now with fading!

* now supporting additional (non-bootstrap) label styles

* adding new secondary/primary labels to gallery

* fixing map key react warning

* using the new secondary label in the ChartList view

* linting

* fixing TS issue
2020-08-18 15:42:00 -07:00
Evan Rusackas
844b471509 fix: removing unsupported modal sizes (#10625)
* fix: removing unsupported modal sizes

* linting!

* NOT specifying bsSize seems to have the same effect as (unsupported) "medium"

* supporting 'large' and 'small' over 'lg' and 'sm'
2020-08-18 14:33:39 -07:00
Ville Brofeldt
ca5dc4256f feat(datasource): remove deleted columns and update column type on metadata refresh (#10619)
* fix: remove missing columns on metadata refresh

* add tests

* lint and simplify

* lint

* reduce locals

* fix label style
2020-08-18 21:47:13 +03:00
Cory Zue
4ee524736d improve documentation for country maps (#10621) 2020-08-18 09:36:35 -07:00
Maxime Beauchemin
0d3caf08e5 chore: npm audit fix as of 2020-08-15 (#10613)
* chore: npm audit fix as of 2020-08-15

* --force

* fixing copy-webpack-plugin

* lint

* resolve conflicts
2020-08-17 15:27:01 -07:00
Daniel Vaz Gaspar
692266f4f5 feat: dataset REST API for distinct values (#10595)
* feat: dataset REST API for distinct values

* add tests and fix lint

* fix mypy, and tests

* fix docs

* fix test

* lint

* fix test
2020-08-17 15:46:59 +01:00
Evan Rusackas
f868580f64 chore: bump react-redux to 5.1.2, whittling console noise (#10602)
* chore: bump react-redux to 5.1.2

* fixing spy, and thus the breaking test.

* relabeling tests to UNSAFE_componentWillReceiveProps because why not.
2020-08-16 21:29:08 -07:00
Evan Rusackas
ed9b6dbf2b fixing console error about bad html attribute (#10604) 2020-08-16 20:21:21 -07:00
Evan Rusackas
08211953b2 chore: migrate console logs to logging service (#10608) 2020-08-16 20:20:47 -07:00
Grace Guo
ca9ca99510 refactor: [migration] convert iframe chart into dashboard markdown component (#10590)
* refactor: [migration] convert iframe chart into dashboard markdown component

* remove 3 viz_types

* fix comments
2020-08-16 14:43:30 -07:00
Lily Kuang
03a62f15d8 feat: sort card view by Alphabetical, Recently Modified, and Least Recently Modified (#10601) 2020-08-14 15:07:37 -07:00
Ville Brofeldt
acb00f509c fix(chart-data-api): assert referenced columns are present in datasource (#10451)
* fix(chart-data-api): assert requested columns are present in datasource

* add filter tests

* add column_names to AnnotationDatasource

* add assertion for simple metrics

* lint
2020-08-14 20:58:24 +03:00
Ville Brofeldt
6c09b938fe docs: update CHANGELOG.md and UPDATING.md for 0.37.0 (#10600) 2020-08-14 18:56:50 +03:00
Daniel Vaz Gaspar
4dd1d1df5e fix(thumbnails): missing field, logging and new config var (#10562)
* fix(thumbnails): missing field, logging and new config var

* deprecate EMAIL_REPORTS_WEBDRIVER

* fix after merge and conflicts

* fix tests

* black
2020-08-14 14:12:44 +01:00
ʈᵃᵢ
db88cec431 feat: SIP-34 card/grid views for dashboards and charts (#10526) 2020-08-13 14:46:56 -07:00
Evan Rusackas
a3fd2b420e fix: More tweaks needed after adding Doctype tag (#10504)
* fixing last-of-type specificity

* Simplifying/consolidating styles

* fixing filterbox in explore

* linting

* adding some px to font sizes

* fixing in-dash overflow

* removing px for one special fontsize case

* simplifying, addressing comments
2020-08-13 11:50:14 -07:00
Ville Brofeldt
c0ebd7f434 fix: show error if rolling window returns empty df (#10572)
* fix: show error if rolling window returns empty df

* add test
2020-08-13 20:51:03 +03:00
Daniel Vaz Gaspar
11da6ee812 fix: dataset delete and perm delete (#10578) 2020-08-13 10:18:13 +01:00
Erik Ritter
bd88e12b8b feat: add extra column to tables and sql_metrics (#10592) 2020-08-12 15:27:29 -07:00
Craig Rueda
2aaa4d92d9 chore: Migrating reports to AuthWebdriverProxy (#10567)
* Migrating reports to AuthWebdriverProxy

* Extracting out webdriver proxy / Adding thumbnail tests to CI

* Adding license

* Adding license again

* Empty commit

* Adding thumbnail tests to CI

* Switching thumbnail test to Postgres

* Linting

* Adding mypy:ignore / removing thumbnail tests from CI

* Putting ignore statement back

* Updating docs

* First cut at authprovider

* First cut at authprovider mostly working - still needs more tests

* Auth provider tests added

* Linting

* Linting again...

* Linting again...

* Busting CI cache

* Reverting workflow change

* Fixing dataclasses

* Reverting back to master

* linting?

* Reverting installation.rst

* Reverting package-lock.json

* Addressing feedback

* Blacking

* Lazy logging strings

* UPDATING.md note
2020-08-12 13:28:41 -07:00
John Bodley
8fb304d665 docs: Update engine installation (#10509)
* Update installation.rst

* Update installation.rst

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-12 09:58:42 -07:00
Ville Brofeldt
85c0cad816 fix: add None checking to cast_to_num (#10584)
* fix: add None checking to cast_to_num

* fix doctest
2020-08-12 19:58:14 +03:00
Erik Ritter
a8197976fe fix: error message modal overflow (#10580) 2020-08-11 17:20:39 -07:00
Erik Ritter
a45f28ed2c Update .asf.yaml (#10581) 2020-08-11 13:17:25 -07:00
Jesse Yang
1b111b677e feat(table-viz): translation and metric column header align right (#10549) 2020-08-11 12:56:32 -07:00
Stuart Hu
890b3ca489 fix: add translate for dropdown menu (#10573)
* fix: translate dropdown menu

Signed-off-by: Stuart Hu <shijiehu@improbable.io>

* Apply suggestions from code review

Co-authored-by: iriswonderland13 <69527796+iriswonderland13@users.noreply.github.com>

Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: iriswonderland13 <69527796+iriswonderland13@users.noreply.github.com>
2020-08-11 12:26:49 -07:00
Jason Davis
c0bb86d0d6 feat: slack integration for SQL-based alerts (#10566)
* add slack functionality

* deleted unused variable

* updated test

* black

* fix rebase

* added nits

* added slack no screenshot integration

* isort

* added namedtuple for screenshot

* added test

* fix precommit

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-11 11:15:31 -07:00
Daniel Vaz Gaspar
b7650b9f57 fix: disable false positive error (#10576) 2020-08-11 18:20:57 +01:00
David Aaron Suddjian
83af9d12f8 fix(sqllab): Handle long table names in SQL Lab (#10518)
* widen the autocomplete menu for table names

* display the full table name in a tooltip

* license

* Update superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* src importing

* move autocomplete width css to main.less

* use html title attribute instead of tooltip

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-08-11 09:50:46 -07:00
Jesse Yang
a37b635674 fix(dashboard): add animation state to fix tab switch re-renders (#10475) 2020-08-11 00:57:50 -07:00
Maxime Beauchemin
613dd12fbf fix: misaligned LimitControl buttons and port jsx->tsx (#10529)
* fix: misaligned LimitControl buttons and port jsx->tsx

* addressed comments
2020-08-10 15:35:39 -07:00
Bogdan
0071d374da chore: move load examples to the fixture (#10545)
* Move load examples to the fixture

* Update tests/celery_tests.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Address feedback

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 13:20:19 -07:00
Hossein Torabi
8190dcb61f fix drill installation (#10558) 2020-08-10 11:39:46 -07:00
Bogdan
101e5b670b chore: clean up csv tests (#10556)
* Clean up csv tests

* Update tests/base_tests.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update tests/base_tests.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* import optional

* Fix mypy error

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-10 11:22:38 -07:00
Jason Davis
8b9292ed05 fix: add retry to SQL-based alerting celery task (#10542)
* added retry and minimized sqlalchemy object lives

* pylint

* added try catch

* adjusted naming

* added scoped session

* update tests for dbsession

* added requested changes

* nit todo

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-10 10:20:43 -07:00
John Bodley
5e944e5730 fix: Resolves #10535 (#10536)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-10 09:59:34 -07:00
Craig Rueda
5a908d4513 fix: Updating Dockerfile to work with updated python requirements. (#10550)
* Updating Dockerfile to work with updated python requirements.

* Adding a Docker build step to CI workflow

* Trying docker build-push

* Linting Dockerfile-dev

* Switching to dev dockerfile
2020-08-08 18:56:20 -07:00
Bogdan
fb051e9a51 Removing trailing space and fix CI (#10557)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-08 12:33:03 -07:00
David Aaron Suddjian
7f84927504 fix(dashboard): changing the chart title, except not (#10527)
* changing slice names in dashboard should not change chart title

* comprehensions > loops
2020-08-07 18:06:58 -07:00
kxu
3b0676f991 docs: add additional project tags (#10553)
Add additional project tags to improve project discoverability in GitHub
2020-08-07 15:55:53 -07:00
Jesse Yang
b6c6b6800a fix: table viz query mode switch not working (#10552) 2020-08-07 14:15:03 -07:00
Erik Ritter
4765f8b10d fix: embedded chart height (#10551) 2020-08-07 13:53:18 -07:00
Tanmay Laud
a6fa02aaec chore: Migrate Timer component from jsx to tsx (#10455)
* migrated LanguagePicker.jsx to tsx

* Migrated Menu.jsx to tsx

* migrated MenuObject.jsx to tsx

* migrated NewMenu.jsx to tsx

* Migrated UserMenu.jsx to tsx

* removed unnecessary export from UserMenu

* added language definition in LanguagePicker

* removed unnecessary exports from Menu.tsx

* used typeof guard for childs

* changed LanguageProps to Languages

* removed unnecessary type casting

* fixed linting errors

* migrated Checkbox to tsx

* Migrated Timer component to tsx

* fixed linting errors

* fixed test cases

* removed unused import in timer spec

* reverting changes

* renamed and then modified Timer

* changes for review comments

* fixed incorrect clear

* using stopTimer in stopwatch

* fixed lint issues

* added explicit timer cleanup

* fixed lint issue

* fixed memory leak

* renamed Timer

* added changes after git mv
2020-08-07 09:30:17 -07:00
kxu
90c9417b16 docs: Update and refresh homepage of superset.apache.org (#10477)
* Update and refresh Index

Update and refresh index with additional links to community resources, new links to `Databases' section directly to parts of the tutorial that talk about that database,  connect, align Superset topline features with same language as in GitHub

* Added link to Superset users

* Update with relative links

* Add link to docs repo

Add link to docs repo on the homepage to encourage easy access for community contribution.

* Update index.rst
2020-08-07 09:28:14 -07:00
Ville Brofeldt
08358d623b fix: handle query exceptions gracefully (#10548)
* fix: handle query exceptions gracefully

* add more recasts

* add test

* disable test for presto

* switch to SQLA error
2020-08-07 17:37:40 +03:00
Jesse Yang
ea0db0d195 bugfix: table chart query mode initial value (#10544) 2020-08-07 02:25:48 -07:00
Ville Brofeldt
363abfa1a5 fix: remove unnecessary exception when exploring non-legacy viz plugins (#10538)
* fix: remove unnecessary exception when exploring non-legacy viz plugins

* lint
2020-08-07 08:41:39 +03:00
Maxime Beauchemin
0bad77f0fe chore: TypeScript <Label /> (#10494)
* chore: TypeScript <Label />

* rebase

* chore: TypeScript <Label />

* rebase

* A bunch o' test fixes. One more to go!

* helper for mountying Emotional components with Enzyme

* asf license

* fixed last test, some linting

* improve the storybook

* Adressing comments

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-08-06 22:33:07 -07:00
Ville Brofeldt
96b9ba3364 ci: bump pre-commit py36 to py37 (#10541)
* ci: bump pre-commit py36 to py37

* add 3rd party for py37

* lint

* yet more lint
2020-08-07 06:54:22 +03:00
Erik Ritter
fd2d1c58c5 Revert "chore: Cleanup database sessions (#10427)" (#10537)
This reverts commit 7645fc85c3.
2020-08-06 15:33:48 -07:00
Erik Ritter
2055ecc1ba feat: refactor error components and add database issue code (#10473)
* feat: refactor error components and add database issue code

* Apply suggestions from code review

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2020-08-06 13:22:24 -07:00
Bogdan
62b873e3da feat: welcome presto to the suite of tested databases (#10498)
* Add presto to the CI

Sample test data

Datetime conversion

Sample test data

Fix tests

* TODO to switch to timestamps

* Address feedback

* Update requirements

* Add TODOs

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-06 12:07:22 -07:00
Daniel Vaz Gaspar
749581d534 fix(log): don't log exceptions on test connection (#10522)
* fix(log): don't log exceptions on test connection

* fix lint
2020-08-06 07:58:22 +01:00
Maxime Beauchemin
ece91928a9 style: use tabs in dashboard edit pane (#10394)
* style: use tabs in dashboard edit pane

* fix tests

* more hackin'

* getting ready to rip cell measurer

* working

* pogress

* Fix cards

* done

* fix jest

* fix cy
2020-08-05 18:53:53 -07:00
Natalie Ruhe
51a88cb19b feat: Add antd to the codebase (#10508) 2020-08-05 13:50:30 -07:00
Ville Brofeldt
3983fff084 ci: bump tests to 3.7 and add support for 3.8 (#10110) 2020-08-05 13:29:07 +03:00
simchaNielsen
57dc7622b4 fix: show label for filters in filter box in explore (#10412)
* fix: show label for filters in filter box in explore

* test: add test for label in filter box

* test: add test / fix lint

* fix: fix CR notes

* refactor: add label propType to FilterBoxItemControl.jsx
2020-08-05 09:23:11 +03:00
Evan Rusackas
3d74c3ce56 feat: storybook for Icon component (#10515)
* storybook for Icon component

* fixing webpack aliases

* linting 

* Icons are now in a nice little grid.

* lint

* EOF fix for alert.txt. Ugh.
2020-08-04 22:39:14 -07:00
Hossein Torabi
514b29f6df fix db installaion (#10425) 2020-08-04 21:51:32 -07:00
John Bodley
cda764fd4b chore: Adding pip-compile-multi et al. (#10499)
* chore: Adding pip-compile-multi et al

* Specify requirements.txt path for fossa

* [ci] Fixing CI

Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-08-04 19:31:52 -07:00
Jason Davis
72ced53d2a feat: make screenshot timeout configurable (#10517)
* made screenshot timeout configurable

* added default value to config and refractored use

* black

* updated config comment

* moves config variables to thumbnail section

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 17:16:31 -07:00
Moriah Kreeger
e040bf7acf feat: add favorite star to dashboard and chart lists (#10510) 2020-08-04 16:34:50 -07:00
Moriah Kreeger
523c6b77bf fix: update time range select tooltip (#10458) 2020-08-04 16:34:20 -07:00
Jason Davis
0d91b3ee6e fix: make SQL-based alert email links user friendly (#10519)
* make urls user friendly

* formatting

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 15:45:38 -07:00
Jesse Yang
246add45a0 fix: explore panel missing padding (#10505) 2020-08-04 15:08:28 -07:00
kxu
bdfabc23e7 Add link to July community meetup (#10513)
Add link to July community meetup
2020-08-04 13:29:58 -07:00
Jason Davis
aa479fb002 feat: updated email format for SQL-based email alerts (#10512)
* added sql statement and link to chart in alert email

* pylint

* updated email to include link to alert

* style changes

* pylint

* added todo and fixed formatting of email

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 13:20:02 -07:00
Lily Kuang
fa07506d0d feat: dataset editor improvements (#10444) 2020-08-04 11:52:35 -07:00
Jason Davis
9c5b0e1c86 fix: refactored SQL-based alerts to not pass sqlalchemy objects as args (#10506)
* refractored alerting to not pass sqlalchemy obj as args

* updated to pass only alert id as arg

* used object id instead of argument

* updated alerts_tests.py to reflect change

Co-authored-by: Jason Davis <@dropbox.com>
2020-08-04 09:52:32 -07:00
Evan Rusackas
5bb8b9790f docs: new contributing language around adding new plugins (#10507)
* Update CONTRIBUTING.md

* nixing bugfix line (unnecessary)

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>

* proper caps on TypeScript

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-08-03 20:14:25 -07:00
Maxime Beauchemin
c58bb852db docs: add a '.asf.yaml' file to configure our GitHub (#10502)
* docs: add a '.asf.yaml' file to configure our GitHub

More info here:
https://cwiki.apache.org/confluence/display/INFRA/git+-+.asf.yaml+features#git.asf.yamlfeatures-GitHubsettings

Where I found out:
https://issues.apache.org/jira/browse/INFRA-20621

* Addressing comments
2020-08-03 17:45:05 -07:00
kxu
d6b7cae5de docs: Add supported database logos (#10368) 2020-08-03 13:50:52 -07:00
Hossein Torabi
825f993dcb authentication type methods docs (#10378) 2020-08-03 12:42:03 -07:00
Bogdan
ab404ea2cf Sample test data (#10487)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-03 09:08:49 -07:00
John Bodley
821916a681 chore: pre-commit run --all-files (#10500)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-08-02 14:32:17 -07:00
Jesse Yang
ce10e13ec3 test: schedules test refactor (#10492) 2020-07-31 12:05:39 -07:00
Stuart Hu
704f89c1db add translate string to zh locale (#10481)
Signed-off-by: Stuart Hu <shijiehu@improbable.io>
2020-07-31 11:23:29 -07:00
Ville Brofeldt
a43ee22f11 style: replace inclusive/exclusive on DateFilterControl with </≤ (#10420)
* feat: improve filter control tooltips

* add styles

* break out utils into own file

* lint

* add tests

* styled component now working

* lint

* add license headers

* replace shallow with mount due to withTheme

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-07-31 20:06:04 +03:00
Ville Brofeldt
9eab29aeaa fix: enforce mandatory chart name on save and edit (#10482)
* fix: show empty charts as empty in chart list view

* migrate ControlLabel to FormLabel and enforce requred fields

* lint

* reorder buttons
2020-07-31 19:30:02 +03:00
Ville Brofeldt
6243a46ca6 feat: add linear color scale to sunburst chart (#10474) 2020-07-31 19:29:27 +03:00
Ville Brofeldt
9d9c34835a fix: support non-string groupbys for pie chart (#10493)
* chore: add unit tests to pie chart

* refine logic for floats and nans and add more tests
2020-07-31 11:19:21 +03:00
John Bodley
7645fc85c3 chore: Cleanup database sessions (#10427)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-30 23:07:56 -07:00
Jesse Yang
7ff1757448 build: optimize GitHub Actions for building speed and stability (#10485) 2020-07-30 22:28:56 -07:00
Jason Davis
7a329c25e9 feat: add test email functionality to SQL-based email alerts (#10476)
* added test email functionality

* formatting changes

* more formatting

* applied requested changes

* mypy

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-30 13:27:22 -07:00
Jason Davis
c9cb723cab made screenshot drivertype configurable (#10472)
Co-authored-by: Jason Davis <@dropbox.com>
2020-07-30 11:19:29 -07:00
Evan Rusackas
16459ad401 style: DOCTYPE tag, and related CSS cleanup/refactoring (#10302) 2020-07-29 18:49:32 -07:00
Maxime Beauchemin
e6e6b49372 style: FilterSelect style tweaks (#10446)
* style: FilterSelect style tweaks

* using withTheme to avoid raw supersetTheme

* lint

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-07-29 16:55:02 -07:00
Maxime Beauchemin
edaf785815 fix(sqllab): button width isn't wide enough for 'Run Selection' (#10461) 2020-07-29 16:21:21 -07:00
Maxime Beauchemin
796f8e7d26 style: make database list less bloated (#10462) 2020-07-29 16:14:39 -07:00
Erik Ritter
1fbd920902 fix: timeout error message (#10478) 2020-07-29 15:58:46 -07:00
Hossein Torabi
259a344fd1 test: upload excel (#10467) 2020-07-29 12:50:39 -07:00
ʈᵃᵢ
78cad9a4a8 refactor(listviews): use correct filter endpoints for charts and datasets (#10442) 2020-07-29 11:00:19 -07:00
David Aaron Suddjian
7f70a241f9 test: Add jest-enzyme assertion library for better frontend tests (#10459)
* adding jest-enzyme

* enzymeify lots of assertions

* types for jest-enzyme
2020-07-29 10:53:06 -07:00
Daniel Vaz Gaspar
671461d0d0 feat(api): database schemas migration to new API (#10436)
* fix(log): log crashes if expired or not authenticated

* fix lint and rison

* add tests

* more tests

* perm fix

* fix test not found

* JS lint

* fix Jest test
2020-07-29 09:33:15 +01:00
Daniel Vaz Gaspar
0aad9c6f48 fix(log): log endpoint authentication (#10435)
* fix(log): log crashes if expired or not authenticated

* add auth to log endpoint
2020-07-29 09:32:10 +01:00
pphszx
473fe1003a fix: excel sheet upload is not working (#10450)
* remove conflicts with csv upload

* revert StringField

* change description

* remove redundant space

* apply string approach
2020-07-29 10:20:44 +03:00
Moriah Kreeger
c716f7afe8 fix: change "add new slice" copy to "add new chart" (#10457) 2020-07-28 18:28:22 -07:00
Jason Davis
d065633c81 fix: Implement updates to SQL-based email alerts (#10454)
* implemented updates to alerting

* fixed imports and teardown

* changed unittest to pytest conventions

* add app_context to tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-07-28 16:48:42 -07:00
Beto Dealmeida
4f678272d6 fix(presto): Handle ROW data stored as string (#10456)
* Handle ROW data stored as string

* Use destringify

* Fix mypy

* Fix mypy with cast

* Bypass pylint
2020-07-28 16:05:58 -07:00
Lily Kuang
39fad8575c feat: update dataset editor modal (#10347) 2020-07-28 15:53:20 -07:00
Moriah Kreeger
e89e60df76 style: update +NEW button to use Button component, add dropdownItems prop to Button (#10422) 2020-07-28 14:29:52 -07:00
Tanmay Laud
9914ae1b52 chore: migrate Checkbox to tsx (#10453) 2020-07-28 11:46:36 -07:00
Ville Brofeldt
fc28c92f57 feat: support non-numeric columns in pivot table (#10389)
* fix: support non-numeric columns in pivot table

* bump package and add unit tests

* mypy
2020-07-28 10:40:53 +03:00
Maxime Beauchemin
5e93f00a53 docs: pointers to plugins blog post (#10251)
* docs: pointers to plugins blog post

* fix build
2020-07-27 22:46:37 -07:00
Evan Rusackas
98437fb3c9 chore: removing VictoryTheme.js (#10445) 2020-07-27 21:12:45 -07:00
ʈᵃᵢ
6f56cd5e9d feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335) 2020-07-27 10:14:11 -07:00
Tanmay Laud
4b3d6d1fbd chore: migrated Menu component to tsx (#10426)
* migrated LanguagePicker.jsx to tsx

* Migrated Menu.jsx to tsx

* migrated MenuObject.jsx to tsx

* migrated NewMenu.jsx to tsx

* Migrated UserMenu.jsx to tsx

* removed unnecessary export from UserMenu

* added language definition in LanguagePicker

* removed unnecessary exports from Menu.tsx

* used typeof guard for childs

* changed LanguageProps to Languages

* removed unnecessary type casting

* fixed linting errors
2020-07-27 09:03:24 -07:00
Stuart Hu
f7465902e4 update code (#10430)
Signed-off-by: Stuart Hu <shijiehu@improbable.io>
2020-07-27 12:48:11 +03:00
Daniel Vaz Gaspar
562012c586 fix(permissions): alpha role has all full features (#10241)
* fix(permissions): alpha role is inconsistent

* reverse and allow Alpha to access manager menu

* Bump FAB to 3.0.1rc1 to include del permission fix

* add docs, tests and UPDATING

* EOL

* Fix query view for Alpha
2020-07-27 10:32:30 +01:00
Jesse Yang
d45ef1c513 fix(dashboard): chart rerender when switching tabs (#10432) 2020-07-27 11:50:08 +03:00
Ville Brofeldt
5b6ff4944c fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box

* fix time range endpoint schema

* fix test

* bump packages

* fix tests

* lint
2020-07-26 12:40:03 +03:00
Maxime Beauchemin
ea3c3bbae4 style: SIP-34 labels (#10403)
* style: SIP-34 labels

Aligning with SIP-34 designs for labels/pills. Going uppercase fixes the
padding issues we had before, and the rounder pills look better.

Cleaning up some CSS in the process

* lint
2020-07-24 18:03:38 -07:00
ʈᵃᵢ
09dfbab7ed fix: allow creating table option and remove schema requirement in dataset add modal (#10369) 2020-07-24 13:17:44 -07:00
Maxime Beauchemin
0483c26254 style(sqllab): fixed button width as label changes (#10404)
As the label change from RUN to STOP, the row of button shifts
left/right. This fixes the width so that it doesn't jitter.
2020-07-24 10:05:07 -07:00
Maxime Beauchemin
a10b185248 chore: deactive flaky filter test (#10406)
Flaky tests hurt everyone's cognitive load. Let's deactivate for now and
revisit.
2020-07-23 23:33:26 -07:00
Moriah Kreeger
6fde7f8984 style: add fade transition to bottom border on navbar menu items (#10402)
* Add fade transition to bottom border on navbar menu items

* lint fix

* use theme variables

* fix spec
2020-07-23 12:49:28 -07:00
Daniel Vaz Gaspar
2fd37b18e3 fix(api): fixes perf on charts and introduces sorting by database on datasets (#10392) 2020-07-23 11:19:05 -07:00
Daniel Vaz Gaspar
e0264060c3 fix(charts): disable CSRF for chart data endpoint (#10397) 2020-07-23 10:44:25 +01:00
Daniel Vaz Gaspar
98a11e7cf2 fix(api): fixes openapi spec errors and adds a test to validate all spec (#10393) 2020-07-23 10:43:41 +01:00
Maxime Beauchemin
b438ba9ed5 chore: wiring ControlLabel to a new FormLabel (#10388)
* chore: wiring ControlLabel to a new FormLabel

Creating new simple <FormLabel /> component and wiring all <label>
and react-bootstrap.ControlLabel towards it.

FormLabel becomes a pivotal point that can be altered to point to AntD
when we're ready.

* lint

* ViewportControl

* addressing comments
2020-07-23 00:27:22 -07:00
Maxime Beauchemin
ea53916730 feat: SIP-34 explore save modal (#10355)
* feat: SIP-34 explore save modal

* using a const for the session storage key

* backend changes

* minor tweaks

* more tweaks

* radio cosmetics

* styles

* fix tests

* CreatableSelect\!

* Fix cypress & lint

* fix unit

* lint
2020-07-23 00:26:29 -07:00
Ville Brofeldt
9a5d812ee6 fix: pie chart multiple groupbys (#10391) 2020-07-23 09:22:48 +03:00
Lily Kuang
37f9b513fe fix: dataset list filters bug (#10398)
* fix dataset list filters

* update database endpoint query params using rison encode
2020-07-22 22:23:44 -07:00
Ville Brofeldt
3fdc141b82 fix: bump pivot-table and rose (#10400) 2020-07-23 01:02:08 +03:00
Evan Rusackas
ca71d4d6ee feat: adding Storybook to Superset (#10383)
* Storybook added!

* starting to configure junk....

* Storybook works!!!

* Now with theme!

* apache boilerplate

* more apache comments

* lots o' knobs for the Button.... taking stock of the codebase

* more classes, but killing the knob for now.

* nixing unused module

* linting

* fresh package-lock

* now with tooltip!

* adding path and zlip because the linter told me to

* upgrading storybook packages from devdeps

* linting

* removing cruft

* killing an annoying (and old?) lint issue

* lint fix, take 2.

* removing zlib/path

* package lock reset from master

* re-adding new packages for this here PR

* nixing console log, simplifying

* nixing comment TODOs (done enough!)

* basic docs.
2020-07-22 10:21:25 -07:00
Daniel Vaz Gaspar
961108625e fix(datasets): sort and humanized modified by (#10380)
* fix(datasets): sort and humanized modified by

* size xl on changed_on_delta_humanized

* Fix, tests

* Fix, tests

* Fix, frontend tests

* remove debug flag
2020-07-22 11:34:47 +01:00
Ville Brofeldt
5f7bb8e7bd fix: treemap template literal (#10382) 2020-07-22 07:49:35 +03:00
ʈᵃᵢ
4cb44561d7 style: make listviews overflow scroll; convert less to emotion (#10384) 2020-07-21 21:41:09 -07:00
Maxime Beauchemin
485cd11ebb style: SIP-34 control-label (#10381) 2020-07-21 20:30:36 -07:00
Maxime Beauchemin
dc4b1b1271 style: add warning msg to "Change Datasource" modal (#10379) 2020-07-21 10:07:58 -07:00
Maxime Beauchemin
85169f2f1c chore: remove QueryView (ModelView) (#10162)
* chore: deprecate QueryView (ModelView)

* lint

* fix unit tests
2020-07-21 09:14:15 -07:00
Ville Brofeldt
9b8da40295 feat: add TXT as default CSV extension (#10371) 2020-07-21 17:04:29 +03:00
Ville Brofeldt
3c39b26c99 fix: extra filters for chart data endpoint (#10359)
* fix: extra filters

* fix old test and add new test

* add test for null filter value

* leave lowercase until all operators are fully uppercased

* bump packages

* rename test
2020-07-21 08:24:50 +03:00
Maxime Beauchemin
61544de6c3 chore: uniform icons across list views (#10363)
* chore: uniform icons across list views

* smaller modals

* integrating comments
2020-07-20 19:56:51 -07:00
Erik Ritter
5fa4680447 feat: update timeout error UX (#10274) 2020-07-20 15:32:17 -07:00
kxu
d92cb66f60 docs: add and update README badges (#10366) 2020-07-20 14:14:09 -07:00
Phillip Kelley-Dotson
7d10669ca8 move control panel to filterbox folder (#10346) 2020-07-20 13:40:00 -07:00
Bogdan
7075c2ff69 Pin slack client, breaking change (#10345)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-20 09:20:05 -07:00
Ville Brofeldt
7af8b2b3f8 feat: add optional prophet forecasting functionality to chart data api (#10324)
* feat: add prophet post processing operation

* add tests

* lint

* whitespace

* remove whitespace

* address comments

* add note to UPDATING.md
2020-07-20 18:46:51 +03:00
bryanck
73797b8b64 check for empty dataframes before processing results (#10361)
Co-authored-by: Bryan Keller <bkeller@netflix.com>
2020-07-19 17:19:30 +03:00
kxu
1a41ea4988 fix: update community Slack link (#10360) 2020-07-17 14:10:50 -07:00
John Bodley
a7a96430cf chore: Silencing unused thumbnail cache config (#10291) 2020-07-17 10:09:12 -07:00
Erik Ritter
5984df3522 chore: enable no-static-element-interactions eslint rule (#10351) 2020-07-17 09:19:16 -07:00
Daniel Vaz Gaspar
aaad4522f0 fix: group by with timestamp granularity (#10344)
* fix, group by with timestamp granularity

* fix, bug found by mypy

* lint

* comment

* Following ville's solution

* lint and comments
2020-07-17 16:03:39 +01:00
Erik Ritter
09de805017 chore: enable no-unused-vars and prefer-template eslint rules (#10350) 2020-07-16 19:13:59 -07:00
ʈᵃᵢ
0eee6785a8 feat(listviews): SIP-34 Bulk Select (#10298) 2020-07-16 16:07:49 -07:00
Daniel Vaz Gaspar
2b061fc64b fix: modified by column on charts and dashboards (#10340) 2020-07-16 23:15:47 +01:00
Daniel Vaz Gaspar
e4c9c7364b tests: update test run doc and add some improvements (#10339)
* fix: update tests/run.sh README to pytest and some improvements

* update docs

* nit

* fix doc
2020-07-16 13:03:49 +01:00
Daniel Vaz Gaspar
4529812a10 refactor: database API OpenAPI spec and location (#10303)
* refactor: database API OpenAPI spec and location

* fix isort and license

* fix description
2020-07-16 09:01:56 +01:00
Ville Brofeldt
611dd7a8f6 fix: make __time an ok column name in SQL Lab (#10336) 2020-07-16 10:34:50 +03:00
Maxime Beauchemin
2341e8d585 docs(readme): move Slack guidelines to CODE_OF_CONDUCT (#10315)
The Slack community guidelines are kind of wordy and best belong as part
of our code of conduct.

Let's make `README.md` super streamlined, and link out to resources like
this one.
2020-07-15 15:21:20 -07:00
Grace Guo
2f147cfedc fix: add additional ui tweaks (#10275)
* fix: add additional ui tweaks

* use fa fa-close class for x icon

* use new svg icons
2020-07-15 14:05:30 -07:00
Jesse Yang
a94744b984 fix(table-viz): value "undefined" for column.name (#10325)
Bump table viz plugin to fix a bug: apache-superset/superset-ui#686
2020-07-15 13:24:56 -07:00
Daniel Vaz Gaspar
74cb82e1ad fix: humanised changed on UTC on dashboards and charts (#10321)
* fix: API marshmallow3 drop utc for naive datetime fields

* fix: API marshmallow3 drop utc for naive datetime fields

* fix, tests

* isort and test

* black

* add and fix test

* fix comment
2020-07-15 19:09:32 +01:00
Ville Brofeldt
ac85aebe4a chore: prefer allow/deny terminology (#10320)
* chore: prefer allow/deny terminology

* fix tests

* add PR reference
2020-07-15 19:22:46 +03:00
Erik Ritter
66b0239eca chore: type welcome (#10317) 2020-07-15 08:38:43 -07:00
Maxime Beauchemin
b4cd57b7bd chore: remove unused files from root (#10318)
Also moving 2 bash scripts to the scripts/ folder.

This is part of a series of commit cleanup up the main page on GitHub,
mostly focused on the content of the README, but might as well groom the
root folder a bit
2020-07-14 22:40:34 -07:00
Erik Ritter
6ae9f3af8e feat: add download as image button to explore (#10297) 2020-07-14 16:40:12 -07:00
Erik Ritter
518dbd05b6 chore: add typing to more sqllab components (#10278) 2020-07-14 16:39:56 -07:00
Erik Ritter
80902bca50 chore: add typing to profile (#10282) 2020-07-14 16:39:37 -07:00
Maxime Beauchemin
11ae48062f fix: broken glyphicons used in react-json-schema (#10267)
I'm working on a talk for the Airflow Summit
"Advanced Apache Superset for Data Engineers" and showing the "Schedule
Query" feature that Beto contributed a while back (behind a feature flag).

I found that the glyphicons used in `react-json-schema` are broken and
came up with an easy fix.

Also other minor tweaks on the feature.
2020-07-14 15:40:39 -07:00
Maxime Beauchemin
0244e2c333 docs(readme): license info in README is redundant (#10314)
Info in in the standard `LICENSE.txt` that GitHub picks up properly and
surfaces in the east panel in the main page.
2020-07-14 13:27:02 -07:00
Ville Brofeldt
7eb00481de fix: leave null timestamp unformatted in view results table (#10313) 2020-07-14 19:12:06 +03:00
Daniel Vaz Gaspar
266238caab fix: Bump FAB to 3.0.1 fix superset init (#10310) 2020-07-14 15:16:45 +01:00
Ville Brofeldt
42b6347fca fix: fix csv and query result type and QueryObject schema (#10312) 2020-07-14 16:37:19 +03:00
Ville Brofeldt
c44ee06b5d fix(chart-data-api): improve chart data endpoint errors (#10300)
* fix: improve chart data error response

* Populate error_message in QueryResult

* add tests

* Lint + fix incorrect raise

* add more tests
2020-07-14 12:40:00 +03:00
Daniel Vaz Gaspar
3922348351 refactor: dashboards OpenAPI spec (#10301)
* refactor: dashboards OpenAPI spec

* small fix
2020-07-14 08:56:23 +01:00
Jesse Yang
96e0da9fea fix(table-viz): table chart time column should use default (#10293) 2020-07-13 23:44:57 -07:00
Erik Ritter
f9c2600efc chore: clarify logging source field (#10306) 2020-07-13 21:16:51 -07:00
Bogdan
7abe3e5182 Add more fields to the log API (#10271)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-13 18:06:33 -07:00
Ville Brofeldt
b316f723a1 fix(chart-data-api): case insensitive evaluation of filter op (#10299)
* fix(chart-data-api): case insensitive evaluation of filter op

* fix(chart-data-api): case insensitive evaluation of filter op

* mypy

* remove print statement

* add test
2020-07-13 17:21:02 +03:00
Daniel Vaz Gaspar
f801d4f815 refactor: charts OpenAPI spec (#10287) 2020-07-13 09:47:56 +01:00
Evan Rusackas
93753cf2f8 fix: saving custom CSS correctly (#10289) 2020-07-12 21:14:10 -07:00
kxu
ba4777cf36 docs: create INTHEWILD.md (#10212)
* Create INTHEWILD.md

Create INTHEWILD.md to: 1. collect all Superset users into a single document and shorten README to make it more usable; 2. Categorize users into broad industry categories, which makes the document more useful as a reference for new users looking for industry peers and best practices (e.g. healthcare industry has unique needs and use cases); 3. removed some companies, whose website is inaccessible or defunct.

* Update INTHEWILD.md

* Update INTHEWILD.md

* Update README.md

* Update INTHEWILD.md

* Update INTHEWILD.md

* Update README.md
2020-07-12 18:56:02 -07:00
Lily Kuang
9d757403be fix: fetch datasets list after dataset created successfully (#10290) 2020-07-11 20:57:54 -07:00
Ville Brofeldt
1f5eec1c4a chore: improve release documentation (#10292)
* fix: releasing readme.md

* fix: improvements to release documentation
2020-07-11 19:00:02 +03:00
Evan Rusackas
06fd1b5e4d logo gets the vertically-centered flexbox treatment in jinja template (#10281) 2020-07-10 16:11:49 -07:00
Lily Kuang
3b4df51848 style: new toast design closer to SIP-34 (#10178) 2020-07-10 14:58:59 -07:00
Lily Kuang
80b06f6827 feat: update delete modal for dataset (#10258)
* update delete modal for dataset

* update datasetList to use hooks

* fix typo on dataset delete modal
2020-07-10 14:23:17 -07:00
Jesse Yang
4d179622fa fix(explore): edit datasource does not update control states (#10284) 2020-07-10 12:46:25 -07:00
John Bodley
4e4ccd48d6 chore: Releasing SQL Lab Celery results (#10279)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-10 09:53:57 -07:00
John Bodley
3f2f5e8311 chore: Bumping Celery (#10280)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-10 09:12:12 -07:00
Ville Brofeldt
14260f9843 feat: add contribution operation and fix cache_key bug (#10286)
* feat: add contribution operation and fix cache_key_bug

* Add contribution schema
2020-07-10 17:06:05 +03:00
Maxime Beauchemin
7d4d2e7469 fix(explore): 'Edit Datasource' is missing from btn-dropdown (#10283)
Not sure how it got broken but he's a fix. I'm thinking this is related
to the controls refactor.

closes https://github.com/apache/incubator-superset/issues/10247
2020-07-10 00:11:53 -07:00
Jesse Yang
af864e9fff fix: deckgl dimension select missing options (#10277)
Fixes #10246
2020-07-09 18:27:05 -07:00
Maxime Beauchemin
a460fdf0f8 docs(fix): /swaggerview/v1 has moved to /swagger/v1 (#10276) 2020-07-09 15:16:52 -07:00
serenajiang
c67b1abfd8 fix(csv upload): hive params typo (#10273)
* fix(csv upload): fix :params typo

* fix tests
2020-07-09 11:25:35 -07:00
Ville Brofeldt
c0d663db9a feat: show formatted dates instead of epoch on results (#10268) 2020-07-09 20:48:53 +03:00
Nilanjan Sarkar
300b2bbf2d fix: Fixed bug for issue #9967 (#10269)
* Added formatted file setup.cfg

* lint

Co-authored-by: Nilanjan1.Sarkar <nilanjan1.sarkar@ril.com>
2020-07-09 16:15:07 +03:00
Daniel Vaz Gaspar
6224edd42d fix: dashboard endpoint sig changed (#10220)
* fix(thumbnails): dashboard endpoint sig changed

* fix, flask get url for Superset.dashboard

* add simple test
2020-07-09 11:42:38 +01:00
Jesse Yang
e94c9804a2 fix: optimize mapStateToProps for chart controls (#10264) 2020-07-09 00:33:48 -07:00
Evan Rusackas
8d9bb5f472 feat: revised icons (#10263)
* fix: recoloring favicon

* fix: recoloring readme logo
2020-07-08 17:49:12 -07:00
Grace Guo
ab5ce82f7b fix: issue in getting filter_box config (#10262) 2020-07-08 17:24:21 -07:00
Evan Rusackas
3dfa4aa15d chore: nixing requiresTime (#10259) 2020-07-08 17:10:03 -07:00
Grace Guo
f6ccd61547 [fix] disable search all options by default (#10260) 2020-07-08 16:43:38 -07:00
Grace Guo
6690963ec2 feat: minor reorder SQL Lab Tab controls (#10257) 2020-07-08 16:21:47 -07:00
Ville Brofeldt
baeacc3c56 feat(chart-data-api): make pivoted columns flattenable (#10255)
* feat(chart-data-api): make pivoted columns flattenable

* Linting + improve tests
2020-07-08 13:35:53 +03:00
Daniel Vaz Gaspar
4252770d50 docs: update upgrading for FAB3 OAuth change (#10253)
* docs: update upgrading for FAB3 OAuth change

* Update UPDATING.md

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-07-08 10:40:23 +01:00
Daniel Vaz Gaspar
7ecff0e513 fix: datasets related objects, apply filter and openapi spec (#10252)
* fix, datasets related objects, apply filter and openapi spec

* fix, add 404 test

* fix, add 404 test

* fix test
2020-07-08 10:04:05 +01:00
Jesse Yang
e5761d3cf7 fix(table-viz): JS error when sort time column (#10250) 2020-07-07 21:28:09 -07:00
Grace Guo
f849103374 feat: Typeahead searchable filter_box for dashboard (#10210)
* [WIP] Typeahead dashboard filter_box

* Make it work

* add config option for async filter_box

* enable for > 1000 options only

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-07-07 09:31:18 -07:00
Daniel Vaz Gaspar
878dbcda3f feat(api): bump marshmallow and FAB to version 3 (#9964)
* feat(api): bump marshmallow and FAB to version 3

* revert query context tests changes

* obey mypy

* fix tests

* ignore types that collide with marshmallow

* preparing for RC2

* fix tests for marshmallow 3

* typing fixes for marshmallow

* fix tests and black

* fix tests

* bump to RC3 and lint

* Test RC4

* Final 3.0.0

* Address comments, fix tests, better naming, docs

* fix test

* couple of fixes, addressing comments

* bumping marshmallow
2020-07-07 13:26:54 +01:00
John Bodley
bacf567656 chore: Cleaning up types and names for SQLA models (#10248) 2020-07-06 20:59:17 -07:00
Evan Rusackas
569e4a7c50 chore: Revised logo (new color), w/CSS for vert alignment (#10237)
* out with the old, in with the new

* vertically centering logo once and for all

* lint: black instead of IDE formating

* touch config.py

* Styles -> StyledHeader

* nixing vestigial SVG

* removing trademark

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-07-06 17:30:18 -07:00
Lily Kuang
b9e0678752 feat: dataset api endpoint for charts and dashboards count (#10235)
* create GET endpoint for charts and dashboards count associated to a dataset

* add test for chart and dashboard count dataset
2020-07-06 16:25:57 -07:00
Bogdan
84f8a51458 feat: support nulls in the csv uploads (#10208)
* Support more table properties for the hive upload

Refactor

Add tests, and refactor them to be pytest friendly

Use lowercase table names

Ignore isort

* Use sql params

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-06 13:26:43 -07:00
Maxime Beauchemin
318e5347bc feat: Alerts! allowing users to set SQL-based email alerts with screenshots (#9944)
* feat: add support for alerts

* Add ModelViews

* First pass at adding scheduled Alert support

* Fix syntax errors

* Add log_retention and database to model

* Improving screenshots

* Still refactoring screenshots

* Pass down thumb_size properly

* Progress on screenshot endpoint

* Add alerts.last_eval_dttm and alert query logic

* Getting ready to split compute_screenshot and screenshot/{SHA}

* split the endpoints

* Improving alerting loop

* empty methods

* Add CLI command 'superset alert' that runs a sched loop

* Getting things to work

* email delivery

* A working email\!

* Add feature flag

* Add some description_columns to AlertModelView

* Little tweaks

* Use database.get_df, eval cells for truthiness

* Migrate thumbnail/screenshot functions to use new arg pattern

* Addressing PR feedback

* Update alerts DB migration down_revision

* Resolve _deliver_email arg conflict

* Make mypy happy

* Make isort happy

* Make pylint happy

Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
2020-07-06 13:12:27 -07:00
Bogdan
b7c45fed80 fix: downgrade sqlparse and add unit test (#10165)
* Downgrade sqlparse and add unit test

* Explain why sqlparse is pinned

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-07-06 11:10:46 -07:00
Erik Ritter
9a5195ab85 feat: support new errors payload in SQL Lab (#10243) 2020-07-06 09:49:32 -07:00
Maxime Beauchemin
2314aad450 feat: add database dropdown to dashboard import (#10118)
* feat: add database dropdown to dashboard import

Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.

With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.

I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.

Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.

Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.

* isort \!? 0%^$%Y$&?%$^?%0^?

* fix tests

* pre-committing to py3.6

* address dpgaspar's comments

* revert isort
2020-07-05 15:08:37 -07:00
John Bodley
33584a8095 refactor: Using self.get_session in security manager (#10146)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-04 13:04:06 -07:00
John Bodley
b181e48f5c [log] Updating form-data logic (#10197)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-04 12:51:43 -07:00
John Bodley
774c23a6f1 chore: Deprecating ENABLE_FLASK_COMPRESS (#10233)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-04 12:46:34 -07:00
Craig Rueda
f6e13b64b0 Removing node_modules volume in docker-compose.yml (#10236) 2020-07-03 08:00:09 -07:00
Hossein Torabi
fdd28c1a5e Upload excel (#9825) 2020-07-03 08:28:30 +03:00
John Bodley
cf60f664a4 fix: Remove double pickling for cached payloads (#10222)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-02 16:46:36 -07:00
Jesse Yang
a6751bf49a fix(table-viz): format non-numeric metrics (#10234) 2020-07-02 14:44:15 -07:00
Erik Ritter
4281ad5486 chore: type ResultSet.tsx (#10226) 2020-07-02 10:12:31 -07:00
ʈᵃᵢ
0afa15138b fix(listview): use disableSortBy to disable sorting in table columns (#10223) 2020-07-02 10:00:37 -07:00
kxu
316de3ae70 Update README.md (#10221)
Adding new tutorial blog on Time Series Charts to the Resources Section
2020-07-01 19:36:11 -07:00
Jesse Yang
dbd4588e4f fix(table-vis): bump to v0.14.6 to fix missing anchor links (#10225) 2020-07-01 19:18:23 -07:00
Jesse Yang
700429f431 fix: chart validation error not cleared on control value update (#10224) 2020-07-01 18:32:27 -07:00
Jesse Yang
f7a024d7de fix: better backward compatibility for table viz (#10219) 2020-07-01 11:23:08 -07:00
Erik Ritter
b2e100ff6c docs: update release instructions for Github releases (#10192) 2020-07-01 08:14:09 -07:00
Srini Kadamati
c3cd63a2e8 docs: added slack community guidelines (#10209)
* refactor: added slack community guidelines

* Some tweaks!

* busting cache to pass tests!

* Implemented excellent feedback
2020-06-30 20:20:09 -07:00
Erik Ritter
1606d80490 fix: tooltips on nvd3 charts rendering in the wrong location (#10211) 2020-06-30 18:02:29 -07:00
Jesse Yang
538f7e0f73 build: enable Cypress tests for visualizations (#10206) 2020-06-30 17:10:17 -07:00
Jesse Yang
9664705435 fix: datatable dependencies for pivot-table in dev (#10205) 2020-06-30 11:38:36 -07:00
Erik Ritter
b686004294 feat: add configuration for Presto cursor poll interval (#10191) 2020-06-30 08:56:22 -07:00
Bogdan
77b36783e7 s/assertEqual/assertEquals (#10195)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-29 16:38:06 -07:00
Bogdan
4e340c8368 feat: Switch from nosetest to pytest (#10177)
* Switch from nosetest to pytest

Fix schedule tests

Collect pytest coverage

Move pytest config into pytest.ini

Move cov to the pytest.ini

* Append coverage for the 2nd run

* Add coverage to all commands

* Coverage only for tests

* Get coverage from 1 place

* Rename classes to be  pytest compatible

* Test coverage for examples and tests

* Max diff to -1

* Explain how to run pytest for the whole project

* Do not append code coverage for the main run

* Do not run coverage on examples

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-29 15:36:06 -07:00
Jason Davis
72fc581b15 added explore database for ctas/cvas (#10174)
Co-authored-by: Jason Davis <@dropbox.com>
2020-06-29 11:13:54 -07:00
Jesse Yang
4342c33d0e build: enable typescript for cypress (#10170) 2020-06-29 10:53:33 -07:00
thibault ketterer
539e11b67e update to last pyathena >= 1.10.8, to fix athena CSV upload (#10188) 2020-06-29 17:38:58 +03:00
Ville Brofeldt
26d34727d3 fix: make time grain nullable in chart data endpoint (#10187)
* fix: make time grain nullable

* add test

* lint
2020-06-29 09:54:01 +03:00
Hendrik Schultze
6a8f441d54 fix: make auth for hive optional (#10172)
* fix: make auth for hive optional

This will make allow the admin to setup a root connection which can be impersonated.

* style: black lint conform

* style: clean up unnecessary condition expansion
2020-06-29 07:40:24 +03:00
Jesse Yang
9bdfa055ac feat(viz): add query mode switch to table chart (#10113)
1, Replace table chart rendering from jquery.DataTables to react-table: apache-superset/superset-ui#623
2. Rearrange the control panel, replace GROUP BY and NOT GROUP BY with a "Query Mode" switch: apache-superset/superset-ui#609
2020-06-28 21:37:04 -07:00
ʈᵃᵢ
3414f35792 refactor: better naming for config flags (#10180) 2020-06-26 17:36:50 -07:00
Erik Ritter
8bdc6b1771 fix: row count container alignment (#10179) 2020-06-26 16:07:29 -07:00
Will Barrett
4965d87505 Break some static methods out of superset.views.core.Superset (#10175) 2020-06-26 14:34:45 -07:00
John Bodley
f6ed46dcc0 chore: Updating UPDATING.md (#10155) 2020-06-26 14:11:23 -07:00
Maxime Beauchemin
f888656e6d style: bring new SIP-34 palettes in controls (#10121) 2020-06-26 13:27:51 -07:00
Jason Davis
9de9e1c19d feat: Added configuration to SQL Lab results "Explore" button (#10164)
* added configuration to virtual table explore button

* added description to mixin

* fixed unit tests

Co-authored-by: Jason Davis <@dropbox.com>
2020-06-26 09:54:55 -07:00
oashton
d8314eeb0d Add maximize and minimize feature to charts (#9210)
* Add maximize and minimize feature to charts

* Fixed lint issues

* Update superset-frontend/src/dashboard/components/SliceHeaderControls.jsx

Add translation function

Co-Authored-By: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* Remove resizeEvent property, change condition to use the nextProps

* Minor changes, improve source code

* Fixed lint issues

* Remove unnecessary resizeEvent props

* Move inline style to css class style

* Minor fixes, improvements css

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
2020-06-26 09:12:53 -07:00
Will Barrett
df71fac1e0 refactor: Fix lint on superset/utils/core.py (#10120)
* Fix lint on superset/utils/core.py

* black

* mypy

* Fix some missing renames
2020-06-26 08:49:12 -07:00
Ville Brofeldt
410c5be2f8 fix: return slice owners for /user_slices ep (#10171)
* fix: return slice wowners for /user_slices ep

* put back created_by and changed_by

* improve comment
2020-06-26 18:10:56 +03:00
Jesse Yang
ffefcd9ad4 build: dont prefer ts for cypress tests (#10161) 2020-06-25 16:24:05 -07:00
Jesse Yang
ece4f6d0b5 build: upgrade Cypress and re-enable visualization tests (#10158) 2020-06-25 15:24:23 -07:00
Maxime Beauchemin
1781ebbaa4 fix: [search query view] edit link is broken (#10128)
* fix: [search query view] edit link is broken

* eslint + mypy

* rever app.py changes

* addressing comments

* use api/v1/query

* fix test
2020-06-25 12:20:10 -07:00
Will Barrett
0017b61f51 refactor: Re-enable pylint on 5 files (#10106)
* Re-enable lint on 5 files

* revert something questionable

* Address PR feedback

* One more PR comment...

* black?

* Update code wrapping

* Disable bugged check

* Add a disable for a failure that's only showing up in CI.

* Fix bad refactor

* A little more lint fixing, bug fixing
2020-06-25 11:14:41 -07:00
Ville Brofeldt
16cffd056c fix: implement legacy druid dashboard import (#10135) 2020-06-25 18:52:13 +03:00
Ville Brofeldt
b205ce32b0 feat: Add new timegrains and convert_dttm to Druid engine spec (#10160)
* feat: Add new timegrains and convert_dttm to Druid engine spec

* Add TemporalType enum and fix test case

* Remove DATETIME for athena (original spec)
2020-06-25 12:18:37 +03:00
Jesse Yang
ecb44a4243 refactor: import emotion-theming methods from @superset-ui/style (#10157)
This makes the code cleaner and fixes missing theme variables when `npm link @superset-ui/style`.
2020-06-24 19:23:51 -07:00
Will Barrett
7a794ed684 refactor: Re-enable lint for 3 files (#10124)
* Fix lint for 2 files: connectors/druid/views.py and utils/dashboard_import_export.py

* Re-enable lint for superset/views/core.py

* Turns out that endpoint needs the  argument even through the function doesn't call it

* Turns out FAB doesn't play nicely with @staticmethod

* Black

* Somehow I got some branch leakage

* Minor lint fix

* Remove unused import.
2020-06-24 16:07:55 -07:00
Evan Rusackas
36ea42f092 fix: Loading overlay bugfix and cleanup (#10105)
* fix: reordering DOM output, simplifying styles, Emotionalizing

* simplification

* converting RefreshChartOverlay to TS

* Loading -> TS, stripping unused size prop

* simplification...

* just letting "position" prop act as a class name. Simpler!

* consolidating styles, changing a className prop to a position prop.

* nixing (unused) classname prop

* replacing inline loading img with the proper Loading component

* BY THERE.

* position prop is optional!
2020-06-24 14:21:45 -07:00
Jason Davis
c544ebd876 fix: Fixed Attribute Error when running core_tests.py (#10154)
* fix: changed import order to fix core-test error

* reformatted using black

Co-authored-by: Jason Davis <@dropbox.com>
2020-06-24 12:46:38 -07:00
Bogdan
42a56e29a1 Fix alembic migrations order (#10156)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-24 11:41:47 -07:00
John Bodley
37777f382f fix(security): dbs/clusters perm (#10130)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-24 10:06:25 -07:00
Bogdan
3db76c6fdc Implement create view as functionality (#9794)
Implement create view as button in sqllab

Make CVAS configurable

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-24 09:50:41 -07:00
Ville Brofeldt
38667b72b1 fix: refine shouldUseLegacyApi and add tests (#10148)
* fix: refine shouldUseLegacyApi and add tests

* address review comments
2020-06-24 19:38:36 +03:00
Jesse Yang
4e71491d86 fix: FilterBox JS when no results (#10143) 2020-06-24 08:09:14 -07:00
Bogdan
763b38591c Fix CTAS explore flow (#10147)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-23 22:36:05 -07:00
John Bodley
aefef9ca55 chore(security): Updating assert logic (#10034)
* chore(security): Updating assert logic

* Deprecating rejected_tables

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-23 20:49:39 -07:00
ʈᵃᵢ
be936c2eb8 style: listviews closer to SIP-34 (#10094) 2020-06-23 14:17:28 -07:00
Lily Kuang
4d1d40989c feat: dataset add modal (#10104) 2020-06-23 10:15:35 -07:00
kxu
bb6f802850 Break down Superset 101 Getting Started content (#10138)
Break down Superset 101 Getting Started content, so it's directly linked to the relevant blog post and more user-friendly.
2020-06-22 19:34:41 -07:00
Jesse Yang
ed4f6e93ac chore: bump superset-ui to v0.14.1 (#10112) 2020-06-22 11:14:23 -07:00
Grace Guo
a80453d945 fix: dashboard filter scope bug (#10114)
* fix: dashboard filter scope bug

* add extra comments per review
2020-06-22 10:18:04 -07:00
Grace Guo
221f38099b [logging] add selected tab name into perf logging (#10080) 2020-06-22 10:14:29 -07:00
Erik Ritter
cb1705fdae chore: type src/addSlice (#10127) 2020-06-22 08:14:27 -07:00
Erik Ritter
231c2b395d chore: fix add datasource help string (#10129) 2020-06-22 07:51:50 -07:00
Erik Ritter
b3ec4be28d chore: extract translateable strings (#10131) 2020-06-22 07:41:02 -07:00
Ville Brofeldt
d615949820 chore: Bump sqlalchemy-utils and cachelib and refresh requirements.txt (#10117)
* chore: Bump sqlalchemy-utils and cachelib and refresh requirements.txt

* undeprecate EncryptedType

* black

* reference correct class

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-06-22 16:01:46 +03:00
Aliaksei Kushniarevich
550e78ff7c feat: Add multiple table filters for Row Level Security (#9751)
* Add multiple table filters for Row Level Security

* Set ENABLE_ROW_LEVEL_SECURITY back to False (default)

* Merge DB migrations

* Drop table_id column and foreign key on PostgreSQL, MySQL, SQLite

* Support db records migration also

* Support downgrading from the new-fashioned formatted records

* Straighten up migrations

* Update migration's down_revision to comply master branch
2020-06-22 12:51:08 +03:00
Daniel Vaz Gaspar
dbc43d7c7b perf(datasets): improve datasets API performance for attr kind (#10111)
* perf(datasets): improve datasets API performance for attr kind

* fix test
2020-06-22 08:21:06 +01:00
Maxime Beauchemin
cf0f1d568d style: replace broken glyphs with font-awesome (#10123)
Glyphicons stopped working recently, not sure why, but let's get rid of
them and double down on font-awesome that we use a lot more in the
codebase. There's only a few instances of glyphicons and they all are
broken ATM.

Also a few other minor style tweaks
2020-06-21 21:38:08 -07:00
amitNielsen
e49ba8f03c Add Nielsen to users list (#10122) 2020-06-20 22:17:55 -07:00
John Bodley
e570263577 chore(mypy): Fixing can_access_database types (#10119)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-20 21:17:33 -07:00
Grace Guo
69100536de fix: dashboard should not add extra_filters onto chart annotation (#10115) 2020-06-20 18:08:45 -07:00
Will Barrett
961b55cfba fix: Visualization settings were lost when editing a datasource from Explore (#10092) 2020-06-19 12:55:49 -07:00
Erik Ritter
2e76fbb7e5 chore: type FilterableTable (#10073) 2020-06-18 21:57:11 -07:00
Maxime Beauchemin
a6390afb89 style: push bootstrap theme towards SIP-34 styles (#10056)
* feat: cartel theme

* piling

* more tweaks

* Make things look better

* lint

* fix tests

* paint it black

* tweaks
2020-06-18 15:01:58 -07:00
Will Barrett
8e23d4f369 chore: Upgrade pylint to 2.5.3 and fix most new rules (#10101)
* Bump pylint version to 2.5.3

* Add a global disable for the most common new pylint error

* Fix a bunch of files containing very few errors

* More pylint tweakage, low-hanging fruit

* More easy stuff...

* Fix more erroring files

* Fix the last couple of errors, clean pylint!

* Black

* Fix mypy issue in connectors/druid/models.py
2020-06-18 14:03:42 -07:00
Phillip Kelley-Dotson
02fee35314 chore(metricoption): remove metricoption and columntypelable dependency (#10077)
* remove columntypeLabel and metricoptions from superset

* fix lint

* remove old test

* update pakage

* add suggestions

* fix merge conflict
2020-06-17 19:55:17 -07:00
Will Barrett
817b7aaf29 style: Change logo color to new branding (#10090)
* Change logo color to new branding

* Add back Apache licenses

* Fix SVG format

* Fix one more license

* Bigger pngs
2020-06-17 19:47:02 -07:00
ʈᵃᵢ
c914af0bc4 fix: adds pagination/infinite scroll to owners select in DashboardList and ChartList (#10035) 2020-06-17 16:27:21 -07:00
Bogdan
be6b9b8fec feat: implement dttm column configuration through db extra config (#9444)
* Implement table mutator and examples how to set date defaults

Fix tests

* Fix flaky test

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-17 13:46:45 -07:00
Will Barrett
01aede0652 refactor: Break up superset/views/core.py (#10078)
* Remove unreferenced function from views/core.py

* Remove excess constants from views/core.py

* Extract CssTemplate-related views to their own file from core.py

* Remove duplicate constant declaration and make the constant less racist

* Move free-floating functions in views/core.py to views/utils.py

* Move AccessRequestsModelView out of views/core.py into its own module

* Move health checks and KV ModelView out of core.py and into their own modules

* Move R model view to its own module

* Move after-request header setting to views/base.py from views/core.py

* black

* mypy

* isort

* Fix reference to imported app

* pylint

* Fix some imports

* Add some missing view imports

* Fix a missing import
2020-06-17 13:42:13 -07:00
Erik Ritter
987cb6e1fe chore: type src/dashboard/util/charts (#10068) 2020-06-17 12:34:04 -07:00
Jesse Yang
5d4d50a609 fix(sqllab): table refresh API endpoint (#10076) 2020-06-17 12:24:10 -07:00
Bogdan
29e9f2c70b feat: superset report slack integration (#9810)
* First draft for the slack integration

Fix slack

another typo

another typo

Fix slack

Add channels to the form

another typo

Another set of changes

Make code more transparent

Fix tests

Add logging

logging

use logger

import logging

import logging

import logging

add assert

more logging

Fix channels

Fix channels

* Address comments

* Move slack into a separate module

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-17 11:01:25 -07:00
Maxime Beauchemin
28bb2e18dd docs: FAQ entry for 'Does Superset have an API' (#10071) 2020-06-17 17:13:28 +01:00
John Bodley
eba1fe2ebb fix: Ensuring queries route accepts float or int (#10079)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-17 08:02:49 -07:00
Animesh Agrawal
35c449dcd4 add GrowthSimple to list of users on readme (#10075) 2020-06-16 21:42:14 -07:00
Erik Ritter
e3013ea129 other: add TypeScript tracker generation script (#10074) 2020-06-16 18:54:51 -07:00
ʈᵃᵢ
8c012f7941 feat: add more columns and icons to dataset listview (#10043) 2020-06-16 17:30:10 -07:00
Evan Rusackas
00e6d7d706 chore: bumping superset-ui theme version (#10059) 2020-06-16 16:33:14 -07:00
ʈᵃᵢ
26120467af fix: use custom int parsing over flask int parsing in sqllab queries endpoint (#10070) 2020-06-16 12:58:32 -07:00
Erik Ritter
334bd6e989 Update prefer_typescript.yml (#10069) 2020-06-16 10:00:30 -07:00
Ville Brofeldt
d3a9ce5afc fix: chart export fails when buildQuery not present (#10062) 2020-06-16 09:25:10 -07:00
Erik Ritter
7504b1cf20 fix: caching on viz with relative time ranges and time compare (#10061) 2020-06-16 08:47:35 -07:00
Nuno Beires
51a42a27e7 docs: Add DouroECI to list of users on readme (#10065) 2020-06-16 14:50:49 +01:00
Maxime Beauchemin
280ade826c fix: dashboard export raises schema issues (#10060)
* fix: dashboard export raises schema issues

* Fix isort
2020-06-15 21:43:05 -07:00
Lily Kuang
98ab95e4c0 feat: owners profile icon on dataset list view (#10041) 2020-06-15 09:52:09 -07:00
Ville Brofeldt
a3393c1bc4 fix: native annotations (#10037)
* fix: native annotations

* Add test

* Add comment to test
2020-06-12 21:53:26 +03:00
Ville Brofeldt
373651efa4 fix: bump pydruid version (#10046) 2020-06-12 18:41:36 +03:00
Ville Brofeldt
ee77707532 feat: add deafult buildQuery for V1 chart data requests (#10048) 2020-06-12 07:49:13 -07:00
Grace Guo
0724eddb7c other: [logging] add dashboard is_published into perf logging (#10042) 2020-06-11 18:57:52 -07:00
John Bodley
9532bff48f chore(security): Renaming access methods (#10031)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-11 13:12:23 -07:00
John Bodley
54c6ddbdb7 chore(security): Renaming schemas_accessible_by_user (#10030)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-11 11:29:43 -07:00
Daniel Vaz Gaspar
c9ee598ac9 fix(security): can_access with None crashes on builtin roles (#10039) 2020-06-11 16:02:08 +01:00
serenajiang
8744dadca8 [csv upload][hive] support other delimiters (#9971)
Co-authored-by: serena-jiang <serena.jiang@airbnb.com>
2020-06-10 17:08:02 -07:00
Natalie Ruhe
d1588c7658 Fix chart annotation source type showing perpetual loading when re-selecting the same value. (#10036)
Remove accidental console.log used during testing.

Co-authored-by: Natalie Ruhe <natalie@preset.io>
2020-06-10 16:17:56 -07:00
John Bodley
36627af916 fix: Resolves a regression from #9939 (#10033)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-10 13:42:08 -07:00
Karen Palacio
1a6b9d7456 fix: bump pydruid to 0.6.0 (#10014)
* bump pydruid to 0.5.11

* bump pydruid to 0.6.0
2020-06-10 12:40:51 -07:00
Will Barrett
4ef26993e2 feat: Add owners and physical/virtual status to Datasets API list endpoint (#10025)
* Add owners and physical/virtual status to Datasets API list endpoint

* black

* Update type definition for DatasourceKind

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Fixin' tests and mypy

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-06-10 22:04:40 +03:00
Lily Kuang
5339d31ed1 feat: implement secondary navigation for datasets (#9982) 2020-06-10 11:55:51 -07:00
Erik Ritter
e17da58a39 feat: add replace option to hive csv upload (#9764) 2020-06-10 08:57:33 -07:00
Ville Brofeldt
56397d75cc fix: raise error in sqllab when using reserved column name (#9859) 2020-06-10 16:32:43 +03:00
Ville Brofeldt
a8db78b069 chore: bump superset-ui to 0.13.27 (#10018)
* chore: bump superset-ui

* Remove redundant control panels
2020-06-10 10:13:00 +03:00
Lily Kuang
f6cd3a917a refactor(sql): optimize sql query parser (#9673)
* optimize sql query parser

* update extract from token

* update doc string

* pylint doc string
2020-06-10 09:15:48 +03:00
Ville Brofeldt
7cb38fe28b chore: remove markup from viz.py (#9997) 2020-06-10 07:49:09 +03:00
serenajiang
280b4dce00 fix(SankeyViz): enforce source/target order (#10003)
* fix(SankeyViz): enforce source/target order

* address pr comments

* black

Co-authored-by: serena-jiang <serena.jiang@airbnb.com>
2020-06-09 10:13:48 -07:00
Ville Brofeldt
526ee3c3df fix: flaky test_copy_dash test in dashboard_tests.py (#10021) 2020-06-09 13:29:22 +03:00
Ville Brofeldt
315518d2d2 feat: add support for query offset (#10010)
* feat: add support for query offset

* Address comments and add new tests
2020-06-09 11:46:28 +03:00
Craig Rueda
2a3305e7dd Quick fix for bad regex in GH Workflow (#10015) 2020-06-08 15:02:48 -07:00
John Bodley
91517a56a3 style(mypy): Spit-and-polish pass (#10001)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-07 08:53:46 -07:00
Grace Guo
656cdfb867 fix: [logging] fix render chart error type (#10000) 2020-06-05 14:44:52 -07:00
John Bodley
63e0188f45 style(mypy): Enforcing typing for superset.views (#9939)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-05 08:44:11 -07:00
Ville Brofeldt
5c4d4f16b3 feat: finalize Word Cloud move to new chart data endpoint (#9975)
* remove word cloud from viz.py

* Fix Run in SQL Lab

* remove deprecated python tests

* break out legacy endpoint type into function

* Break out exploreChart from exportChart and implement results type

* Fix jest tests and refactor accordingly

* lint

* Rename v1 payload function

* Add dashboard id to v1 chart data request url params

* Add support for domain sharding to v1 chart data request
2020-06-05 14:08:46 +03:00
ʈᵃᵢ
619fbc9557 fix: remove -1,-1 from owners request in charts, dashboards list and propertiesModal (#9989) 2020-06-04 15:31:42 -07:00
Daniel Vaz Gaspar
543a3ca6f2 fix(api): Wrong parameter name on database openapi spec (#9965) 2020-06-04 15:21:23 +01:00
Raymond Ho
21fc0116d0 docs: add ELMO Cloud HR & Payroll to list of users on readme (#9960)
Co-authored-by: Raymond Ho <raymond.ho@elmolearning.com.au>
2020-06-03 20:37:16 -07:00
Bogdan
a48a2e44b5 fix: display python_date_format in react views as well (#9934)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-06-03 20:24:25 -07:00
ʈᵃᵢ
d187d2887e fix: fetch all owners for dashboard, chart listview filters and properties modal (#9784) 2020-06-03 19:57:03 -07:00
John Bodley
244677cf5e style(mypy): Enforcing typing for superset (#9943)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-03 15:26:12 -07:00
Grace Guo
dcac860f3e feat: [dashboard] notification and warning for auto force refresh (#9886)
* feat: [dashboard] notification and warning for auto force refresh

* fix review comments
2020-06-03 10:20:56 -07:00
John Bodley
ee777acd57 fix(mypy): Resolves regression introducted in #9824 (#9973)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-03 00:20:34 -07:00
Michael Joseph Rosenthal
3fd6e0630e fix #8302, disabling save button when can_add: false, can_overwrite: false (#9456) 2020-06-02 23:20:52 -07:00
Xiang Fu
1d9dbcd9dc fix: pinot select query logic (#9954)
* Update how pinot handles selection logic

* Change DATETIMECONVERT argument to use single quote for literals
2020-06-02 23:18:35 -07:00
Maxime Beauchemin
209392e9ef feat: make CRUD annotations inline (#9888)
* feat: make CRUD annotations inline

This makes the annotations inline of the "annotation layers". Originally
they were setup as separate ModelViews because of a bug in FAB.

* fix pylint
2020-06-02 23:12:37 -07:00
John Bodley
1001c6d5f4 Revert "[caching] Using request context rather than globals" (#9969)
This reverts commit 90cd3889ac.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-02 16:03:33 -07:00
John Bodley
15f267d586 style(mypy): Fix memoize watch type (#9970)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-02 16:02:07 -07:00
Ville Brofeldt
fc92692f49 feat: implement new version of word cloud (#9962) 2020-06-02 19:28:58 +03:00
Ville Brofeldt
38a6bd79da feat: expand new chart data endpoint coverage (#9903)
* feat: implement new chart API for additional components

* Fix python tests

* Fix tests

* Fix lint

* fix camel case error in requestParams

* lint

* fix samples row limit

* Add samples row limit to config

* remove unnecessary code

* lint

* Address review comments
2020-06-02 10:47:28 +03:00
Erik Ritter
c7618ee54b build: add workflow preferring TypeScript files (#9901)
* Add workflow preventing non TypeScript Files

* Create comment_preferring_typescript.md

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Delete comment_preferring_typescript.md

* Create comment_preferring_typescript.md

* Delete comment_preferring_typescript.md

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Update prevent_non_typescript_files.yml

* Create test.js

* Delete test.js

* Update prevent_non_typescript_files.yml

* Rename prevent_non_typescript_files.yml to prefer_typescript.yml

* Update prefer_typescript.yml
2020-06-01 09:31:31 -07:00
Grace Guo
5324e25328 [filter_box] disable instant_filtering by defult (#9952) 2020-05-31 22:12:04 -07:00
Jesse Yang
4fe6f4f38e fix: FilterBox Select should be Creatable (#9940)
* bugfix: FilterBox Select should be Creatable

* Fix Cypress test
2020-05-28 14:51:51 -07:00
John Bodley
b296a0f250 [mypy] Enforcing typing for superset.utils (#9905)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 22:57:30 -07:00
John Bodley
54dced1cf6 style(mypy): Enforcing mypy typing for views.chart (#9912)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 21:31:26 -07:00
John Bodley
b010c35887 style(mypy): Enforcing typing for views.database (#9920)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 21:04:48 -07:00
John Bodley
5ce1076f3c style(mypy): Enforcing typing for views.dashboard (#9921)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 20:43:11 -07:00
Jesse Yang
359ea8825d fix(react-select): FilterBox focus event and adhoc filter popup height (#9933)
* fix(react-select): FilterBox focus event and adhoc filter popup height

* Fix flacky cypress test

* Use focus instead of click
2020-05-27 15:15:32 -07:00
Ville Brofeldt
1b72907b18 Revert "feat: bump superset-ui and implement queryFields in formData (#9908)" (#9931)
This reverts commit 2c97e72959.
2020-05-27 22:50:14 +03:00
Ville Brofeldt
5ff61048c6 feat: bump sinon to latest (#9926) 2020-05-27 19:34:40 +03:00
Erik Ritter
c4040a2ae0 fix: annotation layer json (#9915)
* fix: annotation layer json

* attempt to add a test

* [tests] Fixing test

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 09:02:03 -07:00
Maxime Beauchemin
92b843e2ae css: beautify roles CRUD (#9890) 2020-05-26 22:32:13 -07:00
Erik Ritter
848ac91bb6 fix: bump nvd3 plugin for annotation styles (#9919) 2020-05-26 16:59:30 -07:00
Phillip Kelley-Dotson
e0c3da5df1 feat: paired t testchart control migration (#9916)
* cherry pick

* update package
2020-05-26 14:11:03 -07:00
Phillip Kelley-Dotson
1fffa37e85 feat: remove para controls (#9851)
* remove para controls

* update package version
2020-05-26 12:37:33 -07:00
Ville Brofeldt
2c97e72959 feat: bump superset-ui and implement queryFields in formData (#9908)
* feat: Bump superset-ui packages for queryFields

* feat: Implement queryField in formData
2020-05-26 10:19:33 -07:00
Grace Guo
e6a55d8858 fix: [dashboard] should not trigger chart refresh when filter not applicable (#9891)
* fix: [dashboard][filter] should not trigger chart refresh when filter is not applicable

* fix comments
2020-05-26 10:14:12 -07:00
John Bodley
7f6dbf838e style: enforcing mypy typing for connectors (#9824)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-25 12:32:49 -07:00
Erik Ritter
9edfc8f68d chore(ts): convert base js files to typescript (#9826) 2020-05-24 19:50:08 -07:00
tooptoop4
bd959919e3 Fix missing line break in Database 'extra' instructions (#9895) 2020-05-23 17:36:51 -07:00
John Bodley
e789a35558 [mypy] Enforcing typing for superset.models (#9883)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-22 20:31:21 -07:00
Jesse Yang
6d4e23663e fix: reenable table chart page length (#9884)
Bump @superset-ui/legacy-preset-chart-table to fix disabled
page length support.

See https://github.com/apache-superset/superset-ui/pull/522
2020-05-22 10:35:45 -07:00
Maxime Beauchemin
ee991963c7 fix: don't create examples db on 'superset init' (#9881)
* chore: don't create examples db on 'superset init'

* fix isort
2020-05-21 21:34:53 -07:00
Bogdan
3e8e441bfc feat: implement csv upload configuration func for the schema enforcement (#9734)
* Implement csv upload func for schema enforcement

Implement function controlled csv upload schema

Refactor + fix tests

Fixing hive as well

* Add explore_db to the extras

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-21 13:49:53 -07:00
Phillip Kelley-Dotson
333dc8529e feat: tablechart plugin controls migration (#9847)
* delete controls

* move columnoption to controls

* update package and remove columnoption

* fix: remove console and fix import

* fix: lint

* update version

* fix last rebase

* fix: lint:
2020-05-21 12:15:02 -07:00
kxu
a46af68922 Update README Resources section (#9864)
Update to README Resources section with May 2020 virtual meetup recording and link to Youtube channel
2020-05-21 09:35:13 -07:00
Daniel Vaz Gaspar
61ebb9bbc4 fix: chart datasource explore URL showing datasource name for druid (#9839) 2020-05-21 10:45:47 +01:00
Christian Murphy
a262ea7487 refactor(frontend): move utils to TypeScript (#9820)
* refactor(frontend): move utils to typescript (#9101)

* refactor(frontend): don't export interfaces

* test(frontend): update types and test for isValidChild
2020-05-20 14:47:40 -07:00
ʈᵃᵢ
ef6af935fc only skip fossa on PRs (#9865) 2020-05-20 14:21:14 -07:00
Will Barrett
13c24372b0 fix: Emit a warning message rather than an exception on query failure (#9811)
* Emit a warning message rather than an exception on query failure

* Add exc_info=True to warning message
2020-05-20 13:13:28 -07:00
Evan Rusackas
428ad70aac feat: Adding Emotion ThemeProviders for all React apps (#9853)
* bumping style package (now with typography styles!)

* ThemeProvider ALL the things!

* package lock

* linting

* no need to parseInt here anymore, the values are numeric now.
2020-05-20 12:43:02 -07:00
David Aaron Suddjian
f076485fd7 upgrade plugins, remove unnecessary code (#9848) 2020-05-20 12:41:12 -07:00
Ville Brofeldt
a43a1d6303 feat: Add new result formats and types to chart data API (#9841)
* feat: Add new result formats and types to chart data API

* lint

* Linting

* Add language to query payload

* Fix tests

* simplify tests
2020-05-20 21:36:14 +03:00
michellethomas
368c85de1b fix: Removing the logic to add timeseries_limit_metric to the data for table (#9832)
* Removing the logic to add timeseries_limit_metric to the data for table viz

* Also make the change in viz_sip_38

* Fix tests

Co-authored-by: michelle_thomas <michelle.thomas@airbnb.com>
2020-05-20 10:20:54 -07:00
John Bodley
c691a07948 Revert "[sqllab] fix, strip comments before parsing statements" (#9862)
This reverts commit 949c4eae28.

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-20 09:54:17 -07:00
Craig Rueda
5aad12d783 fix: Fix for updated cache dependency (#9850)
* Fixing missing dependency

* Switching back to cachelib
2020-05-20 09:42:43 -07:00
Lily Kuang
6f1208f510 fixes: limit no authorization error for sentry (#9816)
* rescue no authorization error

* update no authorization exception to warning
2020-05-20 08:48:32 -07:00
John Bodley
91f6e708eb docs: Disable sphinx-autodoc-typehints (#9846)
* Update requirements.txt

* Update conf.py

* Update conf.py
2020-05-20 06:59:59 -07:00
Phillip Kelley-Dotson
1a775e2612 feat: markupchart plugin controls migration (#9806)
* remove shims and controls

* update chart version

Co-authored-by: Phillip Kelley-Dotson <pkd@pkd.lan>
2020-05-19 23:04:20 -07:00
Jesse Yang
81ab8dd8b4 feat: upgrade react-select and make multi-select sortable (#9628)
* feat: upgrade react-select v1.3.0 to v3.1.0

Upgrade `react-select`, replace `react-virtualized-select` with a custom
solution implemented with `react-window`.

Future plans include deprecate `react-virtualized` used in other places, too.

Migrate all react-select related components to `src/Components/Select`.

* Fix new list view

* Fix tests

* Address PR comments

* Fix a flacky Cypress test

* Adjust styles for Select in CRUD ListView

* Fix loadOptions for owners select in chart PropertiesModal

TODO: add typing support for AsyncSelect props.

* Address PR comments; allow isMulti in SelectControl, too

* Clean up NaN in table filter values

* Fix flacky test
2020-05-19 16:59:49 -07:00
ʈᵃᵢ
68832d2fa5 build: conditionally run fossa check if dependency files change (#9814) 2020-05-19 10:03:59 -07:00
Craig Rueda
88dd2ddd56 fix: issue with duplicated dependencies (#9837)
* Fixing issue with duplicated dependencies in various requirements files.

* Removing restart stanza for tests_worker

* Adding Superset dev Dockerfile
2020-05-19 08:46:52 -07:00
Grace Guo
5ca6ed716f [explore view] inline edit slice name should not overwrite (#9817) 2020-05-18 22:53:29 -07:00
John Bodley
c117e222c0 build: Updating the sphinx configuration (#9833)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-18 21:27:25 -07:00
Grace Guo
d96bb874f2 fix: [filter_box] fix 2 issues in single value filter_box (#9829)
* fix: [filter_box] fix 2 issues in single value filter_box

* add unit test

* add fix per comments
2020-05-18 21:25:10 -07:00
Ivan Blinkov
e121e090c7 Update the link to ClickHouse official website (#9834) 2020-05-19 07:02:14 +03:00
Phillip Kelley-Dotson
38c57f45ac feat: partitionchart controls migration (#9768)
* fix lint error

* fix: import lint error

* pull in latests code

* delete control from plugin registry

* fixing again...

* another fix with rebase...

* commit change

* update packages and fix test

* fix: add ignore to lint error

* fix mr

* fix lint

* fix imports

Co-authored-by: Phillip Kelley-Dotson <pkd@pkd.lan>
2020-05-18 12:48:51 -07:00
Jesse Yang
c4016e3b71 feat: bump superset-ui/time-format and big-number (#9808)
* feat: bump superset-ui/time-format and big-number

This is for adding full dates to big number datetime formatted
by weekly interval.

* Bump time-format to v0.13.15

to bring in https://github.com/apache-superset/superset-ui/pull/493
2020-05-18 12:42:27 -07:00
Erik Ritter
b36738cf56 fix: use snake_case for error_type (#9835) 2020-05-18 12:35:55 -07:00
Ville Brofeldt
7a95c52d61 refactor: simplify getExploreUrl functions (#9831)
* remove payload from return signature

* Rename function and fix tests

* Lint

* fix tests

* Move useLegacyApi inquiry to exploreUtils
2020-05-18 19:19:05 +03:00
John Bodley
52285aeb04 build: tox leveraging conditional factors (#9828) 2020-05-18 07:37:25 -07:00
Christian Murphy
b8eaa114ed feat(frontend): add ability to download dashboard and chart as image (#9819)
* feat(frontend): add ability to export dashboard and chart as image (#6973)

* refactor: migrate download image as to typescript

* feature(frontend): download as image updates

add toast message if error occurs.
make generate file stem an internal method.

* refactor(frontend): move default background color to a const

* feat(frontend): wrap download image toast in translate function
2020-05-17 14:50:27 -07:00
Erik Ritter
c7c76c6a99 build: Add python 3.8 to the build matrix (#9827) 2020-05-17 14:49:51 -07:00
John Bodley
53b58edd6f [mypy] Enforcing typing for translations (#9800)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-16 23:55:49 -07:00
Luca Toscano
5ab5457522 FilterBox,BigNumber,WorldMap: Handle empty results - second attempt (#9789)
* FilteBox: handle empty results (second attempt)

This change was originally attempted in #9671 but reverted
since it broke FilterBox charts with only a time selector.

After some tests I reworked the patch to avoid returning None,
but instead returning an empty list for each col/selector with
an empty dataframe associated. This allows to see all the selectors
without any breakage.

* BigNumberViz: avoid user facing errors when the dataframe is empty

* WorldMapViz: avoid user facing errors when the dataframe is empty
2020-05-16 22:27:57 -07:00
Daniel Vaz Gaspar
ea9b7f2dc4 fix(babel): broken babel extract (#9790)
* fix(babel): broken babel extract

* remove unnecessary f strings
2020-05-15 19:05:24 +01:00
David Aaron Suddjian
34df11a61c upgrade migrated plugins, remove controlPanel configs (#9774)
* remove migrated plugins

* remove chord stuff

* upgrade plugin packages

* update package lock
2020-05-14 17:06:49 -07:00
Ville Brofeldt
ed1d030667 fix: invalid JSON in FR and DE translations (#9803)
* fix: invalid JSON in FR translation

* fix: broken or misformatted translations and add unit test for JSON validty

* Move translation lint test to CI task
2020-05-14 15:26:12 -07:00
Daniel Vaz Gaspar
3cc540019f fix(mssql): reverts #9644 and displays a better error msg (#9752) 2020-05-14 17:00:02 +01:00
Daniel Vaz Gaspar
4427d65717 tests(celery): improve celery tests infra (#9775) 2020-05-14 16:58:30 +01:00
Erik Ritter
d02f2d1fa7 feat: return security errors in the SIP-40 format (#9796) 2020-05-13 17:10:37 -07:00
Erik Ritter
cf30e16550 fix: construct SupersetErrors properly (#9799)
* fix: construct SupersetErrors properly

* Update viz_sip38.py
2020-05-13 14:03:42 -07:00
Krist Wongsuphasawat
45c8fcfd92 fix: add flag for time series table (#9798) 2020-05-13 13:27:43 -07:00
Bogdan
1d3b264a36 Add extra configration to the email reports (#9342)
Superset email. Fix slice url

Make WEBDRIVER_BASEURL a function

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-13 20:14:12 +03:00
Ville Brofeldt
b532c4609f chore: bump python dependencies (#9786)
* chore: bump pyhton dependencies

* bump flask-testing

* Add note to UPDATING and bump flask-testing in requirements-dev.txt

* fix old sqlparse test case that is fixed with sqlparse==0.3.1

* Fix migration and sqlparse set test

* downgrade alembic

* Downgrade sqlalchemy-utils

* pin sqlalchemy-utils due to regression in 0.36.5

* Refine comment in setup.py

* make cachelib an explicit requirement
2020-05-13 18:49:34 +03:00
Fullstop000
34147d9d80 docs: add whale.im to list of users (#9795)
* Add whale.im to list of users

* address comment
2020-05-12 22:31:56 -07:00
Erik Ritter
83ec7365a7 feat: convert backend chart errors to the new error type (#9753) 2020-05-12 18:15:53 -07:00
Jesse Yang
0e7888c659 build: disable webpack progress for CI (#9791) 2020-05-12 16:09:18 -07:00
Maxime Beauchemin
65d185f153 chore: add support for prlint: a commit msg linter (#9655)
Sets up [PRLint](https://github.com/apps/prlint), with a single rule
matching [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/)

Also modifying the PR template to remove redundant annoying checkbox
section.

Once we adopt, I'm hoping we can modify our bot to auto-label based on
the commit type.
2020-05-12 10:23:43 -07:00
John Bodley
04e3a4a72d [caching] Using request context rather than globals (#9715)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-11 15:55:05 -07:00
Ville Brofeldt
f369ab35d6 chore: move bullet string manipulation to frontend (#9773) 2020-05-11 11:49:27 -07:00
Ville Brofeldt
a8d5a8aaa2 fix: make tests work individually (#9782) 2020-05-11 11:48:22 -07:00
Daniel Vaz Gaspar
660ea88534 tests: Fix, script to help run single tests (#9779) 2020-05-11 17:42:46 +01:00
Ville Brofeldt
42b10aecae Add QueryContext deserialization test (#9778)
* Add QueryContext deserialization test

* deserialize using marshmallow and assert error dict
2020-05-11 14:10:14 +03:00
ʈᵃᵢ
24db9ab088 [docs] Add SSL config options for postgres (#9767)
* [docs] add postgres SSL documentation

* move caching section to where it makes more sense
2020-05-10 19:37:13 +01:00
Bogdan
903217f64d Fix SQL Lab schema permission checks (#9756)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-08 14:59:49 -07:00
Bogdan
358bbe0c88 fix: Catch db_engine_spec.get_function_names exceptions (#9691)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-08 19:51:00 +01:00
Phillip Kelley-Dotson
b6df5da195 fix bug where error at import dashboard fails to show toast in "welcome" app (#9714)
* fix bug where error at import dashboard fails

* fix: make reusable component for messages and bring to app level

* fix: add liscence

* fix: lint errors and tests

* fix

* fix: lint

* fix: lint error

* add suggestions

* add suggestions

Co-authored-by: Phillip Kelley-Dotson <pkd@pkd.lan>
2020-05-08 10:50:55 -07:00
David Aaron Suddjian
3a213916c4 use the builtin calendar control panel (#9771) 2020-05-07 21:15:03 -07:00
David Aaron Suddjian
8a49c69f38 use word cloud's built in control panel (#9770) 2020-05-07 18:28:48 -07:00
Jesse Yang
13c5b133a9 test(frontend): use absolute path for src imports (#9761)
* test(frontend): use absolute path for src imports

* Upgrade prettier, fix eslint
2020-05-07 14:18:10 -07:00
ʈᵃᵢ
6237cea952 [docs] add postgres documentation (#9766) 2020-05-07 12:17:37 -07:00
Ville Brofeldt
5b430ead42 fix: implement force refresh in chart data request (#9762)
* fix: implement force refresh in chart data request

* unrelated lint
2020-05-07 09:33:41 -07:00
David Aaron Suddjian
80f8349018 Query the new chart data api for charts that support it (#9710)
* calling new chart api (mostly working)

* can't .then when the promise has already been await-ed

* Add handling for v1 API response

* comment

* update word cloud plugin & dependencies

* testing

* try just waiting

* Revert "try just waiting"

This reverts commit 10c092effd.

* tweaking bootstrap types

* Bumping word cloud package version

* new package lock

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2020-05-07 01:09:28 -07:00
Evan Rusackas
b93bf05bbd fix: removing controls from incubator-superset that are now in the plugin (#9758) 2020-05-06 17:29:49 -07:00
Krist Wongsuphasawat
52de32b9d7 build: bump superset-ui to 0.13 (#9757)
* chore: bump superset-ui

* build: bump superset-ui to 0.13

* docs: remove comment
2020-05-06 15:44:18 -07:00
kxu
d59e50ff1f Update README.md (#9731)
* Update README.md

Update and reorganize README to make it easier to navigate and use for community visitors.

* Update README.md
2020-05-06 11:55:20 -07:00
Erik Ritter
4b6681bc19 Revert "FilterBox,BigNumber,WorldMap: Handle empty results (#9671)" (#9755)
This reverts commit 865a909690.
2020-05-06 11:28:03 -07:00
Grace Guo
83b4165e61 [perf logging] Add extra logging for new/editMode dash (#9745)
* [perf logging] Add extra logging for new/editMode dash

* fix review comments
2020-05-06 09:03:04 -07:00
Maxime Beauchemin
9aabafe9fe fix: adhoc filter 'equals' doesn't let you save (#9652)
When altering a filter, when using `equals` or `does not equals`,
the save button is disabled even when it should be enalbed.
2020-05-06 08:38:10 -07:00
Bogdan
292704fec9 Use monospace (#9709)
Update superset-frontend/src/SqlLab/main.less

Co-authored-by: Evan Rusackas <evan@preset.io>

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2020-05-06 08:37:16 -07:00
Ville Brofeldt
5485eb993c feat: Add controlGroups to formData (#9740) 2020-05-06 14:53:13 +03:00
Daniel Vaz Gaspar
453806fc4c perf(dataset): improve performance on get list (#9739) 2020-05-06 11:48:32 +01:00
Ville Brofeldt
763f3529d2 fix: Add force flag to QueryContext schema (#9749)
* fix: Add force flag to QueryContext schema

* Fix comment

* Remove unnecessary required=Falses
2020-05-06 13:27:53 +03:00
Maxime Beauchemin
67d8b634b8 fix: autocomplete search in AdhocFilter operator dropdown (#9654)
Searching for 'equ' in AdhocFilter's operator dropdown doesn't find the
options who's label contain that substring.

I'd write a unit test but it's pretty tricky.
2020-05-05 21:43:33 -07:00
Erik Ritter
eee6280780 fix: re-add all time grain options to the new chart API (#9744) 2020-05-05 18:03:11 -07:00
Erik Ritter
821e7e53a9 chore: update README screenshots (#9728) 2020-05-05 13:02:10 -07:00
Grace Guo
0b963bdbb6 [perf logging] Add timing event when browser tab is hidden (#9733)
* [perf logging] Add timing event when browser tab is hidden

* fix review comment
2020-05-05 10:17:22 -07:00
David Aaron Suddjian
d65d29c810 fix: css prop is now overwhelmed with emotion (#9742) 2020-05-05 10:10:56 -07:00
Daniel Vaz Gaspar
0d85d25314 docs(api): improve openapi documentation for dash, charts and queries (#9724) 2020-05-05 14:42:18 +01:00
Daniel Vaz Gaspar
911f117673 fix(dependencies): Bump FAB to 2.3.4 (#9703) 2020-05-05 14:41:04 +01:00
Daniel Vaz Gaspar
d373cc8074 perf(dashboards): improve API performance for dashboards (#9704) 2020-05-05 14:30:24 +01:00
Bogdan
11972ed60d Fix bad test (#9735)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-04 23:52:18 -07:00
Luca Toscano
865a909690 FilterBox,BigNumber,WorldMap: Handle empty results (#9671)
This change avoids Pandas errors to pop up in chart when no data
is returned (confusing users). In this way a nicer
"No Results etc.." is returned.
2020-05-04 11:03:23 -07:00
ʈᵃᵢ
4c522ac65f [sqllab] fix, strip comments before parsing statements (#9692) 2020-05-04 19:47:29 +03:00
serenajiang
5d167afb94 [hive][csv upload] make INTs BIGINTs (#9716) 2020-05-03 09:28:31 -07:00
Erik Ritter
7f496668cb feat: add logging to warm_up_cache endpoint (#9712) 2020-05-01 18:01:38 -07:00
Bogdan
858082f975 Fix email reports (#9695)
* Fix email reports

* Address comments and inherit from str

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-05-01 07:42:58 -07:00
David Aaron Suddjian
9d3da79c4b migrate bignumber to use builtin controls (#9707)
* migrate bignumber to use builtin controls

* install @babel/compat-data
2020-04-30 19:27:44 -07:00
Grace Guo
43eec67291 [table editor] hide Edit Datasource option when no onDatasourceSave (#9706)
* [table editor] hide Edit Datasource option when no onDatasourceSave

* add !! operator to get truthiness
2020-04-30 17:32:01 -07:00
Erik Ritter
5fb883e279 chore(ts): type getClientErrorObject (#9693) 2020-04-30 17:03:31 -07:00
Ville Brofeldt
aad8209922 chore: Bump PyArrow to latest stable version (#9696) 2020-04-30 22:34:27 +03:00
Craig Rueda
e24e6ca571 [Helm] - Allow for customization of release name (#9694)
* Updated configurations to allow for more customization

* Adding gitignore for requirements.lock

* Moving Helm chart up a level

* Adding bootstrap script / switching image

* Adding bootstrap script / switching image
2020-04-30 10:55:43 -07:00
Daniel Vaz Gaspar
2b59075d57 tests(engine_specs): full bigquery engine coverage (#9702) 2020-04-30 18:31:15 +01:00
John Bodley
a908813f89 fix(security) Fixing regression in #9689 (#9705)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-30 10:22:03 -07:00
Daniel Vaz Gaspar
48ef619618 perf(charts): improve performance on GET list (#9619) 2020-04-30 17:15:48 +01:00
Erik Ritter
e95af7f783 fix: migrate all slices off the old time grain format (#9684) 2020-04-30 08:38:13 -07:00
John Bodley
3b0f8e9c8a [sql] Adding lighweight Table class (#9649)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-30 08:38:02 -07:00
ʈᵃᵢ
f7f60cc75d [Chart & Dashboard] improve listview filter ui and add expandable list support (#9651)
* better styling for select filters and search input

* add emotion babel plugin

* add spec for search input

* fix async select, add beeter error messages

* add error boundary around views

* cleanup and lint

* add expandable list to dashboards

* fix emotion babel config

* fix specs

* remove commented out code

* add selected style

* DRY up styles

* add icons

* fix type

* add apache license

* fix svgs

* fix ExpandableList type

* reduce custom css

* lint
2020-04-29 21:54:07 -07:00
Erik Ritter
5d7b13507e feat(errors): add client scaffolding for custom error messages (#9677) 2020-04-29 17:20:31 -07:00
Bogdan
62a15f027d Make cache work again for annotations (#9688)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-29 23:57:31 +03:00
Bogdan
283504479e Fix ENABLE_ROW_LEVEL_SECURITY flag usage (#9689)
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-29 23:57:06 +03:00
John Bodley
7f89f12c4a [debug] Debugging caching issue (#9665)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-29 12:16:47 -07:00
Grace Guo
52a0afe241 [fix] reduce table metadata fetch for latest_partition check (#9685)
* [fix] reduce table metadata fetch for latest_partition check

* fix review comment
2020-04-29 11:40:29 -07:00
Daniel Vaz Gaspar
527bee5051 tests(engine_specs): full postgres engine coverage (#9682) 2020-04-29 18:20:25 +01:00
Daniel Vaz Gaspar
f13ba2561c fix(tests): custom filter flaky tests on dash and charts (#9679) 2020-04-29 08:36:11 +01:00
Grace Guo
735dcd2002 [explore view] add partition as adhoc filter option (#9637)
* [explore view] add partition as adhoc option

* use adhocFilter Simple Tab

* simplify conditional check for custom adhoc filter operator

* add simple unit tests
2020-04-28 23:09:44 -07:00
Ville Brofeldt
8d2165d96d fix: catch viz exceptions (#9669) 2020-04-29 05:14:27 +03:00
Lily Kuang
b27a81e0da [logging] deprecation notices for SQLite (#9662)
* [logging] deprecation notices for SQLite

* [logging] use warning for SQLite notice

* [logging] update grammar
2020-04-28 14:28:09 -07:00
Evan Rusackas
13aa889796 gotta catch 'em all (#9676) 2020-04-28 14:10:04 -07:00
Natalie Ruhe
9d755bc1ad [fix] Support APP_ICON_WIDTH configuration parameter in SPA menu (#9666)
* Expose additional APP_ICON_WIDTH python config variable to ui via app bootstrap for use in Menu

* Update base.py to inclue APP_ICON_WIDTH via bracket notation instead of .get and adjust Menu proptypes to be required.

Co-authored-by: Natalie Ruhe <nruhe@nruhe.attlocal.net>
Co-authored-by: Natalie Ruhe <natalie@preset.io>
2020-04-28 12:59:03 -07:00
Ville Brofeldt
a52cfcd234 feat: Add geospatial post processing operations (#9661)
* feat: Add geospatial post processing operations

* Linting

* Refactor

* Add tests

* Improve docs

* Address comments

* fix latitude/longitude mixup

* fix: bad refactor by pycharm
2020-04-28 20:15:16 +03:00
Lily Kuang
c474ea848a [fix] Push browser history on pagination in react listviews (#9624)
* improve history for query params

* fix: push browser history on pagination in react listviews

* fix spec

Co-authored-by: Tai Dupree <tdupreetan@gmail.com>
2020-04-27 21:37:22 -07:00
Erik Ritter
e8c3803336 chore(ts): refactor and migrate StackTraceMessage to TypeScript (#9663) 2020-04-27 13:24:21 -07:00
Daniel Vaz Gaspar
f07ca7d836 fix(database): test connection error message for module not found (#9634) 2020-04-27 09:24:41 +01:00
Daniel Vaz Gaspar
516bdf6db1 fix(mssql): apply limit and set alias for functions (#9644) 2020-04-27 09:23:08 +01:00
Evan Rusackas
5e4c291913 Controls cleanup pass (#9578)
* migrating date_filter

* normalized control

* filter_configs control

* column_collection control

* time_range_endpoints control

* time_range_fixed control

* url_params control

* cache_timeout control

* annotation_layers control

* color control unused?

* linters rule 🤘

* this should have been deleted earlier

* global_opacity, mapbox_label, mapbox_style, viewport_zoom

* linting

* comparison_type

* contribution control

* log_scale

* show_values

* table_filter

* pandas_aggfunc

* code control

* formatSelectOptions import

* lint

* markup_type control

* lintage

* date_time_format control, linting

* url control, test mods

* min_periods control

* rolling_periods

* rolling_type

* missing lib

* order_desc

* number_format

* link_length

* all_columns_y

* all_columns_x

* normalize_across, select_country, all_columns

* fixing test

* linter-caught dependencies

* waiting

* wait longer!

* utilizing tabOverride for Analytics

* tabOverride for Annotations and Layers
2020-04-24 16:12:26 -07:00
Grace Guo
29dd989483 [dashboard] increase tab count limit (#9640) 2020-04-24 13:41:33 -07:00
John Bodley
1c656feb95 [mypy] Enforcing typing for a number of modules (#9586)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-24 10:07:35 -07:00
Jesse Yang
7d5f4494d0 docs: remove references to superset-ui-plugins (#9639)
`superset-ui-plugins` has been deprecated.[1] We now manages
all basic visualizations in apache-superset/superset-ui .

[1] https://github.com/apache-superset/superset-ui/pull/332
2020-04-24 09:03:17 -07:00
Lily Kuang
b2720074bd [datesets] feat: add statsd to datasets api (#9577)
* add statsd to tables api

* [datasets] update export endpoint

* [datasets] update charts api test
2020-04-24 16:38:29 +01:00
John Bodley
955a4fe792 [fix] Automatically add relevant Jinja methods to cache key if present (#9572)
* [fix] Adding URL params to cache key if present

* [cache] Wrapping Jinja methods

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-24 08:18:22 -07:00
V
7386b017ab Cast raw 'fetch_values_predicate' to Sqlalchemy Text (#9643)
Issue https://github.com/apache/incubator-superset/issues/9642
2020-04-24 12:04:18 +03:00
John Bodley
8ae92b50ad [fix] Fixing regression from #9161 (#9641)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-23 22:51:33 -07:00
Ville Brofeldt
a6cedaaa87 chore: Improve chart data API + schemas + tests (#9599)
* Make all fields optional in QueryObject and fix having_druid schema

* fix: datasource type sql to table

* lint

* Add missing fields

* Refactor tests

* Linting

* Refactor query context fixtures

* Add typing to test func
2020-04-23 14:30:48 +03:00
Daniel Vaz Gaspar
76764acfc1 [sql_lab] Improve performance, only use slow func when needed (#9612) 2020-04-23 09:35:57 +01:00
David Aaron Suddjian
f8adfc8fbf use new @superset-ui/style package for theming (#9605)
* use new @superset-ui/style package for theming

* fix tests to reference theme

* try adding a wait
2020-04-22 13:13:40 -07:00
Jesse Yang
7b33d5457b fix: change number format to original value to "~g" (#9608)
Originally it uses " ", which do give the original value, but will
not work when the `getNumberFormatter` in `superset-ui/number-format`
is called for the second time. Because the format will successfully
register as "" [1], but cannot be obtained again via `registry.get()`[2].

[1]: 44ad062dd0/packages/superset-ui-number-format/src/NumberFormatterRegistry.ts (L30)
[2]: dc804b7a70/packages/superset-ui-core/src/models/RegistryWithDefaultKey.ts (L36)
2020-04-22 10:07:37 -07:00
Ville Brofeldt
85778f5bec fix: broken IS NULL and IS NOT NULL operator (#9613)
* fix: broken is null and is not null operator

* add unit tests

* Rename filter operator enum
2020-04-22 19:11:45 +03:00
Ville Brofeldt
c3307fa7aa fix: move docs image symlink to _static (#9592)
* fix: move docs image symlink to _static

* Remove unneeded copy statements from build script

* Remove copy statement from CI conf
2020-04-22 19:11:20 +03:00
Daniel Vaz Gaspar
cba82cfd03 [statsd] Send time metrics in ms not seconds (#9614) 2020-04-22 16:46:38 +01:00
filippo balicchia
d052f47bbd improve helm chart (#9346)
* improve helm chart

* add Apache license headers

* fix: suburst chart when secondary metric is defined (#9343)

* refactor: remove settooltip (#9332)

* [config] Fixing GET_FEATURE_FLAGS_FUNC example (#9339)

* [config] Fixing GET_FEATURE_FLAGS_FUNC example

* Adding typing for GET_FEATURE_FLAGS_FUNC

* Update config.py

* feat: [SQLLAB] add checkbox to control autocomplete (#9338)

* [SQLLAB] add checkbox to control autocomplete

* autocomplete -> autocompleteEnabled

* fix defaultProps

* fix spec

* Cal heatmap controls migration (#9355)

* controls migrated

* linting

* migrating unique EventFlow controls (#9358)

* migrating unique controls

* Lint 

* Treemap controls migration (#9352)

* Treemap

* linting

* feat: [explore] don't save filters inherited from a dashboard (#9340)

* feat: [explore] don't save filters inherited from a dashboard

When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.

Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".

Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.

* fix build

* [charts] Refactor API using SIP-35 (#9329)

* [charts] Refactor charts API using SIP-35

* [charts] Fix, copy pasta

* [charts] simplify

* Add global install of webpack and webpack-cli to docker-compose (#9310)

* [dataset] columns and metrics API (nested) (#9268)

* [dataset] columns and metrics API (nested)

* [dataset] tests and validation

* [datasets] Fix, revert list field name to database_name

* Adding requirements-local.txt support (#9357)

* Adding requirements-local.txt support

* Reverting package-lock.json

* Migrate unique Heatmap controls (#9360)

* Migrate Heatmap controls

* Lint

* fix: don't parseFloat when the *already numeric* value ends in a decimal point (#9351)

* [sip-15] Fixing typo in docstring (#9377)

* [explore view] fix long query issue from Run in SQL LAB Button (#9345)

* [explore view] fix long query issue from Run in SQL LAB Button

* SQL Lab page needs to take the post form data, too

* fix variable names

* updated payload dict, rename hidden form

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>

* fix a typo in set prop value (#9383)

* Migrating unique DirectedForce controls (#9359)

* migrating controls

* Linting 

* oops... meant to pull this out in a conflict resolution.

* Update MANIFEST.in (#9261)

Include superset-frontent/package.json in package because setup.py requires it

* fix: [dashboard] add row padding (#9381)

* Removing WordCloud controls from CONTRIBUTING.md (#9391)

* [dashboard] handle markdown error (#9350)

* [dashboard] handle markdown error

* localize error message, fix review comments.

* [cache] Cleaning up viz/cache logic (#9375)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* migrating controls 🎛 (#9386)

* Migrating unique Table controls (#9388)

* Migrating unique BoxPlot controls (#9392)

* upgrade to react-bootstrap v0.33.1 (#9372)

* upgrade to react-bootstrap v0.33.1

* fix test

* simplify proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

* simplify more proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>

* migrating unique controls (#9374)

* Migrating horizon controls (#9368)

* migrating unique controls

* linting 

* build: use manifest hooks for dev server proxy and fix hot reload for charts (#9333)

* Use manifest hooks for dev server proxy

* Rewrite dashboard/App.jsx to supress Redux error in hot reload

* Update ChartRenderer to allow hot realod in Explore

* Fix hot reload in dashboars as well

* Revert changes to ChartRenderer.jsx

Will submit in another PR.

* Clean up

* migrating controls (#9373)

* [dataset] New, export API endpoint (#9367)

* [dataset] New, export API endpoint

* Fix, lint

* [charts] New, bulk delete API endpoint (#9387)

* [charts] New, bulk delete API endpoint

* [charts] Fix, typos

* [charts] Fix wrong model name

* [sip-15] fix messaging (#9397)

* Mirgrating unique Partition chart controls (#9385)

* mirgrating controls

* specific import

* feat: add SSL certificate validation for Druid (#9396)

* feat: add SSL certificate feature

* Address comments

* don't mutate extras

* Address comments and add polish

* Add further polish

* [fix] Fixing cache key inconsistencies (#9382)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* add initjob conf + secret

* [dependency] Fix, Bump FAB to 2.3.1 (#9413)

* [mypy] Enforcing typing for charts (#9411)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* add missing headers

* [dashboards] Fix, API update slug uniqueness refusing empty string (#9417)

* [dashboards] Fix, API update slug uniqueness refusing empty string

* [dashboards] tests

* Build: fix hot reload for charts (#9400)

* Fix hot reload for charts

* Override tsc options for plugins

Plugins will sometimes have their own `tsconfig.json`, which will
interfere with the dev server config if configured inappropriately.

This change makes sure `tsc` (and `ts-loader`) always compiles to
`esnext` modules, so we don't get "Uncaught ReferenceError: exports
is not defined" error.

* [fix] allow force refresh for No Results chart (#9408)

* [fix] dashboard filter indicator no showing single number value (#9401)

* fix pagination for list views (#9425)

* feat(visualization): add timeRangeFixed to Big Number w/ Trendlines (#9341)

* feat: add timeRangeFixed and increase font size for Big Number chart

* Update package-lock.json

* [fix]some translation not work better (#9428)

* Add check for SSL certificate and add form validators (#9436)

* Add check for server_cert falsy and add form validators

* Address comments

* migrating unique controls (#9446)

* Enforcing linting of LESS (#9356)

* linting some LESS

* enforce linting

* moving font binaries out of stylesheets to fonts folder.

* renaming font specimen sheet directory.

* Migrating unique bigNumber(total) controls (#9440)

* migrating options controls

* lint 

* baby steps...

* shared BigNumber controls file

* capitalization matters

* Migrating unique NVD3 viz controls (#9445)

* donut control

* labels outside

* linting

* x_log_scale, pie_label_type

* linting

* line_charts, line_charts_2

* marker_labels

* marker_line_labels, marker_lines, markers

* prefix_metric_with_slice_name, range_labels, ranges

* stacked_style

* Revert "stacked_style"

This reverts commit aae2d418b8f1950fbe32248b62e50a12fbf186bd.

* stacked_style take 2...

* Revert "stacked_style take 2..."

This reverts commit 38b7155f50143684c92a67b2a9fa16f65c269d35.

* Migrating NVD3 Area's stacked_style config (#9454)

* Migrating NVD3 Area's stacked_style config

* test mods

* lint

* nonsense change

* undoing nonsense. Come on GitHub, WORK.

* Eslint prefer-object-spread (#9466)

* The rule.

* The result

* [mypy] Enforcing typing for some modules (#9416)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* chore: bump black to 19.10b0 and mypy to 0.770 (#9378)

* Bump black to 19.10b0

* Upgrade mypy to 0.770

* Update how inline type is defined

* release: Add support for ZSH in RELEASING and add tagging instructions (#9451)

* Add support for ZSH in RELEASING and add tagging instructions

* fail if unsupported shell

* Added dremio (#9472)

* [query] New, readonly API (#9403)

* [query] New, readonly API

* Update tests/queries/api_tests.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* [mypy] Enforcing typing for superset.examples (#9469)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* Migrating shared DeckGL controls (#9455)

* Missed a couple unique controls!

* new shared module, with filter_nulls export.

* autozoom

* dimension

* nixing unneeded import

* stroke_width

* js_columns

* remaining js_* controls

* cleaning up unused stuff

* legend_format

* exports for prior commit

* legend_position

* line_column

* fill_color_picker

* filled, stroked, stroke_color_picker

* grid_size, extruded

* ... more gridsize

* viewport

* point_radius_fixed, spatial

* multiplier, line_type, line_width

* reverse_long_lat

* lint 

* [Doc] Update installation doc for Dremio (#9464)

* update installation doc for Dremio

Customers fail to install pyodbc properly which on linux systems requires you to install unixodbc-devel package. Update the instructions to make it clear.

* fix new line

* [mypy] Enforcing typing for superset.dashboards (#9418)

* [mypy] Enforcing typing for superset.dashboards

* Make return types equal on all commands

* Make return types equal on all commands

* [dashboard] address comments same return type on commands

* lint

* lint

* [datasets] Add strict type annotation (#9437)

* [datasets] Add strict type annotation

* Fix refresh endpoint

* Improve logic on update

* Filter owners select by text input (#9337)

* filter owners select by text input

* use rison

* fix backend owners filter logic

* use fullname, not username on owners inputs

* fix some tests

* fixing tests

* deterministic tests

* appease linter

* add back search by username

* more comprehensive filter test

* add clarifying text

* formatting...

* Handle empty dataframes in TableViz (#9480)

TableViz fails to display empty dataframes returning an error like:
"None of [Index(['project', 'count'], dtype='object')] are in the [columns]"

The behavior has been observed while testing 0.36.0rc3 with
Druid datasources.

issue: #9468

* [sqllab] Add CUSTOM_TEMPLATE_PROCESSOR config (#9376)

Co-authored-by: Dandan Shi <dshi@dropbox.com>

* [tests] refactor, change datasets and charts to it's own folder (#9487)

* pylint: accept specific 2 character names by default (#9460)

* lint: accept 2 letter names by default

* Address review comments

* Remove e and d from good-names

* Upgrade table chart plugin to 0.12.13 (#9493)

* feat: change default time range in sql lab explore (#9486)

Change from "100 years go" to "no filter".

100 years ago is basically equivalent to no filter, but has
implications on how x-axis is plotted on certain charts (e.g. Big
Number).

* fix: add explore control tabOverride at the section level (#9495)

* [query] Migrate api v1 query to new location (#9479)

* [query] Migrate api v1 query to new location

* Improved errors and tests

* [query] nit and revert undesired change

* [query] lint

* [query] revert nan change

* Update superset/queries/api.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update tests/queries/api_tests.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* change endpoint location to charts

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Bump FAB to 2.3.2 (#9491)

* [dashboards] Fix, update dashboard owners not propagating to charts o… (#9484)

* [dashboards] Fix, update dashboard owners not propagating to charts owners

* Add tests

* Fix tests

* better naming

* [dashboards] New, tittle and slug OR filter (#9435)

* [dashboards] New, tittle and slug OR filter

* Update requirements, because of prison bump

* Tests

* Fix tests

* Avoid like filter on empty string value

* merge master brings strict typing to the table

* fix: add lineWidth to Shared_DeckGL.jsx (#9496)

* fix: add lineWidth to Shared_DeckGL.jsx

* linting

* apply changes

* opps again .... license

* feat: Add post processing to QueryObject (#9427)

* Add post processing to QueryObject

* Simplify sort signature and require explicit sort order

* Add new operations and unit tests

* linting

* Address comments

* Simplify test method names

* Address comments

* Linting

* remove unnecessary logic

* Apply strict whitelisting to all getattr calls

* Add checking of rolling_type_options and add/improve docs

* Add visualization flow to the CTA queries (#9370)

* Visualize after running Ctas query (#4)

* Visualize after running Ctas query.

Stub for table viz

Work on the viz

Add JS functionality for Ctas viz

Add test for the table viz flow

Fix test

Add js test for the ctas viz

* Fix tests

* Resolve comments

* Leverate tmpSchema in the query object

* Fix i18n string

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>

* Bump sqlalchemy and dremio deps (#9503)

* [charts] New, custom filter for name OR description (#9492)

* [charts] New, custom filter for name OR description

* Improve test

* docker node_modules in its own volume (#9509)

* [Dashboard] new listview filters & emotion infra (#9462)

* [Dashboard] listview filters to match new design

* use title_or_slug filter

* use ?. operator

* move components to components folder

* chore: auto label issues based on the template chosen (#9507)

* chore: auto label issues based on the template chosen

* quoted stuffs

* control to turn off table bar-chart backgrounds (#9500)

* control to turn off table bar-chart backgrounds

* flipping enable to disable, to support existing charts

* lint 

* Turn ON to enable (reversing logic)

* bumping big number chart

* ling 

* Another attempt to fix a viz.py bug (#9522)

* Another attempt to fix a viz.py bug

* Add types to new ddtm attributes

* deprecate groupby controls in query_obj (#9366)

* Deprecate groupby from query_obj

* Fix query_object bug

* Fix histogram

* Remove groupby from legacy druid connector and fix first batch of unit tests

* Deprecate some unnecessary tests + fix a few others

* Address comments

* hide SIP-38 changes behind feature flag

* Break out further SIP-38 related tests

* Reslove test errors

* Add feature flag to QueryContext

* Resolve tests and bad rebase

* Backport recent changes from viz.py and fix broken DeckGL charts

* Fix bad rebase

* backport #9522 and address comments

* [dashboard] Fix, improve test for custom filter (#9521)

* [api] refactor, remove unnecessary code, using command pattern now (#9520)

* Importing validators module from superset-ui (#9465)

* importing... this is going to break CI, but there it is.

* adding validator package.

* pluralization - maybe it should be plural, but whatevs

* updating validators to match new exports

* removing old validators

* lintage 

* validateNumeric -> validateNumber

* using legacyValidateInteger, legacyValidateNumber

* linting 

* removing extraneous package lock file

* Fix typo in viz.py (#9533)

* [Build] Add Github workflows (#9517)

As an replacement to Travis CI.

* Disabling recording in Cypress tests (#9535)

* Disabling recording in Cypress tests

* Removing --group --ci-build-id

* Run CI on all pushes / PR's (#9538)

* [list views] add work-break css for table layouts (#9537)

* [thumbnails] API and celery task for dashboards and charts (#8947)

* [copy] fix: Row Level Security get_rls_filters func SELECT statement (#9541)

* fix: Row Level Security get_rls_filters func SELECT statement

* More general RowLevelSecurityTests case to avoid improper ids matching

* Make email parsing more robust (#9523)

* Make email parsing more robust

* Address comment

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>

* docs: point our README the maintained Docker image (#9536)

Our README now points to a not-so-well-maintain, community-contributed
Docker image. The docker image we link to here is managed and
supported by actual committers under the Preset org.

* Bump copyright notice (#9539)

* Ditching travis config in favor of Github Actions (#9548)

* Bump @superset-ui/legacy-plugin-chart-table to 0.12.14 (#9549)

* [dashboard] New, add statsd metrics to the API (#9519)

* [fix] warm up cache error handling (#9560)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* [fix] dashboard filter scope bug (#9550)

* [Build] Collect frontend code coverage from Cypress tests (#9555)

* build: collect code coverage from Cypress

Collect frontend code coverage reports from Cypress tests and add
proper tagging for all tests.

* Fix bash script lint error from shellcheck

* Revert Cypress to 4.3.0 to see if it fixes a failing test

* chore: Migrate unique FilterBox controls from controls.jsx (#9566)

* Migrate FilterBox controls from controls.jsx

* Linting

* chore: Add OpenAPI docs to /api/v1/chart/data EP (#9556)

* Add OpenAPI docs to /api/v1/chart/data EP

* Add missing fields to QueryObject, fix linting and unit test errors

* Fix unit test errors

* abc

* Fix errors uncovered by schema validation and add unit test for invalid payload

* Add schema for response

* Remove unnecessary pylint disable

* [pypi] Include compiled translations on Pypi pkg (#9567)

* doc: Add changelog for 0.36.0 (#9570)

* Migrating shared NVD3 controls to new module (#9525)

* proto module

* caught a missed 'freq' unique control

* line_interpolation

* linting

* showLegend

* show_controls

* xAxisLabel

* bottomMargin

* x_ticks_layout

* missed one

* x_axis_format

* yLogScale

* y_axis_bounds

* linting

* nixing yarn lock

* x_axis_showminmax

* xAxisShowminmax control

* richTooltip

* linting, syntax fix

* show_bar_value, bar_stacked

* reduceXticks, yaxislabel

* left_margin, max_bubble_size, y_axis_showminmax

* show_labels

* send_time_range, y_axis_2_format, show_markers, order_bars

* nixing commented imports

* fake controls

* looking up actual controls for comparison.

* adding key to test setup

* controls inventory

* apache junk

* lint 

* ignore null controls

* fixing goofed up spread operation for xAxisFormat config

* lint 

* fixes for errors caused by <hr> element in filterbox controls

* fixing filter controls for 'druid_time_origin', 'granularity', 'granularity_sqla', 'time_grain_sqla'

* getControlsInventory -> getControlsForVizType

* further renaming of chartControlsInventory - > getControlsForVizType

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>

* fix: Add deprecated fields to QueryObject schema (#9579)

* fix: Add deprecated fields to QueryObject schema

* linting

* [mypy] Enforcing typing for superset.migrations (#9583)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* Re-enable the AnnotationLayerModelView read API (#9443)

* Re-enable the AnnotationLayerModelView read API

* Fix CI

* [config] Enable dashboard bootstrap payload reduction by default (#9585)

* [docs] fix, elastic.co elasticsearch product location (#9598)

* [fix] Fixing issue with Jinja filter_value (#9582)

Co-authored-by: John Bodley <john.bodley@airbnb.com>

* [Build] moves prettier check to separate script (#9591)

* [Build] moves prettier check to separate script

* rename step: eslint -> lint

* Add documentation build to Github Actions (#9569)

* Add documentation build to Github Actions

* Update requirements for documentation builds

* Minor optimization - only install requirements for documentation in documentation job

* Add raw number/integer option to d3 number formats (#9562)

* Bump superset-ui-connection to 0.12.22 (#9602)

* [charts] feat: add statsd to charts api (#9571)

* add statsd to charts api

* update test for charts api

* [charts] add statsd asserts wrapper

* [charts] update api test

* removed white space

* [tests] Helper script to run single tests (#9547)

* [charts] adds new filters ui (#9530)

* [charts] adds new filters ui

* move null check to be more visible

* better filter lists and async filter functionality

* [SQL Lab] Lock result set controls to be always visible (#9587)

* improve helm chart

* add Apache license headers

* add initjob conf + secret

* add missing headers

* apply changes

* opps again .... license

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Krist Wongsuphasawat <krist.wongz@gmail.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
Co-authored-by: Will Barrett <will@preset.io>
Co-authored-by: Craig Rueda <craig@craigrueda.com>
Co-authored-by: Grace Guo <grace.guo@airbnb.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Alexander Mancevice <amancevice@cargometrics.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: venter <venter.zhu@outlook.com>
Co-authored-by: Naren <narendrans@users.noreply.github.com>
Co-authored-by: Luca Toscano <elukey@users.noreply.github.com>
Co-authored-by: dandanhub <dandanshi@live.cn>
Co-authored-by: Dandan Shi <dshi@dropbox.com>
Co-authored-by: Bogdan <b.kyryliuk@gmail.com>
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Co-authored-by: Octavian <octavian.corlade@gmail.com>
Co-authored-by: Aliaksei Kushniarevich <axelet3@gmail.com>
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: Lily Kuang <lily@preset.io>
2020-04-22 07:45:13 -07:00
Erik Ritter
dcbffed9bb [SQL Lab] Lock result set controls to be always visible (#9587) 2020-04-21 12:09:33 -07:00
ʈᵃᵢ
0b999e3b91 [charts] adds new filters ui (#9530)
* [charts] adds new filters ui

* move null check to be more visible

* better filter lists and async filter functionality
2020-04-21 12:04:11 -07:00
Daniel Vaz Gaspar
9cf33e9f9d [tests] Helper script to run single tests (#9547) 2020-04-21 20:03:58 +01:00
Lily Kuang
7cefc89c64 [charts] feat: add statsd to charts api (#9571)
* add statsd to charts api

* update test for charts api

* [charts] add statsd asserts wrapper

* [charts] update api test

* removed white space
2020-04-21 19:57:42 +01:00
Erik Ritter
ba691d3a27 Bump superset-ui-connection to 0.12.22 (#9602) 2020-04-21 11:36:01 -07:00
Jesse Yang
2b957a2c1e Add raw number/integer option to d3 number formats (#9562) 2020-04-20 21:31:47 -07:00
Will Barrett
132d774953 Add documentation build to Github Actions (#9569)
* Add documentation build to Github Actions

* Update requirements for documentation builds

* Minor optimization - only install requirements for documentation in documentation job
2020-04-20 15:48:50 -07:00
ʈᵃᵢ
cb51d7833f [Build] moves prettier check to separate script (#9591)
* [Build] moves prettier check to separate script

* rename step: eslint -> lint
2020-04-20 15:06:33 -07:00
John Bodley
237ac59474 [fix] Fixing issue with Jinja filter_value (#9582)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-20 09:44:45 -07:00
Daniel Vaz Gaspar
2295999a91 [docs] fix, elastic.co elasticsearch product location (#9598) 2020-04-20 15:48:03 +01:00
Erik Ritter
083dd6ae1a [config] Enable dashboard bootstrap payload reduction by default (#9585) 2020-04-19 15:41:36 -07:00
Erik Ritter
06471f5877 Re-enable the AnnotationLayerModelView read API (#9443)
* Re-enable the AnnotationLayerModelView read API

* Fix CI
2020-04-19 10:19:50 -07:00
John Bodley
636ee5d19a [mypy] Enforcing typing for superset.migrations (#9583)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-18 23:24:32 -07:00
Ville Brofeldt
0472c11157 fix: Add deprecated fields to QueryObject schema (#9579)
* fix: Add deprecated fields to QueryObject schema

* linting
2020-04-18 20:28:57 +03:00
Evan Rusackas
ea27e68ee1 Migrating shared NVD3 controls to new module (#9525)
* proto module

* caught a missed 'freq' unique control

* line_interpolation

* linting

* showLegend

* show_controls

* xAxisLabel

* bottomMargin

* x_ticks_layout

* missed one

* x_axis_format

* yLogScale

* y_axis_bounds

* linting

* nixing yarn lock

* x_axis_showminmax

* xAxisShowminmax control

* richTooltip

* linting, syntax fix

* show_bar_value, bar_stacked

* reduceXticks, yaxislabel

* left_margin, max_bubble_size, y_axis_showminmax

* show_labels

* send_time_range, y_axis_2_format, show_markers, order_bars

* nixing commented imports

* fake controls

* looking up actual controls for comparison.

* adding key to test setup

* controls inventory

* apache junk

* lint 

* ignore null controls

* fixing goofed up spread operation for xAxisFormat config

* lint 

* fixes for errors caused by <hr> element in filterbox controls

* fixing filter controls for 'druid_time_origin', 'granularity', 'granularity_sqla', 'time_grain_sqla'

* getControlsInventory -> getControlsForVizType

* further renaming of chartControlsInventory - > getControlsForVizType

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
2020-04-17 11:40:50 -07:00
Ville Brofeldt
1b02b5b157 doc: Add changelog for 0.36.0 (#9570) 2020-04-17 19:55:51 +03:00
Daniel Vaz Gaspar
ecf1abae78 [pypi] Include compiled translations on Pypi pkg (#9567) 2020-04-17 16:28:10 +01:00
Ville Brofeldt
8e439b1115 chore: Add OpenAPI docs to /api/v1/chart/data EP (#9556)
* Add OpenAPI docs to /api/v1/chart/data EP

* Add missing fields to QueryObject, fix linting and unit test errors

* Fix unit test errors

* abc

* Fix errors uncovered by schema validation and add unit test for invalid payload

* Add schema for response

* Remove unnecessary pylint disable
2020-04-17 16:44:16 +03:00
Ville Brofeldt
427d2a05e5 chore: Migrate unique FilterBox controls from controls.jsx (#9566)
* Migrate FilterBox controls from controls.jsx

* Linting
2020-04-17 12:20:32 +03:00
Jesse Yang
d8de540e0c [Build] Collect frontend code coverage from Cypress tests (#9555)
* build: collect code coverage from Cypress

Collect frontend code coverage reports from Cypress tests and add
proper tagging for all tests.

* Fix bash script lint error from shellcheck

* Revert Cypress to 4.3.0 to see if it fixes a failing test
2020-04-16 23:35:01 -07:00
Grace Guo
4a55e1ea3a [fix] dashboard filter scope bug (#9550) 2020-04-16 15:44:03 -07:00
John Bodley
074e3653e2 [fix] warm up cache error handling (#9560)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-16 15:19:32 -07:00
Daniel Vaz Gaspar
7b11b44abe [dashboard] New, add statsd metrics to the API (#9519) 2020-04-16 10:54:45 +01:00
Jesse Yang
d9ebd32485 Bump @superset-ui/legacy-plugin-chart-table to 0.12.14 (#9549) 2020-04-15 14:41:36 -07:00
Craig Rueda
403d5d6542 Ditching travis config in favor of Github Actions (#9548) 2020-04-15 10:22:43 -07:00
Ville Brofeldt
8476de9640 Bump copyright notice (#9539) 2020-04-15 08:59:29 -07:00
Maxime Beauchemin
4afedf1a01 docs: point our README the maintained Docker image (#9536)
Our README now points to a not-so-well-maintain, community-contributed
Docker image. The docker image we link to here is managed and
supported by actual committers under the Preset org.
2020-04-15 15:20:01 +01:00
Bogdan
3574a3a4fb Make email parsing more robust (#9523)
* Make email parsing more robust

* Address comment

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-15 16:58:03 +03:00
Aliaksei Kushniarevich
ef5e11f45b [copy] fix: Row Level Security get_rls_filters func SELECT statement (#9541)
* fix: Row Level Security get_rls_filters func SELECT statement

* More general RowLevelSecurityTests case to avoid improper ids matching
2020-04-15 16:41:54 +03:00
Daniel Vaz Gaspar
d81f720502 [thumbnails] API and celery task for dashboards and charts (#8947) 2020-04-15 09:40:14 +01:00
ʈᵃᵢ
1ccda920fe [list views] add work-break css for table layouts (#9537) 2020-04-14 22:04:24 -07:00
Craig Rueda
fd89900dc5 Run CI on all pushes / PR's (#9538) 2020-04-14 21:16:16 -07:00
Craig Rueda
1d7900ade3 Disabling recording in Cypress tests (#9535)
* Disabling recording in Cypress tests

* Removing --group --ci-build-id
2020-04-14 15:56:35 -07:00
Jianchao Yang
7b4b0d1c61 [Build] Add Github workflows (#9517)
As an replacement to Travis CI.
2020-04-14 13:38:09 -07:00
Will Barrett
aef06ded6b Fix typo in viz.py (#9533) 2020-04-14 13:17:36 -07:00
Evan Rusackas
6270f7dc24 Importing validators module from superset-ui (#9465)
* importing... this is going to break CI, but there it is.

* adding validator package.

* pluralization - maybe it should be plural, but whatevs

* updating validators to match new exports

* removing old validators

* lintage 

* validateNumeric -> validateNumber

* using legacyValidateInteger, legacyValidateNumber

* linting 

* removing extraneous package lock file
2020-04-14 12:00:25 -07:00
Daniel Vaz Gaspar
c343c2ff1d [api] refactor, remove unnecessary code, using command pattern now (#9520) 2020-04-14 10:11:11 +01:00
Daniel Vaz Gaspar
925d8b5315 [dashboard] Fix, improve test for custom filter (#9521) 2020-04-14 10:10:14 +01:00
Ville Brofeldt
9447381549 deprecate groupby controls in query_obj (#9366)
* Deprecate groupby from query_obj

* Fix query_object bug

* Fix histogram

* Remove groupby from legacy druid connector and fix first batch of unit tests

* Deprecate some unnecessary tests + fix a few others

* Address comments

* hide SIP-38 changes behind feature flag

* Break out further SIP-38 related tests

* Reslove test errors

* Add feature flag to QueryContext

* Resolve tests and bad rebase

* Backport recent changes from viz.py and fix broken DeckGL charts

* Fix bad rebase

* backport #9522 and address comments
2020-04-14 12:06:10 +03:00
Will Barrett
c1f8c9e397 Another attempt to fix a viz.py bug (#9522)
* Another attempt to fix a viz.py bug

* Add types to new ddtm attributes
2020-04-14 09:10:04 +03:00
Evan Rusackas
f29d0fd9f2 control to turn off table bar-chart backgrounds (#9500)
* control to turn off table bar-chart backgrounds

* flipping enable to disable, to support existing charts

* lint 

* Turn ON to enable (reversing logic)

* bumping big number chart

* ling 
2020-04-13 16:53:50 -07:00
Maxime Beauchemin
cf6422caf3 chore: auto label issues based on the template chosen (#9507)
* chore: auto label issues based on the template chosen

* quoted stuffs
2020-04-13 16:31:21 -07:00
ʈᵃᵢ
f90824fa17 [Dashboard] new listview filters & emotion infra (#9462)
* [Dashboard] listview filters to match new design

* use title_or_slug filter

* use ?. operator

* move components to components folder
2020-04-13 13:39:55 -07:00
Octavian
a797465ae5 docker node_modules in its own volume (#9509) 2020-04-11 15:47:50 -07:00
Daniel Vaz Gaspar
622561f756 [charts] New, custom filter for name OR description (#9492)
* [charts] New, custom filter for name OR description

* Improve test
2020-04-11 07:25:54 +01:00
Ville Brofeldt
11ac8c7392 Bump sqlalchemy and dremio deps (#9503) 2020-04-11 08:19:25 +03:00
Bogdan
02b3fb1d63 Add visualization flow to the CTA queries (#9370)
* Visualize after running Ctas query (#4)

* Visualize after running Ctas query.

Stub for table viz

Work on the viz

Add JS functionality for Ctas viz

Add test for the table viz flow

Fix test

Add js test for the ctas viz

* Fix tests

* Resolve comments

* Leverate tmpSchema in the query object

* Fix i18n string

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-04-11 00:46:46 +03:00
Ville Brofeldt
a8ce3bccdf feat: Add post processing to QueryObject (#9427)
* Add post processing to QueryObject

* Simplify sort signature and require explicit sort order

* Add new operations and unit tests

* linting

* Address comments

* Simplify test method names

* Address comments

* Linting

* remove unnecessary logic

* Apply strict whitelisting to all getattr calls

* Add checking of rolling_type_options and add/improve docs
2020-04-10 20:50:11 +03:00
Ville Brofeldt
5ec0192bcc fix: add lineWidth to Shared_DeckGL.jsx (#9496)
* fix: add lineWidth to Shared_DeckGL.jsx

* linting
2020-04-09 12:47:50 -07:00
Daniel Vaz Gaspar
b39e78fca5 [dashboards] New, tittle and slug OR filter (#9435)
* [dashboards] New, tittle and slug OR filter

* Update requirements, because of prison bump

* Tests

* Fix tests

* Avoid like filter on empty string value

* merge master brings strict typing to the table
2020-04-09 11:14:28 +01:00
Daniel Vaz Gaspar
bb80ceaccc [dashboards] Fix, update dashboard owners not propagating to charts o… (#9484)
* [dashboards] Fix, update dashboard owners not propagating to charts owners

* Add tests

* Fix tests

* better naming
2020-04-09 09:37:37 +01:00
Daniel Vaz Gaspar
ecfc1f147d Bump FAB to 2.3.2 (#9491) 2020-04-09 09:07:19 +01:00
Daniel Vaz Gaspar
0610c489bb [query] Migrate api v1 query to new location (#9479)
* [query] Migrate api v1 query to new location

* Improved errors and tests

* [query] nit and revert undesired change

* [query] lint

* [query] revert nan change

* Update superset/queries/api.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update tests/queries/api_tests.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* change endpoint location to charts

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-04-09 09:05:49 +01:00
Jianchao Yang
5565895819 fix: add explore control tabOverride at the section level (#9495) 2020-04-08 18:26:53 -07:00
Jianchao Yang
36cd5411d0 feat: change default time range in sql lab explore (#9486)
Change from "100 years go" to "no filter".

100 years ago is basically equivalent to no filter, but has
implications on how x-axis is plotted on certain charts (e.g. Big
Number).
2020-04-08 17:39:14 -07:00
Jianchao Yang
fd85696378 Upgrade table chart plugin to 0.12.13 (#9493) 2020-04-08 17:30:47 -07:00
Ville Brofeldt
980dd2fd41 pylint: accept specific 2 character names by default (#9460)
* lint: accept 2 letter names by default

* Address review comments

* Remove e and d from good-names
2020-04-08 20:32:26 +03:00
Daniel Vaz Gaspar
4485800e21 [tests] refactor, change datasets and charts to it's own folder (#9487) 2020-04-08 08:44:35 +01:00
dandanhub
72f051f3ce [sqllab] Add CUSTOM_TEMPLATE_PROCESSOR config (#9376)
Co-authored-by: Dandan Shi <dshi@dropbox.com>
2020-04-07 21:00:42 +01:00
Luca Toscano
a52b9ee8ff Handle empty dataframes in TableViz (#9480)
TableViz fails to display empty dataframes returning an error like:
"None of [Index(['project', 'count'], dtype='object')] are in the [columns]"

The behavior has been observed while testing 0.36.0rc3 with
Druid datasources.

issue: #9468
2020-04-07 10:37:03 -07:00
David Aaron Suddjian
5e535062da Filter owners select by text input (#9337)
* filter owners select by text input

* use rison

* fix backend owners filter logic

* use fullname, not username on owners inputs

* fix some tests

* fixing tests

* deterministic tests

* appease linter

* add back search by username

* more comprehensive filter test

* add clarifying text

* formatting...
2020-04-07 09:09:02 -07:00
Daniel Vaz Gaspar
4be827544e [datasets] Add strict type annotation (#9437)
* [datasets] Add strict type annotation

* Fix refresh endpoint

* Improve logic on update
2020-04-07 16:22:57 +01:00
Daniel Vaz Gaspar
f9db3faade [mypy] Enforcing typing for superset.dashboards (#9418)
* [mypy] Enforcing typing for superset.dashboards

* Make return types equal on all commands

* Make return types equal on all commands

* [dashboard] address comments same return type on commands

* lint

* lint
2020-04-07 12:52:14 +01:00
Naren
b487834d12 [Doc] Update installation doc for Dremio (#9464)
* update installation doc for Dremio

Customers fail to install pyodbc properly which on linux systems requires you to install unixodbc-devel package. Update the instructions to make it clear.

* fix new line
2020-04-07 12:01:30 +03:00
Evan Rusackas
b6bca9f137 Migrating shared DeckGL controls (#9455)
* Missed a couple unique controls!

* new shared module, with filter_nulls export.

* autozoom

* dimension

* nixing unneeded import

* stroke_width

* js_columns

* remaining js_* controls

* cleaning up unused stuff

* legend_format

* exports for prior commit

* legend_position

* line_column

* fill_color_picker

* filled, stroked, stroke_color_picker

* grid_size, extruded

* ... more gridsize

* viewport

* point_radius_fixed, spatial

* multiplier, line_type, line_width

* reverse_long_lat

* lint 
2020-04-06 18:37:25 -07:00
John Bodley
dcb7b8350e [mypy] Enforcing typing for superset.examples (#9469)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-06 09:11:49 -07:00
Daniel Vaz Gaspar
c0807c1af7 [query] New, readonly API (#9403)
* [query] New, readonly API

* Update tests/queries/api_tests.py

Co-Authored-By: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-04-06 11:18:32 +01:00
Naren
25e38f6ca7 Added dremio (#9472) 2020-04-06 09:27:16 +03:00
Ville Brofeldt
8dd92f71a9 release: Add support for ZSH in RELEASING and add tagging instructions (#9451)
* Add support for ZSH in RELEASING and add tagging instructions

* fail if unsupported shell
2020-04-06 09:21:31 +03:00
Jianchao Yang
801e2f1777 chore: bump black to 19.10b0 and mypy to 0.770 (#9378)
* Bump black to 19.10b0

* Upgrade mypy to 0.770

* Update how inline type is defined
2020-04-04 13:23:18 -07:00
John Bodley
5e55e09e3e [mypy] Enforcing typing for some modules (#9416)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-04-04 12:45:14 -07:00
Evan Rusackas
1cdfb829d7 Eslint prefer-object-spread (#9466)
* The rule.

* The result
2020-04-03 17:05:16 -07:00
Evan Rusackas
265a2feb29 Migrating NVD3 Area's stacked_style config (#9454)
* Migrating NVD3 Area's stacked_style config

* test mods

* lint

* nonsense change

* undoing nonsense. Come on GitHub, WORK.
2020-04-03 12:50:28 -07:00
Evan Rusackas
cd572334c9 Migrating unique NVD3 viz controls (#9445)
* donut control

* labels outside

* linting

* x_log_scale, pie_label_type

* linting

* line_charts, line_charts_2

* marker_labels

* marker_line_labels, marker_lines, markers

* prefix_metric_with_slice_name, range_labels, ranges

* stacked_style

* Revert "stacked_style"

This reverts commit aae2d418b8f1950fbe32248b62e50a12fbf186bd.

* stacked_style take 2...

* Revert "stacked_style take 2..."

This reverts commit 38b7155f50143684c92a67b2a9fa16f65c269d35.
2020-04-03 12:50:07 -07:00
Evan Rusackas
9e79cf37f8 Migrating unique bigNumber(total) controls (#9440)
* migrating options controls

* lint 

* baby steps...

* shared BigNumber controls file

* capitalization matters
2020-04-02 10:52:32 -07:00
Evan Rusackas
c53bc4ddf9 Enforcing linting of LESS (#9356)
* linting some LESS

* enforce linting

* moving font binaries out of stylesheets to fonts folder.

* renaming font specimen sheet directory.
2020-04-02 10:10:10 -07:00
Evan Rusackas
c003189d0d migrating unique controls (#9446) 2020-04-02 09:26:52 -07:00
Ville Brofeldt
e33f6c244d Add check for SSL certificate and add form validators (#9436)
* Add check for server_cert falsy and add form validators

* Address comments
2020-04-02 08:17:17 +03:00
venter
621b4816b3 [fix]some translation not work better (#9428) 2020-04-01 17:00:23 -07:00
Jianchao Yang
f0f4f7e91d feat(visualization): add timeRangeFixed to Big Number w/ Trendlines (#9341)
* feat: add timeRangeFixed and increase font size for Big Number chart

* Update package-lock.json
2020-04-01 12:38:56 -07:00
ʈᵃᵢ
893c95521b fix pagination for list views (#9425) 2020-04-01 09:20:17 -07:00
Grace Guo
a9ff51bd61 [fix] dashboard filter indicator no showing single number value (#9401) 2020-03-30 15:05:04 -07:00
Grace Guo
ce3031b925 [fix] allow force refresh for No Results chart (#9408) 2020-03-30 15:00:58 -07:00
Jianchao Yang
3d8a2b859e Build: fix hot reload for charts (#9400)
* Fix hot reload for charts

* Override tsc options for plugins

Plugins will sometimes have their own `tsconfig.json`, which will
interfere with the dev server config if configured inappropriately.

This change makes sure `tsc` (and `ts-loader`) always compiles to
`esnext` modules, so we don't get "Uncaught ReferenceError: exports
is not defined" error.
2020-03-30 09:31:46 -07:00
Daniel Vaz Gaspar
752de8fe9d [dashboards] Fix, API update slug uniqueness refusing empty string (#9417)
* [dashboards] Fix, API update slug uniqueness refusing empty string

* [dashboards] tests
2020-03-30 16:10:08 +01:00
John Bodley
ec795a4711 [mypy] Enforcing typing for charts (#9411)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-29 13:39:36 -07:00
Daniel Vaz Gaspar
2e81e27272 [dependency] Fix, Bump FAB to 2.3.1 (#9413) 2020-03-29 16:26:52 +01:00
John Bodley
e63cb52630 [fix] Fixing cache key inconsistencies (#9382)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-28 12:33:16 -07:00
Ville Brofeldt
499f9c8fca feat: add SSL certificate validation for Druid (#9396)
* feat: add SSL certificate feature

* Address comments

* don't mutate extras

* Address comments and add polish

* Add further polish
2020-03-27 19:07:07 +02:00
Evan Rusackas
fd227888b6 Mirgrating unique Partition chart controls (#9385)
* mirgrating controls

* specific import
2020-03-27 09:16:36 -07:00
John Bodley
742887bf00 [sip-15] fix messaging (#9397) 2020-03-27 08:20:47 -07:00
Daniel Vaz Gaspar
81971967c3 [charts] New, bulk delete API endpoint (#9387)
* [charts] New, bulk delete API endpoint

* [charts] Fix, typos

* [charts] Fix wrong model name
2020-03-27 09:31:01 +00:00
Daniel Vaz Gaspar
40bc1b33d2 [dataset] New, export API endpoint (#9367)
* [dataset] New, export API endpoint

* Fix, lint
2020-03-27 09:30:23 +00:00
Evan Rusackas
98a26c4f2c migrating controls (#9373) 2020-03-26 21:32:23 -07:00
Jianchao Yang
77fcc4b6aa build: use manifest hooks for dev server proxy and fix hot reload for charts (#9333)
* Use manifest hooks for dev server proxy

* Rewrite dashboard/App.jsx to supress Redux error in hot reload

* Update ChartRenderer to allow hot realod in Explore

* Fix hot reload in dashboars as well

* Revert changes to ChartRenderer.jsx

Will submit in another PR.

* Clean up
2020-03-26 16:55:22 -07:00
Evan Rusackas
9fcdc93c06 Migrating horizon controls (#9368)
* migrating unique controls

* linting 
2020-03-26 15:16:07 -07:00
Evan Rusackas
b12188ec80 migrating unique controls (#9374) 2020-03-26 15:15:47 -07:00
David Aaron Suddjian
cfa786850f upgrade to react-bootstrap v0.33.1 (#9372)
* upgrade to react-bootstrap v0.33.1

* fix test

* simplify proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

* simplify more proptypes

Co-Authored-By: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
2020-03-26 11:16:49 -07:00
Evan Rusackas
ccff6be969 Migrating unique BoxPlot controls (#9392) 2020-03-26 09:29:17 -07:00
Evan Rusackas
7e86e38dab Migrating unique Table controls (#9388) 2020-03-26 09:28:51 -07:00
Evan Rusackas
bf0fa84bbc migrating controls 🎛 (#9386) 2020-03-26 09:28:09 -07:00
John Bodley
19da9042ff [cache] Cleaning up viz/cache logic (#9375)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-26 09:22:06 -07:00
Grace Guo
5b07c8d229 [dashboard] handle markdown error (#9350)
* [dashboard] handle markdown error

* localize error message, fix review comments.
2020-03-26 09:06:23 -07:00
Evan Rusackas
d5e2f7e6b3 Removing WordCloud controls from CONTRIBUTING.md (#9391) 2020-03-26 08:19:35 -07:00
ʈᵃᵢ
f5cc0ef906 fix: [dashboard] add row padding (#9381) 2020-03-26 08:18:53 -07:00
Alexander Mancevice
9eb5baddd6 Update MANIFEST.in (#9261)
Include superset-frontent/package.json in package because setup.py requires it
2020-03-25 22:00:41 -07:00
Evan Rusackas
0061a3ebaf Migrating unique DirectedForce controls (#9359)
* migrating controls

* Linting 

* oops... meant to pull this out in a conflict resolution.
2020-03-25 19:20:52 -07:00
Grace Guo
4fd5ac9be6 fix a typo in set prop value (#9383) 2020-03-25 16:08:22 -07:00
Grace Guo
6b0f62a36e [explore view] fix long query issue from Run in SQL LAB Button (#9345)
* [explore view] fix long query issue from Run in SQL LAB Button

* SQL Lab page needs to take the post form data, too

* fix variable names

* updated payload dict, rename hidden form

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-03-25 13:15:52 -07:00
John Bodley
43f0221304 [sip-15] Fixing typo in docstring (#9377) 2020-03-25 10:00:41 -07:00
Evan Rusackas
634b440c56 fix: don't parseFloat when the *already numeric* value ends in a decimal point (#9351) 2020-03-24 15:34:09 -07:00
Ville Brofeldt
fe53555fc2 Migrate unique Heatmap controls (#9360)
* Migrate Heatmap controls

* Lint
2020-03-24 21:43:20 +02:00
Craig Rueda
06e0f04214 Adding requirements-local.txt support (#9357)
* Adding requirements-local.txt support

* Reverting package-lock.json
2020-03-24 10:24:23 -07:00
Daniel Vaz Gaspar
ccb22dc976 [dataset] columns and metrics API (nested) (#9268)
* [dataset] columns and metrics API (nested)

* [dataset] tests and validation

* [datasets] Fix, revert list field name to database_name
2020-03-24 17:24:08 +00:00
Will Barrett
46e39d1036 Add global install of webpack and webpack-cli to docker-compose (#9310) 2020-03-24 08:38:58 -07:00
Daniel Vaz Gaspar
f51ab59748 [charts] Refactor API using SIP-35 (#9329)
* [charts] Refactor charts API using SIP-35

* [charts] Fix, copy pasta

* [charts] simplify
2020-03-24 10:05:11 +00:00
Maxime Beauchemin
98a71be80b feat: [explore] don't save filters inherited from a dashboard (#9340)
* feat: [explore] don't save filters inherited from a dashboard

When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.

Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".

Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.

* fix build
2020-03-23 23:05:00 -07:00
Evan Rusackas
3d738eecec Treemap controls migration (#9352)
* Treemap

* linting
2020-03-23 22:33:08 -07:00
Evan Rusackas
b5a9bae106 migrating unique EventFlow controls (#9358)
* migrating unique controls

* Lint 
2020-03-23 22:32:55 -07:00
Evan Rusackas
20dd4182cb Cal heatmap controls migration (#9355)
* controls migrated

* linting
2020-03-23 22:16:16 -07:00
ʈᵃᵢ
866f6f9330 feat: [SQLLAB] add checkbox to control autocomplete (#9338)
* [SQLLAB] add checkbox to control autocomplete

* autocomplete -> autocompleteEnabled

* fix defaultProps

* fix spec
2020-03-23 22:11:05 -07:00
John Bodley
5d9857544a [config] Fixing GET_FEATURE_FLAGS_FUNC example (#9339)
* [config] Fixing GET_FEATURE_FLAGS_FUNC example

* Adding typing for GET_FEATURE_FLAGS_FUNC

* Update config.py
2020-03-23 13:53:37 -07:00
Krist Wongsuphasawat
f4087d2ad2 refactor: remove settooltip (#9332) 2020-03-23 12:35:31 -07:00
Ville Brofeldt
5e6662ab12 fix: suburst chart when secondary metric is defined (#9343) 2020-03-22 22:31:05 +02:00
John Bodley
232925b7bf [requirements] Telling Celery 4.4.1 it is not welcome here (#9331)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-20 10:45:26 -07:00
Daniel Vaz Gaspar
c34df6b7b3 [dashboard] Refactor API using SIP-35 (#9315)
* [dashboard] Refactor API using SIP-35

* [dashboard] Fix, import

* [dashboard] more tests

* [dashboards] a misc of improvements

* [charts] Fix, DAO and tests

* [dashboards] small exceptions refactor

* [dashboards] lint

* [dashboards] Improves comments on base classes

* [dashboards] lint
2020-03-20 16:32:03 +00:00
Krist Wongsuphasawat
ccf21f6f1b feat: bump deckgl plugin version (#9325)
* feat: bump deckgl plugin version

* feat: bump again
2020-03-19 17:51:09 -07:00
Jianchao Yang
c4b53a7d42 Build: optimize frontend build configs to improve superset-ui-plugin dev experience (#9326)
* Upgrade webpack, babel and React

* Upgrade all Babel related packages

Also remove babel-plugin-css-modules-transform that is not in use.

* Remvoe tslib as dependency

* Remove unnecesary packages
2020-03-19 14:57:39 -07:00
ʈᵃᵢ
ff703cf01b [chart] fix, bulk delete endpoint and error message (#9330) 2020-03-19 18:26:55 +00:00
David Aaron Suddjian
46598830e9 show edit modal on dashboards list view (#9211)
* show edit modal on dashboards list view

* lint

* fix test

* simplify PropertiesModal interface

* lint

* comply with method ordering

* fix type issue
2020-03-19 08:05:35 -07:00
Erik Ritter
d7ea41a529 Revert "[requirements] Bumpy Celery (#9277)" (#9323)
* Revert "[requirements] Bumpy Celery (#9277)"

This reverts commit c0f0d45377.

* Update requirements.txt
2020-03-18 14:21:21 -07:00
Ville Brofeldt
f1edcebc79 fix: handle list of lists from fetch_data (#9322)
* fix: handle list of lists from fetch_data

* Address comments
2020-03-18 22:04:26 +02:00
Krist Wongsuphasawat
104f3d2502 fix: cannot assign to read only property exports of object (#9319)
* fix: cannot assign to read only property exports of object

* fix: compile ts from plugins

* fix: add package back
2020-03-18 09:01:02 -07:00
Grace Guo
adebd40d30 [cache warm_up] warm_up slice with dashboard default_filters (#9311)
* [cache warm_up] warm_up slice with dashboard default_filters

* update Celery warmup tasks

* fix code review comments

* add try catch and type checking for parsed dash metadata

* extra code review fix
2020-03-18 08:21:10 -07:00
Ali Bahjati
98ac72074c Add Iran to Country Visualization (#8940) 2020-03-18 14:08:07 +02:00
Jianchao Yang
c36a7e3ada chore: allow webpack-dev-server proxy to any destination (#9296)
One of the pain points in developing Superset frontend code is the lack
of testing data. Local installation often do not have enough examples
setup to test all edge cases.

This change allows `webpack-dev-server` to proxy to any remote Superset
service, but the same time replaces frontend asset references in HTML
with links to local development version. This allows developers to test
with production data locally, tackling edge cases all while maintaining
the productivity of editing the code locally.
2020-03-17 15:37:07 -07:00
ʈᵃᵢ
8f7ce168a0 bump FAB to 2.3.0 (#9318) 2020-03-17 22:17:02 +00:00
Ville Brofeldt
982c234a50 fix: remove character set and collate column info by default (#9316)
* fix: remove character set and collate column info by default

* lint

* remove collation and charset info before compile
2020-03-17 21:34:39 +02:00
Maxime Beauchemin
6cf36c91ea fix: big number to handle NULL as it did in the past (#9314) 2020-03-17 10:46:59 -07:00
ʈᵃᵢ
85e9a4fa99 [datasets] fix typo (#9312) 2020-03-17 00:59:12 +02:00
Ville Brofeldt
f1370c5e32 fix: add saved metrics to point size metric dropdown in deckgl scatterplot (#9309) 2020-03-16 20:06:56 +02:00
ʈᵃᵢ
8764ae3852 [sqllab] fix exception caused by casting string to int with psycopg2 (#9287)
* [sqllab] fix exception caused by casting string to int with psycopg2

* rollback session on exception

* add SQLLAB_BACKEND_PERSISTENCE to default feature flags

* cast tab_state_id to str in python instead of sql

* remove import
2020-03-16 10:51:41 -07:00
mfharding
b1916a190e Fixed two typos in the README (#9305)
I noticed two small typos in the README that I fixed:
1) "Acts" was wrong because it does not have the correct subject-verb agreement
2) "Who Have" is the wrong pronoun to use when referring to companies. "That have" is the grammatically correct option. 
Additionally, my company, Let's Roam, uses superset to visualize people completing challenges all over the world.
2020-03-14 22:38:09 +02:00
David Aaron Suddjian
f6f40c815a [Charts] Use the Edit Properties modal throughout React views (#9267)
* typescriptification

* use the chart edit modal on the react list view

* linting

* typings don't work on old react-bootstrap version

* lint

* remove duplicate field
2020-03-13 15:14:50 -07:00
Ville Brofeldt
91f3cb9878 fix: bump click in setup.py and requirements.txt (#9299)
* bump click

* add token_normalize_func to click cli decorator
2020-03-13 21:36:16 +02:00
ʈᵃᵢ
5767fb15cd [datasets] new, listview (react) (#9197)
* [datasets] new, react listview

* add hidden columns to support filtering by columns not rendered

* throw exception if config is incorrect

* fix database filter

* update endpoints to point to datasets; fix translation strings

* move Link into src/components

* add add new record button to datasets listview
2020-03-13 21:35:00 +02:00
Erik Ritter
f80fadff0e Reduce dashboard bootstrap payload (#9284) 2020-03-13 12:18:22 -07:00
Craig Rueda
e9b0095754 Docker-Compose Memory Issue Fix? (#9285)
* Adding free memory nag / running npm build with development options in compose

* Adding license
2020-03-13 09:25:54 -07:00
Asif Iqbal
1cbd955e79 [SIP-36] Migrate RunQueryActionButton.jsx to RunQueryActionButton.tsx (#9290) (#9291) 2020-03-12 18:36:55 -07:00
Daniel Vaz Gaspar
0c8c4d6895 [api] Fix, related fields need to be explicitly defined (#9283)
* [api] Fix, related fields need to be explicitly defined

* [api] Fix, lint

* Update superset/datasets/api.py

Co-Authored-By: ʈᵃᵢ <tdupreetan@gmail.com>

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-03-12 18:55:33 +00:00
Daniel Vaz Gaspar
78ba7d52f6 [dashboard][api] Fix, PUT publish/draft to not clean slug and owners (#9279) 2020-03-12 15:35:27 +00:00
Jianchao Yang
fe2dd75a59 fix: bump legacy-table-chart to 0.11.20 (#9286) 2020-03-11 15:12:53 -07:00
John Bodley
c0f0d45377 [requirements] Bumpy Celery (#9277)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-03-11 08:39:38 -07:00
Jianchao Yang
c9c18011f3 fix(table-chart): bump legacy-table-chart to 0.11.18 (#9275) 2020-03-10 22:41:20 -07:00
Ville Brofeldt
406ad8778c fix: remove duplicate metric from bullet chart (#9274) 2020-03-11 06:52:58 +02:00
Ville Brofeldt
3682702e91 fix: add connection testing params for snowflake (#9272)
* fix: add connection testingt params for snowflake

* Linting
2020-03-11 06:51:57 +02:00
Grace Guo
724b8a3c31 [fix] copy filter_scopes with duplicate charts (#9271) 2020-03-10 10:23:15 -07:00
Maxime Beauchemin
c04d6163e7 feat: add rolling window support to 'Big Number with Trendline' viz (#9107)
* Rolling big number

* addressing comment
2020-03-10 10:19:12 -07:00
Jianchao Yang
753aeb4829 fix: upgrade legacy table chart to 0.11.17 (#9269)
This fixes bugs related to chart rerendering.

https://github.com/apache-superset/superset-ui-plugins/pull/392
2020-03-10 10:14:58 -07:00
Maxime Beauchemin
116200cf73 fix: change database save in DatasourceEditor (#9255)
* fix: change database save in DatasourceEditor

This addresses the issue where pointing a datasource to another database
in the datasource editor is not reflected.

Also addresses:
- a minorcosmetic issue in the datasource editor.
- user/owners list not getting populated

* tests
2020-03-10 09:20:37 -07:00
Will Barrett
99242225d6 Adds default username and password created at installation to documentation (#9263) 2020-03-10 07:30:43 +02:00
Evan Rusackas
d8fea640f8 removing safari "fix" for ACE editor font width jank. (#9264) 2020-03-09 12:46:25 -07:00
Better-Boy
8a5b898606 New entry into superset user (#9259)
* New entry into superset user

Added a new company that uses apache superset for dashboard and visualization purpose

* alphabetical order
2020-03-09 08:17:41 +02:00
Grace Guo
8bc30da621 [log] Add dashboard_id param to explore_json request (#9243)
* [log] Add dashboard_id param to explore_json request

* fix cypress test
2020-03-08 19:51:08 -07:00
Rob DiCiuccio
8cabea5cb8 Update PyArrow to 0.16.0 (#9119) 2020-03-08 23:07:15 +02:00
ʈᵃᵢ
1902fda159 [webpack] fix copying images when running dev server (#9250) 2020-03-08 10:03:58 -07:00
Daniel Vaz Gaspar
52c59d6890 [datasets] new, API using command pattern (#9129)
* [datasets] new, API using command pattern

* [datasets] tests and improvements

* [datasets] lint

* [database] address comments

* [datasets] lint

* [datasets] Address PR comments

* [dataset] Fix, dataset expects a Dict now

* [dataset] lint and optional commits

* [dataset] mypy

* [dataset] Fix, license and parent class

* [dataset] Make CRUD DAO raise exceptions
2020-03-08 09:13:08 +00:00
ʈᵃᵢ
89109a16c6 [chart] fix, datasource link in listview (#9247) 2020-03-07 14:46:17 -08:00
Ville Brofeldt
0faced7d4a fix: update release testing FLASK_APP param (#9254) 2020-03-07 12:54:10 +02:00
Erik Ritter
f34e9e393a Replace No data error with help message (#9249) 2020-03-06 16:11:01 -08:00
Krist Wongsuphasawat
fc64c37724 feat: bump plugins deckgl version (#9251) 2020-03-06 14:06:44 -08:00
Jianchao Yang
f784af285f feat: improve loading speed for legacy table chart (#9234)
* perf(table-chart): upgrade to 0.11.6

Upgrade table chart `@superset-ui/legacy-plugins-chart-table`
to https://github.com/apache-superset/superset-ui-plugins/pull/385

* refactor: use ternary instead of if

* fix: rename variables
2020-03-06 14:03:33 -08:00
Jordan Zucker
04523c77d2 Add PubNub to list of organizations that use Superset (#9252) 2020-03-06 16:22:40 +02:00
Grace Guo
000a038af1 [fix] use filter_scopes in dashboard warmup strategy (#9235)
* [fix] use filter_scopes in dashboard warmup strategy

* remove unnecessary comment
2020-03-05 17:50:32 -08:00
Krist Wongsuphasawat
787833f1be Bump node from v10 to v12 in release Dockerfiles (#9248) 2020-03-05 15:58:43 -08:00
Erik Ritter
786e575dbe [build] Bump superset-ui packages and update build (#9241) 2020-03-05 14:20:45 -08:00
Ville Brofeldt
4ffee8c5d1 [UPDATING] Adding notes regarding #8867 (#9246) 2020-03-05 21:15:47 +02:00
Ville Brofeldt
ef2ebbd570 Add option to specify type specific date truncation functions (#9238) 2020-03-05 07:25:50 +02:00
Erik Ritter
7d572d9e96 Introducing Inter UI & Fira typefaces (#9207)
* All the fonts!

* dynamic loading

* folderizing fonts by family

* Shuffling files, getting rid off LESS fanciness

* Fira Mono, consolidating on "specimen" for LESS filenames

* Fira Code

* switch for enabling ligatures

* ligatures off for now

* license

* nixing Fira Mono, using OTF features instead.
2020-03-04 17:32:08 -08:00
Erik Ritter
b1d83ba8d6 fix: choose language link for local dev (#9215)
@superset-ui/connection will add protocol and host to an "endpoint" call.

`e.currentTarget.href` may return the full URL instead of the relative
url.
2020-03-04 17:08:23 -08:00
Ville Brofeldt
969bc87431 fix: Oracle fetch_query and datetime conversion (#9240) 2020-03-04 23:43:28 +02:00
Ville Brofeldt
7a91498cf1 fix: share column type matching between model and result set (#9161)
* Share column type matching between model and result set

* Address comments
2020-03-04 16:33:22 +02:00
Daniel Vaz Gaspar
d55240a598 [security] Fix, let admin's be able to reset user passwords on AUTH_DB (#9232)
* [security] Fix, let admin's be able to reset user passwords on AUTH_DB

* [security] Fix, use constants
2020-03-03 18:57:23 +00:00
Bogdan
4e1fa95035 Make schema name for the CTA queries and limit configurable (#8867)
* Make schema name configurable

Fixing unit tests

Fix table quoting

Mypy

Split tests out for sqlite

Grant more permissions for mysql user

Postgres doesn't support if not exists

More logging

Commit for table creation

Priviliges for postgres

Update tests

Resolve comments

Lint

No limits for the CTA queries if configures

* CTA -> CTAS and dict -> {}

* Move database creation to the .travis file

* Black

* Move tweaks to travis db setup

* Remove left over version

* Address comments

* Quote table names in the CTAS queries

* Pass tmp_schema_name for the query execution

* Rebase alembic migration

* Switch to python3 mypy

* SQLLAB_CTA_SCHEMA_NAME_FUNC -> SQLLAB_CTAS_SCHEMA_NAME_FUNC

* Black
2020-03-03 19:52:20 +02:00
Daniel Vaz Gaspar
26e916e46b [api] enable CSRF by default (#9205)
* [api] Fix, don't exempt CSRF on APIs

* adds cookie based CSRF token support

* blacking

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
2020-03-03 12:22:40 +00:00
Erik Ritter
28c05b22e8 [SQL Lab] Implement refetch results button properly (#9220) 2020-03-02 16:10:40 -08:00
David Aaron Suddjian
e01f24f833 Prevent database connections to sqlite (#9218)
* prevent database connections to sqlite

* tweaks and tests

* add entry to UPDATING.md
2020-03-02 13:13:11 -08:00
Grace Guo
ccd6e44edf refactor copy filter_scopes and add tests (#9224)
* refactor copy filter_scopes and add tests

* fix review comments
2020-03-02 12:55:30 -08:00
John Bodley
7b2c2e8a33 [fix] Adding SIP-15 support for the query context (#9219) 2020-03-02 10:10:54 -08:00
ʈᵃᵢ
cd4605e4c1 [dashboard, chart] fix ordering and filtering in listviews (#9212)
* [dashboard, chart] fix ordering and filtering

* fix owner name bug, better typing

* remove tslint comment
2020-02-27 09:30:52 -08:00
Grace Guo
ca2bc8b15f [fix] remove chart id from filter_scopes metadata if chart is not in dash anymore (#9213)
* [fix] remove chart id from filter_scopes metadata if chart is not in dashboard anymore

* fix review comments, and add check for overwrite dash function
2020-02-26 17:33:01 -08:00
michellethomas
4f73f8a1f9 [Bug Fix] Returning timeseries_limit_metric in table viz get_data (#9196)
* Returning timeseries_limit_metric in table viz get_data

* Fixing issue with include_time field

* Reformatting and adding a test

* Changing if/else structure

* Reformatting
2020-02-25 21:34:36 -08:00
Grace Guo
ace0ba9456 [annotation] upgrade chart plugin version (#9203) 2020-02-25 21:19:00 -08:00
Grace Guo
883b0d0313 [dashboard perf logging] add dashboard url anchor component id (#9202) 2020-02-25 21:18:36 -08:00
Maxime Beauchemin
57321dc1f6 chore: run 'npm audit fix' to fix 2 vulnerabilities (#9106) 2020-02-25 17:05:58 -08:00
Evan Rusackas
8c16ff089b Removing (unused?) Victory theme file (#9063) 2020-02-25 16:46:37 -08:00
Jianchao Yang
1992069af1 Upgrade typescript to 3.8.2 (#9189) 2020-02-25 08:44:26 -08:00
Daniel Vaz Gaspar
23fc9a7a72 [config] Disable FAB's permission and view menus views (#9133) 2020-02-25 00:49:56 +00:00
Erik Ritter
5ba7fcaeea docs: update CONTRIBUTING with TypeScript details from [SIP-36] (#9185) 2020-02-24 14:31:23 -08:00
Erik Ritter
eeec63c7dd [SIP-36] Migrate setupApp.js to setupApp.ts (#9180) 2020-02-24 14:30:35 -08:00
Grace Guo
421aeb4605 [dashboard] fix filter_scopes when copy dashboard with duplicate_slices (#9188)
* [dashboard] fix filter_scopes when copy dashboard with duplicate_slices

* code cleanup
2020-02-24 13:45:29 -08:00
Daniel Vaz Gaspar
8c095a6e39 Bump FAB to 2.2.4 (#9165) 2020-02-24 18:57:58 +00:00
ʈᵃᵢ
1748728c45 adds FAB style filter types (#9086) 2020-02-24 10:16:11 -08:00
Evan Rusackas
72518e20ee forcing fixed width fonts on ace editor (fixes #9095) (#9183)
* forcing fixed width fonts on ace editor

* making styles global (for sql editors outside SqlLab

* prettier
2020-02-24 10:09:21 -08:00
Daniel Vaz Gaspar
8e4dcd0509 [log] Set detailed query info to log debug level (#9167) 2020-02-24 10:42:59 +00:00
Daniel Vaz Gaspar
27b371a485 [core] Fix, sanitize errors returned from testconn (#9178) 2020-02-24 10:40:51 +00:00
Maxime Beauchemin
7b06bb7549 docs: remove focus on Druid in README.md (#9184)
The text in the README seemed overly Druid-centric at this time. While
originally (3-4 years ago) Superset was heavily focussed on druid, it's
just not accurate anymore. Druid is just one of the databases that we
support and docs should reflect that.
2020-02-24 10:30:25 +00:00
Erik Ritter
78b1561820 Make JSX Menu links open in new tab (#9191) 2020-02-23 07:43:06 -08:00
altef
dee16de03e [SIP-29] Add support for row-level security (#8699)
* Support and apply filters.

* Added the UI for row level security, and moved it all under SQLA in order to access the Table model more easily.

* Added a row level security filter documentation entry.

* Accidentally added two new lines to this file.

* Blacked and iSorted, hopefully.  Also, sometimes g.user may not be set.

* Another isort, and handling g not having a user attribute another way.

* Let's try this again #CI tests.

* Adjusted import order for isort; I was sure I'd already done this..

* Row level filters should be wrapped in parentheses in case one contains an OR.

* Oops, did not think that would change Black's formatting.

* Changes as per @mistercrunch.

* RLS filters are now many-to-many with Roles.

* Updated documentation to reflect RLS filters supporting multiple rows.

* Let's see what happens when I set it to the previous revision ID

* Updated from upstream.

* There was a pylint error.

* Added RLS ids to the cache keys; modified documentation; added template processing to RLS filters.

* A new migration was merged in.

* Removed RLS cache key from query_object.

* RLS added to the cache_key from query_context.

* Changes as per @etr2460.

* Updating entry for RLS pull request.

* Another migration to skip.

* Changes as per @serenajiang.

* Blacked.

* Blacked and added some attributes to check for.

* Changed to a manual query as per @mistercrunch.

* Blacked.

* Another migration in the meantime.

* Black wanted some whitespace changes.

* AttributeError: 'AnonymousUserMixin' object has no attribute 'id'.

* Oops, did hasattr backwards.

* Changes as per @mistercrunch.

* Doesn't look like text us required here anymore.

* Changes as per @dpgaspar

* Two RLS tests.

* Row level security is now disabled by default via the feature flag ENABLE_ROW_LEVEL_SECURITY.

* New head to revise.

* Changed the comment.
2020-02-22 11:21:31 +02:00
Erik Ritter
3efdfc5345 Infer SQL_LAB QuerySource from referrer (#9181) 2020-02-20 13:38:47 -08:00
John Bodley
141570636e [fix] SQL query source (#9173) 2020-02-20 11:15:12 -08:00
ʈᵃᵢ
74423e5d19 deprecate tslint and configure eslint for typescript (#9172) 2020-02-20 09:54:33 -08:00
Daniel Vaz Gaspar
e55fe43ca6 [database] Fix, tables API endpoint (#9144) 2020-02-20 10:15:22 +00:00
Grace Guo
c1750af54a [dashboard] clean up usage for old filter immune metadata (#9146)
* [dashboard] clean up usage for filter_immune metadata

* add fix per comment
2020-02-19 09:58:34 -08:00
Will Barrett
38f3fd0c9f Add feature flags to control query sharing, KV exposure (#9120)
* Add feature flags to control query sharing, KV exposure

* Add tests, fix bug

* Skip test for kv endpoints when they are disabled

* ESLint fixes

* Remove unnecessary binds

* Fix eslint errors

* Add note to UPDATING.md RE: new feature flag options

* Use expanded version of RBAC

* Enable KV_STORE and SHARE_QUERIES_VIA_KV_STORE feature flags in the test environment

* Fix black
2020-02-19 09:51:50 -08:00
Grace Guo
84b42d28b9 [dashboard] use filter_scopes metadata when import old dashboard (#9145)
* [dashboard] update filter_scopes metadata when import old dashboard

* fix review comments
2020-02-19 09:06:52 -08:00
Erik Ritter
e5e6b53687 [SIP-36] Migrate Link.jsx to Link.tsx (#9162) 2020-02-19 08:49:04 -08:00
ʈᵃᵢ
3e73c81b25 filter out markdown containing XSS (#9163) 2020-02-19 09:44:44 +00:00
John Bodley
9f5f8e5d92 [mypy] Enforcing typing for db_engine_specs (#9138) 2020-02-17 23:08:11 -08:00
Ville Brofeldt
3149d8ebc0 Add release refinements from 0.35.2 release (#8925)
* Add refinements from 0.35.2 release

* Trim whitespace from voter name if voters entered with space after comma (e.g. 'Ville, Andy')

* Reinstate deterministic deps

* Bump copyright date in NOTICE

* Fix incorrect link in README
2020-02-18 07:14:31 +02:00
Xiang Fu
c7e2785d38 Support human readable datetime type for PinotDB (#9142)
* Support more time types for Pinot

* Address comments

* Address comments
2020-02-18 07:05:38 +02:00
Rob DiCiuccio
0992445ae9 Catch TypeError on PyArrow array instantiation (#9139) 2020-02-17 08:34:00 -08:00
John Bodley
9f7466ef90 [fix] Fix table viz column order (#9122) 2020-02-16 22:51:35 -08:00
John Bodley
a7e433a512 [mypy] Disallowing implicit optional (#9150) 2020-02-16 22:34:15 -08:00
Ville Brofeldt
114642d78c fix adhoc metric bug in chord diagram (#9149) 2020-02-16 20:45:35 -08:00
ʈᵃᵢ
f95a867742 [sqllab] fix: return pandas records in execute_sql_statements (#9102)
* [sqllab] fix: return pandas records in execute_sql_statements

* empty commit
2020-02-14 13:42:55 -08:00
Maxime Beauchemin
35c697560e fix: handle duplicate groupby keys (#8658)
* fix: handle duplicate groupby keys

* Also de-duping upfront
2020-02-14 13:40:26 -08:00
Grace Guo
f4ad15e644 [migration] metadata for dashboard filters (#9109)
* [migration] metadata for dashboard filters

* fix comments

* fix extra code review comments
2020-02-14 13:26:04 -08:00
Grace Guo
b0110a74e7 [dashboard] remove loading spinner in missing chart holder (#9140) 2020-02-14 09:01:47 -08:00
Daniel Vaz Gaspar
f993bdc7ef [database] new, select star API migration (#9054) 2020-02-14 14:30:49 +00:00
Daniel Vaz Gaspar
1aab4c072c [charts] Fix, double registration of charts API (#9134) 2020-02-14 08:46:24 +00:00
David Aaron Suddjian
966d321703 [docker] fix, Dockerfile for frontend builds (#9114)
* fix dockerfile for frontend builds

* fix paths

* empty commit for CI

* adjust version_info.json

* making version_info work

* rat

* fixing docker-compose node service

* address feedback
2020-02-12 15:48:24 +00:00
Daniel Vaz Gaspar
30b7064e30 Bump FAB to 2.2.3 (#9117) 2020-02-12 08:59:11 +00:00
Grace Guo
a005e4568f [logging] Add data_age for cached chart (#9121)
* [logging] Add data_age for cached chart

* set data_age be null when is not cached data
2020-02-11 13:11:17 -08:00
David Aaron Suddjian
2913063924 SIP-32: Moving frontend code to the base of the repo (#9098)
* move assets out, get webpack dev working

* update docs to reference superset-frontend

* draw the rest of the owl

* fix docs

* fix webpack script

* rats

* correct docs

* fix tox dox
2020-02-09 17:53:56 -08:00
Arian Treffer
0cf354cc88 Add support for Cockroach DB (#9043)
* Add support for Cockroach DB

* Add documentation, fix installation and style for CockroachDB

* Fix formatting for black
2020-02-08 12:07:02 +02:00
Craig Rueda
607cfd1f29 Moving away from using the root logger everywhere (#9099)
* Moving away from using the root logger everywhere

* self.logger -> logger
2020-02-07 23:38:48 -08:00
David Aaron Suddjian
3cbe228dc1 [dashboard] Fix for dashboard edit modal, loading user list (#9081)
* fix fetching list of potential dashboard owners

* show owners input before data is loaded

* unnecessary fragment
2020-02-07 14:52:35 -08:00
Daniel Vaz Gaspar
4f06236bc4 [datasources] Fix, Prevent gamma user's from accessing save datasources (#9091) 2020-02-07 17:00:47 -05:00
Rob DiCiuccio
161d211c07 SQL Lab: Use numpy structured arrays, fallback to JSON serialization (#9096)
* Use numpy structured arrays, fallback to JSON serialization

* Explicitly cast data as list when creating numpy array
2020-02-06 17:25:22 -08:00
John Bodley
8a138fbd03 [tox] Allowing running of specific tests (#9097) 2020-02-06 16:45:37 -08:00
Daniel Vaz Gaspar
ea399047d9 [table] [columns] remove generic checkbox API (#9044) 2020-02-06 20:01:24 +00:00
David Aaron Suddjian
f0d3892b26 [dashboard] Fix metadata state (#9088)
* use the full metadata object

* use ace editor for json
2020-02-06 10:00:27 -08:00
John Bodley
f24f671a90 [fix] Temporary filename for CSV upload to Hive (#9093) 2020-02-05 15:57:22 -08:00
ʈᵃᵢ
e5f5eed425 [chart] new, list view (react) (#8999)
* [charts] new, list view (react)

* DRY up template rendering

* fix i18n

* lint package.json
2020-02-05 12:42:42 -08:00
Grace Guo
26def813b0 [fix] Add Auto Refresh Dashboard user event into dashboard logging (#9087)
1. add logging
2. refactor general periodical render function
2020-02-05 12:25:01 -08:00
Will Barrett
47b5780c5c Wrap tagging endpoints in a feature flag (disabled by default) (#9078)
* Wrap tagging endpoints in a feature flag (disabled by default)

* Add tests for new feature flag

* Reuse existing feature flag

* Add TAGGING_SYSTEM to feature flags defaulted to False
2020-02-05 11:10:13 -08:00
Daniel Vaz Gaspar
916d184076 [query] deprecate can_only_access_owned_queries (#9046) 2020-02-05 08:58:11 +00:00
Will Barrett
fc1c9428e3 Do not show stacktraces on some intentionally-thrown errors (#9056)
* Do not show stacktraces on some intentionally-thrown errors

* Fix pylint error

* Fix JavaScript looking for the wrong key in error response from connection check

* format -> f-string

* Run black because PyCharm missed it on the last save
2020-02-05 07:01:43 +02:00
John Bodley
6cb4ce0e19 [fix] Issue with previously defined SQL configuration (#9082) 2020-02-04 13:37:01 -08:00
Daniel Vaz Gaspar
24ec89a800 [csv upload] Use python's named temp file (#9047)
* [csv upload] Use python's named temp file

* [csv upload] stream write uploaded file

* Added missing ensure that configured path exists

* Fix, lint

* [csv upload] remove python's tmp file default delete behaviour
2020-02-04 10:28:32 -08:00
David Aaron Suddjian
d4d7134bf8 [explore] Modal to edit chart properties (#9051)
* chart edit modal

* remove commented code

* remove unused prop

* address PR feedback

* small tweak
2020-02-04 17:38:51 +00:00
Maxime Beauchemin
1a2ba56f46 [docs] add a link to versioned docs in the docs (#9069) 2020-02-04 17:18:23 +00:00
Will Barrett
540df268c2 Add Preset, Inc. to companies using Superset (#9076) 2020-02-03 14:29:38 -05:00
Grace Guo
c9a4384b5e [logging] Add flag for document visibility (#9070) 2020-02-03 11:29:02 -08:00
Grace Guo
bee913bbb1 [domain sharding] Freeup main domain when domain sharding is enabled (#9060)
* [domain sharding] Freeup main domain when domain sharding is enabled

* add change per comment + extra cleanup
2020-02-03 11:28:39 -08:00
John Bodley
848c565c8c [sip-15] Enabling SIP-15 by default (#9017) 2020-02-03 10:37:29 -08:00
zhxjdwh
010fdd20a1 add Dragonpass Com. Ltd. (#9075) 2020-02-03 09:39:18 -08:00
John Bodley
66fd177000 [sqla] Fixing ORDER BY logic (#9065) 2020-02-02 10:37:17 -08:00
semantiDan
c5be4f4e08 update organisation name from WPSemantix to timbr.ai (#9068) 2020-02-02 10:36:56 -08:00
Erik Ritter
f9c8ca5df2 [SQL Lab] Improve autocomplete performance (#9064) 2020-02-02 09:13:25 -08:00
John Bodley
7364024bba [fix] Ensure that is_adhoc_metric returns a boolean (#9062) 2020-01-31 17:39:30 -08:00
Evan Rusackas
bbe433784d LESS is more (#9023)
* hover stuff

* pseudos

* lint

* condensation

* linebreaks before ampersands, where prettier allows.

* more condensing, adding whitespace above blocks, adding stylelint rule to enforce that.

* prettier

* a little DRYer
2020-01-31 09:38:31 -08:00
Erik Ritter
c214cf1a43 [Viz/Query] Improve logging around cache hits (#9058) 2020-01-31 08:46:12 -08:00
Erik Ritter
47eecb84f5 [SQL Lab] Remove space after schema autocomplete (#9059) 2020-01-31 08:45:00 -08:00
Azhar Khan
2629c779af [docs] update README.md Peak AI (#9052) 2020-01-30 13:56:37 +00:00
John Bodley
6416ef51ff [UPDATING] Add metadata cache changes to 0.29.0 (#9050) 2020-01-29 20:22:46 -08:00
Will Barrett
9f4d8a5090 Add revert guidelines to CONTRIBUTING.md (#9018)
* Add revert guidelines to CONTRIBUTING.md

* Add note about age of PR

* Fix nits
2020-01-29 17:47:58 -08:00
John Bodley
51183b36f0 [sqllab] Showing schema length only when schema selected (#9041) 2020-01-29 16:06:57 -08:00
John Bodley
5738f9a159 [fix] Pivot table metric ordering (#9031) 2020-01-29 15:58:46 -08:00
aspedrosa
5f499b9545 Avoid fetch fav dashboard stat not logged in (#8527)
* Avoid fetch fav dashboard stat not logged in

* Fix old Header tests and add a new one

* Add userId to other Header tests to be consistent

* Format code to make 'prettier' tests pass
2020-01-29 15:45:20 -08:00
Will Barrett
fd9a713c7e Remove endpoints allowing arbitrary cache access (#9049) 2020-01-29 15:41:57 -08:00
Daniel Vaz Gaspar
d5dbfc886d [database] new, API table metadata (#9002)
Migrates and completely removes: '/superset/table/<database_id>/<table_name>/<schema>/'
- Guarantees database filtering based on the user permissions
- Full OpenAPI spec
- Better error handling
2020-01-29 09:51:06 +00:00
Daniel Vaz Gaspar
fb17acd122 [api] fix, set default columns to just id when not defined (#8982) 2020-01-29 09:41:40 +00:00
Will Barrett
a4ed0758b0 Remove redirect endpoint /superset/explorev2 (#9038) 2020-01-29 00:33:08 -05:00
John Bodley
a303c3c73e [fix] Adding show to FAB CRUD set (#9040) 2020-01-28 17:19:16 -08:00
Rob DiCiuccio
2fc3d84b5a Serialize nested columns as JSON strings (#9007) 2020-01-28 15:50:36 -08:00
John Bodley
162f81078e [routes] Re-adding FAB API routes for TableColumnInlineView (#9036) 2020-01-28 13:48:58 -08:00
John Bodley
a267446f7b [routes] Re-adding FAB API routes for SqlMetricInlineView and TableModelView (#9035) 2020-01-28 11:00:48 -08:00
John Bodley
dc60db2a43 [fix] Reverting metic logic from #8901 (#9030) 2020-01-27 22:28:42 -08:00
ʈᵃᵢ
d0aab05e79 [dashboard] fix, add config to optionally enable react replacement fo… (#9025)
* [dashboard] fix, add config to optionally enable react replacement for CRUD views

* move app.config to function scope
2020-01-27 11:28:24 -08:00
ʈᵃᵢ
a0cda321b7 [dashboard] new, bulk actions for delete & export (#8979)
* bulk actions for dashboards list view

* add confirm component

* finish bulk actions work

* remove loading component

* fix sortby double render bug, lint, fix specs

* adds spec for bulk actions

* fix spec

* spec ConfirmStatusChange

* lint

* tslint

* address review feedback

* tslint fixes

* guard against empty filterTypes

* persist dom events

* tslint
2020-01-27 13:23:41 -05:00
John Bodley
aecc82e174 [refactor] Centralizing custom Python types (#9026) 2020-01-26 10:04:04 -08:00
Daniel Vaz Gaspar
1f21bf877f [log] fix, log model view permissions (#8993)
Limit MVC access to admin role only and limit REST API permissions
2020-01-26 12:15:57 +00:00
Erik Ritter
68e85ab1b6 [Caching] Ensure cache is always created (#9020)
* [Caching] Ensure cache is always created

* Update cache_manager.py

* Refactoring cache typing
2020-01-25 22:49:05 +00:00
ʈᵃᵢ
c552c852cd [dashboard] fix, enable info endpoint (#9015)
* [dashboard] fix, enable info endpoint

* add info to REST_MODEL_VIEW_CRUD_SET
2020-01-24 17:16:28 -08:00
Erik Ritter
922eec2db2 [SQL Lab] Cache function names query (#9019) 2020-01-24 16:45:41 -08:00
serenajiang
f079b6dad0 [i18n] enable spanish (#9010) 2020-01-24 11:27:05 -08:00
John Bodley
dcfa047b0b [fix] Ensure sunburst column ordering adheres to hierarchy (#9011) 2020-01-24 11:24:34 -08:00
Erik Ritter
a4b8e0b9e4 [SQL Lab] Add function names to autocomplete (#9012) 2020-01-24 11:08:26 -08:00
Evan Rusackas
a85df65f85 Z index registry / clean-up (#8984)
* first pass

* whittling unused code

* updating to shortened name

* removing unnecessary z-index

* removing unnecessary flexbox vendor prefixing

* hover pseudoclass not needed for cursor styling.

* Seemingly unnecessary  z-indices on ACE content editor in dashboard

* seemingly uused styles.

* seemingly unncessary z-index setting

* seemingly unnecessary z-index

* LESS is more

* nixing antiquated gridster styles

* clearing out unnecessary z-indices

* adding z-dashedits layer

* removing a seemingly unnecessary z-index

* renaming var... more of a layer than edit-situation

* nixing unused z-indices

* moving to var

* comments/org

* moving to var. Lower value, but seems fine.

* usage note

* formatting/linting 

* better notes/labeling

* dash -> dashboard

* Do or do not. There is no try.

* no comment

* z-... -> z-index-...

Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
2020-01-24 00:47:55 -05:00
Grace Guo
d0bc04fc93 [perf_logging] Add is_cached status when chart has error (#9009) 2020-01-23 17:05:39 -08:00
Erik Ritter
d3d8603620 [SQL Lab] Disable autocomplete when typing numbers (#9008) 2020-01-23 16:07:36 -08:00
John Bodley
4b5d141f20 [fix] pydruid export_pandas (#9006)
* [fix] pydruid export_pandas

* Update models.py
2020-01-23 15:38:28 -08:00
Maxime Beauchemin
04be1d4b42 docs: remove reference to Panoramix and Caravel (#8998) 2020-01-23 15:50:21 -05:00
Daniel Vaz Gaspar
6f1c931ff0 Bump FAB to 2.2.2 (#9004) 2020-01-23 16:51:01 +00:00
Maxime Beauchemin
315a11dfe2 fix: shut off unneeded endpoints (#8960)
* fix: shut off all uneeded endpoints

We recently added a new feature to FAB allowing to whitelist the needed
endpoints in ModelView and ModelRestApi.

First, we set our base wrapper class to an empty set, forcing each
class inheriting from it to explicitely turn on the endpoints that
Superset intends to use.

Second, we go ModelView by ModelView to whitelist the actual endpoints
used in the app.

Notes:
* as a result a large set of [unneeded] permissions should be cleaned up
* outside of the "private" use of endpoints in the app, people that have
  been using endpoints in their environment for other purposes may
  experience loss of functionality

* Tweaking

* Reduce the amount of endpoints using white lists

* Fix, included needed endpoints for dashboard and druid

* Drying things up

* fixes

* limiting more endpoints

* Read only on some FAB model views

* fixing some tests

* fixes

* Fixing more tests

* Addressing comments

* Drying up route_methods

* further drying

Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
2020-01-23 11:25:15 -05:00
Evan Rusackas
22699a204d Timing and radii (#8988)
* parameterizing dot for easy resizing.

* first pass

* all timing normalized

* seeing no need to 'reset' this transition

* getting most border radii, a little light linting.

* parameterizing dot dimensions
2020-01-22 20:55:57 -05:00
Ville Brofeldt
bf08ff591c Bump requirements.txt to what setup.py would pull in (#8992) 2020-01-22 20:12:40 -05:00
John Bodley
d56abc3d34 [druid] Making scaning/refreshing Druid datasource view items optional (#8995) 2020-01-22 15:53:16 -08:00
Erik Ritter
5a04f30104 [SQL Lab] Open request access link in a new tab (#8997) 2020-01-22 15:31:28 -08:00
serenajiang
a62390d1a0 [druid] make cluster_name editable (#8996) 2020-01-22 15:19:51 -08:00
Ville Brofeldt
e46ff239af Bump pandas to 0.25.3 (#8985)
* Bump pandas to 0.25.3 as per recommendation to get ready for 1.0

* Localize timezone aware Pandas series prior to Arrow conversion
2020-01-22 09:03:19 +02:00
Daniel Vaz Gaspar
d02cf2f509 [dashboards] New, API for Bulk delete (#8972)
* [dashboards] New, API for Bulk delete

* [dashboards] Tests

* [dashboards] Fix not found on multiple delete

* [dashboards] Bulk delete partial deletes on not owned dashes

* [dashboards] Improve OpenAPI spec and tests

* [dashboards] Test for bad request

* [dashboards] i18n

* [dashboards] black

* [dashboard] make bulk all or nothing

* [dashboard] Log on sqlalchemy error

* [dashboard] Log on sqlalchemy error
2020-01-21 17:14:53 -05:00
Daniel Vaz Gaspar
74158694c5 [charts] New, REST API (#8917)
* [charts] New REST API

* [charts] Small improvements

* [charts] Fix, lint

* [charts] Tests and datasource validation

* [charts] Fix, lint

* [charts] DRY post schemas

* [charts] lint and improve type declarations

* [charts] DRY owned REST APIs

* [charts] Small fixes

* [charts] More tests

* [charts] Tests and DRY

* [charts] Tests for update

* [charts] More tests

* [charts] Fix, isort

* [charts] DRY and improve quality

* [charts] DRY and more tests

* [charts] Refactor base for api and schemas

* [charts] Fix bug on partial updates for dashboards

* [charts] Fix missing apache license

* black app.py after merge

* [charts] Fix, missing imports and black

* [api] Log on sqlalchemy error

* [api] isort
2020-01-21 13:04:52 -05:00
John Bodley
2fc5fd4f29 [sip-15] Displaying endpoints for all start/end time ranges (#8817)
* [sip-15] Displaying endpoints for all start/end time ranges

* Update superset/assets/src/explore/components/controls/DateFilterControl.jsx

Co-Authored-By: Erik Ritter <erik.ritter@airbnb.com>

* Update superset/assets/src/explore/components/controls/DateFilterControl.jsx

Co-Authored-By: Erik Ritter <erik.ritter@airbnb.com>

* Update DateFilterControl.jsx

Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
2020-01-17 13:13:35 -08:00
Ville Brofeldt
c087a48d52 fix: add datasource.changed_on to cache_key (#8901)
* Add datasource.changed_on to cache_key and add+fix related unit tests

* Add note to UPDATING.md

* Remove redundant comment about metric names
2020-01-16 00:51:13 -05:00
Grace Guo
2b0c7a1b73 [docs] Fix CORS section in installation (#8958) 2020-01-16 00:49:33 -05:00
ʈᵃᵢ
7b97764dbc [dashboard] New, list view (react) (#8845)
* adds dashboard listview component

* use new api

* use json over rison

* lint

* adds seperate dashboard list view

* edit and delete actions

* fix lint ignore

* fix common_bootstrap_payload is now a function

* fix license

* fix pylint

* isort

* fix tests

* lint

* lint ts

* fix js tests

* fix double import from bad rebase

* fix indent error

* lookup permissions

* generic permission lookup

* get tslint to pass

* adds js specs

* lint

* fix rebase

* lint

* lint again

* fix type errors preventing build

* adds more specs

* fix tslint error

* fix null check

* remove unecessary code

* use translations provided by api

* more translations

* linting

* fix spec

* i18n

* fix register order
2020-01-16 00:48:55 -05:00
David Aaron Suddjian
7e6719050b fix empty slug breaking url (#8974) 2020-01-16 00:34:23 -05:00
Erik Ritter
ff9bc74c86 Refactor sql editor autocomplete (#8967) 2020-01-15 13:05:56 -08:00
Daniel Vaz Gaspar
123246fca6 [dashboards] New, export api (#8941)
* [dashboards] Multiple exports

* [dashboards] Fix, mulexport permission missing

* [dashboards] Test for security filtered export

* [dashboards] Address PR comments
2020-01-15 18:09:55 +00:00
Ville Brofeldt
65c5922a3e Add changelog for 0.35.2 (#8971) 2020-01-15 16:40:00 +02:00
Maxime Beauchemin
cd7cb147b9 docs: fix bad extras_require reference (#8969) 2020-01-15 08:50:30 +00:00
Craig Rueda
4d04f94c52 Fixing RewardGateway URL (https://rewardgateway.com/ gave a cert error) (#8964) 2020-01-15 00:25:39 -05:00
Maxime Beauchemin
31d7f69193 fix: lighten CSS border for data preview table (#8966)
this has been bugging me
2020-01-15 00:17:50 -05:00
David Aaron Suddjian
614f13377b [dashboard] Modal for editing dashboard properties & metadata (#8876)
* wip

* wip

* wip

* modal to update dashboard properties

* cleanup

* translations and flavor text

* linted

* more explanatory text in the modal
2020-01-14 14:29:59 -05:00
Grace Guo
50f21cb7db [filter_box] Fix ; separated filter_box default values (#8949) 2020-01-13 20:35:33 -08:00
Maxime Beauchemin
b5e51ead29 docs: add Reward Gateway to README (#8950)
* docs: add Reward Gateway to README

corrects https://github.com/apache/incubator-superset/pull/8533

* Update README.md

Removed trailing whitespace.

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2020-01-13 12:46:13 -08:00
serenajiang
1f6f4ed879 [db migration] change datasources-clusters foreign key to cluster_id (#8576)
* [db migration] change datasources foreign key to cluster_id

* address pr comments

* address pr comment, fix ci
2020-01-13 11:02:36 -08:00
Evan Rusackas
d9e7db69fe [css] Bringing Bootswatch in line with external variables, and other CSS tweaks (#8781)
* Bumping less-loader

* moving/updating styles, with a bit of linting as I go.

* more whittling

* caught a couple more colors

* reverting plugin config changes I was hacking around with.

* toast messages now use status colors across the board.

* no more pink.

* expanding scope of linting

* a little more CSS linting

* fixing popover adhoc metric title height issue

* eslint: Ignoring nore modules in subfolders
2020-01-13 12:59:20 -05:00
John Bodley
0fe047171b [fix] Enforce the QueryResult.df to be a pandas.DataFrame (Phase II) (#8948) 2020-01-12 21:35:44 -08:00
Rob DiCiuccio
7ff18f060c Ensure proper JSON serialization of numpy.ndarray (#8946) 2020-01-10 13:24:03 -05:00
Daniel Vaz Gaspar
497c3e595b [app] Fix, manage menu should be before charts (#8945) 2020-01-10 17:02:58 +00:00
Naren
3bedee75d3 Add support for Dremio as a new source (#8939)
* Added spec for Dremio

* Installation instructions for Dremio

* added dependency for dremio

* Update dremio.py

* ASF header, dttm, set min version in setup.py

* Update installation.rst

* Update installation.rst

* fix tox 'Title underline too short.'

* change URI example

Co-authored-by: Naren <41924335+naren-dremio@users.noreply.github.com>
2020-01-10 17:37:40 +02:00
Daniel Vaz Gaspar
5b2499984d [dashboard] Deprecate superset published API (#8914) 2020-01-10 08:48:17 +00:00
Daniel Vaz Gaspar
5bc3d24b2f [dashboards] Fix, missing mulexport permission (#8942)
* [dashboards] Fix, missing mulexport permission

* [dashboards] Fix, missing mulexport permission
2020-01-10 00:34:02 -05:00
John Bodley
2d456e88eb [fix] Enforce the query result to contain a data-frame (#8935) 2020-01-08 11:50:26 -08:00
Craig Rueda
2a94150097 Moving appbuilder.xxx out of view files and into app.py (#8912)
* Moving appbuilder.xxx out of view files ands into app.py

* Pulled url map converters out into their own file

* Adding license blurb

* Linting

* Linting again...
2020-01-08 18:04:05 +00:00
Kelvin Jayanoris
28563ad088 Fix docstrings in superset/config.py (#8931)
- Replace ldap with LDAP
- Replace `(username/password()` with `(username/password)`
2020-01-07 11:00:32 +00:00
Grace Guo
93bcace20f Revert "Make select_star work with SQL Lab views (#8598)" (#8930)
This reverts commit 964e6db8
2020-01-06 12:04:36 -08:00
Daniel Vaz Gaspar
2726f21cbc [dashboard] Fix, prevent delete and update on dashes not owned (#8911) 2020-01-06 15:29:39 +00:00
Hossein Torabi
478e445a5a Add config for celery email task soft time (#8887) 2020-01-04 09:20:57 +02:00
Rob DiCiuccio
6537d5ed8c Replace pandas.DataFrame with PyArrow.Table for nullable int typing (#8733)
* Use PyArrow Table for query result serialization

* Cleanup dev comments

* Additional cleanup

* WIP: tests

* Remove explicit dtype logic from db_engine_specs

* Remove obsolete  column property

* SupersetTable column types

* Port SupersetDataFrame methods to SupersetTable

* Add test for nullable boolean columns

* Support datetime values with timezone offsets

* Black formatting

* Pylint

* More linting/formatting

* Resolve issue with timezones not appearing in results

* Types

* Enable running of tests in tests/db_engine_specs

* Resolve application context errors

* Refactor and add tests for pyodbc.Row conversion

* Appease isort, regardless of isort:skip

* Re-enable RESULTS_BACKEND_USE_MSGPACK default based on benchmarks

* Dataframe typing and nits

* Renames to reduce ambiguity
2020-01-03 11:55:39 -05:00
Daniel Vaz Gaspar
4f8bf2b04d [database] [log] Fix, Limit the amount of info on response (#8918) 2020-01-03 16:35:12 +00:00
zuodong
1dbf17bebb [Fix],Correct read in Jinja configuration and update docs of SupersetAppInitializer (#8908) 2020-01-03 07:44:25 +02:00
Craig Rueda
4ce5add5df Making test_config and main config the same (#8838) 2020-01-02 13:57:54 -05:00
Popoko Games
4b95c1f517 Add new entry to lists of users of Apache Superset (#8906)
* Add new entry to lists of users of Apache Superset

Add new entry to lists of users of Apache Superset

* Alphabetical order

Alphabetical order
2019-12-31 19:22:14 +02:00
Rob DiCiuccio
8fc814fc62 Enable running of tests in tests/db_engine_specs (#8902)
* Enable running of tests in tests/db_engine_specs

* Resolve application context errors

* Refactor and add tests for pyodbc.Row conversion

* Appease isort, regardless of isort:skip
2019-12-31 14:45:33 +02:00
Ville Brofeldt
5b690f9411 chore: refactor, add typing and fix uncovered errors (#8900)
* Add type annotations and fix inconsistencies

* Address review comments

* Remove incorrect typing of jsonable obj
2019-12-31 09:26:23 +02:00
Daniel Vaz Gaspar
191aca1fb0 [docker] fix: for #8880 (#8882) 2019-12-22 22:07:50 +00:00
Evan Rusackas
36c6f4ca3a moving favicon(s) to config, allowing multiple favicons (#8856)
* moving favicon to config, allowing multiple favicons

* black...
2019-12-20 12:58:36 -08:00
Chan Chak Shing
d0efd0e4c9 Ease switching of database engines for docker builds (#8863) 2019-12-20 10:57:33 +00:00
David Aaron Suddjian
3a468a53d9 fix a broken model reference (#8866) 2019-12-20 10:46:25 +00:00
Daniel Vaz Gaspar
3d9181d270 [dashboard] New, get releated owners and slices (#8872) 2019-12-20 10:16:57 +00:00
Evan Rusackas
b6639504b6 Removing some dividers to make header dropdown menus more consistent (#8857)
* separators removed, "childs" changed to "children"

* changing `children` back to `childs`... it's baked in somewhere in Fab

* linting

* reverting changes to MenuObject

* adding separator above Druid menu items
2019-12-19 10:17:43 -08:00
Grace Guo
cd8aa92cbb [explore view] fix: Inline edit chart title cause unintended overwrite original query parameter (#8835)
* [explore view] fix: Inline edit chart title cause unintended overwrite original query parameter

* add more unit tests

* handle new slice case
2019-12-18 16:17:48 -08:00
David Aaron Suddjian
016f202423 Refactor Dashboard and Slice models (#8820)
* refactor dashboard and slice models

* appease various linters

* remove shortcuts & import indirection

* appease mypy

* fix bad imports

* lint

* address various issues

* ignore type issue

* remove unused imports

* lint
2019-12-18 11:40:45 -08:00
ʈᵃᵢ
cbf860074b move cypress into its own directory with package.json (#8627)
* move cypress into it's own directory with package.json

* update contributing and include cypress fixtures dir

* newline

* fix rebase

* add cypress dep

* bump cypress
2019-12-18 09:59:42 -08:00
David Aaron Suddjian
7a68cb7ca0 factor out datasource_access_request model (#8809) 2019-12-17 16:17:49 -08:00
Beto Dealmeida
9ed4b24533 Add toast presenter to Welcome app (#8854)
* Add toast presenter

* Improve message when unauthenticated

* Lint
2019-12-17 15:50:36 -08:00
Will Barrett
025b31c019 Re-enable pylint for superset/connectors/base/models.py (#8824) 2019-12-17 16:42:58 +00:00
Daniel Vaz Gaspar
408196f304 [superset] Core SQLAlchemy query refactor (#8280)
* [superset] Slight performance improvement, remove SQLA first

* [superset] Slight performance improvement, remove SQLA first

* [superset] black it

* [superset] Revert warm up cache change

* [superset] Fix warm up cache slice_id may be none

* [superset] Reverted changes of methods one by get

* [superset] Reverted changes of methods one by get
2019-12-16 23:50:55 -08:00
Evan Rusackas
5780d9d53b Version number and SHA added to user menu (#8850)
* working!

* sigh... linting.

* more linting
2019-12-16 23:48:27 -08:00
Kim Truong
930353286f fix: add default value to log param in sql_json (#8851)
* fix: add default params to log

* fix: add optional typing

* fix: linting
2019-12-16 23:27:06 -08:00
Kim Truong
2d42272e60 Add user agent logs (#8826)
* feat: add user agent logging

* fix: lint

* fix: address feedback

* fix: formatting
2019-12-16 14:28:00 -08:00
Daniel Vaz Gaspar
2f2ac00a09 [dashboard] feat: REST API (#8694) 2019-12-16 21:10:33 +00:00
serenajiang
1719c4b5a3 [fix][sqllab] nullable booleans in dataframe (#8833)
* [fix] nullable booleans in dataframe

* added comment
2019-12-16 09:59:27 -08:00
Gustavo Brian
f88a55e790 Fix dev-server parameter example (#8836) 2019-12-15 21:51:37 -08:00
Grace Guo
b6f31abcfe [dashboard] fix duplicated chart fetching when dashboard has default_filters (#8829) 2019-12-13 11:40:27 -08:00
Will Barrett
b87f21fe1f Move function in utils folder to fix circular import issues (#8814)
* Move function in utils folder to fix circular import issues

* CI fixes - black, isort
2019-12-13 16:44:56 +00:00
John Bodley
18fbe56462 [fix] Adding time grains to Table (#8825) 2019-12-13 09:27:20 +13:00
Beto Dealmeida
ec43609820 Fix for when there are no dashboards (#8815) 2019-12-12 11:15:40 -08:00
Grace Guo
1d3c93ccb2 [filter_box] dashboard should carry defaultValue in filter_box (#8812) 2019-12-12 11:01:18 -08:00
Will Barrett
ed54f6ec8d Require the SQLAlchemy URI on the database model (#8720)
* Require the SQLAlchemy URI when creating a database

* Add migration to make dbs.sqlalchemy_uri not-nullable

* Fixes for black, isort, tests

* Alter migration to use current revision from master as downgrade target

* Update tests to support new db constraint

* black
2019-12-11 14:05:23 -08:00
Grace Guo
a96eae46af [dashboard] fix time granularity display values (#8806)
* [dashboard] fix time granularity display values

* fix review comments
2019-12-11 12:01:11 -08:00
Will Barrett
562aeab1aa Fix a bunch of files with pylint disabled (#8743)
* Re-enable pylint for superset/jinja_context.py

* Re-enable pylint for superset/sql_lab.py

* Re-enable pylint for superset/sql_parse.py

* Re-enable pylint for superset/exceptions.py

* Re-enable lint for superset/translations/utils.py

* Re-enable pylint for superset/views/schedules.py

* Re-enable pylint for superset/views/base.py

* Re-enable pylint for superset/views/log/views.py

* Re-enable pylint for superset/views/annotations.py

* black

* PR feedback, pylint, isort fixes

* Black, one more time...

* Move ungrouped-imports to a global disable
2019-12-11 10:14:24 -08:00
Will Barrett
60914fa76a re-enable Pylint on a number of view files (#8773)
* re-enable pylint for superset/views/tags.py

* Re-enable pylint for superset/views/dashboard.py

* Re-enable pylint for superset/views/sql_lab.py

* Re-enable pylint for superset/views/datasource.py

* Re-enable pylint for superset/views/utils.py

* Re-enable pylint for superset/views/log/__init__.py

* pylint fix

* Improve naming
2019-12-11 09:49:19 -08:00
Will Barrett
adf2cc2039 Re-enable pylint for some model files (#8770)
* Allow id as a valid name for pylint

* Re-enable pylint for superset/models/core.py

* re-enable pylint for superset/models/sql_lab.py

* re-enable pylint for superset/models/schedules.py

* re-enable pylint for superset/models/helpers.py

* re-enable pylint for superset/models/annotations.py

* re-enable pylint on superset/models/tags.py

* a couple more fixes after black formatting...

* Add another inline pylint disable

* Fix black

* Move to inline disables for 'id' attribute on models

* Fix lint disables after black reformatted them
2019-12-10 13:24:45 -08:00
Kim Truong
6c130b32ad Update sql validator status (#8799)
* fix: update status code for sql validator error

* fix: inspect error

* fix: lint issues

* fix: lint issues 2
2019-12-10 11:55:36 -08:00
Bogdan
e6be51953c Avoid circular dependency between superset config and superset package (#8254)
Resolve comments

Avoid circular dependency between superset config and superset package

Resolve comments
2019-12-10 09:17:34 +00:00
Will Barrett
7f8db7ab8d Re-enable pylint for common, connector, and test files (#8774)
* re-enable pylint for superset/common/query_context.py

* Re-enable pylint for superset/connectors/base/views.py

* re-enable pylint for superset/connectors/connector_registry.py

* Re-enable pylint for tests/fixtures/pyodbcRow.py

* re-enable pylint for superset/cli.py

* Fix for mypy

* Improve variable naming

* A few more naming fixes
2019-12-09 22:32:54 -08:00
Maxime Beauchemin
9f16d053e1 fix: don't show filter popover on explore view load (#8729)
* fix: don't show filter popover on explore view load

There's this confusing "feature" that I thought was a bug that shows the
metric popover opened when entering the explore view when the filter
comes from an active dashboard filter, based on the "fromFormData"
attribute of the filter.

The popover is confusing and often shows as misaligned with the actual
element it's supposed to float over when overflowing.

* warn

* fix cypress

* also shut off  metrics
2019-12-09 21:59:53 -08:00
Evan Rusackas
8b1022f66b darker opacity on shadow border for highlighted cards (#8797)
* darker opacity on shadow for highlighted cards

* removing unnecessary LESS fade

* lightening the lightest segment of the shadow again.
2019-12-09 21:58:59 -08:00
John Bodley
2fb95cc2b0 [fix] Adding time grains to DualLine (#8800) 2019-12-10 14:21:07 +13:00
Beto Dealmeida
5477f42740 Limit payload returned when using SQLLAB_BACKEND_PERSISTENCE (#8769)
* Limit queries

* WIP

* Adding unit test

* WIP

* Add unit test

* Fix test

* Try to fix remote unit tests

* Fix unit test

* Fix  for postgres
2019-12-09 16:12:40 -08:00
Daniel Vaz Gaspar
8a00168b63 Bump FAB to 2.2.1 (#8793) 2019-12-09 08:11:21 -08:00
Dinesh Sawant
cae0583e0f Support timeFormat extraction function column for Druid in Filter (#8728) 2019-12-07 17:54:37 -08:00
Maxime Beauchemin
6ff086df3a docs: add copyright notice to conform to ASF requirements (#8761)
This should make things green
here: https://whimsy.apache.org/pods/project/superset
2019-12-07 17:52:30 -08:00
Will Barrett
9c2b27f37a Re-enable Pylint on some celery-related files (#8765)
* Re-enable pylint for superset/tasks/schedules.py

* re-enable pylint for superset/tasks/celery_app.py
2019-12-07 17:52:08 -08:00
Bogdan
c3f15b952d Do not delete schema permission on the table deletion (#8768) 2019-12-07 17:50:34 -08:00
Will Barrett
cc49aae245 re-enable pylint for database compatibility layer (#8772)
* Re-enable pylint for superset/db_engines/hive.py

* re-enable pylint for superset/db_engine_specs/elasticsearch.py

* Re-enable superset/db_engine_specs/__init__.py

* Re-enable pylint for superset/db_engine_specs/exasol.py
2019-12-07 16:15:12 -08:00
Hossein Torabi
d3f7fda778 fix create-admin (#8787) 2019-12-07 16:09:14 -08:00
Hossein Torabi
b053d66ea7 fix urlib opener bug (#8788) 2019-12-07 16:07:09 -08:00
Will Barrett
ed3944ebef Re-enable pylint for superset/utils folder (#8766)
* re-enable pylint for superset/utils/import_datasource.py

* re-enable pylint for superset/utils/cache.py

* re-enable pylint for superset/utils/log.py
2019-12-06 14:34:58 -08:00
Will Barrett
60892ae45d Re-enable pylint for example-related files (#8771)
* re-enable pylint for superset/examples/energy.py

* re-enable pylint for superset/examples/world_bank.py

* re-enable pylint for superset/examples/tabbed_dashboard.py

* Re-enable pylint for superset/examples/helpers.py
2019-12-06 14:30:50 -08:00
Will Barrett
68aca88c54 Re-enable pylint on some configuration files (#8767)
* re-enable pylint for superset/config.py

* re-enable pylint on superset/migrations/env.py

* re-enable pylint for superset/legacy.py

* re-enable pylint for superset/forms.py

* re-enable pylint for superset/stats_logger.py

* Tweaks to make mypy and pylint happy

* black
2019-12-06 14:30:11 -08:00
Craig Rueda
7dba3f54ee Adding updates to CONTRIBUTING and UPDATING for app factory changes (#8782)
* Adding updates to CONTRIBUTING and UPDATING for app factory changes

* Fixing celery_app:app
2019-12-06 13:15:12 -08:00
Craig Rueda
a44635e309 Splitting up some of the Docker build steps (#8775)
* Splitting up some of the Docker build steps

* Adding dev target which includes requirements-extra / Updating docker configs to handle async query running
2019-12-05 16:47:22 -08:00
John Bodley
665e94784c [fix] Adding time grains to PivotTable (#8764) 2019-12-05 09:55:33 -08:00
Craig Rueda
3bdf764f83 Removing upgrade of pip from Docker build (#8760) 2019-12-04 22:15:18 -08:00
ʈᵃᵢ
f7c33680a4 adds react-router to welcome component (#8654)
* adds react-router to welcome component

* prettify

* empty commit
2019-12-04 18:23:53 -08:00
Erik Ritter
737c52541f Bump viz plugins for bug bash (#8759) 2019-12-04 17:27:21 -08:00
John Bodley
e72533506b [fix] Fixing time controls when switching datasource types (#8748)
* [fix] Fixing time controls when switching datasource types

* Update exploreReducer.js

* Update exploreReducer.js

* Fix linting
2019-12-04 16:55:08 -08:00
Maxime Beauchemin
e127579fc8 fix: remove unused .js module (#8741)
* fix: remove unused .js module

* fix tests, remove more references

* lints
2019-12-04 16:51:05 -08:00
Evan Rusackas
b107cc03bf SHA display touchups (#8614)
* Only showing last 8 chars of SHA

* visual touchups

* Grabbing first 8 rather than last 8

* 10 char SHA rather than 8

* atting config var for SHA length
2019-12-04 13:13:51 -08:00
Craig Rueda
e55001b88f Fixing default Dockerfile entrypoint. Gunicorn needed a few tweaks (#8744) 2019-12-04 13:13:15 -08:00
John Bodley
3d2117809f [fix] Remedying filter-box w/ invalid metrics (#8722) 2019-12-04 11:34:56 -08:00
Beto Dealmeida
5b934bb377 Change column to longtext (#8739)
* Change column to longtext

* Manual merge heads
2019-12-04 11:24:23 -08:00
ʈᵃᵢ
a94464b9c9 guard against duplicate columns in datasource save (#8712)
* catch IntegrityError in datasource save

* catch duplicate columns and wrap in exception handling decorators

* use 409

* isort
2019-12-04 11:05:06 -08:00
michellethomas
98a82a0720 Adding error message when there's no partition for a presto table using latest_partition (#8745) 2019-12-04 11:03:50 -08:00
David Aaron Suddjian
0a5e4603c9 Correcting some issues with the Time-Series Table (#8746)
* default timeLag to 0

* correct placeholder

* remove random link default
2019-12-04 10:32:33 -08:00
ʈᵃᵢ
c88bb591eb improve performance for filter form selects (#8757) 2019-12-04 10:05:02 -08:00
Daniel Vaz Gaspar
81e45acc43 [docs] Fix, UPDATING had two changes that were not included on 0.35 (#8754) 2019-12-04 17:04:21 +00:00
Daniel Vaz Gaspar
385484eb9d [config] Enables swagger UI by default (#8732)
* [config] Enables swagger UI by default
2019-12-04 09:50:56 +00:00
John Bodley
c74bb6cb9b [fix] Updating bound filters for PyDruid 0.5.7 (#8742) 2019-12-03 17:44:04 -08:00
John Bodley
38782e260a [charts] Chart specific time controls (#8674) 2019-12-03 17:41:51 -08:00
Grace Guo
89950440f2 [filter_box] Fix show time column in filter_box (#8740) 2019-12-03 17:02:09 -08:00
David Aaron Suddjian
b0b93768bb handle nulls in bar chart series/breakdown (#8724)
* handle nulls in bar chart series/breakdown

* snake_case

* add tests for null groups in bar charts

* black

* comments will save us
2019-12-03 16:11:15 -08:00
ʈᵃᵢ
5e1a6eafe4 bump style-loader to fix FOUC when sourcemaps are enabled (#8738) 2019-12-03 16:07:24 -08:00
Craig Rueda
a0b48f0f47 Fixing up Docker installation docs (#8735)
* Fixing up Docker installation docs

* Typo
2019-12-03 15:56:33 -08:00
David Aaron Suddjian
f055231e52 require a series on a bar chart in the UI (#8726) 2019-12-03 15:30:12 -08:00
Bogdan
003e98c231 Support schema permissions (#8219)
* Build support for schema access in Superset and SQLab

* Lint
* Test for old and new flask
* Black formatting
* Cleanup modified files
* Support schema permissions
* Add migration
* Make it work for slices as well
* TODO and remove unused field
* Apply schema access check to dashboards as well

Cleaner schema permissions check

Fetch schema permissions in 1 query

Bugfix

Better datasource check

Use security manager for permissions checks and remove dead code

Properly handle anon user

Add database permissions on the database updates

Fix schema filtering

Lint / flake changes

Increase cypress request timeout

Run black

Resolve multiple alembic heads

* Use set comprehensions

* Fixes for the pylint
2019-12-03 14:57:24 -08:00
Erik Ritter
43f637e403 [Explore] Fix annotation layer select box formatting (#8734) 2019-12-03 13:13:42 -08:00
Beto Dealmeida
f8e15e1c55 Add protocol to cache warmup (#8721)
* Add protocol to cache warmup

* Update unit tests

* Fix wrong commit

* Update UPDATING.md

* Fix pylint
2019-12-03 10:51:06 -08:00
Craig Rueda
fce49680d7 Docker support (#8725)
* Moving Docker stuff around

* docker-compose working as expected

* Updating README

* Addressing comments

* Utilizing requirements-extra
2019-12-03 18:37:18 +00:00
Grace Guo
69dcaca324 [explore] should not triger chart render when overlay is on (#8719) 2019-12-03 10:36:15 -08:00
Beto Dealmeida
606ac3255d Migrate filter_immune_slice_fields (#8718) 2019-12-03 10:26:54 -08:00
Daniel Vaz Gaspar
0ed0031412 [jinja_context] Fix, allow for app factory pattern (#8693)
Better app factory pattern on jinja context and introduces tests for building docs
2019-12-03 09:42:57 +00:00
Daniel Vaz Gaspar
391d8303cb [release] Fix, update superset docs process (#8680)
Introduces some automation on superset doc's build using docker
2019-12-03 09:37:33 +00:00
John Bodley
4e998be695 [fix] Druid IS NULL/IS NOT NULL filters (#8714) 2019-12-02 20:38:42 -08:00
Maxime Beauchemin
871af05f68 fix: #8711 CSS loads late and app flickers (#8715) 2019-12-02 17:20:43 -08:00
Erik Ritter
57631f8962 [SQL Lab] Fix unadjustable sql editor height (#8716) 2019-12-02 16:39:49 -08:00
Will Barrett
bca2b91417 Split functionality out of views/database/__init__.py, re-enable pylint (#8713)
* Split functionality out of __init__.py, re-enable pylint

* Black, isort

* Test fix

* Remove commented-out code bit
2019-12-02 14:33:35 -08:00
Beto Dealmeida
ac0e353a54 Update docs on gunicorn (#8710) 2019-12-02 10:57:05 -08:00
Maxime Beauchemin
6810174fcd fix: vulnerabilities by running 'npm audit fix' (#8657) 2019-12-02 10:18:39 -08:00
Erik Ritter
e06a138aad [SQL Lab] Re-add erroneously removed css (#8707) 2019-12-02 10:09:21 -08:00
Ville Brofeldt
bd91f334d9 fix: default missing values to zero on area chart (#8678)
* Add fill_value to area chart pivot

* Only fill for area chart

* Linting
2019-12-02 18:53:21 +02:00
Daniel Vaz Gaspar
b2633a51d4 [docs] Fix, database deps table (#8692) 2019-11-29 13:48:39 +00:00
Daniel Vaz Gaspar
3690fb4979 [setup] Fix, sqlalchemy and sqlparse version interval (#8689) 2019-11-28 18:47:19 +00:00
Daniel Vaz Gaspar
517a643bd4 [databases] [mvc] remove encrypted extra from list of possible filter (#8679) 2019-11-28 09:02:45 +00:00
Erik Ritter
44d919c757 Prettify the frontend code (#8648)
* Add Prettier global configs

* Format js/jsx/ts/tsx/less files
2019-11-27 14:02:48 -08:00
Evan Rusackas
e21f768a92 Only list tables in DB test if API returns them (which it doesn't) (#8681)
* only list tables if we get an array of them back (which we probably never will)

* nixing old/busted table display
2019-11-27 11:43:49 -08:00
Will Barrett
16c0599470 Disable deprecated druid connector by default (#8512)
* Disable deprecated druid connector by default

* Add a line in UPDATING.md for the configuration change

* Remove security tests related default-disabled feature

* More test updates

* black
2019-11-27 11:28:23 -08:00
Evan Rusackas
172b90ec50 Font styling consolidation (#8633)
* Font weights standardized

* now with more glob!

* Linting touchups

* caught a low-value color declaration

* first wave of font size alignment

* getting the CRUD styles caught up to speed.

* unneeded inline-block - float does that for ya.

* a few errant colors that snuck in.

* more font stylings.

* caught some more colors that needed variable alignment

* le typo

* whittle, whittle

* dead styles

* whittling

* whittling

* whittling away at font sizes

* since we appear to be adjusting icon sizes for optics, let's get this one too.

* Prettier 

* whittling at line height standardization.

* placing vars, take 1

* 2 more down...

* cleaning out some styles that had no real effect.

* seemingly no change if this is removed for consistency.

* allowing one 8px line height for proper icon placement - adding comment.

* last one, I reckon.

* linting fixes
2019-11-27 10:36:25 -08:00
Evan Rusackas
f3555486f5 Filter edit icon component replaced with Font Awesome (#8600)
* replaced!

* added role to the FA image/button

* adding tabindex.

* capitalization of tabIndex matters. I'll have another cup of coffee now.

* added newine at end of file, added stylelint rule to track this.

* re-removing these files after merge conflict resolution.
2019-11-27 18:07:12 +00:00
Evan Rusackas
044348708e Fixing variable conflicts between Superset and Boot(swatch/strap) (#8650)
* Fixing @gray conflict between Superset and Bootswatch

* removing duplicate import... whoops!

* making bootswatch bend it's namespace rather than superset/
2019-11-27 17:53:46 +00:00
Daniel Vaz Gaspar
75c1378d1f [release] Fix, release docs (#8646)
* [release] Fix, release documentation
2019-11-27 15:28:37 +00:00
Craig Rueda
df2ee5cbcb Adding app context wrapper to Celery tasks (#8653)
* Adding app context wrapper to Celery tasks
2019-11-27 15:06:06 +00:00
Daniel Vaz Gaspar
96fb108894 [docs] Update changelog and updating for 0.35.1 (#8662) 2019-11-26 21:52:17 +00:00
Beto Dealmeida
5f4e3adfd2 Pass full response to query_cost_formatter (#8652)
* Return full info when doing query cost estimation

* Add unit test

* Fix isort
2019-11-26 11:49:19 -08:00
Evan Rusackas
badcf820c9 now with sourcemaps! (#8637) 2019-11-26 10:09:39 -08:00
Grace Guo
acf0753504 [dashboard scoped filters] Add all time related options to filter scope settings (#8636) 2019-11-25 10:21:09 -08:00
Daniel Vaz Gaspar
f04b72c341 [releases] New, email automation for apache releases (#8612) 2019-11-25 10:01:31 +00:00
Ville Brofeldt
4a34c553c7 Bump to gunicorn 20 (#8643) 2019-11-24 10:18:22 +02:00
maxmelnick
6c83c6464a fixes error creating a new database due to Malformed JSON error for empty Secure extras field (#8630)
* handle empty encrypted_extra field

* move $("#encrypted_extra").val() to const

* handle empty extra field
2019-11-22 16:29:38 -08:00
serenajiang
b34c9d36ba [fix] TimeTable timelag error (#8619) 2019-11-22 16:28:40 -08:00
Dave Smith
aafbfd3b4e slightly decouple sql_json, queries, and results http endpoints from … (#8626)
* slightly decouple sql_json, queries, and results http endpoints from biz logic

* fix syntax errors

* add some type annotations, fix a bug

* remove unnecessary var decl and assign

* add a lot more type annotations to fix tests

* fix mypy issues
2019-11-22 10:12:48 -08:00
Evan Rusackas
a72a39502f Adjusting the placement of header menu carets (#8618)
* this should work.

* tweaks

* Update superset/assets/src/components/Menu/Menu.jsx
2019-11-21 20:53:38 -08:00
Erik Ritter
9303672121 [SQL Lab] Wrap more logic with feature flag (#8629) 2019-11-21 17:08:11 -08:00
maxmelnick
b7a508d5a7 updated FLASK_APP values for dockerusage (#8621) 2019-11-21 08:44:17 +00:00
ʈᵃᵢ
6e470fc9bb fix filter dropdown z-index (#8623) 2019-11-20 22:52:27 -08:00
Ville Brofeldt
7104b04817 Pass url parameters from dashboard to charts (#8536)
* Pass url_params from dashboard to charts

* Update params to form_data instead of overwriting

* Add cypress tests

* Add python test

* Add docs

* Move reserved url params to utils

* Bump cypress
2019-11-21 07:07:08 +02:00
Evan Rusackas
ff6773df4e Copying in Markdown formatted Apache Code of Conduct. (#8615) 2019-11-20 14:42:53 -08:00
Evan Rusackas
89c58bcb6f [css] Simplifying SQL toolbar item margins, fixing overflow bug (#8596)
* lots of margin adjustments and simplifications

* class -> className

* correcting class name to match conventions (NorthPane -> north-pane)
2019-11-20 14:42:25 -08:00
Beto Dealmeida
964e6db800 Make select_star work with SQL Lab views (#8598)
* Make select_star work with SQL Lab views

* Fix mypy
2019-11-20 13:07:16 -08:00
Evan Rusackas
ceec53da17 Migrate CSS to LESS files, remove unused files (#8617)
* all CSS files migrated to LESS

* prettier

* removing unused CSS/LESS Files
2019-11-20 12:14:10 -08:00
John Bodley
fc14eff290 Update CONTRIBUTING.md (#8599) 2019-11-20 11:01:14 -08:00
Conglei
096fefd8c8 revert table (#8616) 2019-11-20 10:24:24 -08:00
Evan Rusackas
6919ee4ef4 Moving static colors over to Less vars (#8563)
* Sweep #1

* moving a few more colors, fixing an import issue.

* another include, another color nabbed.

* more whittling.

* moving filterbox css to less, standardizing colors in there.

* nixing the css file I meant to nab in the last commit

* Moving the variables file to a more global/sensible (I hope?) location.

* FilterableTable moved from CSS to LESS, using color vars now.

* more whittling

* standardizing opacity stops

* nails more colors, removes some old (seemingly unused) css

* removing more dead css

* DatasourceControl moved from CSS to LESS

* BootstrapSliderWrapper CSS -> LESS

* reactable-pagination CSS->LESS, color-conformed

* FilterBadgeIcon CSS->LESS, conformed

* deleting unused/deprecated css

* welcome.css -> welcome.less (is this even being used?)

* main.css -> main.less, standardized

* there were two main.css files - this should have been in the last commit.

* explore.css -> explore.less (not used anywhere?)

* sql.css -> sql.less (also not used anywhere?)

* another main.css -> main.less, standardized on colors

* time to add shades and tints!

* caught some colors in SVG that should be in LESS.

* nixing commented css

* deleting commented code

* pulling in z-index vars lost in a conflict resolution
2019-11-20 09:33:29 -08:00
Craig Rueda
e490414484 Flask App factory PR #1 (#8418)
* First cut at app factory

* Setting things back to master

* Working with new FLASK_APP

* Still need to refactor Celery

* CLI mostly working

* Working on unit tests

* Moving cli stuff around a bit

* Removing get in config

* Defaulting test config

* Adding flask-testing

* flask-testing casing

* resultsbackend property bug

* Fixing up cli

* Quick fix for KV api

* Working on save slice

* Fixed core_tests

* Fixed utils_tests

* Most tests working - still need to dig into remaining app_context issue in tests

* All tests passing locally - need to update code comments

* Fixing dashboard tests again

* Blacking

* Sorting imports

* linting

* removing envvar mangling

* blacking

* Fixing unit tests

* isorting

* licensing

* fixing mysql tests

* fixing cypress?

* fixing .flaskenv

* fixing test app_ctx

* fixing cypress

* moving manifest processor around

* moving results backend manager around

* Cleaning up __init__ a bit more

* Addressing PR comments

* Addressing PR comments

* Blacking

* Fixes for running celery worker

* Tuning isort

* Blacking
2019-11-20 15:47:06 +00:00
ʈᵃᵢ
300c4ecb0f [SECURITY] bump packages with security vulnerabilities (#8573)
* bump packages with security velnerabilities

* bring back cypress

* remove cypress
2019-11-19 23:34:13 -08:00
ʈᵃᵢ
9d36fa348f Move from MVC FAB menu to Superset React menu (#8289)
* adds react based menu for welcome view

* bump fab

* better logic in common_bootstrap_payload

* split up files

* fix spacing and module scope styles

* lint

* render correct template for welcome
2019-11-19 22:56:27 -08:00
ʈᵃᵢ
54d9154a14 increase z-index on filter box to fix bleeding of filter indicator (#8579)
* increase z-index on filter box to fix bleeding of filter indicator

* convert to less and use variables

* add comment and port value to variable
2019-11-19 22:55:03 -08:00
Evan Rusackas
03d5a82137 Using Prettier for CSS (#8606)
* Adding clean-css npm script, and calling it in the lint-fix script for good measure.

* resulting cleanup
2019-11-19 22:33:38 -08:00
Evan Rusackas
ac665d360c showing version and SHA (subtly) in user menu. (#8562)
* showing version and SHA (subtly) in user menu.

* not using VERSION_INFO_FILE after all.

* cleanup... excess linebraks...

* Just trying to make you happy, Black!

* adding some spaces before opening brackets for CSS selectors

* setting version_sha from appbuilder.app.config['VERSION_SHA']
2019-11-19 21:35:18 -08:00
Will Barrett
d70e0fc359 Fix for BigQuery connection checks and CSV uploads (#8511)
* Fix for BigQuery connection checks and CSV uploads

* Don't assume encrypted_extra will be populated

* Fix undefined method error

* Refactor to avoid circular import strangeness
2019-11-19 14:50:47 -08:00
Beto Dealmeida
3b97ae3b9d Set owner when creating SQL Lab view (#8597)
* Set owner when creating SQL Lab view

* Add unit test

* Small fix
2019-11-19 10:48:42 -08:00
Daniel Vaz Gaspar
3b13fb4143 [docs] Improve and automate apache source releases (#8584) 2019-11-19 15:44:38 +00:00
ashun
71c5c0f366 fix for issue#8269 (#8270) 2019-11-19 07:13:47 -08:00
Caahlo
07058c5a12 add Liechtenstein to country selection (#8605)
add Liechtenstein to country selection and document its municipalities as regions
2019-11-19 07:06:17 -08:00
Grace Guo
f42aae843c [dashboard scoped filter] Reduce calls to expensive safeStringify (#8595)
* [dashboard scoped filter] Reduce calls to expensive safeStringify

* better handle empty or null scope settings
2019-11-18 20:49:28 -08:00
Erik Ritter
7d14b71a93 [lint] Add lint rule enforcing React Fragment shorthand (#8585) 2019-11-18 16:17:12 -08:00
Grace Guo
ff6ab10893 [Feature] Dashboard scoped filter (#8590)
* [WIP][dashboard scoped filter] part 1: scope selector modal (#8557)

* filter scope selector modal

* add single-field-edit in multi-edit mode switch

* fix code review comments (round 1)

* refactory after design review

* fix a few props initial value

* [WIP][dashboard scoped filter] part 2: add algorithm to convert checked ids to scope object (#8564)

* convert ids to scope object

* use lodash helpers to make code readable

* [WIP][dashboard scoped filter] part 3: merge filter scope settings into dashboard redux state (#8522)

* merge filter scope settings into dashboard redux state

* fix/add unit tests

* minor bug fixes

* fix save filter Scopes behavior

* resolve review comments

* fix save filter scope settings

* minor comments

* [dashboard scoped filter] Improve scrollbar inside modal (#8553)

* improve scroll inside modal

* make left pane and right pane scroll separately

* fix review comments

* force show filter_box as unchecked (#8587)
2019-11-18 13:02:25 -08:00
Caahlo
c87a140734 add Switzerland to country selection (#8592)
add Switzerland to country selection and document Swiss cantons as regions
2019-11-18 10:13:53 -08:00
Wu Junhao
1ee08c991f adding bilibili in readme (#8591) 2019-11-18 17:16:12 +02:00
Evan Rusackas
3d0c0f5028 [css] adding spaces before opening curlies. (#8572)
* adding spaces before opening curlies.

* adding stylelint config to catch these brackets

* moving stylelint rules to package.json
2019-11-15 16:35:48 -08:00
Beto Dealmeida
9c82ff8b96 Fix async queries with SQLLAB_BACKEND_PERSISTENCE (#8586) 2019-11-15 10:34:56 -08:00
Rob DiCiuccio
fc12e53ff5 Bump pyarrow to 0.15.1 due to CVE (#8583) 2019-11-15 09:08:23 -08:00
Daniel Vaz Gaspar
4290f79640 [docs] Improve tests for an Apache release candidate (#8570)
* [docs] Improve tests for an Apache release candidate

* [docs] Fix phrase
2019-11-15 13:44:07 +00:00
Daniel Vaz Gaspar
efb44ba59d [druid] Fix, pydruid forced dependency (#8566)
* [druid] Fix, forced pydruid dependency

* [druid] Fix, more type annotation that force pydruid dependency
2019-11-15 09:25:23 +00:00
Beto Dealmeida
71ac788b20 Fix error when templateParams is undefined (#8581) 2019-11-14 20:22:06 -08:00
Conglei
dc42015e69 feat: bump superset ui table version (#8582) 2019-11-14 17:13:56 -08:00
Beto Dealmeida
9044f210ee Do not autorun query on tab duplicate (#8577)
* Pass autorun argument to cloneQueryToNewTab

* Accept autorun argument

* Fix unit test
2019-11-14 17:08:03 -08:00
Beto Dealmeida
26c55bd57a Copy template params when duplicating query (#8580) 2019-11-14 17:07:30 -08:00
Beto Dealmeida
2f77c9f33e Math.max(...array) considered harmful (#8575)
* Do not use Math.max

* Small fix
2019-11-14 17:07:18 -08:00
Beto Dealmeida
78f41b38e1 Fix more places where feature flags are serialized (#8567) 2019-11-14 10:01:57 -08:00
Beto Dealmeida
d66bc5ad90 SIP-23: Persist SQL Lab state in the backend (#8060)
* Squash all commits from VIZ-689

* Fix javascript

* Fix black

* WIP fixing javascript

* Add feature flag SQLLAB_BACKEND_PERSISTENCE

* Use feature flag

* Small fix

* Fix lint

* Fix setQueryEditorSql

* Improve unit tests

* Add unit tests for backend sync

* Rename results to description in table_schema

* Add integration tests

* Fix black

* Migrate query history

* Handle no results backend

* Small improvement

* Address comments

* Store SQL directly instead of reference to query

* Small fixes

* Fix clone tab

* Fix remove query

* Cascade delete

* Cascade deletes

* Fix tab closing

* Small fixes

* Small fix

* Fix error when deleting tab

* Catch 404 when tab is deleted

* Remove tables from state on tab close

* Add index, autoincrement and cascade

* Prevent duplicate table schemas

* Fix mapStateToProps

* Fix lint

* Fix head

* Fix javascript

* Fix mypy

* Fix isort

* Fix javascript

* Fix merge

* Fix heads

* Fix heads

* Fix displayLimit

* Recreate migration script trying to fix heads

* Fix heads
2019-11-14 09:44:57 -08:00
ʈᵃᵢ
59bc220602 bump legacy-preset-chart-nvd3 to 0.11.5 (#8558) 2019-11-13 12:18:34 -08:00
Conglei
e14ca1a423 feat: switch to new table (#8560) 2019-11-13 12:18:03 -08:00
Maxime Beauchemin
2b53ace8a4 docs: remove Gitter link from README (#8549) 2019-11-13 11:19:05 -08:00
Erik Ritter
1a5c2573b7 [Dashboard Import] Log error on dashboard import failure (#8550) 2019-11-13 09:41:48 -08:00
Ville Brofeldt
90275fe991 Add convert_dttm method to SnowflakeEngineSpec (#8551) 2019-11-13 11:13:49 +02:00
John Bodley
7bfa24d0da [fix] Re-cleanup legacy filters (#8523) 2019-11-12 12:29:00 -08:00
Beto Dealmeida
a58b3920db Encode feature flags to JSON pessimistically (#8529)
* Encode feature flags to JSON pessimistically

* Add unit test

* Remove old imports
2019-11-12 11:10:36 -08:00
Evan Rusackas
1b3e40feac Clickable checkbox labels (#8534)
* passing onClick prop to header with the existing onChange method.

* basic test checking that label click fires the onChange method.

* cleaning up stuff caught by linting.
2019-11-12 10:22:17 -08:00
Erik Ritter
a867d41d2a Upgrade superset-ui/time-format (#8541) 2019-11-12 10:22:08 -08:00
Daniel Vaz Gaspar
b7b655e180 [docs] 0.35.0 CHANGELOG (#8547)
* [docs] Update CHANGELOG with 0.35.0

* [docs] Fix, github md problem
2019-11-12 10:21:56 -08:00
axuew
763f59fc58 Add support for database engine SAP Hana (#8411)
* Add support for database engine SAP Hana

* Support hana services

Increase time, minute, and second

* Fix hana return string

* Fix formatting errors
2019-11-12 08:42:44 +02:00
Paul Vickers
62476c5901 Allow customization of documentation icon and text (#8507)
* Allow customization of documentation icon and text

* Set icon width to 100%

* Use double quotes for strings
2019-11-11 17:35:19 -08:00
ʈᵃᵢ
6bce4f9877 fab 2.2.0 (#8517) 2019-11-11 17:34:08 -08:00
John Bodley
64de9aa056 [docs] Updating slice parameter documentation. (#8535)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2019-11-10 11:31:11 -08:00
Daniel Vaz Gaspar
650c848243 [cli] Fix, import datasources exported by UI (#8477)
* [cli] Fix, import datasources exported by UI
2019-11-10 16:29:51 +00:00
francishemingway
5ed2190ebd [docs] User tutorial (#8459)
* added user tutorial and rearranged docs hierarchy

* added license header, renamed admin tutorial file

* fixed image url issue

* Fix spelling

* Tweaks to text based on feedback

* guilabel and menu test

* added guilabel and upload csv section

* tidy up of rst formatting
2019-11-08 15:45:06 -08:00
John Bodley
c4c01d601c [docs] Adding Slice parameter documentation (#8531)
* [CONTRIBUTING.md] Adding Slice parameter documentation

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2019-11-08 14:19:22 -08:00
Ville Brofeldt
49ea232c3a [fix] Improve csv upload functionality (#8457)
* [fix] csv upload when table metadata present

* Remove table from hive spec

* Move upload before table metadata creation

* Refine upload logic, dd unit tests and fix translations

* Use ALLOWED_EXTENSIONS from config

* Address review comments

* Fix error message grammar

* Add return type to hive csv upload and replace first with one_or_none
2019-11-07 20:03:42 +02:00
Ville Brofeldt
397e1e3d40 Replace hardcoded default colors with defaults in setupColors.js (#8510) 2019-11-07 20:01:59 +02:00
Juliette Tisseyre
ec476fc67e Default page: remove title attribute to fall back on appbuilder.app_name (#8427) 2019-11-06 13:10:39 -08:00
John Bodley
1e3d833b02 [sip-15] Fixing time range endpoints from dashboards (#8513) 2019-11-06 09:15:58 -08:00
Conglei
d78e59b75c revert tablevis (#8515) 2019-11-05 23:08:44 -08:00
Erik Ritter
571c4745f5 Make Report a bug link open in a new tab (#8509) 2019-11-05 15:30:02 -08:00
Beto Dealmeida
7e7f55386d Remove tabs (#8508) 2019-11-05 10:55:35 -08:00
John Bodley
0e64dc84de [SIP-15] Making sure the toast link opens in a new tab (#8503)
* [SIP-15] Ensuring toast opens in a new tab

* Update config.py
2019-11-05 07:02:18 -08:00
Daniel Vaz Gaspar
926dca3214 [docs] Small fixes on the release docs (#8500)
* [docs] Small fixes on the release docs

* [docs] Fix, remove deprecated app parameter from fab create-admin
2019-11-05 08:44:06 +00:00
Paul Vickers
e8af9459ab Update query tab's title when saving a new query (#8484)
* Update query tab's title when saving a new query

Just like it does when you opt to update an existing query

* Remove trailing whitespace
2019-11-04 23:39:33 -08:00
Will Barrett
0730261342 Fix column type on dbs.encrypted_extra, add instructions for testing migration downgrades (#8493)
* Fix column type on dbs.encrypted_extra

* Add instructions for testing migration downgrades

* Account for non-Postgres DBs in migration

* Use batch_alter_table to make SQLite happy

* Another CI-appeasing tweak
2019-11-04 23:13:21 -08:00
liuyanpunk
5617f8721d Updating pip with default timeout (#8492)
* Updating pip with default timeout

Most of the time, the pip default site is realiable but we do see timeouts pops out when network is busy or temporary unavaliable .

The default value was 15 and that's way too short. So adding --default-time and set it to 1000 should be long enough to mitigate

* Update Dockerfile
2019-11-04 23:05:39 -08:00
John Bodley
5dba2f4b56 [SIP-15] Adding grace period (#8490) 2019-11-04 12:00:41 -08:00
Beto Dealmeida
338a2b1a51 Allow user to customize query cost estimate (#8470)
* Allow user to customize query estimate

* Add docs; run black

* Update docs with types
2019-11-04 11:08:00 -08:00
serenajiang
9a29116d6b [typing] superset/models/core.py (#8284) 2019-11-04 21:04:53 +02:00
Marcus
4c35de1d1f build: bump dompurify version because of nasty xss bypass. (#8498) 2019-11-04 10:30:46 -08:00
Paul Vickers
5df1fcb7bd Add Duplicate Tab option (#8485)
* Add `Duplicate Tab` option

Adds an option to duplicate the current tab's setting/content into a new tab. Useful if you're iterating on a query.

* Add test
2019-11-04 09:05:10 -08:00
Taeshik Hwang
51c22900db feat: add korea(South) info on CountryMap viz and bump legacy-plugin-chart-country-map to v0.11.4 (#8478) 2019-11-04 07:45:43 -08:00
francishemingway
a305b1a2c5 Change Fedora installation instructions + some small formatting changes (#8496) 2019-11-03 18:02:14 -08:00
John Bodley
fda2333cf2 [SIP-15] Updating ISO 8601 regex match to make time optional (#8494) 2019-11-01 17:44:28 -07:00
Grace Guo
acad66dad1 [datasource editor] Only one click target for edit action (#8495) 2019-11-01 17:22:38 -07:00
Conglei
d46b47a5d8 feat(TableVis): Switch to the new table plugin (#8446)
* use new table comp

* remove commented code

* update lock file

* fix lint

* bump version

* update lock file

* fix lock issue
2019-11-01 15:58:29 -07:00
John Bodley
554a6d82db [sip-15] Adding database level python-date-format (#8474) 2019-10-31 07:13:41 -07:00
John Bodley
eb150eba1f [sip-15] Fix time range endpoints encoding (#8481) 2019-10-31 07:11:48 -07:00
Christoph Lingg
06a4108a7d Enhance docs for email reporting (#8486)
* extend documentation about setting up email reporting

* mention EMAIL_REPORTS_USER
2019-10-30 22:37:13 -07:00
Marcus
a8f1589dbf fixing typo. (#8487) 2019-10-30 22:30:06 -07:00
Will Barrett
1ccfa4f11e Re-enable DRUID_IS_ACTIVE flag (#8482)
* Re-enable DRUID_IS_ACTIVE flag

* Make CI happy
2019-10-30 22:16:51 -07:00
Will Barrett
e4ca44e95f Use config[] not config.get() (#8454)
* Typo fix in CONTRIBUTING.md

* Alter references to config.get('FOO') to use preferred config['FOO']

* Set missing configuration constants in superset/config.py

* Misc. CI fixes

* Add type annotation for FEATURE_FLATGS
2019-10-30 16:19:16 -07:00
Kim Truong
3cba1bd990 feat: add expand_data parameter (#8472)
* feat: add expand_data parameter

* fix: reformat files
2019-10-30 11:45:35 -07:00
Maxime Beauchemin
18c6d17b24 docs: more release instructions (#8432) 2019-10-30 10:24:18 -07:00
John Bodley
0a3b121244 [sql] Fixing datetime SQL literal (#8464) 2019-10-29 23:24:48 -07:00
John Bodley
7afda6e4f5 Update UPDATING.md (#8465) 2019-10-29 18:01:49 -07:00
Grace Guo
5fb0bcb854 [Datasource Editor] A few small UI changes in modal to prevent accidental edits (#8471) 2019-10-29 15:26:11 -07:00
Will Barrett
1adf7426c2 Provide documentation for using a Service Account to connect to BigQuery (#8462)
* Provide documentation for using a Service Account to connect to BigQuery

* Alter line wrapping for shorter lines

* Whitespace commit to trigger another build (flake)

* Another meaningless whitespace change to trigger another build
2019-10-29 12:31:45 -07:00
John Bodley
8b74745f9e [SIP-15] Adding initial framework (#8398)
* [sip-15] Adding initial framework

* [toast] Addressing etr2460's comments

* [fix] Addressing etr2460's comments
2019-10-28 14:23:12 -07:00
John Bodley
f7f0be502d [SIP-15] Making client time use UTC as the local time (#8450)
* [fix] Making client time UTC

* Update UPDATING.md
2019-10-28 13:05:01 -07:00
Daniel Vaz Gaspar
a757b43164 [db engine] Add support for Elasticsearch (#8441)
* [db engine] Add support for Elasticsearch
2019-10-28 16:04:14 +00:00
Will Barrett
148cec4690 Add UI-only database configuration method for extended authorization scenarios (#8448)
* Add encrypted_extra to dbs

* WIP - UI-based BigQuery connection configuration

* Fix 500 bubbling to the surface when adding a database connection

* Add check for valid json

* black formatting:

* isort

* Incorporate PR feedback. Thanks all!

* black

* Typo fix in CONTRIBUTING.md
2019-10-28 15:49:40 +00:00
Daniel Vaz Gaspar
c1810aab15 [docs] Crafting a new release (#8433)
* [docs] Crafting a new release
2019-10-28 10:17:10 +00:00
Alexandre Brilhante
eaeed0c93a removed repeated word (#8458) 2019-10-26 19:47:22 +03:00
Beto Dealmeida
e704e29174 Allow fetching all rows from results endpoint (#8389)
* Allow bypassing DISPLAY_MAX_ROW

* Add unit tests and docs

* Fix tests

* Fix mock

* Fix unit test

* Revert config change after test

* Change behavior

* Address comments
2019-10-25 10:22:16 -07:00
Daniel Vaz Gaspar
59889a4436 [setup] Fix, download_url (#8439)
* [setup] Fix, download_url
2019-10-25 08:59:06 +01:00
Will Barrett
82b174701f Split up tests/db_engine_test.py (#8449)
* Split up db_engine_specs_test.py into a number of targeted files

* Remove db_engine_specs_test.py

* isort
2019-10-24 20:46:45 -07:00
Christoph Lingg
1d5718a1a8 introduce a space in command line option (#8438)
see https://docs.celeryproject.org/en/latest/userguide/optimizing.html
2019-10-24 16:00:33 -07:00
Christoph Lingg
a39c24ef6a explain the need to enable async queries (#8444) 2019-10-24 09:52:16 -07:00
Austin Pray
19d2ea2c8c spelling fix (#8442) 2019-10-24 19:32:51 +03:00
John Bodley
786d7706e7 [fix] Updating parse_human_timedelta typing (#8436) 2019-10-23 16:04:46 -07:00
Ville Brofeldt
08c6b61a2e [fix] refine release instructions (#8381)
* Separate RC from VERSION

* Fix pypi_push.sh and refine instructions

* Add SUPERSET_ prefix to env variables

* Finalize release instructions

* Change one-off to First Time Only

* Add tagging of final version

* Convert some remaining env variables and add a check step to pypi deploy
2019-10-23 16:43:04 +03:00
Maxime Beauchemin
cde17a8c9d docs: Add an 'Orientation' section to CONTRIBUTING.md (#8422) 2019-10-22 21:44:11 -07:00
Maxime Beauchemin
a0db22bdf3 docs: add a note to RELEASING about Slack Channel (#8419) 2019-10-22 21:42:12 -07:00
John Bodley
b91205d991 [pydruid] Bumping the pydruid version (#8430) 2019-10-22 15:19:37 -07:00
3018 changed files with 424959 additions and 173378 deletions

54
.asf.yaml Normal file
View File

@@ -0,0 +1,54 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# https://cwiki.apache.org/confluence/display/INFRA/.asf.yaml+features+for+git+repositories
---
github:
description: "Apache Superset is a Data Visualization and Data Exploration Platform"
homepage: https://superset.apache.org/
labels:
- superset
- apache
- apache-superset
- data-visualization
- data-viz
- analytics
- business-intelligence
- data-science
- data-engineering
- asf
- bi
- business-analytics
- data-analytics
- data-analysis
- data-science
- python
- react
- sql-editor
- flask
features:
# Enable issues management
issues: true
# Enable projects for project management boards
projects: true
# Enable wiki for documentation
wiki: true
enabled_merge_buttons:
squash: true
merge: false
rebase: false

View File

@@ -34,6 +34,7 @@
tests/
docs/
install/
superset/assets/node_modules/
superset/assets/cypress/
superset/assets/coverage/
superset-frontend/node_modules/
superset-frontend/cypress/
superset-frontend/coverage/
venv

47
.editorconfig Normal file
View File

@@ -0,0 +1,47 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
# 4 space indentation for Python files
[*.py]
indent_style = space
indent_size = 4
max_line_length=88
# 2 space indentation for Frontend files
[*.{js,jsx,ts,tsx,html,less,css}]
indent_style = space
indent_size = 2
# 2 space indentation for json and yaml files
[*.{json,yml}]
indent_style = space
indent_size = 2
# Tab indentation
[Makefile]
indent_style = tab

View File

@@ -14,5 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FLASK_APP=superset:app
FLASK_ENV=development
FLASK_APP="superset.app:create_app()"
FLASK_ENV="development"

View File

@@ -26,13 +26,11 @@ analyze:
modules:
- name: assets
type: npm
target: superset/assets
path: superset/assets
- name: docs
type: pip
target: docs
path: docs
- name: .
target: superset-frontend
path: superset-frontend
- name: base
type: pip
target: .
path: .
options:
requirements: ./requirements/base.txt

View File

@@ -1,6 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
labels: "#bug"
---
@@ -32,11 +33,10 @@ If applicable, add screenshots to help explain your problem.
- superset version: `superset version`
- python version: `python --version`
- node.js version: `node -v`
- npm version: `npm -v`
### Checklist
Make sure these boxes are checked before submitting your issue - thank you!
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.

20
.github/ISSUE_TEMPLATE/cosmetic.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Cosmetic Issue
about: Describe a cosmetic issue with CSS, positioning, layout, labeling, or similar
labels: "cosmetic-issue"
---
## Screenshot
[drag & drop image(s) here!]
## Description
[describe the issue here!]
## Design input
[describe any input/collaboration you'd like from designers, and
tag accordingly. For design review, add the
label `design:review`. If this includes a design proposal,
include the label `design:suggest`]

View File

@@ -1,6 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
labels: "#enhancement"
---

View File

@@ -0,0 +1,12 @@
---
name: Security vulnerability
about: Report a security vulnerability or issue
labels: "#security"
---
## DO NOT REPORT SECURITY VULNERABILITIES HERE
Please report security vulnerabilities to private@superset.apache.org.
In the event a community member discovers a security flaw in Superset, it is important to follow the [Apache Security Guidelines](https://www.apache.org/security/committers.html) and release a fix as quickly as possible before public disclosure. Reporting security vulnerabilities through the usual GitHub Issues channel is not ideal as it will publicize the flaw before a fix can be applied.

View File

@@ -1,9 +1,13 @@
---
name: SIP
about: Superset Improvement Proposal
labels: "#SIP"
---
*Please make sure you are familiar with the SIP process documented*
(here)[https://github.com/apache/superset/issues/5602]
## [SIP] Proposal for XXX
### Motivation

View File

@@ -1,14 +1,3 @@
### CATEGORY
Choose one
- [ ] Bug Fix
- [ ] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
@@ -27,5 +16,3 @@ Choose one
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
### REVIEWERS

View File

@@ -0,0 +1 @@
indent_size = 2

View File

@@ -0,0 +1,3 @@
dist/
lib/
node_modules/

View File

@@ -0,0 +1,26 @@
module.exports = {
plugins: ['jest', '@typescript-eslint'],
extends: ['plugin:jest/all'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 9,
sourceType: 'module',
},
rules: {
'eslint-comments/no-use': 'off',
'import/no-namespace': 'off',
'no-unused-vars': 'off',
'no-console': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
env: {
node: true,
es6: true,
'jest/globals': true,
},
};

View File

@@ -0,0 +1,34 @@
name: Tests
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: npm ci
- name: Run prettier format check
run: npm run format-check
- name: Build
run: npm run build
- name: Run tests
run: npm run test
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash)

View File

@@ -0,0 +1,6 @@
lib
coverage
node_modules
!dist
!dist/cache

View File

@@ -0,0 +1,3 @@
dist/
lib/
node_modules/

View File

@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"parser": "typescript"
}

View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2018 GitHub, Inc. and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,212 @@
# cached-dependencies
[![](https://github.com/ktmud/cached-dependencies/workflows/Tests/badge.svg)](https://github.com/ktmud/cached-dependencies/actions?query=workflow%3ATests) [![codecov](https://codecov.io/gh/ktmud/cached-dependencies/branch/master/graph/badge.svg)](https://codecov.io/gh/ktmud/cached-dependencies)
Enable **multi-layer cache** and **shortcut commands** in any workflows.
Manage multiple cache targets in one step. Use either the built-in cache configs for npm, yarn, and pip, or write your own. Create a bash command library to easily reduce redudencies across workflows. Most useful for building webapps that require multi-stage building processes.
This is your all-in-one action for everything related to setting up dependencies with cache.
## Inputs
- **run**: bash commands to run, allows shortcut commands
- **caches**: path to a JS module that defines cache targets, defaults to `.github/workflows/caches.js`
- **bashlib**: path to a BASH scripts that defines shortcut commands, defaults to `.github/workflows/bashlib.sh`
- **parallel**: whether to run the commands in parallel with node subprocesses
## Examples
Following workflow sets up dependencies for a typical Python web app with both `~/.pip` and `~/.npm` cache configured in one simple step:
```yaml
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
uses: ktmud/cached-dependencies@v1
with:
run: |
npm-install
npm run build
pip-install
python ./bin/manager.py fill_test_data
```
Here we used predefined `npm-install` and `pip-install` commands to install dependencies with correponding caches.
You may also replace `npm-install` with `yarn-install` to install npm pacakges with `yarn.lock`.
```yaml
- name: Install dependencies
uses: ktmud/cached-dependencies@v1
with:
run: |
yarn-install
yarn build
pip-install
python ./bin/manager.py fill_test_data
```
See below for more details.
## Usage
### Cache configs
Under the hood, we use [@actions/cache](https://github.com/marketplace/actions/cache) to manage cache storage. But instead of defining only one cache at a time and specify them in workflow YAMLs, you manage all caches in a spearate JS file: `.github/workflows/caches.js`.
Here is [the default configuration](https://github.com/ktmud/cached-dependencies/blob/master/src/cache/caches.ts) for Linux:
```js
module.exports = {
pip: {
path: [`${process.env.HOME}/.cache/pip`],
hashFiles: ['requirements*.txt'],
keyPrefix: 'pip-',
restoreKeys: 'pip-',
},
npm: {
path: [`${HOME}/.npm`],
hashFiles: [
`package-lock.json`,
`*/*/package-lock.json`,
`!node_modules/*/package-lock.json`,
],
},
yarn: {
path: [`${HOME}/.npm`],
// */* is for supporting lerna monorepo with depth=2
hashFiles: [`yarn.lock`, `*/*/yarn.lock`, `!node_modules/*/yarn.lock`],
},
}
```
In which `hashFiles` and `keyPrefix` will be used to compute the primary cache key used in [@actions/cache](https://github.com/marketplace/actions/cache). `keyPrefix` will default to `${cacheName}-` and `restoreKeys` will default to `keyPrefix` if not specified.
It is recommended to always use absolute paths in these configs so you can share them across different worflows more easily (in case you the action is called from different working directories).
#### Speficy when to restore and save
With the predefined `cache-store` and `cache-save` bash commands, you have full flexibility on when to restore and save cache:
```yaml
steps:
- uses: actions/checkout@v2
- uses: ktmud/cached-dependencies@v1
with:
run: |
cache-restore npm
npm install
cache-save npm
cache-restore pip
pip install -r requirements.txt
cache-save pip
```
### Shortcut commands
All predefined shortcut commands can be found [here](https://github.com/ktmud/cached-dependencies/blob/master/src/scripts/bashlib.sh). You can also customize them or add new ones in `.github/workflows/bashlib.sh`.
For example, if you want to install additional packages for before saving `pip` cache, simply add this to the `bashlib.sh` file:
```bash
# override the default `pip-install` command
pip-install() {
cd $GITHUB_WORKSPACE
cache-restore pip
echo "::group::pip install"
pip install -r requirements.txt # prod requirements
pip install -r requirements-dev.txt # dev requirements
pip install -e ".[postgres,mysql]" # current pacakge with some extras
echo "::endgroup::"
cache-save pip
}
```
### Default setup command
When `run` is not provided:
```yaml
jobs:
name: Build
steps:
- name: Install dependencies
uses: ktmud/cached-depdencies@v1
```
You must provide a `default-setup-command` in the bashlib. For example,
```bash
default-setup-command() {
pip-install & npm-install
}
```
This will start installing pip and npm dependencies at the same time.
### Customize config locations
Both the two config files, `.github/workflows/bashlib.sh` and `.github/workflows/caches.js`, can be placed in other locations:
```yaml
- uses: ktmud/cached-dependencies@v1
with:
caches: ${{ github.workspace }}/.github/configs/caches.js
bashlib: ${{ github.workspace }}/.github/configs/bashlib.sh
```
### Run commands in parallel
When `parallel` is set to `true`, the `run` input will be split into an array of commands and passed to `Promise.all(...)` to execute in parallel. For example,
```yaml
- uses: ktmud/cached-dependencies@v1
with:
parallel: true
run: |
pip-install
npm-install
```
is equivalent to
```yaml
- uses: ktmud/cached-dependencies@v1
with:
run: |
pip-install & npm-install
```
If one or more of your commands must spread across multiple lines, you can add a new line between the parallel commands. Each command within a parallel group will still run sequentially.
```yaml
- uses: ktmud/cached-dependencies@v1
with:
run: |
cache-restore pip
pip install requirements*.txt
# additional pip packages
pip install package1 package2 pacakge2
cache-save pip
npm-install
cache-restore cypress
cd cypress/ && npm install
cache-save cypress
```
## License
This project is released under [the MIT License](LICENSE).

View File

@@ -0,0 +1,124 @@
import path from 'path';
import * as fs from 'fs';
import * as os from 'os';
import * as core from '@actions/core';
import * as cache from '../src/cache';
import * as inputsUtils from '../src/utils/inputs';
import * as actionUtils from '@actions/cache/src/utils/actionUtils';
import defaultCaches from '../src/cache/caches';
import { setInputs, getInput, maybeArrayToString } from '../src/utils/inputs';
import { Inputs, InputName, GitHubEvent, EnvVariable } from '../src/constants';
import caches, { npmExpectedHash } from './fixtures/caches';
describe('patch core states', () => {
it('should log error if states file invalid', () => {
const logWarningMock = jest.spyOn(actionUtils, 'logWarning');
fs.writeFileSync(`${os.tmpdir()}/cached--states.json`, 'INVALID_JSON', {
encoding: 'utf-8',
});
core.getState('haha');
expect(logWarningMock).toHaveBeenCalledTimes(2);
});
it('should persist state', () => {
core.saveState('test', '100');
expect(core.getState('test')).toStrictEqual('100');
});
});
describe('cache runner', () => {
it('should use default cache config', async () => {
await cache.loadCustomCacheConfigs();
// but `npm` actually come from `src/cache/caches.ts`
const inputs = await cache.getCacheInputs('npm');
expect(inputs?.[InputName.Path]).toStrictEqual(
maybeArrayToString(defaultCaches.npm.path),
);
expect(inputs?.[InputName.RestoreKeys]).toStrictEqual('npm-');
});
it('should override cache config', async () => {
setInputs({
[InputName.Caches]: path.resolve(__dirname, 'fixtures/caches'),
});
await cache.loadCustomCacheConfigs();
const inputs = await cache.getCacheInputs('npm');
expect(inputs?.[InputName.Path]).toStrictEqual(
maybeArrayToString(caches.npm.path),
);
expect(inputs?.[InputName.Key]).toStrictEqual(`npm-${npmExpectedHash}`);
expect(inputs?.[InputName.RestoreKeys]).toStrictEqual(
maybeArrayToString(caches.npm.restoreKeys),
);
});
it('should apply inputs and restore cache', async () => {
setInputs({
[InputName.Caches]: path.resolve(__dirname, 'fixtures/caches'),
[EnvVariable.GitHubEventName]: GitHubEvent.PullRequest,
});
const setInputsMock = jest.spyOn(inputsUtils, 'setInputs');
const inputs = await cache.getCacheInputs('npm');
const result = await cache.run('restore', 'npm');
expect(result).toBeUndefined();
// before run
expect(setInputsMock).toHaveBeenNthCalledWith(1, inputs);
// after run
expect(setInputsMock).toHaveBeenNthCalledWith(2, {
[InputName.Key]: '',
[InputName.Path]: '',
[InputName.RestoreKeys]: '',
});
// inputs actually restored to original value
expect(getInput(InputName.Key)).toStrictEqual('');
// pretend still in execution context
setInputs(inputs as Inputs);
// `core.getState` should return the primary key
expect(core.getState('CACHE_KEY')).toStrictEqual(inputs?.[InputName.Key]);
setInputsMock.mockRestore();
});
it('should run saveCache', async () => {
// call to save should also work
const logWarningMock = jest.spyOn(actionUtils, 'logWarning');
setInputs({
[InputName.Parallel]: 'true',
});
await cache.run('save', 'npm');
expect(logWarningMock).toHaveBeenCalledWith(
'Cache Service Url not found, unable to restore cache.',
);
});
it('should exit on invalid args', async () => {
// other calls do generate errors
const processExitMock = jest
.spyOn(process, 'exit')
// @ts-ignore
.mockImplementation(() => {});
// incomplete arguments
await cache.run();
await cache.run('save');
// bad arguments
await cache.run('save', 'unknown-cache');
await cache.run('unknown-action', 'unknown-cache');
setInputs({
[InputName.Caches]: 'non-existent',
});
await cache.run('save', 'npm');
expect(processExitMock).toHaveBeenCalledTimes(5);
});
});

View File

@@ -0,0 +1,5 @@
#!/bin/bash
default-setup-command() {
print-cachescript-path
}

View File

@@ -0,0 +1,14 @@
/**
* Example cache config.
*/
export const npmHashFiles = ['.*ignore'];
export const npmExpectedHash =
'13ed29a1c7ec906e7dcb20626957ebfcd3f0f2174bd2685a012105792bf1ff55';
export default {
npm: {
path: [`~/.npm`],
hashFiles: npmHashFiles,
restoreKeys: 'node-npm-',
},
};

View File

@@ -0,0 +1,101 @@
/**
* Test default runner.
*/
import { setInputs } from '../src/utils/inputs';
import { InputName, DefaultInputs } from '../src/constants';
import * as setup from '../src/setup';
import path from 'path';
const extraBashlib = path.resolve(__dirname, './fixtures/bashlib.sh');
describe('setup runner', () => {
// don't actually run the bash script
const runCommandMock = jest.spyOn(setup, 'runCommand');
it('should allow custom bashlib', async () => {
setInputs({
[InputName.Bashlib]: extraBashlib,
});
await setup.run();
expect(runCommandMock).toHaveBeenCalledTimes(1);
expect(runCommandMock).toHaveBeenCalledWith(
DefaultInputs[InputName.Run],
extraBashlib,
);
});
it('should allow inline bash overrides', async () => {
const processExitMock = jest
.spyOn(process, 'exit')
// @ts-ignore
.mockImplementation(() => {});
setInputs({
[InputName.Bashlib]: '',
[InputName.Parallel]: 'false',
[InputName.Run]: `
${DefaultInputs[InputName.Run]}() {
echo "It works!"
exit 202
}
${DefaultInputs[InputName.Run]}
`,
});
// allow the bash script to run for one test, but override the default
await setup.run();
expect(runCommandMock).toHaveBeenCalledTimes(1);
expect(processExitMock).toHaveBeenCalledTimes(1);
expect(processExitMock).toHaveBeenCalledWith(1);
});
it('should use run commands', async () => {
// don't run the commands when there is no overrides
runCommandMock.mockImplementation(async () => {});
setInputs({
[InputName.Bashlib]: 'non-existent',
[InputName.Run]: 'print-cachescript-path',
});
await setup.run();
expect(runCommandMock).toHaveBeenCalledTimes(1);
expect(runCommandMock).toHaveBeenCalledWith('print-cachescript-path', '');
});
it('should handle single-new-line parallel commands', async () => {
setInputs({
[InputName.Run]: `
test-command-1
test-command-2
`,
[InputName.Parallel]: 'true',
});
await setup.run();
expect(runCommandMock).toHaveBeenNthCalledWith(1, 'test-command-1', '');
expect(runCommandMock).toHaveBeenNthCalledWith(2, 'test-command-2', '');
});
it('should handle multi-new-line parallel commands', async () => {
setInputs({
[InputName.Run]: `
test-1-1
test-1-2
test-2
`,
[InputName.Parallel]: 'true',
});
await setup.run();
expect(runCommandMock).toHaveBeenNthCalledWith(
1,
'test-1-1\n test-1-2',
'',
);
expect(runCommandMock).toHaveBeenNthCalledWith(2, 'test-2', '');
});
});

View File

@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "../build",
"noEmit": true,
"rootDir": "../"
},
"exclude": ["node_modules"]
}

View File

@@ -0,0 +1,25 @@
name: Cached Dependencies
description: Setup multi-layered cache and dependencies in one step, share predefined commands across workflows
author: Jesse Yang <hello@yjc.me>
branding:
icon: layers
color: yellow
inputs:
caches:
required: false
description: Path to a JS file with cache configs
default: ${{ github.workspace }}/.github/workflows/caches.js
bashlib:
required: false
description: Path to a Bash script with command shortcuts
default: ${{ github.workspace }}/.github/workflows/bashlib.sh
run:
required: false
description: Setup commands to run, can use shortcuts defined in bashlib
default: default-setup-command
parallel:
required: false
description: Whether to run commands in parallel
runs:
using: node12
main: dist/index.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
'use strict';
const fs = require('fs');
const crypto = require('crypto');
const {parentPort} = require('worker_threads');
const handlers = {
hashFile: (algorithm, filePath) => new Promise((resolve, reject) => {
const hasher = crypto.createHash(algorithm);
fs.createReadStream(filePath)
// TODO: Use `Stream.pipeline` when targeting Node.js 12.
.on('error', reject)
.pipe(hasher)
.on('error', reject)
.on('finish', () => {
const {buffer} = hasher.read();
resolve({value: buffer, transferList: [buffer]});
});
}),
hash: async (algorithm, input) => {
const hasher = crypto.createHash(algorithm);
if (Array.isArray(input)) {
for (const part of input) {
hasher.update(part);
}
} else {
hasher.update(input);
}
const hash = hasher.digest().buffer;
return {value: hash, transferList: [hash]};
}
};
parentPort.on('message', async message => {
try {
const {method, args} = message;
const handler = handlers[method];
if (handler === undefined) {
throw new Error(`Unknown method '${method}'`);
}
const {value, transferList} = await handler(...args);
parentPort.postMessage({id: message.id, value}, transferList);
} catch (error) {
const newError = {message: error.message, stack: error.stack};
for (const [key, value] of Object.entries(error)) {
if (typeof value !== 'object') {
newError[key] = value;
}
}
parentPort.postMessage({id: message.id, error: newError});
}
});

View File

@@ -0,0 +1,21 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!@actions).+\\.js$',
],
verbose: true,
};
// suppress debug messages
const processStdoutWrite = process.stdout.write.bind(process.stdout);
process.stdout.write = (str, encoding, cb) => {
processStdoutWrite(str.split('\n').filter(x => {
return !/^::debug::/.test(x);
}).join('\n'), encoding, cb);
};

8197
.github/actions/cached-dependencies/package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
{
"name": "setup-superset-action",
"version": "1.0.0",
"private": true,
"keywords": [
"actions",
"node",
"setup",
"superset"
],
"main": "dist/run",
"scripts": {
"all": "npm run format && npm run lint && npm run test && npm run build",
"build": "npm run clean && tsc && ncc build -o dist src/run.ts && ncc build -o dist/scripts/cache src/scripts/cache.ts",
"clean": "rm -rf ./lib ./dist",
"coverage": "npm run test && open ./coverage/lcov-report/index.html",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"test": "jest --clearCache && jest --coverage"
},
"dependencies": {
"@actions/cache": "actions/cache#d29c1df198dd38ac88e0ae23a2881b99c2d20e68",
"@actions/core": "1.2.4",
"@actions/exec": "1.0.4",
"@actions/glob": "0.1.0",
"@types/uuid": "7.0.4",
"hasha": "5.2.0",
"tempy": "0.6.0",
"uuid": "7.0.3"
},
"devDependencies": {
"@types/jest": "26.0.7",
"@types/node": "12.12.53",
"@typescript-eslint/eslint-plugin": "3.7.1",
"@typescript-eslint/parser": "3.7.1",
"@zeit/ncc": "0.22.3",
"eslint": "7.5.0",
"eslint-plugin-jest": "23.19.0",
"jest": "26.1.0",
"js-yaml": "3.14.0",
"prettier": "2.0.5",
"prettier-plugin-packagejson": "2.2.5",
"ts-jest": "26.1.4",
"typescript": "3.9.7"
}
}

View File

@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}

View File

@@ -0,0 +1,49 @@
/**
* Default cache configs
*/
import * as os from 'os';
export interface CacheConfig {
path: string[] | string;
hashFiles: string[] | string;
keyPrefix?: string;
restoreKeys?: string[] | string;
}
export interface CacheConfigs {
[cacheName: string]: CacheConfig;
}
const { HOME = '~' } = process.env;
const platform = os.platform() as 'linux' | 'darwin' | 'win32';
const pathByPlatform = {
linux: {
pip: `${HOME}/.cache/pip`,
},
darwin: {
pip: `${HOME}/Library/Caches/pip`,
},
win32: {
pip: `${HOME}\\AppData\\Local\\pip\\Cache`,
},
};
export default {
pip: {
path: pathByPlatform[platform].pip,
hashFiles: 'requirements*.txt',
},
npm: {
path: `${HOME}/.npm`,
hashFiles: [
`package-lock.json`,
// support lerna monorepo with depth=2
`*/*/package-lock.json`,
`!node_modules/*/package-lock.json`,
],
},
yarn: {
path: `${HOME}/.npm`,
hashFiles: [`yarn.lock`, `*/*/yarn.lock`, `!node_modules/*/yarn.lock`],
},
} as CacheConfigs;

View File

@@ -0,0 +1,146 @@
/**
* Execute @actions/cache with predefined cache configs.
*/
import { beginImport, doneImport } from './patch'; // monkey patch @actions modules
beginImport();
import saveCache from '@actions/cache/src/save';
import restoreCache from '@actions/cache/src/restore';
doneImport();
import hasha from 'hasha';
import * as fs from 'fs';
import * as core from '@actions/core';
import * as glob from '@actions/glob';
import { Inputs, InputName, DefaultInputs } from '../constants';
import { applyInputs, getInput, maybeArrayToString } from '../utils/inputs';
import caches from './caches'; // default cache configs
// GitHub uses `sha256` for the built-in `${{ hashFiles(...) }}` expression
// https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#hashfiles
const HASH_OPTION = { algorithm: 'sha256' };
/**
* Load custom cache configs from the `caches` path defined in inputs.
*
* @returns Whether the loading is successfull.
*/
export async function loadCustomCacheConfigs() {
const customCachePath = getInput(InputName.Caches);
try {
core.debug(`Reading cache configs from '${customCachePath}'`);
const customCache = await import(customCachePath);
Object.assign(caches, customCache.default);
} catch (error) {
if (
customCachePath !== DefaultInputs[InputName.Caches] ||
!error.message.includes('Cannot find module')
) {
core.error(error.message);
core.setFailed(
`Failed to load custom cache configs: '${customCachePath}'`,
);
return process.exit(1);
}
}
return true;
}
/**
* Generate SHA256 hash for a list of files matched by glob patterns.
*
* @param {string[]} patterns - The glob pattern.
* @param {string} extra - The extra string to append to the file hashes to
* comptue the final hash.
*/
export async function hashFiles(
patterns: string[] | string,
extra: string = '',
) {
const globber = await glob.create(maybeArrayToString(patterns));
let hash = '';
let counter = 0;
for await (const file of globber.globGenerator()) {
if (!fs.statSync(file).isDirectory()) {
hash += hasha.fromFileSync(file, HASH_OPTION);
counter += 1;
}
}
core.debug(`Computed hash for ${counter} files. Pattern: ${patterns}`);
return hasha(hash + extra, HASH_OPTION);
}
/**
* Generate GitHub Action inputs based on predefined cache config. Will be used
* to override env variables.
*
* @param {string} cacheName - Name of the predefined cache config.
*/
export async function getCacheInputs(
cacheName: string,
): Promise<Inputs | null> {
if (!(cacheName in caches)) {
return null;
}
const { keyPrefix, restoreKeys, path, hashFiles: patterns } = caches[
cacheName
];
const pathString = maybeArrayToString(path);
const prefix = keyPrefix || `${cacheName}-`;
// include `path` to hash, too, so to burse caches in case users change
// the path definition.
const hash = await hashFiles(patterns, pathString);
return {
[InputName.Key]: `${prefix}${hash}`,
[InputName.Path]: pathString,
// only use prefix as restore key if it is never defined
[InputName.RestoreKeys]:
restoreKeys === undefined ? prefix : maybeArrayToString(restoreKeys),
};
}
export const actions = {
restore(inputs: Inputs) {
return applyInputs(inputs, restoreCache);
},
save(inputs: Inputs) {
return applyInputs(inputs, saveCache);
},
};
export type ActionChoice = keyof typeof actions;
export async function run(
action: string | undefined = undefined,
cacheName: string | undefined = undefined,
) {
if (!action || !(action in actions)) {
core.setFailed(`Choose a cache action from: [restore, save]`);
return process.exit(1);
}
if (!cacheName) {
core.setFailed(`Must provide a cache name.`);
return process.exit(1);
}
const runInParallel = getInput(InputName.Parallel);
if (await loadCustomCacheConfigs()) {
if (runInParallel) {
core.info(`${action.toUpperCase()} cache for ${cacheName}`);
} else {
core.startGroup(`${action.toUpperCase()} cache for ${cacheName}`);
}
const inputs = await getCacheInputs(cacheName);
if (inputs) {
core.info(JSON.stringify(inputs, null, 2));
await actions[action as ActionChoice](inputs);
} else {
core.setFailed(`Cache '${cacheName}' not defined, failed to ${action}.`);
return process.exit(1);
}
if (!runInParallel) {
core.endGroup();
}
}
}

View File

@@ -0,0 +1,95 @@
/**
* Monkey patch to safely import and use @action/cache modules
*/
import * as utils from '@actions/cache/src/utils/actionUtils';
import * as core from '@actions/core';
import * as fs from 'fs';
import * as os from 'os';
import { InputName } from '../constants';
import { getInput } from '../utils/inputs';
interface KeyValueStore {
[key: string]: any;
}
const { logWarning, isValidEvent } = utils;
const { getState, saveState } = core;
function getStateStoreFile() {
const cacheName = getInput(InputName.Key);
return `${os.tmpdir()}/cached-${cacheName}-states.json`;
}
/**
* Load states from the persistent store.
*
* The default `core.saveState` only writes states as command output, and
* `core.getState` is only possible to read the state in a later step via ENV
* variables.
*
* So we use a temp file to save and load states, so to allow persistent
* states within the same step.
*
* Since the state output is not uniq to caches, each cache should have their
* own file for persistent states.
*/
function loadStates() {
const stateStore = getStateStoreFile();
const states: KeyValueStore = {};
try {
Object.assign(
states,
JSON.parse(fs.readFileSync(stateStore, { encoding: 'utf-8' })),
);
core.debug(`Loaded states from: ${stateStore}`)
} catch (error) {
// pass
if (error.code !== 'ENOENT') {
utils.logWarning(`Could not load states: ${stateStore}`)
utils.logWarning(error.message);
}
}
return states;
}
/**
* Save states to the persistent storage.
*/
function persistState(name: string, value: any) {
const states = loadStates();
const stateStore = getStateStoreFile();
const valueString = typeof value === 'string' ? value : JSON.stringify(value);
// make sure value is always string
states[name] = valueString;
// persist state in the temp file
fs.writeFileSync(stateStore, JSON.stringify(states, null, 2), {
encoding: 'utf-8',
});
core.debug(`Persist state "${name}=${valueString}" to ${stateStore}`);
// still pass the original value to the original function, though
return saveState(name, value);
}
/**
* Get states from persistent store, fallback to "official" states.
*/
function obtainState(name: string) {
const states = loadStates();
return states[name] || getState(name);
}
export function beginImport() {
Object.defineProperty(utils, 'isValidEvent', { value: () => false });
Object.defineProperty(utils, 'logWarning', { value: () => {} });
}
export function doneImport() {
Object.defineProperty(utils, 'isValidEvent', { value: isValidEvent });
Object.defineProperty(utils, 'logWarning', { value: logWarning });
Object.defineProperty(core, 'saveState', { value: persistState });
Object.defineProperty(core, 'getState', { value: obtainState });
}

View File

@@ -0,0 +1,43 @@
// Possible input names
export enum InputName {
// @actions/cache specific inputs
Key = 'key',
Path = 'path',
RestoreKeys = 'restore-keys',
// setup-webapp specific inputs
Run = 'run',
Caches = 'caches',
Bashlib = 'bashlib',
Parallel = 'parallel',
}
// Possible GitHub event names
export enum GitHubEvent {
Push = 'push',
PullRequest = 'pull_request',
}
// Directly available environment variables
export enum EnvVariable {
GitHubEventName = 'GITHUB_EVENT_NAME',
}
export const EnvVariableNames = new Set(Object.values(EnvVariable) as string[]);
export interface Inputs {
[EnvVariable.GitHubEventName]?: string;
[InputName.Key]?: string;
[InputName.RestoreKeys]?: string;
[InputName.Path]?: string;
[InputName.Caches]?: string;
[InputName.Bashlib]?: string;
[InputName.Run]?: string;
[InputName.Parallel]?: string;
}
export const DefaultInputs = {
[InputName.Caches]: '.github/workflows/caches.js',
[InputName.Bashlib]: '.github/workflows/bashlib.sh',
[InputName.Run]: 'default-setup-command',
} as Inputs;

View File

@@ -0,0 +1,3 @@
import { run } from './setup';
run();

View File

@@ -0,0 +1,61 @@
#!/bin/bash
# -----------------------------------------------
# Predefined command shortcuts
# -----------------------------------------------
# Exit on any command fails
set -e
bashSource=${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]:-${(%):-%x}}
cacheScript="$(dirname $(dirname $(dirname $bashSource)))/dist/scripts/cache"
print-cachescript-path() {
echo $cacheScript
}
cache-restore() {
node $cacheScript restore $1
}
cache-save() {
node $cacheScript save $1
}
# install python packages
pip-install() {
cache-restore pip
echo "::group::Install Python pacakges"
pip install -r requirements.txt # install dependencies
pip install -e . # install current directory as editable python package
echo "::endgroup"
cache-save pip
}
# install npm packages
npm-install() {
cache-restore npm
echo "::group::Install npm pacakges"
echo "npm: $(npm --version)"
echo "node: $(node --version)"
npm ci
echo "::endgroup::"
cache-save npm
}
# install npm packages via yarn
yarn-install() {
cache-restore yarn
echo "::group::Install npm pacakges via yarn"
echo "npm: $(npm --version)"
echo "node: $(node --version)"
echo "yarn: $(yarn --version)"
yarn
echo "::endgroup::"
cache-save yarn
}
# default setup will install both pip and npm pacakges at the same time
default-setup-command() {
echo 'Please provide `run` commands or configure `default-setup-command`.'
exit 1
}

View File

@@ -0,0 +1,18 @@
/**
* Runner script to store/save caches by predefined configs.
* Used in `scripts/bashlib.sh`.
*/
import { EnvVariable } from '../constants';
// To import `@actions/cache` modules safely, we must set GitHub event name to
// a invalid value, so actual runner code doesn't execute.
const originalEvent = process.env[EnvVariable.GitHubEventName];
process.env[EnvVariable.GitHubEventName] = 'CACHE_HACK';
import { run } from '../cache';
// then we restore the event name before the job actually runs
process.env[EnvVariable.GitHubEventName] = originalEvent;
// @ts-ignore
run(...process.argv.slice(2));

View File

@@ -0,0 +1,66 @@
/**
* Load inputs and execute.
*/
import * as core from '@actions/core';
import { exec } from '@actions/exec';
import path from 'path';
import fs from 'fs';
import { DefaultInputs, InputName } from './constants';
import { getInput } from './utils/inputs';
const SHARED_BASHLIB = path.resolve(__dirname, '../src/scripts/bashlib.sh');
/**
* Run bash commands with predefined lib functions.
*
* @param {string} cmd - The bash commands to execute.
*/
export async function runCommand(
cmd: string,
extraBashlib: string,
): Promise<void> {
const bashlibCommands = [`source ${SHARED_BASHLIB}`];
if (extraBashlib) {
bashlibCommands.push(`source ${extraBashlib}`);
}
try {
await exec('bash', ['-c', [...bashlibCommands, cmd].join('\n ')]);
} catch (error) {
core.setFailed(error.message);
process.exit(1);
}
}
export async function run(): Promise<void> {
let bashlib = getInput(InputName.Bashlib);
const rawCommands = getInput(InputName.Run);
const runInParallel = getInput(InputName.Parallel);
if (!fs.existsSync(bashlib)) {
if (bashlib !== DefaultInputs[InputName.Bashlib]) {
core.error(`Custom bashlib "${bashlib}" does not exist.`);
}
// don't add bashlib to runCommand
bashlib = '';
}
if (runInParallel) {
// Attempt to split by two or more new lines first, if there is still only
// one command, attempt to split by one new line. This is because users
// asked for parallelization, so we make our best efforts to get multiple
// commands.
let commands = rawCommands.split(/\n{2,}/);
if (commands.length === 1) {
commands = rawCommands.split('\n');
}
core.debug(`>> Run ${commands.length} commands in parallel...`);
await Promise.all(
commands
.map(x => x.trim())
.filter(x => !!x)
.map(cmd => exports.runCommand(cmd, bashlib)),
);
} else if (rawCommands) {
await exports.runCommand(rawCommands, bashlib);
}
}

View File

@@ -0,0 +1,2 @@
declare module '@actions/cache/dist/restore';
declare module '@actions/cache/dist/save';

View File

@@ -0,0 +1,61 @@
/**
* Manage inputs and env variables.
*/
import * as core from '@actions/core';
import {
Inputs,
EnvVariableNames,
InputName,
DefaultInputs,
} from '../constants';
export function getInput(name: keyof Inputs): string {
const value = core.getInput(name);
if (name === InputName.Parallel) {
return value.toUpperCase() === 'TRUE' ? value : '';
}
return value || DefaultInputs[name] || '';
}
/**
* Update env variables associated with some inputs.
* See: https://github.com/actions/toolkit/blob/5b940ebda7e7b86545fe9741903c930bc1191eb0/packages/core/src/core.ts#L69-L77 .
*
* @param {Inputs} inputs - The new inputs to apply to the env variables.
*/
export function setInputs(inputs: Inputs): void {
for (const [name, value] of Object.entries(inputs)) {
const envName = EnvVariableNames.has(name)
? name
: `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
process.env[envName] = value;
}
}
/**
* Apply new inputs and execute a runner function, restore them when done.
*
* @param {Inputs} inputs - The new inputs to apply to the env variables before
* excuting the runner.
* @param {runner} runner - The runner function that returns a promise.
* @returns {Promise<any>} - The result from the runner function.
*/
export async function applyInputs(
inputs: Inputs,
runner: () => Promise<void>,
): Promise<any> {
const originalInputs: Inputs = Object.fromEntries(
Object.keys(inputs).map(name => [
name,
EnvVariableNames.has(name) ? process.env[name] : core.getInput(name),
]),
);
exports.setInputs(inputs);
const result = await runner();
exports.setInputs(originalInputs);
return result;
}
export function maybeArrayToString(input: string[] | string) {
return Array.isArray(input) ? input.join('\n') : input;
}

View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"lib": ["esnext"],
"moduleResolution": "node",
"outDir": "./lib",
"rootDir": ".",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"preserveSymlinks": true
},
"include": [
"./src",
"./node_modules/@actions"
],
"exclude": ["**/*.test.ts", "__tests__"]
}

View File

@@ -0,0 +1,3 @@
dist/
lib/
node_modules/

View File

@@ -0,0 +1,58 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-object-literal-type-assertion": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

View File

@@ -0,0 +1,36 @@
name: "Test the build"
on: # rebuild any PRs and main branch changes
pull_request:
push:
jobs:
pre-commit: # make sure pre-commits work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Cache npm env
uses: actions/cache@v2
env:
cache-name: cache-npm-v1
with:
path: node_modules
key: ${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('package.json','package-lock.json') }}
- name: "Install dependencies for npm"
run: |
npm ci
- name: Cache pre-commit env
uses: actions/cache@v2
env:
cache-name: cache-pre-commit-v1
with:
path: ~/.cache/pre-commit
key: ${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: "Install pre-commit"
run: |
pip install pre-commit
- name: "Run pre-commit"
run: |
pre-commit run --all-files --show-diff-on-failure --color always

View File

@@ -0,0 +1,101 @@
# Dependency directory
node_modules
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# OS metadata
.DS_Store
Thumbs.db
# Ignore built ts files
__tests__/runner/*
lib/**/*
.idea

View File

@@ -0,0 +1,47 @@
---
default_stages: [commit, push]
default_language_version:
# force all unspecified python hooks to run python3
python: python3
minimum_pre_commit_version: "1.20.0"
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
hooks:
- id: forbid-tabs
exclude: ^dist/index.js$
- repo: https://github.com/thlorenz/doctoc.git
rev: v1.4.0
hooks:
- id: doctoc
name: Add TOC for md files
files: ^README\.md$|^CONTRIBUTING\.md$|^UPDATING.md$|^dev/README\.md$|^dev/BACKPORT_PACKAGES.md$
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/adrienverge/yamllint
rev: v1.23.0
hooks:
- id: yamllint
name: Check yaml files with yamllint
entry: yamllint -c yamllint-config.yml
types: [yaml]
exclude: ^.*init_git_sync\.template\.yaml$|^.*airflow\.template\.yaml$|^chart/templates/.*\.yaml$
- repo: local
hooks:
- id: build
name: Build package for distribution
language: system
entry: bash -c "npm run release"
files: .*\.ts$
require_serial: true
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-merge-conflict
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^dist/.*
- id: trailing-whitespace
exclude: ^dist/.*

View File

@@ -0,0 +1,3 @@
dist/
lib/
node_modules/

View File

@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}

View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2018 GitHub, Inc. and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,731 @@
<p><a href="https://github.com/potiuk/cancel-workflow-runs/actions">
<img alt="cancel-workflow-runs status"
src="https://github.com/potiuk/cancel-workflow-runs/workflows/Test%20the%20build/badge.svg"></a>
# Cancel Workflow Runs action
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Context and motivation](#context-and-motivation)
- [Usage](#usage)
- [Inputs and outputs](#inputs-and-outputs)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Most often used canceling example](#most-often-used-canceling-example)
- [More Examples](#more-examples)
- [Repositories that use Pull Requests from forks](#repositories-that-use-pull-requests-from-forks)
- [Cancel duplicate runs for the source workflow](#cancel-duplicate-runs-for-the-source-workflow)
- [Cancel duplicate jobs for triggered workflow](#cancel-duplicate-jobs-for-triggered-workflow)
- [Cancel the "self" source workflow run](#cancel-the-self-source-workflow-run)
- [Cancel the "self" triggered workflow run](#cancel-the-self-triggered-workflow-run)
- [Fail-fast source workflow runs with failed jobs](#fail-fast-source-workflow-runs-with-failed-jobs)
- [Fail-fast source workflow runs with failed jobs and corresponding triggered runs](#fail-fast-source-workflow-runs-with-failed-jobs-and-corresponding-triggered-runs)
- [Fail-fast for triggered workflow runs with failed jobs](#fail-fast-for-triggered-workflow-runs-with-failed-jobs)
- [Cancel another workflow run](#cancel-another-workflow-run)
- [Cancel all duplicates for named jobs](#cancel-all-duplicates-for-named-jobs)
- [Repositories that do not use Pull Requests from forks](#repositories-that-do-not-use-pull-requests-from-forks)
- [Cancel duplicate runs for "self" workflow](#cancel-duplicate-runs-for-self-workflow)
- [Cancel "self" workflow run](#cancel-self-workflow-run)
- [Fail-fast workflow runs with failed jobs](#fail-fast-workflow-runs-with-failed-jobs)
- [Cancel all runs with named jobs](#cancel-all-runs-with-named-jobs)
- [Development environment](#development-environment)
- [License](#license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Context and motivation
Cancel Workflow Runs is an action that utilizes `workflow_run` triggers in order to perform various
run cancel operations. The idea is to save number of jobs and free them for other queued runs. It is
particularly useful in case your projects development flow where contributors submit pull requests
from forks. Using `workflow_run` trigger enables safe canceling of runs triggered by such pull requests.
In case your CI takes a lot of time and uses a lot of jobs, the action might help your project
to reduce job usage and decrease waiting time as it detects and cancels runs that are still executed,
but we know already they are superseded by newer runs.
The main purpose of this action is canceling duplicated runs for the same branch as the current run,
effectively limiting the resource consumption of the workflow to one run per branch. In short, the action
is useful if you want to limit jobs usage on GitHub Actions in case of the usage pattern
when fixups/rebases are pushed in quick succession to the same branch (fast iterations on a Pull Request).
This is achieved by `duplicates` cancel mode. The `duplicates` mode only cancels "past" runs - it does
not take into account runs that were started after the "current" run.
Another use case is to cancel the `pull_request` corresponding to the `workflow_run` triggered run.
This can happen when the triggered `workflow_run` finds that it makes no sense to proceed with
the source run. This is achieved by `self` cancel mode.
There are also two supplementary cancel modes for the action. Those supplementary use cases allow for further
optimisations - failing fast in case we detect that important job failed and canceling duplicates of the
`workflow_run` triggered events in case they execute some heavy jobs. This is achieved by `failedJobs` and
`namedJobs` cancel modes.
Note that `namedjobs` cancel mode is solely for the purpose of bypassing current limitations
of GitHub Actions. Currently, there is no way to retrieve connection between triggering and triggered
workflow in case of `workflow_run`, as well as retrieving repository and branch of the triggering
workflow. The action uses workaround - it requires designing workflows in the way that they pass necessary
information via carefully crafted job names. The job names are accessible via GitHub API, and they can be
resolved during execution of the workflow using information about the linked workflow available
at the workflow runtime. Hopefully this information will soon be available in GitHub Actions allowing
removal of `namedJobs` cancel mode and simplifying the examples and workflows using the Action.
Another feature of the Action is to notify the PRs linked to the workflows. Normally when workflows
get cancelled there is no information why it happens, but this action can add an explanatory comment
to the PR if the PR gets cancelled. This is controlled by `notifyPRCancel` boolean input.
Also, for the `workflow_run` events, GitHub does not yet provide an easy interface linking the original
Pull Request and the Workflow_run. You can ask the CancelWorkflowRun action to add extra comment to the PR
adding explanatory message followed by a link to the `workflow_run` run.
You can take a look at the description provided in the
[Apache Airflow's CI](https://github.com/apache/airflow/blob/master/CI.rst) and
[the workflows](https://github.com/apache/airflow/blob/master/.github/workflows)
Started from simple cancel workflow developed by [n1hility](https://github.com/n1hility)
that implemented cancelling previous runs before introducing `workflow_run` type of event by
GitHub Actions: [Cancel](https://github.com/n1hility/cancel-previous-runs).
# Usage
If you want a comprehensive solution, you should use the action as follows:
1) In case your project does not use public forks, it's enough to have one action with the `duplicates`
cancel mode in the workflow. This is a rare thing in open-source projects (usually those projects
accept pull requests from forks) and more often applicable for private repositories.
2) If you use forks, you should create a separate "Cancelling" `workflow_run` triggered workflow.
The `workflow_run` should be responsible for all canceling actions. The examples below show
the possible ways the action can be utilized.
# Inputs and outputs
## Inputs
| Input | Required | Default | Comment |
|--------------------------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `token` | yes | | The github token passed from `${{ secrets.GITHUB_TOKEN }}` |
| `cancelMode` | no | `duplicates` | The mode to run cancel on. The available options are `duplicates`, `self`, `failedJobs`, `namedJobs` |
| `cancelFutureDuplicates` | no | true | In case of duplicate canceling, cancel also future duplicates leaving only the "freshest" running job and not all the future jobs. By default it is set to true. |
| `sourceRunId` | no | | Useful only in `workflow_run` triggered events. It should be set to the id of the workflow triggering the run `${{ github.event.workflow_run.id }}` in case cancel operation should cancel the source workflow. |
| `notifyPRCancel` | no | | Boolean. If set to true, it notifies the cancelled PRs with a comment containing reason why they are being cancelled. |
| `notifyPRCancelMessage` | no | | Optional cancel message to use instead of the default one when notifyPRCancel is true. It is only used in 'self' cancelling mode. |
| `notifyPRMessageStart` | no | | Only for workflow_run events triggered by the PRs. If not empty, it notifies those PRs with the message specified at the start of the workflow - adding the link to the triggered workflow_run. |
| `jobNameRegexps` | no | | An array of job name regexps. Only runs containing any job name matching any of of the regexp in this array are considered for cancelling in `failedJobs` and `namedJobs` and `allDuplicateNamedJobs` modes. |
| `skipEventTypes` | no | | Array of event names that should be skipped when cancelling (JSON-encoded string). This might be used in order to skip direct pushes or scheduled events. |
| `selfPreservation` | no | true | Do not cancel self. |
| `workflowFileName` | no | | Name of the workflow file. It can be used if you want to cancel a different workflow than yours. |
The job cancel modes work as follows:
| Cancel Mode | No `sourceRunId` specified | The `sourceRunId` set to `${{ github.event.workflow_run.id }}` |
|--------------------------|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| `duplicates` | Cancels duplicate runs from the same repo/branch as current run. | Cancels duplicate runs for the same repo/branch as the source run. |
| `allDuplicates` | Cancels duplicate runs from all running workflows. | Cancels duplicate runs from all running workflows. |
| `self` | Cancels self run. | Cancel the `sourceRunId` run. |
| `failedJobs` | Cancels all runs of own workflow that have matching jobs that failed. | Cancels all runs of the `sourceRunId` workflow that have matching jobs that failed. |
| `namedJobs` | Cancels all runs of own workflow that have matching jobs. | Cancels all runs of the `sourceRunId` workflow that have matching jobs. |
| `allDuplicatedNamedJobs` | Cancels all duplicate runs of own workflow that share matching jobs pattern. | Cancels all runs of the `sourceRunId` workflow that share matching job pattern. |
## Outputs
| Output | No `sourceRunId` specified | The `sourceRunId` set to `${{ github.event.workflow_run.id }}` |
|---------------------|---------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| `sourceHeadRepo` | Current repository. Format: `owner/repo` | Repository of the run that triggered this `workflow_run`. Format: `owner/repo` |
| `sourceHeadBranch` | Current branch. | Branch of the run that triggered this `workflow_run`. Might be forked repo, if it is a pull_request. |
| `sourceHeadSha` | Current commit SHA: `{{ github.sha }}` | Commit sha of the run that triggered this `workflow_run`. |
| `mergeCommitSha` | Merge commit SHA if PR-triggered event. | Merge commit SHA if PR-triggered event. |
| `targetCommitSha` | Target commit SHA (merge if present, otherwise source). | Target commit SHA (merge if present, otherwise source). |
| `pullRequestNumber` | Number of the associated Pull Request (if PR triggered) | Number of the associated Pull Request (if PR triggered) |
| `sourceEvent` | Current event: ``${{ github.event }}`` | Event of the run that triggered this `workflow_run` |
| `cancelledRuns` | JSON-stringified array of cancelled run ids. | JSON-stringified array of cancelled run ids. |
## Most often used canceling example
The most common canceling example is that you want to cancel all duplicates appearing in your build queue.
As of 4.1 version of the Action this can be realised by single workflow run that can cancel all duplicates
for all running workflows. It is resistant to temporary queues - as it can cancel also the future, queued
workflows that have duplicated, fresher (also queued workflows and this is recommended for everyone.
The below example is a "workflow_run" type of event. The workflow_run event always has "write" access that allows
it to cancel other workflows - even if they are coming from pull request.
```yaml
name: Cancelling Duplicates
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
cancel-duplicate-workflow-runs:
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel duplicate workflow runs"
with:
cancelMode: allDuplicates
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
```
# More Examples
Note that you can combine the steps below in several steps of the same job. The examples here are showing
one step per case for clarity.
## Repositories that use Pull Requests from forks
Note that in case you implement separate "Canceling workflow", following the examples below, you do not
need to add cancel action to any other workflow. All Cancel actions should be configured in this
Cancelling workflow.
Those examples show how you should configure your project with separate `Cancelling` workflow which is
triggered via `workflow_run` trigger.
In the example belows we use the following names:
* **triggered workflow** - the "Cancelling" workflow - separate workflow triggered by the `workflow_run`
event. Its main job is to manage cancelling of other workflows.
* **triggered run** - the run of the *triggered workflow*. It is triggered by another ("source") run. In the
examples below, this run is in "Cancelling" workflow. It always runs in the context of the main repository,
even if it is triggered by a Pull Request from a fork.
* **source workflow** - the "main" workflow - main workflow that performs CI actions. In the examples below,
this is a "CI" workflow.
* **source run** - the run of the *source workflow*. It is the run that triggers the *triggered run*,
and it runs most of the CI tasks. In the examples below those are the runs of "CI" workflow.
### Cancel duplicate runs for the source workflow
Cancel past, duplicate *source runs* of the *source workflow*. This workflow cancels
duplicated, past runs (for the same branch/repo that those associated with the *source run* that triggered
the *triggered run*). You have to create it with the `sourceRunId` input with the value of
`${{ github.event.workflow_run.id }}` in order to work correctly.
In the example below, the `Canceling` run cancels past, duplicate runs from the `CI` with the same
branch/repo as the *source run* which triggered it - effectively what's left after the action is only
the latest *source run* of "CI" from the same branch/repo.
This works for all kind of triggering events (`push`, `pull_request`, `schedule` ...). It works for
events triggered in the local repository, as well as triggered from the forks, so you do not need
to set up any extra actions to cancel internal Pushes/Pull Requests.
You can also choose to skip certain types of events (for example `push` and `schedule` if you want your
jobs to run to full completion for this kind of events.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
cancel-duplicate-workflow-runs:
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel duplicate workflow runs"
with:
cancelMode: duplicates
cancelFutureDuplicates: true
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
notifyPRCancel: true
skipEventTypes: '["push", "schedule"]'
```
Note that `duplicate` cancel mode cannot be used for `workflow_run` type of event without `sourceId` input.
The action will throw an error in this case because it is not really doing what you would expect it to do.
All `workflow_run` events have the same branch and repository (they are all run in the context of the
target branch and repository) no matter what is the source of the event, therefore cancelling duplicates
would cancel all the runs originated from all the branches and this is not really expected.
If you want to cancel duplicate runs of the *triggered workflow*, you need to utilize the
`namedJob` cancel mode as described in the next chapter
[Cancel duplicate jobs for triggered workflow](#cancel-duplicate-jobs-for-triggered-workflow) using outputs
from the duplicate canceling for *source workflow* run above.
Hopefully we will have an easier way of doing that in the future once GitHub Actions API will allow
searching for source runs (it's not available at this moment).
### Cancel duplicate jobs for triggered workflow
Cancels all past runs from the *triggered workflow* if any of the job names match any of the regular
expressions. Note that it does not take into account the branch of the runs. It will cancel all runs
with matching job names no mater the branch/repo.
This example is much more complex. It shows the actual case on how you can design your jobs using with
using outputs from the cancel duplicate action and running subsequent cancel with namedJobs cancel
mode. Hopefully in the future better solution will come from Github Actions and such cancel flow will
be natively supported by GitHub Actions but as of now (August 2020) such native support is not
possible. The example below uses specially named jobs that contain Branch, Repo and Run id of
the triggering run. The cancel operation finds the runs that have jobs with the names following
pattern containing the same repo and branch as the source run branch and repo in order to cancel duplicates.
In the case below, this workflow will first cancel the "CI" duplicate runs from the same branch and then
it will cancel the runs from the Cancelling workflow which contain the same repo and branch as
in job names, effectively implementing cancelling duplicate runs for the Cancelling workflow.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
cancel-duplicate-ci-runs:
name: "Cancel duplicate CI runs"
runs-on: ubuntu-latest
outputs:
sourceHeadRepo: ${{ steps.cancel.outputs.sourceHeadRepo }}
sourceHeadBranch: ${{ steps.cancel.outputs.sourceHeadBranch }}
sourceHeadSha: ${{ steps.cancel.outputs.sourceHeadSha }}
sourceEvent: ${{ steps.cancel.outputs.sourceEvent }}
steps:
- uses: potiuk/cancel-workflow-runs@master
id: cancel
name: "Cancel duplicate CI runs"
with:
cancelMode: duplicates
cancelFutureDuplicates: true
token: ${{ secrets.GITHUB_TOKEN }}
notifyPRCancel: true
notifyPRMessageStart: |
Note! The Docker Images for the build are prepared in a separate workflow,
that you will not see in the list of checks.
You can checks the status of those images in:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel duplicate Cancelling runs"
with:
cancelMode: namedJobs
token: ${{ secrets.GITHUB_TOKEN }}
notifyPRCancel: true
jobNameRegexps: >
["Build info
repo: ${{ steps.cancel.outputs.sourceHeadRepo }}
branch: ${{ steps.cancel.outputs.sourceHeadBranch }}.*"]
build-info:
name: >
Build info
repo: ${{ needs.cancel-workflow-runs.outputs.sourceHeadRepo }}
branch: ${{ needs.cancel-workflow-runs.outputs.sourceHeadBranch }}
runs-on: ubuntu-latest
needs: [cancel-duplicate-ci-runs]
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
steps:
- name: >
[${{ needs.cancel-workflow-runs.outputs.sourceEvent }}] will checkout
Run id: ${{ github.run_id }}
Source Run id: ${{ github.event.workflow_run.id }}
Sha: ${{ needs.cancel-workflow-runs.outputs.sourceHeadSha }}
Repo: ${{ needs.cancel-workflow-runs.outputs.sourceHeadRepo }}
Branch: ${{ needs.cancel-workflow-runs.outputs.sourceHeadBranch }}
run: |
printenv
```
### Cancel the "self" source workflow run
This is useful in case you decide to cancel the *source run* that triggered the *triggered run*.
In the case below, the step cancels the `CI` workflow that triggered the `Cancelling` run.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
cancel-self-source-workflow-run:
name: "Cancel the self CI workflow run"
runs-on: ubuntu-latest
steps:
- name: "Cancel the self CI workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: self
notifyPRCancel: true
notifyPRCancelMessage: Cancelled because image building failed.
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
```
### Cancel the "self" triggered workflow run
This is useful in case you decide to cancel the *triggered run*. The difference vs. previous case is that
you do not specify the `sourceRunId` input.
In the case below - self workflow will be cancelled.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
cancel-self-cancelling-run:
name: "Cancel the self Canceling workflow run"
runs-on: ubuntu-latest
steps:
- name: "Cancel the self Cancelling workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: self
notifyPRCancel: true
token: ${{ secrets.GITHUB_TOKEN }}
```
Note that if you want to cancel both - source workflow and self workflow you need to first cancel
the source workflow, and then cancel the self one, not the other way round :).
### Fail-fast source workflow runs with failed jobs
Cancels all runs from the *source workflow* if there are failed jobs matching any of the regular expressions.
Note that the action does not take into account the branch/repos of the runs. It will cancel all runs
with failed jobs no mater the branch/repo.
In the case below, if any of `CI` workflow runs (even with different branch heads) have failed jobs
names matching `^Static checks$` and `^Build docs^` or `^Build prod image .*` regexp - they
will be cancelled.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
fail-fast-triggered-workflow-named-jobs-runs:
name: "Fail fast CI runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Fail fast CI runs"
with:
cancelMode: failedJobs
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
notifyPRCancel: true
jobNameRegexps: '["^Static checks$", "^Build docs$", "^Build prod image.*"]'
```
Note that if you not only want to cancel the failed triggering workflows but also
the want to fail the corresponding "Cancelling" workflows, you need to implement the solution
described in the next chapter.
### Fail-fast source workflow runs with failed jobs and corresponding triggered runs
Cancels all runs from the *source workflow* if there are failed jobs matching any of the regular expressions,
also cancels the corresponding *triggered runs*.
Note that the action does not take into account the branch/repos of the runs. It will cancel all runs
with failed jobs no mater the branch/repo.
In the case below, if any of `CI` workflow runs (even with different branch heads) have failed jobs
names matching `^Static checks$` and `^Build docs^` or `^Build prod image .*` regexp - they
will be cancelled as well as the corresponding "Cancelling" workflow runs.
There is no native support yet in GitHub actions to do it easily, so the example below shows how this can be
achieved using `namedJobs` and output returned from the previous `Cancel Workflow Runs` action. Hopefull
this will be simplified when GitHub Actions introduce native support for it.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
fail-fast-triggered-workflow-named-jobs-runs:
name: "Fail fast CI runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Fail fast CI. Source run: ${{ github.event.workflow_run.id }}"
id: cancel-failed
with:
cancelMode: failedJobs
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
notifyPRCancel: true
jobNameRegexps: '["^Static checks$", "^Build docs$", "^Build prod image.*"]'
- name: "Extract canceled failed runs"
id: extract-cancelled-failed-runs
if: steps.cancel-failed.outputs.cancelledRuns != '[]'
run: |
REGEXP="Fail fast CI. Source run: "
SEPARATOR=""
for run_id in $(echo "${{ steps.cancel-failed.outputs.cancelledRuns }}" | jq '.[]')
do
REGEXP="${REGEXP}${SEPARATOR}(${run_id})"
SEPARATOR="|"
done
echo "::set-output name=matching-regexp::${REGEXP}"
- name: "Cancel triggered 'Cancelling' runs for the cancelled failed runs"
if: steps.cancel-failed.outputs.cancelledRuns != '[]'
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: namedJobs
token: ${{ secrets.GITHUB_TOKEN }}
notifyPRCancel: true
jobNameRegexps: ${{ steps.extract-cancelled-failed.runs.matching-regexp }}
```
Note that if you not only want to cancel the failed triggering workflows but also
the want to fail the corresponding "Cancelling" workflows, you need to implement the solution
described in the next chapter.
### Fail-fast for triggered workflow runs with failed jobs
Cancels all runs from the *triggered workflow* if there are failed jobs matching any of the regular
expressions. Note that it does not take into account the branch/repos of the runs. It will cancel all runs
with failed jobs no mater the branch/repo.
In the case below, if any of `Cancelling` workflow runs (even with different branch heads) have failed jobs
names matching `^Static checks$` and `^Build docs^` or `^Build prod image .*` regexp - they
will be cancelled.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
fail-fast-triggered-workflow-named-jobs-runs:
name: "Fail fast Canceling runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Fail fast Canceling runs"
with:
cancelMode: failedJobs
token: ${{ secrets.GITHUB_TOKEN }}
jobNameRegexps: '["^Static checks$", "^Build docs$", "^Build prod image.*"]'
```
### Cancel another workflow run
This is useful in case you decide to cancel the *source run* that triggered the *triggered run*.
In the case below, the step cancels the `CI` workflow that triggered the `Cancelling` run.
```yaml
name: Cancelling
on:
workflow_run:
workflows: ['CI']
types: ['requested']
cancel-other-workflow-run:
name: "Cancel the self CI workflow run"
runs-on: ubuntu-latest
steps:
- name: "Cancel the self CI workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: duplicates
cancelFutureDuplicates: true
token: ${{ secrets.GITHUB_TOKEN }}
workflowFileName: other_workflow.yml
```
### Cancel all duplicates for named jobs
Cancels all duplicated runs for all jobs that match specified regular expression.
Note that it does not take into account the branch of the runs. It will cancel all duplicates with
the same match for jobs, no matter what branch originated it.
This is useful in case of job names generated dynamically.
In the case below, for all the runs that have job names generated containing Branch/Repo/Event combination
that have the same match, the duplicates will get cancelled leaving only the most recent run for each exact
match.
Note that the match must be identical. If there are two jobs that have a different Branch
they will both match the same pattern, but they are not considered duplicates.
Also, this is one of the jobs It has also self-preservation turned off.
This means that in case the job determines that it is itself a duplicate it will cancel itself. That's
why checking for duplicates of self-workflow should be the last step in the cancelling process.
```yaml
on:
push:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
cancel-self-failed-runs:
name: "Cancel the self workflow run"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel past CI runs"
with:
cancelMode: allDuplicatedNamedJobs
token: ${{ secrets.GITHUB_TOKEN }}
jobNameRegexps: '["Branch: .* Repo: .* Event: .* "]'
selfPreservation: false
notifyPRCancel: true
```
## Repositories that do not use Pull Requests from forks
Note that examples in this chapter only work if you do not have Pull Requests coming from forks (so for
example if you only work in a private repository). When those action runs within the usual `pull_request`
triggered runs coming from a fork, they have not enough permissions to cancel running workflows.
If you want to cancel `pull_requests` from forks, you need to use `workflow_run` triggered runs - see the
[Repositories that use Pull Requests from fork](#repositories-that-use-pull-requests-from-forks) chapter.
Note that in case you configure the separate `workflow_run` Cancelling workflow, there is no need to add
the action to the "source" workflows. The "Canceling workflow" pattern handles well not only Pull Requests
from the forks, but also all other cases - including cancelling Pull Requests for the same repository
and canceling scheduled runs.
### Cancel duplicate runs for "self" workflow
Cancels past runs for the same workflow (with the same branch).
In the case below, any of the direct "push" events will cancel all past runs for the same branch as the
one being pushed. However, it can be configured for "pull_request" (in the same repository) or "schedule"
type of events as well. It will also notify the PR with the comment containining why it has been
cancelled.
```yaml
name: CI
on: push
jobs:
cancel-duplicate-workflow-runs:
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel duplicate workflow runs"
with:
cancelMode: duplicates
cancelFutureDuplicates: true
notifyPRCancel: true
```
### Cancel "self" workflow run
This is useful in case you decide to cancel "self" run.
In the case below - own workflow will be cancelled immediately. It can be configured for "push",
"pull_request" (from the same repository) or "schedule" type of events.
```yaml
name: CI
on: push
jobs:
cancel-self-run:
name: "Cancel the self workflow run"
runs-on: ubuntu-latest
steps:
- name: "Cancel the self workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: self
token: ${{ secrets.GITHUB_TOKEN }}
notifyPRCancel: true
```
### Fail-fast workflow runs with failed jobs
Cancels all runs (including self run!) if they have failed jobs matching any of the regular expressions.
Note that it does not take into account the branch of the running jobs. It will cancel all runs with failed
jobs, no matter what branch originated it.
In the case below, if any of the own workflow runs have failed jobs matching any of the
`^Static checks$` and `^Build docs^` or `^Build prod image .*` regexp, this workflow will cancel the runs.
```yaml
name: CI
on:
push:
jobs:
cancel-self-failed-runs:
name: "Cancel failed runs"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel failed runs"
with:
cancelMode: failedJobs
token: ${{ secrets.GITHUB_TOKEN }}
jobNameRegexps: '["^Static checks$", "^Build docs$", "^Build prod image.*"]'
notifyPRCancel: true
```
### Cancel all runs with named jobs
Cancels all runs (including self run!) if any of the job names match any of the regular
expressions. Note that it does not take into account the branch of the runs. It will cancel all runs with
matching jobs, no matter what branch originated it.
This is useful in case of job names generated dynamically.
In the case below, if any of the "self" workflow runs has job names that matches any of the
`^Static checks$` and `^Build docs^` or `^Build prod image .*` regexp, this workflow will cancel the runs.
```yaml
on:
push:
workflow_run:
workflows: ['CI']
types: ['requested']
jobs:
cancel-self-failed-runs:
name: "Cancel the self workflow run"
runs-on: ubuntu-latest
steps:
- uses: potiuk/cancel-workflow-runs@master
name: "Cancel past CI runs"
with:
cancelMode: namedJobs
token: ${{ secrets.GITHUB_TOKEN }}
jobNameRegexps: '["^Static checks$", "^Build docs$", "^Build prod image.*"]'
notifyPRCancel: true
```
## Development environment
It is highly recommended tu use [pre commit](https://pre-commit.com). The pre-commits
installed via pre-commit tool handle automatically linting (including automated fixes) as well
as building and packaging Javascript index.js from the main.ts Typescript code, so you do not have
to run it yourself.
## License
[MIT License](LICENSE) covers the scripts and documentation in this project.

View File

@@ -0,0 +1,5 @@
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
test('no op', () => {})

View File

@@ -0,0 +1,74 @@
name: 'Cancel Workflow Runs'
description: 'Cancel Workflow Runs - duplicates, failed, named in order to limit job usage,'
author: 'potiuk'
inputs:
token:
description: The GITHUB_TOKEN secret of the repository
required: true
sourceRunId:
description: |
The run that triggered the action. It should be set to
`$\{\{ github.event.workflow_run.id` variable \}\}` if used in `workflow_run` triggered run if
you want to act on source workflow rather than the triggered run.
required: false
notifyPRCancel:
description: |
Boolean. If set to true, it notifies the cancelled PRs with a comment containing reason why
they are being cancelled.
required: false
notifyPRCancelMessage:
description: |
Optional cancel message to use instead of the default one when notifyPRCancel is true. Only
used in 'self' cancel mode.
required: false
notifyPRMessageStart:
description: |
Only for workflow_run events triggered by the PRs. If not empty, it notifies those PRs with the
message specified at the start of the workflow - adding the link to the triggered workflow_run.
required: false
cancelMode:
description: |
The mode of cancel. One of:
* `duplicates` - cancels duplicate runs from the same repo/branch as local run or
sourceId workflow. This is the default mode when cancelMode is not specified.
* `allDuplicates` - cancels duplicate runs from all workflows. It is more aggressive version of
duplicate canceling - as it cancels all duplicates. It is helpful in case
of long queues of builds - as it is enough that one of the workflows that
cancel duplicates is executed, it can effectively clean-up the queue in this
case for all the future, queued runs.
* `self` - cancels self run - either own run if sourceRunId is not set, or
the source run that triggered the `workflow_run'
* `failedJobs` - cancels all runs that failed in jobs matching one of the regexps
* `namedJobs` - cancels runs where names of some jobs match some of regexps
required: false
cancelFutureDuplicates:
description: |
In case of duplicate canceling, cancel also future duplicates leaving only the "freshest" running
job and not all the future jobs. By default it is set to true.
required: false
selfPreservation:
description: |
Do not cancel your own run. There are cases where selfPreservation should be disabled but it is
enabled by default. You can disable it by setting 'false' as value.
required: false
jobNameRegexps:
description: |
Array of job name regexps (JSON-encoded string). Used by `failedJobs` and `namedJobs` cancel modes
to match job names of workflow runs.
required: false
skipEventTypes:
description: |
Array of event names that should be skipped when cancelling (JSON-encoded string). This might be used
in order to skip direct pushes or scheduled events.
required: false
workflowFileName:
description: |
Name of the workflow file. It can be used if you want to cancel a different workflow than yours.
required: false
runs:
using: 'node12'
main: 'dist/index.js'
branding:
icon: 'play'
color: 'blue'

View File

@@ -0,0 +1,11 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
}

10921
.github/actions/cancel-workflow-runs/package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
{
"name": "typescript-action",
"version": "0.0.0",
"private": true,
"description": "TypeScript template action",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"pack": "ncc build",
"test": "jest",
"all": "npm run build && npm run format && npm run lint && npm run pack && npm test",
"release": "ncc build -o dist src/main.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/actions/typescript-action.git"
},
"keywords": [
"actions",
"node",
"setup"
],
"author": "YourNameOrOrganization",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.2",
"@actions/github": "^2.1.0",
"jstreemap": "^1.28.2"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@types/node": "^12.7.12",
"@typescript-eslint/parser": "^2.8.0",
"@zeit/ncc": "^0.20.5",
"eslint": "^5.16.0",
"eslint-plugin-github": "^2.0.0",
"eslint-plugin-jest": "^22.21.0",
"jest": "^26.2.2",
"jest-circus": "^26.2.2",
"js-yaml": "^3.13.1",
"prettier": "^1.19.1",
"ts-jest": "^26.1.4",
"typescript": "^3.6.4"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
},
"exclude": ["node_modules", "**/*.test.ts"]
}

View File

@@ -0,0 +1,22 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
extends: default
rules:
line-length:
max: 110

View File

@@ -0,0 +1,13 @@
FROM ruby:2.6.0
LABEL "com.github.actions.name"="Comment on PR"
LABEL "com.github.actions.description"="Leaves a comment on an open PR matching a push event."
LABEL "com.github.actions.repository"="https://github.com/unsplash/comment-on-pr"
LABEL "com.github.actions.maintainer"="Aaron Klaassen <aaron@unsplash.com>"
LABEL "com.github.actions.icon"="message-square"
LABEL "com.github.actions.color"="blue"
RUN gem install octokit
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

7
.github/actions/comment-on-pr/LICENSE vendored Normal file
View File

@@ -0,0 +1,7 @@
Copyright 2019 Unsplash Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

27
.github/actions/comment-on-pr/README.md vendored Normal file
View File

@@ -0,0 +1,27 @@
# Comment on PR via GitHub Action
A GitHub action to comment on the relevant open PR when a commit is pushed.
## Usage
- Requires the `GITHUB_TOKEN` secret.
- Requires the comment's message in the `msg` parameter.
- Supports `push` and `pull_request` event types.
### Sample workflow
```
name: comment-on-pr example
on: pull_request
jobs:
example:
name: sample comment
runs-on: ubuntu-latest
steps:
- name: comment PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Check out this message!"
```

View File

@@ -0,0 +1,15 @@
name: Comment on PR
author: Aaron Klaassen <aaron@unsplash.com>
description: Leaves a comment on an open PR matching a push event.
branding:
icon: 'message-square'
color: 'blue'
inputs:
msg:
description: Comment's message
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.msg }}

47
.github/actions/comment-on-pr/entrypoint.sh vendored Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env ruby
require "json"
require "octokit"
json = File.read(ENV.fetch("GITHUB_EVENT_PATH"))
event = JSON.parse(json)
github = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"])
if !ENV["GITHUB_TOKEN"]
puts "Missing GITHUB_TOKEN"
exit(1)
end
if ARGV.empty?
puts "Missing message argument."
exit(1)
end
repo = event["repository"]["full_name"]
if ENV.fetch("GITHUB_EVENT_NAME") == "pull_request"
pr_number = event["number"]
else
pulls = github.pull_requests(repo, state: "open")
push_head = event["after"]
pr = pulls.find { |pr| pr["head"]["sha"] == push_head }
if !pr
puts "Couldn't find an open pull request for branch with head at #{push_head}."
exit(1)
end
pr_number = pr["number"]
end
message = ARGV.join(' ')
coms = github.issue_comments(repo, pr_number)
duplicate = coms.find { |c| c["user"]["login"] == "github-actions[bot]" && c["body"] == message }
if duplicate
puts "The PR already contains a database change notification"
exit(0)
end
github.add_comment(repo, pr_number, message)

View File

@@ -0,0 +1,55 @@
codecov:
notify:
require_ci_to_pass: yes
coverage:
notify:
slack:
default:
threshold: 1%
message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message
attachments: "sunburst, diff"
only_pulls: false
status:
src:
target: auto
threshold: 7%
base: auto
if_ci_failed: success
paths:
- src/
- '!src/tests/'
flags:
- src
test:
target: 60%
threshold: 10%
if_ci_failed: error
base: auto
paths:
- src/tests/
flags:
- test
precision: 2
round: down
range: "70...100"
flags:
src:
paths:
- src
- '!src/tests/'
test:
paths:
- src/tests/
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no

View File

@@ -0,0 +1,73 @@
plugins:
- '@typescript-eslint'
- eslint-comments
- promise
- unicorn
extends:
- airbnb-typescript
- plugin:@typescript-eslint/recommended
- plugin:eslint-comments/recommended
- plugin:promise/recommended
- plugin:unicorn/recommended
- prettier
- prettier/@typescript-eslint
settings:
import/parsers:
'@typescript-eslint/parser':
- .ts
- .tsx
- .js
import/resolver:
typescript: {}
rules:
unicorn/filename-case: off
react/static-property-placement: 0
no-prototype-builtins: 0
import/prefer-default-export: 0
'@typescript-eslint/no-explicit-any': 0
import/no-default-export: error
no-use-before-define:
- error
-
functions: false
classes: true
variables: true
'@typescript-eslint/explicit-function-return-type':
- error
-
allowExpressions: true
allowTypedFunctionExpressions: true
'@typescript-eslint/no-use-before-define':
- error
-
functions: false
classes: true
variables: true
typedefs: true
'@typescript-eslint/indent':
- 2
- 2
unicorn/prevent-abbreviations: 0
import/no-extraneous-dependencies: [error, {devDependencies: ['**/*.ts']}]
parser: "@typescript-eslint/parser"
parserOptions:
project: ./tsconfig.json
ecmaVersion: 2019
sourceType: module
env:
node: true
browser: true
ignorePatterns:
- '*.js'
overrides:
- files: ['src/tests/**/*']
plugins:
- jest
extends:
- plugin:jest/recommended
rules:
global-require: 0
'@typescript-eslint/no-var-requires': 0
no-console: 0
'@typescript-eslint/no-unused-vars': 0
'@typescript-eslint/no-throw-literal': 0

View File

@@ -0,0 +1,3 @@
# Contributing
The repository is released under the MIT license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into master.

View File

@@ -0,0 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**Workflow**
If applicable, provide a workflow file to help explain your problem.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,14 @@
### Type of Change
<!-- What type of change does your code introduce? -->
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation
- [ ] Refactor
- [ ] Chore
### Resolves
- Fixes #[Add issue number here.]
### Describe Changes
<!-- Describe your changes in detail, if applicable. -->
_Describe what this Pull Request does_

View File

@@ -0,0 +1 @@
.codecov.yml,.eslintignore,.eslintrc.json,.eslintrc.yml,.github/workflows/integration.yml,.github/workflows/pr.yml,.github/workflows/push.yml,.github/workflows/readme.md,.gitignore,.prettierignore,.prettierrc.json,.prettierrc.yml,.releaserc.yml,Makefile,README.md,__tests__/main.test.ts,action.yml,dist/index.js,jest.config.js,package.json,src/ChangedFiles.ts,src/File.ts,src/FilesHelper.ts,src/GithubHelper.ts,src/InputHelper.ts,src/UtilsHelper.ts,src/main.ts,src/tests/FilesHelper.test.ts,src/tests/GithubHelper.test.ts,src/tests/InputHelper.test.ts,src/tests/UtilsHelper.test.ts,src/tests/main.test.ts,src/tests/mocks/core/index.test.ts,src/tests/mocks/core/index.ts,src/tests/mocks/env/events/issue_comment_created.json,src/tests/mocks/env/events/issue_comment_edited.json,src/tests/mocks/env/events/pull_request_opened.json,src/tests/mocks/env/events/pull_request_reopened.json,src/tests/mocks/env/events/pull_request_synchronize.json,src/tests/mocks/env/events/push.json,src/tests/mocks/env/events/push_merge.json,src/tests/mocks/env/events/schedule.json,src/tests/mocks/env/index.test.ts,src/tests/mocks/env/index.ts,src/tests/mocks/fs/index.test.ts,src/tests/mocks/fs/index.ts,src/tests/mocks/github/index.test.ts,src/tests/mocks/github/index.ts,src/tests/mocks/octokit/endpoint/merge.test.ts,src/tests/mocks/octokit/endpoint/merge.ts,src/tests/mocks/octokit/index.test.ts,src/tests/mocks/octokit/index.ts,src/tests/mocks/octokit/paginate.test.ts,src/tests/mocks/octokit/paginate.ts,src/tests/mocks/octokit/payloads.ts,src/tests/mocks/octokit/pulls/listFiles.test.ts,src/tests/mocks/octokit/pulls/listFiles.ts,src/tests/mocks/octokit/repos/compareCommits.test.ts,src/tests/mocks/octokit/repos/compareCommits.ts,src/tests/payloads.ts,src/typings/ActionError/index.d.ts,src/typings/ChangedFiles/index.d.ts,src/typings/CoreMock/index.d.ts,src/typings/FsMock/index.d.ts,src/typings/GitHubFile/index.d.ts,src/typings/GitHubMock/index.d.ts,src/typings/Inferred/index.d.ts,src/typings/Inputs/index.d.ts,src/typings/OctokitMock/index.d.ts,src/typings/TestInput/index.d.ts,tsconfig.build.json,tsconfig.json,yarn.lock
1 .codecov.yml .eslintignore .eslintrc.json .eslintrc.yml .github/workflows/integration.yml .github/workflows/pr.yml .github/workflows/push.yml .github/workflows/readme.md .gitignore .prettierignore .prettierrc.json .prettierrc.yml .releaserc.yml Makefile README.md __tests__/main.test.ts action.yml dist/index.js jest.config.js package.json src/ChangedFiles.ts src/File.ts src/FilesHelper.ts src/GithubHelper.ts src/InputHelper.ts src/UtilsHelper.ts src/main.ts src/tests/FilesHelper.test.ts src/tests/GithubHelper.test.ts src/tests/InputHelper.test.ts src/tests/UtilsHelper.test.ts src/tests/main.test.ts src/tests/mocks/core/index.test.ts src/tests/mocks/core/index.ts src/tests/mocks/env/events/issue_comment_created.json src/tests/mocks/env/events/issue_comment_edited.json src/tests/mocks/env/events/pull_request_opened.json src/tests/mocks/env/events/pull_request_reopened.json src/tests/mocks/env/events/pull_request_synchronize.json src/tests/mocks/env/events/push.json src/tests/mocks/env/events/push_merge.json src/tests/mocks/env/events/schedule.json src/tests/mocks/env/index.test.ts src/tests/mocks/env/index.ts src/tests/mocks/fs/index.test.ts src/tests/mocks/fs/index.ts src/tests/mocks/github/index.test.ts src/tests/mocks/github/index.ts src/tests/mocks/octokit/endpoint/merge.test.ts src/tests/mocks/octokit/endpoint/merge.ts src/tests/mocks/octokit/index.test.ts src/tests/mocks/octokit/index.ts src/tests/mocks/octokit/paginate.test.ts src/tests/mocks/octokit/paginate.ts src/tests/mocks/octokit/payloads.ts src/tests/mocks/octokit/pulls/listFiles.test.ts src/tests/mocks/octokit/pulls/listFiles.ts src/tests/mocks/octokit/repos/compareCommits.test.ts src/tests/mocks/octokit/repos/compareCommits.ts src/tests/payloads.ts src/typings/ActionError/index.d.ts src/typings/ChangedFiles/index.d.ts src/typings/CoreMock/index.d.ts src/typings/FsMock/index.d.ts src/typings/GitHubFile/index.d.ts src/typings/GitHubMock/index.d.ts src/typings/Inferred/index.d.ts src/typings/Inputs/index.d.ts src/typings/OctokitMock/index.d.ts src/typings/TestInput/index.d.ts tsconfig.build.json tsconfig.json yarn.lock

View File

@@ -0,0 +1,75 @@
[
".codecov.yml",
".eslintignore",
".eslintrc.json",
".eslintrc.yml",
".github/workflows/integration.yml",
".github/workflows/pr.yml",
".github/workflows/push.yml",
".github/workflows/readme.md",
".gitignore",
".prettierignore",
".prettierrc.json",
".prettierrc.yml",
".releaserc.yml",
"Makefile",
"README.md",
"__tests__/main.test.ts",
"action.yml",
"dist/index.js",
"jest.config.js",
"package.json",
"src/ChangedFiles.ts",
"src/File.ts",
"src/FilesHelper.ts",
"src/GithubHelper.ts",
"src/InputHelper.ts",
"src/UtilsHelper.ts",
"src/main.ts",
"src/tests/FilesHelper.test.ts",
"src/tests/GithubHelper.test.ts",
"src/tests/InputHelper.test.ts",
"src/tests/UtilsHelper.test.ts",
"src/tests/main.test.ts",
"src/tests/mocks/core/index.test.ts",
"src/tests/mocks/core/index.ts",
"src/tests/mocks/env/events/issue_comment_created.json",
"src/tests/mocks/env/events/issue_comment_edited.json",
"src/tests/mocks/env/events/pull_request_opened.json",
"src/tests/mocks/env/events/pull_request_reopened.json",
"src/tests/mocks/env/events/pull_request_synchronize.json",
"src/tests/mocks/env/events/push.json",
"src/tests/mocks/env/events/push_merge.json",
"src/tests/mocks/env/events/schedule.json",
"src/tests/mocks/env/index.test.ts",
"src/tests/mocks/env/index.ts",
"src/tests/mocks/fs/index.test.ts",
"src/tests/mocks/fs/index.ts",
"src/tests/mocks/github/index.test.ts",
"src/tests/mocks/github/index.ts",
"src/tests/mocks/octokit/endpoint/merge.test.ts",
"src/tests/mocks/octokit/endpoint/merge.ts",
"src/tests/mocks/octokit/index.test.ts",
"src/tests/mocks/octokit/index.ts",
"src/tests/mocks/octokit/paginate.test.ts",
"src/tests/mocks/octokit/paginate.ts",
"src/tests/mocks/octokit/payloads.ts",
"src/tests/mocks/octokit/pulls/listFiles.test.ts",
"src/tests/mocks/octokit/pulls/listFiles.ts",
"src/tests/mocks/octokit/repos/compareCommits.test.ts",
"src/tests/mocks/octokit/repos/compareCommits.ts",
"src/tests/payloads.ts",
"src/typings/ActionError/index.d.ts",
"src/typings/ChangedFiles/index.d.ts",
"src/typings/CoreMock/index.d.ts",
"src/typings/FsMock/index.d.ts",
"src/typings/GitHubFile/index.d.ts",
"src/typings/GitHubMock/index.d.ts",
"src/typings/Inferred/index.d.ts",
"src/typings/Inputs/index.d.ts",
"src/typings/OctokitMock/index.d.ts",
"src/typings/TestInput/index.d.ts",
"tsconfig.build.json",
"tsconfig.json",
"yarn.lock"
]

View File

@@ -0,0 +1 @@
.codecov.yml .eslintignore .eslintrc.json .eslintrc.yml .github/workflows/integration.yml .github/workflows/pr.yml .github/workflows/push.yml .github/workflows/readme.md .gitignore .prettierignore .prettierrc.json .prettierrc.yml .releaserc.yml Makefile README.md __tests__/main.test.ts action.yml dist/index.js jest.config.js package.json src/ChangedFiles.ts src/File.ts src/FilesHelper.ts src/GithubHelper.ts src/InputHelper.ts src/UtilsHelper.ts src/main.ts src/tests/FilesHelper.test.ts src/tests/GithubHelper.test.ts src/tests/InputHelper.test.ts src/tests/UtilsHelper.test.ts src/tests/main.test.ts src/tests/mocks/core/index.test.ts src/tests/mocks/core/index.ts src/tests/mocks/env/events/issue_comment_created.json src/tests/mocks/env/events/issue_comment_edited.json src/tests/mocks/env/events/pull_request_opened.json src/tests/mocks/env/events/pull_request_reopened.json src/tests/mocks/env/events/pull_request_synchronize.json src/tests/mocks/env/events/push.json src/tests/mocks/env/events/push_merge.json src/tests/mocks/env/events/schedule.json src/tests/mocks/env/index.test.ts src/tests/mocks/env/index.ts src/tests/mocks/fs/index.test.ts src/tests/mocks/fs/index.ts src/tests/mocks/github/index.test.ts src/tests/mocks/github/index.ts src/tests/mocks/octokit/endpoint/merge.test.ts src/tests/mocks/octokit/endpoint/merge.ts src/tests/mocks/octokit/index.test.ts src/tests/mocks/octokit/index.ts src/tests/mocks/octokit/paginate.test.ts src/tests/mocks/octokit/paginate.ts src/tests/mocks/octokit/payloads.ts src/tests/mocks/octokit/pulls/listFiles.test.ts src/tests/mocks/octokit/pulls/listFiles.ts src/tests/mocks/octokit/repos/compareCommits.test.ts src/tests/mocks/octokit/repos/compareCommits.ts src/tests/payloads.ts src/typings/ActionError/index.d.ts src/typings/ChangedFiles/index.d.ts src/typings/CoreMock/index.d.ts src/typings/FsMock/index.d.ts src/typings/GitHubFile/index.d.ts src/typings/GitHubMock/index.d.ts src/typings/Inferred/index.d.ts src/typings/Inputs/index.d.ts src/typings/OctokitMock/index.d.ts src/typings/TestInput/index.d.ts tsconfig.build.json tsconfig.json yarn.lock

View File

@@ -0,0 +1 @@
.codecov.yml,.eslintrc.yml,.prettierrc.yml,.releaserc.yml,src/FilesHelper.ts,src/GithubHelper.ts,src/InputHelper.ts,src/UtilsHelper.ts,src/tests/FilesHelper.test.ts,src/tests/GithubHelper.test.ts,src/tests/InputHelper.test.ts,src/tests/UtilsHelper.test.ts,src/tests/main.test.ts,src/tests/mocks/core/index.test.ts,src/tests/mocks/core/index.ts,src/tests/mocks/env/events/issue_comment_created.json,src/tests/mocks/env/events/issue_comment_edited.json,src/tests/mocks/env/events/pull_request_opened.json,src/tests/mocks/env/events/pull_request_reopened.json,src/tests/mocks/env/events/pull_request_synchronize.json,src/tests/mocks/env/events/push.json,src/tests/mocks/env/events/push_merge.json,src/tests/mocks/env/events/schedule.json,src/tests/mocks/env/index.test.ts,src/tests/mocks/env/index.ts,src/tests/mocks/fs/index.test.ts,src/tests/mocks/fs/index.ts,src/tests/mocks/github/index.test.ts,src/tests/mocks/github/index.ts,src/tests/mocks/octokit/endpoint/merge.test.ts,src/tests/mocks/octokit/endpoint/merge.ts,src/tests/mocks/octokit/index.test.ts,src/tests/mocks/octokit/index.ts,src/tests/mocks/octokit/paginate.test.ts,src/tests/mocks/octokit/paginate.ts,src/tests/mocks/octokit/payloads.ts,src/tests/mocks/octokit/pulls/listFiles.test.ts,src/tests/mocks/octokit/pulls/listFiles.ts,src/tests/mocks/octokit/repos/compareCommits.test.ts,src/tests/mocks/octokit/repos/compareCommits.ts,src/tests/payloads.ts,src/typings/ActionError/index.d.ts,src/typings/ChangedFiles/index.d.ts,src/typings/CoreMock/index.d.ts,src/typings/FsMock/index.d.ts,src/typings/GitHubFile/index.d.ts,src/typings/GitHubMock/index.d.ts,src/typings/Inferred/index.d.ts,src/typings/Inputs/index.d.ts,src/typings/OctokitMock/index.d.ts,src/typings/TestInput/index.d.ts,tsconfig.build.json
1 .codecov.yml .eslintrc.yml .prettierrc.yml .releaserc.yml src/FilesHelper.ts src/GithubHelper.ts src/InputHelper.ts src/UtilsHelper.ts src/tests/FilesHelper.test.ts src/tests/GithubHelper.test.ts src/tests/InputHelper.test.ts src/tests/UtilsHelper.test.ts src/tests/main.test.ts src/tests/mocks/core/index.test.ts src/tests/mocks/core/index.ts src/tests/mocks/env/events/issue_comment_created.json src/tests/mocks/env/events/issue_comment_edited.json src/tests/mocks/env/events/pull_request_opened.json src/tests/mocks/env/events/pull_request_reopened.json src/tests/mocks/env/events/pull_request_synchronize.json src/tests/mocks/env/events/push.json src/tests/mocks/env/events/push_merge.json src/tests/mocks/env/events/schedule.json src/tests/mocks/env/index.test.ts src/tests/mocks/env/index.ts src/tests/mocks/fs/index.test.ts src/tests/mocks/fs/index.ts src/tests/mocks/github/index.test.ts src/tests/mocks/github/index.ts src/tests/mocks/octokit/endpoint/merge.test.ts src/tests/mocks/octokit/endpoint/merge.ts src/tests/mocks/octokit/index.test.ts src/tests/mocks/octokit/index.ts src/tests/mocks/octokit/paginate.test.ts src/tests/mocks/octokit/paginate.ts src/tests/mocks/octokit/payloads.ts src/tests/mocks/octokit/pulls/listFiles.test.ts src/tests/mocks/octokit/pulls/listFiles.ts src/tests/mocks/octokit/repos/compareCommits.test.ts src/tests/mocks/octokit/repos/compareCommits.ts src/tests/payloads.ts src/typings/ActionError/index.d.ts src/typings/ChangedFiles/index.d.ts src/typings/CoreMock/index.d.ts src/typings/FsMock/index.d.ts src/typings/GitHubFile/index.d.ts src/typings/GitHubMock/index.d.ts src/typings/Inferred/index.d.ts src/typings/Inputs/index.d.ts src/typings/OctokitMock/index.d.ts src/typings/TestInput/index.d.ts tsconfig.build.json

View File

@@ -0,0 +1,54 @@
[
".codecov.yml",
".eslintrc.yml",
".prettierrc.yml",
".releaserc.yml",
"src/FilesHelper.ts",
"src/GithubHelper.ts",
"src/InputHelper.ts",
"src/UtilsHelper.ts",
"src/tests/FilesHelper.test.ts",
"src/tests/GithubHelper.test.ts",
"src/tests/InputHelper.test.ts",
"src/tests/UtilsHelper.test.ts",
"src/tests/main.test.ts",
"src/tests/mocks/core/index.test.ts",
"src/tests/mocks/core/index.ts",
"src/tests/mocks/env/events/issue_comment_created.json",
"src/tests/mocks/env/events/issue_comment_edited.json",
"src/tests/mocks/env/events/pull_request_opened.json",
"src/tests/mocks/env/events/pull_request_reopened.json",
"src/tests/mocks/env/events/pull_request_synchronize.json",
"src/tests/mocks/env/events/push.json",
"src/tests/mocks/env/events/push_merge.json",
"src/tests/mocks/env/events/schedule.json",
"src/tests/mocks/env/index.test.ts",
"src/tests/mocks/env/index.ts",
"src/tests/mocks/fs/index.test.ts",
"src/tests/mocks/fs/index.ts",
"src/tests/mocks/github/index.test.ts",
"src/tests/mocks/github/index.ts",
"src/tests/mocks/octokit/endpoint/merge.test.ts",
"src/tests/mocks/octokit/endpoint/merge.ts",
"src/tests/mocks/octokit/index.test.ts",
"src/tests/mocks/octokit/index.ts",
"src/tests/mocks/octokit/paginate.test.ts",
"src/tests/mocks/octokit/paginate.ts",
"src/tests/mocks/octokit/payloads.ts",
"src/tests/mocks/octokit/pulls/listFiles.test.ts",
"src/tests/mocks/octokit/pulls/listFiles.ts",
"src/tests/mocks/octokit/repos/compareCommits.test.ts",
"src/tests/mocks/octokit/repos/compareCommits.ts",
"src/tests/payloads.ts",
"src/typings/ActionError/index.d.ts",
"src/typings/ChangedFiles/index.d.ts",
"src/typings/CoreMock/index.d.ts",
"src/typings/FsMock/index.d.ts",
"src/typings/GitHubFile/index.d.ts",
"src/typings/GitHubMock/index.d.ts",
"src/typings/Inferred/index.d.ts",
"src/typings/Inputs/index.d.ts",
"src/typings/OctokitMock/index.d.ts",
"src/typings/TestInput/index.d.ts",
"tsconfig.build.json"
]

View File

@@ -0,0 +1 @@
.codecov.yml .eslintrc.yml .prettierrc.yml .releaserc.yml src/FilesHelper.ts src/GithubHelper.ts src/InputHelper.ts src/UtilsHelper.ts src/tests/FilesHelper.test.ts src/tests/GithubHelper.test.ts src/tests/InputHelper.test.ts src/tests/UtilsHelper.test.ts src/tests/main.test.ts src/tests/mocks/core/index.test.ts src/tests/mocks/core/index.ts src/tests/mocks/env/events/issue_comment_created.json src/tests/mocks/env/events/issue_comment_edited.json src/tests/mocks/env/events/pull_request_opened.json src/tests/mocks/env/events/pull_request_reopened.json src/tests/mocks/env/events/pull_request_synchronize.json src/tests/mocks/env/events/push.json src/tests/mocks/env/events/push_merge.json src/tests/mocks/env/events/schedule.json src/tests/mocks/env/index.test.ts src/tests/mocks/env/index.ts src/tests/mocks/fs/index.test.ts src/tests/mocks/fs/index.ts src/tests/mocks/github/index.test.ts src/tests/mocks/github/index.ts src/tests/mocks/octokit/endpoint/merge.test.ts src/tests/mocks/octokit/endpoint/merge.ts src/tests/mocks/octokit/index.test.ts src/tests/mocks/octokit/index.ts src/tests/mocks/octokit/paginate.test.ts src/tests/mocks/octokit/paginate.ts src/tests/mocks/octokit/payloads.ts src/tests/mocks/octokit/pulls/listFiles.test.ts src/tests/mocks/octokit/pulls/listFiles.ts src/tests/mocks/octokit/repos/compareCommits.test.ts src/tests/mocks/octokit/repos/compareCommits.ts src/tests/payloads.ts src/typings/ActionError/index.d.ts src/typings/ChangedFiles/index.d.ts src/typings/CoreMock/index.d.ts src/typings/FsMock/index.d.ts src/typings/GitHubFile/index.d.ts src/typings/GitHubMock/index.d.ts src/typings/Inferred/index.d.ts src/typings/Inputs/index.d.ts src/typings/OctokitMock/index.d.ts src/typings/TestInput/index.d.ts tsconfig.build.json

View File

@@ -0,0 +1 @@
.github/workflows/integration.yml,.github/workflows/pr.yml,.github/workflows/push.yml,.github/workflows/readme.md,.gitignore,.prettierignore,README.md,action.yml,jest.config.js,package.json,src/main.ts,tsconfig.json,yarn.lock
1 .github/workflows/integration.yml .github/workflows/pr.yml .github/workflows/push.yml .github/workflows/readme.md .gitignore .prettierignore README.md action.yml jest.config.js package.json src/main.ts tsconfig.json yarn.lock

View File

@@ -0,0 +1,15 @@
[
".github/workflows/integration.yml",
".github/workflows/pr.yml",
".github/workflows/push.yml",
".github/workflows/readme.md",
".gitignore",
".prettierignore",
"README.md",
"action.yml",
"jest.config.js",
"package.json",
"src/main.ts",
"tsconfig.json",
"yarn.lock"
]

View File

@@ -0,0 +1 @@
.github/workflows/integration.yml .github/workflows/pr.yml .github/workflows/push.yml .github/workflows/readme.md .gitignore .prettierignore README.md action.yml jest.config.js package.json src/main.ts tsconfig.json yarn.lock

View File

@@ -0,0 +1 @@
.eslintignore,.eslintrc.json,.prettierrc.json,Makefile,__tests__/main.test.ts,dist/index.js,src/ChangedFiles.ts,src/File.ts
1 .eslintignore .eslintrc.json .prettierrc.json Makefile __tests__/main.test.ts dist/index.js src/ChangedFiles.ts src/File.ts

View File

@@ -0,0 +1,10 @@
[
".eslintignore",
".eslintrc.json",
".prettierrc.json",
"Makefile",
"__tests__/main.test.ts",
"dist/index.js",
"src/ChangedFiles.ts",
"src/File.ts"
]

View File

@@ -0,0 +1 @@
.eslintignore .eslintrc.json .prettierrc.json Makefile __tests__/main.test.ts dist/index.js src/ChangedFiles.ts src/File.ts

View File

@@ -0,0 +1,157 @@
json_output='["functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json", "functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json", "functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json", "functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json"]'
csv_output="functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json,functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json,functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json,functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json"
txt_hard_output='functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json_<br />&nbsp;&nbsp;_functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json_<br />&nbsp;&nbsp;_functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json_<br />&nbsp;&nbsp;_functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json'
txt_output='functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json'
testOutput () {
# read from var
if [ "${2}" == "json" ]; then
local output_length=$(echo "${1}" | jq '. | length')
elif [ "${2}" == "," ]; then
local output_length=$(awk -F"${2}" '{print NF-1}' <<< $(echo "${1}"))
else
local output_length=$(awk -F"${2}" '{print NF-1}' <<< $(echo "${1}"))
fi
echo "$output_length"
}
testFile () {
# read from file
if [ "${2}" == "json" ]; then
local file_length=$(jq -r '. | length' ${file}.json)
elif [ "${2}" == "," ]; then
local file_length=$(cat ${file}.csv | awk -F"${2}" '{print NF-1}')
else
local file_length=$(cat ${file}.txt | awk -F"${2}" '{print NF-1}')
fi
echo "$file_length"
}
cleanTest () {
rm -rf $1.json $1.csv $1.txt
}
prepareTest () {
# if prefix is simple setup test var and file
if [ "$1" == "simple_" ]; then
# declare a var named simple_FILE
if [ "$dev" == "dev" ]; then
local file_prefix="events/"
else
local file_prefix=""
fi
declare -n file=${1}${2}
if [ "$3" == "json" ]; then
echo ${json_output} > "${file_prefix}${!file}.json"
elif [ "$3" == "," ]; then
echo ${csv_output} > "${file_prefix}${!file}.csv"
elif [ "$3" == "_<br />&nbsp;&nbsp;_" ]; then
echo ${txt_hard_output} > "${file_prefix}${!file}.txt"
else
echo ${txt_output} > "${file_prefix}${!file}.txt"
fi
if [ "$4" == "json" ]; then
file=$json_output
elif [ "$4" == "," ]; then
file=$csv_output
elif [ "$4" == "_<br />&nbsp;&nbsp;_" ]; then
file=$txt_hard_output
else
file=$txt_output
fi
else
declare -n file=${2}
if [ "$dev" == "dev" ]; then
if [ "$4" == "json" ]; then
file="$(cat events/${!file}.json)"
elif [ "$4" == "," ]; then
file="$(cat events/${!file}.csv)"
else
file="$(cat events/${!file}.txt)"
fi
fi
fi
echo "${file}"
}
testResults () {
if [ "$1" == 'simple_' ]; then
expected=3
if [ "$2" == 'json' ]; then
expected=$(($expected+1))
fi
# echo $result
if [ "$3" != "$expected" ]; then
echo -e "\t\033[1;91mTest failure $5/($1)$4:'$2' { EXPECTED:$expected RECEIVED:$3 } \033[0m"
exit 1;
fi
else
if [ "$4" == 'files' ]; then
expected=72
elif [ "$4" == 'files_added' ]; then
expected=51
elif [ "$4" == 'files_modified' ]; then
expected=12
elif [ "$4" == 'files_removed' ]; then
expected=7
fi
if [ "$2" == 'json' ]; then
expected=$(($expected+1))
fi
if [ "$3" != "$expected" ]; then
echo -e "\t\033[1;91mTest failure $5/($1)$4:'$2' { EXPECTED:$expected RECEIVED:$3 } \033[0m"
exit 1;
fi
fi
echo -e "\t\033[1;92mTest success $5/($1)$4:'$2' { $expected == $3 } \033[0m"
}
runTest () {
for prefix in "simple_" "real"; do \
file=${1}
if [ "$prefix" == 'simple_' ]; then
if [ "$dev" == "dev" ]; then
file=events/${prefix}${1}
else
file=${prefix}${1}
fi
elif [ "$prefix" != 'simple_' ] && [ "$dev" == "dev" ]; then
file=events/${1}
fi
input="$(prepareTest $prefix $1 "$2" "$3")"
local file_length=$(testFile $file "${2}")
local output_length=$(testOutput "${input}" "${3}")
testResults $prefix "${2}" "$file_length" "$1" "fileOutput"
testResults $prefix "${3}" "$output_length" "$1" "output"
if [ "$prefix" == 'simple_' ]; then
cleanTest $file
fi
done
}
test () {
if [ "$dev" == "dev" ]; then
echo -e "\t\033[1;91mDEV MODE\033[0m"
fi
if [ "$output" == "" ] || [ "$fileOutput" == "" ]; then
for fileOutput in "json" "," " "; do \
echo -e "\033[1;92mFILEOUTPUT:'$fileOutput'\033[0m"
for output in "json" "," " "; do \
echo -e "\033[1;92mOUTPUT:'$output'\033[0m"
for file in "files" "files_modified" "files_added" "files_removed"; do \
echo -e "\033[1;92mFILE:'$file'\033[0m"
runTest $file "$fileOutput" "$output"
done
done
done
else
for file in "files" "files_modified" "files_added" "files_removed"; do \
echo -e "\033[1;92mFILE:'$file' with FILEOUTPUT:'$fileOutput' OUTPUT:'$output'\033[0m"
runTest $file "$fileOutput" "$output"
done
fi
}
dev=$1
test

View File

@@ -0,0 +1,26 @@
# Set to true to add reviewers to pull requests
addReviewers: true
# Set to true to add assignees to pull requests
addAssignees: author
# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- trilom
# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - assigneeA
# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
# numberOfAssignees: 2
# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip

View File

@@ -0,0 +1,42 @@
- name: pretty
description: Code that has been linted with eslint and prettier
color: 76edd1
- name: builds
description: Code that builds with yarn and tsc
color: 39bc44
- name: tested-unit
description: Code that has passed unit tests with jest
color: 9520bc
- name: tested-integration
description: Code that has passed integration tests with jest
color: fc5aee
- name: "doesnt read directions"
description: "Doesn't know how to read directions, please PR to develop"
color: d876e3
- name: automated pr
description: This was created by create-pull-request action
color: b9ff9b
- name: released
description: This has been released to NPM, Github Packages, and Actions Marketplace
color: ededed
- name: bug
description: Something isn't working
color: d73a4a
- name: duplicate
description: This issue or pull request already exists
color: cfd3d7
- name: enhancement
description: New feature or request
color: a2eeef
- name: "automated merge"
description: This was merged automatically
color: c2e0c6
- name: "hold merge"
description: This merge will be blocked from automerging until this label is removed
color: b60205
- name: lintdogged
description: Code that has been looked at by reviewdog
color: 5F422D
- name: failure
description: Something bad happened...
color: d93f0b

View File

@@ -0,0 +1,97 @@
# this will tag PRs that are ready for release and automerge them
name: Automerge Pull Requests
on:
# issue_comment:
# types: [created]
pull_request:
branches: [master, next, alpha, beta]
types: [labeled, closed]
jobs:
automerge:
name: automerge pr
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
pr_number: ${{ format('{0}{1}', github.event.pull_request.number, github.event.issue.number) }}
# if event type is non fork PR or comment on PR from trilom with '/release'
if: >-
(
github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository
&& contains(github.event.pull_request.labels.*.name, 'pretty')
&& contains(github.event.pull_request.labels.*.name, 'builds')
&& contains(github.event.pull_request.labels.*.name, 'tested-unit')
&& contains(github.event.pull_request.labels.*.name, 'tested-integration')
&& contains(github.event.pull_request.labels.*.name, 'lintdogged')
&& ! contains(github.event.pull_request.labels.*.name, 'automated merge')
&& ! contains(github.event.pull_request.labels.*.name, 'hold merge')
) || (
github.event_name == 'issue_comment'
&& github.event.issue.pull_request != ''
&& contains(github.event.comment.body, '/release')
&& github.actor == 'trilom'
&& contains(github.event.issue.labels.*.name, 'pretty')
&& contains(github.event.issue.labels.*.name, 'builds')
&& contains(github.event.issue.labels.*.name, 'tested-unit')
&& contains(github.event.issue.labels.*.name, 'tested-integration')
&& contains(github.event.issue.labels.*.name, 'lintdogged')
&& ! contains(github.event.issue.labels.*.name, 'automated merge')
&& ! contains(github.event.issue.labels.*.name, 'hold merge'))
steps:
- name: if pretty, builds, tested merge automerge pr
# if pretty, builds, and tested labels then merge
uses: pascalgn/automerge-action@v0.7.5
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
MERGE_METHOD: merge
# this breaks the /release on issue_comment portion unless I get the head.ref from github-script
MERGE_COMMIT_MESSAGE: 'Auto merge from ${{ github.event.pull_request.head.ref }} PR#{pullRequest.number}: {pullRequest.title}'
UPDATE_METHOD: merge
MERGE_LABELS: 'pretty,builds,tested-unit,tested-integration,lintdogged'
UPDATE_LABELS: ''
# if failure, get payload of PR and notify
- name: if failure, get pr payload
uses: actions/github-script@0.8.0
id: pr_json
if: failure()
with:
github-token: ${{env.GITHUB_TOKEN}}
script: |
const result = await github.pulls.get({
owner: '${{ github.repository }}'.split('/')[0],
repo: '${{ github.repository }}'.split('/')[1],
pull_number: ${{ env.pr_number }}
})
return result.data;
- name: if failure, set pr payload outputs
if: failure()
id: pr
run: |
echo '${{ steps.pr_json.outputs.result }}' > pr.json
echo "::set-output name=user::$( jq -r '.user.login' pr.json )"
echo "::set-output name=head::$( jq -r '.head.repo.full_name' pr.json )"
echo "::set-output name=head_url::$( jq -r '.head.repo.html_url' pr.json )"
echo "::set-output name=base::$( jq -r '.base.repo.full_name' pr.json )"
echo "::set-output name=base_url::$( jq -r '.base.repo.html_url' pr.json )"
- name: if failure, notify
uses: peter-evans/create-or-update-comment@v1
if: failure()
with:
token: ${{ env.GITHUB_TOKEN }}
issue-number: ${{ env.pr_number }}
body: |
@${{ steps.pr.outputs.user }}, @trilom - it appears that there was an issue with the merge.
Head Repo/Branch: **[${{ steps.pr.outputs.head }}]**(${{ steps.pr.outputs.head_url }}) merge into **[${{ steps.pr.outputs.base }}]**(${{ steps.pr.outputs.base_url }})
## Event JSON
```json
${{ toJSON(steps.pr_json.outputs.result)}}
```
- uses: actions/github-script@0.6.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['automated merge']
})

View File

@@ -0,0 +1,19 @@
name: Close Pull Request
on:
pull_request:
branches-ignore: [master]
types: [opened, reopened]
jobs:
# close any fork PRs not opened by trilom to anything but master
close_pr:
name: close non master PRs from fork
runs-on: ubuntu-latest
if: (github.actor != 'trilom' || github.actor != 'trilom-bot') && github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: superbrothers/close-pull-request@v2
with:
comment: Please merge your code into master, this will trigger the desired merge workflow.
- uses: actions/github@v1.0.0
if: success()
with:
args: label "doesnt read directions"

View File

@@ -0,0 +1,106 @@
name: Integration Tests
on:
issue_comment:
types:
- created
schedule:
- cron: '0 0 * * *'
pull_request:
branches: [master]
push:
branches: [master]
jobs:
# always_job:
# name: Always run job
# runs-on: ubuntu-latest
# steps:
# - name: dump env
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# JOB_CONTEXT: ${{ toJson(job) }}
# STEPS_CONTEXT: ${{ toJson(steps) }}
# RUNNER_CONTEXT: ${{ toJson(runner) }}
# STRATEGY_CONTEXT: ${{ toJson(strategy) }}
# MATRIX_CONTEXT: ${{ toJson(matrix) }}
# run: |
# echo "GITHUB_EVENT_PATH\n$GITHUB_EVENT_PATH"
# echo "GITHUB_CONTEXT\n$GITHUB_CONTEXT"
# echo "JOB_CONTEXT\n$JOB_CONTEXT"
# echo "STEPS_CONTEXT\n$STEPS_CONTEXT"
# echo "RUNNER_CONTEXT\n$RUNNER_CONTEXT"
# echo "STRATEGY_CONTEXT\n$STRATEGY_CONTEXT"
# echo "MATRIX_CONTEXT\n$MATRIX_CONTEXT"
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
event_type: ['push', 'pull_request']
output: ['json', ',', ' ', '_<br />&nbsp;&nbsp;_']
fileOutput: ['json', ',', ' ', '_<br />&nbsp;&nbsp;_']
if: >-
( startsWith(github.head_ref, '1.')
|| startsWith(github.head_ref, '2.'))
||
contains(github.event.head_commit.message, 'Release merge from')
||
github.event_name == 'schedule'
|| (
github.event_name == 'issue_comment'
&& github.event.issue.number != ''
&& contains(github.event.comment.body, '/integration')
&& github.actor == 'trilom')
steps:
# get pr number if exists
- id: pr
if: github.event_name == 'issue_comment'
run: |
pr=$(echo "${{github.event.comment.body}}" | sed 's|.*/integration||') &&
echo "::set-output name=pr::${pr}"
env:
comment: ${{ toJson(github) }}
# use pr number from integration command
- uses: actions/checkout@v2
if: github.event_name == 'issue_comment' && steps.pr.outputs.pr != ''
with:
ref: ${{format('refs/pull/{0}/head', steps.pr.outputs.pr )}}
# use the issue number if pr is blank
- uses: actions/checkout@v2
if: github.event_name == 'issue_comment' && steps.pr.outputs.pr == '' && github.event.issue.pull_request != ''
with:
ref: ${{format('refs/pull/{0}/head', github.event.issue.number )}}
- name: fail if no PR number and issue comment
if: github.event_name == 'issue_comment' && steps.pr.outputs.pr == '' && github.event.issue.pull_request == ''
run: |
echo "Please provide a PR number to use like /integration13 for PR# 13."
exit 1
- uses: actions/checkout@v2
if: github.event_name != 'issue_comment'
- run: yarn build-package
- uses: ./
id: file_changes_build_pr
if: matrix.event_type == 'pull_request'
with:
prNumber: 83
output: ${{ matrix.output }}
fileOutput: ${{ matrix.fileOutput }}
- uses: ./
id: file_changes_build_push
if: matrix.event_type == 'push'
with:
pushBefore: 6ac7697cd1c4f23a08d4d4edbe7dab06b34c58a2
pushAfter: 4ee1a1a2515f4ac1b90a56aaeb060b97f20c8968
output: ${{ matrix.output }}
fileOutput: ${{ matrix.fileOutput }}
- run: |
mv $HOME/files* .
chmod +x test.sh && ./test.sh
working-directory: .github/actions/integration
if: success()
env:
fileOutput: ${{ matrix.fileOutput }}
output: ${{ matrix.output }}
files: ${{ format('{0}{1}', steps.file_changes_build_pr.outputs.files, steps.file_changes_build_push.outputs.files ) }}
files_modified: ${{ format('{0}{1}', steps.file_changes_build_pr.outputs.files_modified, steps.file_changes_build_push.outputs.files_modified ) }}
files_added: ${{ format('{0}{1}', steps.file_changes_build_pr.outputs.files_added, steps.file_changes_build_push.outputs.files_added ) }}
files_removed: ${{ format('{0}{1}', steps.file_changes_build_pr.outputs.files_removed, steps.file_changes_build_push.outputs.files_removed ) }}

View File

@@ -0,0 +1,13 @@
name: Sync labels
on:
push:
branches: [master]
paths: [.github/labels.yml]
jobs:
make-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,192 @@
name: Contribution Workflow
env:
isFork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
on: [pull_request]
jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/auto-assign-action@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# make sure we can build
build:
name: yarn install && tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn build
- uses: actions/github-script@0.6.0
if: failure() && contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
if ('${{ contains(github.event.pull_request.labels.*.name, 'builds') }}' == 'true') {
github.issues.removeLabel({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
name: 'builds'
})
}
- uses: actions/github-script@0.6.0
if: contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['builds']
})
# unit test with jest
test-unit:
name: jest unit tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- run: yarn build
- run: yarn test-coverage
- run: bash <(curl -s https://codecov.io/bash)
if: contains(env.isFork, 'false')
- uses: actions/github-script@0.6.0
if: failure() && contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
if ('${{ contains(github.event.pull_request.labels.*.name, 'tested-unit') }}' == 'true') {
github.issues.removeLabel({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
name: 'tested-unit'
})
}
- uses: actions/github-script@0.6.0
if: contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['tested-unit']
})
# integration test with jest
test-integration:
name: jest integration tests
runs-on: ubuntu-latest
needs: test-unit
steps:
- uses: actions/checkout@v2
- run: yarn build
- run: yarn test-integration
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
- uses: actions/github-script@0.6.0
if: failure() && contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
if ('${{ contains(github.event.pull_request.labels.*.name, 'tested-integration') }}' == 'true') {
github.issues.removeLabel({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
name: 'tested-integration'
})
}
- uses: actions/github-script@0.6.0
if: contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['tested-integration']
})
# lint code in github check
lintdog-fork:
name: eslintdog (reviewdog)
runs-on: ubuntu-latest
needs: build
if: github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
- run: yarn build
- name: Lint and report
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
eslint_flags: '--ext .ts ./'
# lint code and comment back if possible
lintdog:
name: eslintdog (reviewdog)
runs-on: ubuntu-latest
needs: build
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v2
- run: yarn build
- name: Lint and report
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.TRILOM_BOT_TOKEN }}
reporter: github-pr-review
eslint_flags: '--ext .ts ./'
- uses: actions/github-script@0.6.0
if: failure()
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
if ('${{ contains(github.event.pull_request.labels.*.name, 'lintdogged') }}' == 'true') {
github.issues.removeLabel({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
name: 'lintdogged'
})
}
- uses: actions/github-script@0.6.0
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['lintdogged']
})
# format and push code back if not forked branch
format_check_push:
name: prettier
runs-on: ubuntu-latest
needs: [lintdog, lintdog-fork]
if: always()
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
steps:
- uses: actions/checkout@v2 # checkout for forks
if: contains(env.isFork, 'true')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2 # checkout for PR
if: contains(env.isFork, 'false')
with:
token: ${{ secrets.TRILOM_BOT_TOKEN }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- run: yarn build
- run: yarn format-check
- name: yarn format and push code if check failed
if: failure() && github.actor != 'trilom-bot' && contains(env.isFork, 'false')
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
run: |
yarn format
sudo yarn clean
git config --local user.email "trilom-bot@trailmix.me"
git config --local user.name "trilom-bot"
git add -A
git diff-index --quiet HEAD || git commit -m "Adding format changes 🤖" -a
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git HEAD:refs/heads/${{ github.head_ref }} && exit 0
- uses: actions/github-script@0.6.0
if: failure() && contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
if ('${{ contains(github.event.pull_request.labels.*.name, 'pretty') }}' == 'true') {
github.issues.removeLabel({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
name: 'pretty'
})
}
- uses: actions/github-script@0.6.0
if: contains(env.isFork, 'false')
with:
github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
script: |
github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,
labels: ['pretty']
})

View File

@@ -0,0 +1,259 @@
# if a push comes in then this will test it for a release and create a release PR if needed
name: Push to release branches
on:
push:
branches: [master, next, alpha, beta]
tags-ignore: ['**']
jobs:
# semantic release an auto-merged branch to github package repo, npm, github actions
release:
name: Release to NPM, Github, Github Actions Marketplace
runs-on: ubuntu-latest
needs: [build, test-unit, test-integration, lintdog]
if: >
github.actor != 'semantic-release-bot'
&& ( (contains(github.event.head_commit.message, 'trilom/1.')
|| contains(github.event.head_commit.message, 'trilom/2.'))
&& ! contains(github.event.head_commit.message, 'chore(release):'))
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
SEMANTIC_RELEASE_PACKAGE: '@${{ github.repository }}'
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: semantic-release
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
semantic_version: 15.14.0
extra_plugins: |
@semantic-release/git@7.0.18
@semantic-release/changelog
semantic-release-slack-bot
dry_run: false
- name: echo release outputs
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
- name: Setup Node.js with GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://npm.pkg.github.com'
scope: trilom
- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ env.GITHUB_TOKEN }}
# create PR from release branch to master to prepare for release
check-release:
name: Check if we need to release
runs-on: ubuntu-latest
needs: [build, test-unit, test-integration, lintdog]
if: >
github.actor != 'semantic-release-bot'
&& ! contains(github.event.head_commit.message, 'trilom/1.')
&& ! contains(github.event.head_commit.message, 'trilom/2.')
&& ! contains(github.event.head_commit.message, 'chore(release):')
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: commit format changes and create authors file
run: |
git config --local user.email "trilom-bot@trailmix.me"
git config --local user.name "trilom-bot"
yarn build
yarn format
git add -A
git diff-index --quiet HEAD || git commit -m "Adding format changes 🤖" -a
yarn build-release
git add -A
git diff-index --quiet HEAD || git commit -m "Adding release changes ⚙️" -a
git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS
sed -i '/trilom-bot/d' AUTHORS
sed -i '/semantic-release-bot/d' AUTHORS
sed -i '/carnoco@gmail.com/d' AUTHORS
sed -i '/GitHub <noreply@github.com>/d' AUTHORS
sed -i '/dependabot/d' AUTHORS
echo -e "\r\n$(date)" >> AUTHORS
git add -A
git diff-index --quiet HEAD || git commit -m "Updating AUTHORS 📓" -a
# see if we need to release, if so create a automerge release PR and notify the original creator
- name: semantic-release
uses: cycjimmy/semantic-release-action@v2
id: semantic
env:
SEMANTIC_RELEASE_PACKAGE: '@${{ github.repository }}'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
with:
semantic_version: 15.14.0
extra_plugins: |
@semantic-release/git@7.0.18
@semantic-release/changelog
semantic-release-slack-bot
dry_run: true
- name: echo release outputs
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
- name: push potential formatting changes since there is no release
if: steps.semantic.outputs.new_release_published == 'false'
run: |
git config --local user.email "trilom-bot@trailmix.me"
git config --local user.name "trilom-bot"
git push -f https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:${{ github.ref }}
- name: get changed files and format for automerge PR body
id: file_changes
uses: trilom/file-changes-action@master
if: steps.semantic.outputs.new_release_published == 'true'
with:
githubToken: ${{ env.GITHUB_TOKEN }}
output: '_<br />&nbsp;&nbsp;_'
- name: get original PR number
uses: actions/github-script@0.6.0
id: pr
if: steps.semantic.outputs.new_release_published == 'true'
with:
github-token: ${{env.GITHUB_TOKEN}}
result-encoding: string
script: |
const result = await github.repos.listPullRequestsAssociatedWithCommit({
owner: context.payload.repository.owner.name,
repo: context.payload.repository.name,
commit_sha: context.payload.head_commit.id
})
if (result.data.length >= 1) {
return result.data[0].number
} else return 87
- name: get original PR user
uses: actions/github-script@0.6.0
id: login
if: steps.pr.outputs.result != 0 && steps.semantic.outputs.new_release_published == 'true'
with:
github-token: ${{env.GITHUB_TOKEN}}
result-encoding: string
script: |
const result = await github.pulls.get({
owner: context.payload.repository.owner.name,
repo: context.payload.repository.name,
pull_number: ${{ steps.pr.outputs.result }}
})
if (result.data.user === true && result.data.user.login === true) {
return result.data.user.login
} else return 'trilom';
- name: create release PR
id: create-pr
uses: peter-evans/create-pull-request@v2
if: steps.semantic.outputs.new_release_published == 'true'
with:
token: ${{ env.GITHUB_TOKEN }}
commit-message: '${{ github.event.head_commit.message }}'
committer: trilom-bot <trilom-bot@trailmix.me>
author: ${{ steps.login.outputs.result }} <${{ steps.login.outputs.result }}@users.noreply.github.com>
title: 'releases/v${{ steps.semantic.outputs.new_release_version }} [@${{ steps.login.outputs.result }}] - ${{ github.event.head_commit.message }}'
body: |
# @${{ steps.login.outputs.result }} would like to merge into file-changes-action
[**compare link**](${{ github.event.compare }})
## Commits
```json
${{ toJSON(github.event.commits)}}
```
## Files
&nbsp;&nbsp;_${{ steps.file_changes.outputs.files}}_
## Files modified
&nbsp;&nbsp;_${{ steps.file_changes.outputs.files_modified}}_
## Files added
&nbsp;&nbsp;_${{ steps.file_changes.outputs.files_added}}_
## Files removed
&nbsp;&nbsp;_${{ steps.file_changes.outputs.files_removed}}_
labels: 'automated pr'
assignees: '${{ steps.login.outputs.result }},trilom'
reviewers: trilom
branch: '${{ steps.semantic.outputs.new_release_version }}'
- name: notify initial commiter of change
uses: peter-evans/create-or-update-comment@v1
if: steps.login.outputs.result != '' && steps.semantic.outputs.new_release_published == 'true'
with:
token: ${{ env.GITHUB_TOKEN }}
issue-number: ${{ steps.pr.outputs.result }}
body: |
Hey @${{ steps.login.outputs.result }},
This merge has triggered a release, hurray!
[Here you can follow the release.](https://github.com/trilom/file-changes-action/pull/${{ steps.create-pr.outputs.pr_number }})
Please use this new **Pull Request** if there are any issues to communicate further.
Thanks!
# - uses: actions/github-script@0.6.0
# if: steps.create-pr.outputs.pr_number != '' && steps.semantic.outputs.new_release_published == 'true'
# with:
# github-token: ${{ secrets.TRILOM_BOT_TOKEN }}
# script: |
# github.issues.addLabels({owner: context.repo.owner, repo: context.repo.repo, issue_number: ${{ steps.create-pr.outputs.pr_number }},
# labels: ['${{ steps.semantic.outputs.new_release_version }}']
# })
# make sure we can build
build:
name: yarn install && tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn build
# unit test with jest
test-unit:
name: jest unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn build
- run: yarn test-coverage
- run: bash <(curl -s https://codecov.io/bash)
# integration test with jest
test-integration:
name: jest integration tests
needs: test-unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn build
- run: yarn test-integration
env:
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }}
# lint code and comment back if possible
lintdog:
name: eslintdog (reviewdog)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint and report push
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.TRILOM_BOT_TOKEN }}
reporter: github-check
eslint_flags: 'src/**/*.ts'

View File

@@ -0,0 +1,86 @@
# Workflow Information
- [Workflow Information](#workflow-information)
- [Overview](#overview)
- [Schedule](#schedule)
- [Issue Comment](#issue-comment)
- [Pull Request](#pull-request)
- [Push](#push)
# Overview
1. Make a **Pull Request** from your forked branch (forked from _master_) with changes to _trilom/file-changes-action/master_ branch.
2. Once merged into master this will lint the code and provide output in the checks, update the AUTHORS file, and package _dist/_. If there is a release then this will create a **Pull Request** from the _v\*\*_ branch to _master_ and a comment will be made on the original **Pull Request** notifying contributors. If there is not a release the changes will be **push**ed to _master_.
3. In the **Pull Request** linting and testing will be performed again. If _linted_, _tested-unit_, _tested-integration_, _builds_, and _lintdogged_ label exist and _hold merge_ does not the release will be merged into _master_.
4. Once merged this time [semantic-release](https://github.com/semantic-release/semantic-release) will run to create the Github Release, release notes, changelog, notify Slack, package and deploy to NPM and Github Package Repo, label the release, and notify any issues of it's deployment.
5. After user semantic-release-bot commits the release commit, this code will be pushed to the release branch.
## Schedule
- Everyday at 5:00 AM GMT:
- Run integration tests via Github Actions.
## Issue Comment
- When any `created` **Issue Comment** type runs on a **Pull Request** from trilom with the body of `/integrationNUMBER`(**integration.yml**):
- Run integration tests via Github Actions with PR.
- **NOT IMPLEMENTED** When any `created` **Issue Comment** type runs on a **Pull Request** from trilom with the body of `/release`(**automerge.yml**):
- If _linted_, _tested-unit_, _tested-integration_, _builds_, _lintdogged_, and _hold merge_ or _automated merge_ **does not** labels exist:
- Merge the PR and add the _automated merge_ label
- If failure, put some output on the original PR.
## Pull Request
- When any `opened`, `reopened`, or `synchronize` **Pull Request** type runs to the _master_ branch from a _v\*\*_ branch:
- Run integration tests via Github Actions.
- When any `opened` or `reopened` **Pull Request** type runs on any branch other than _master_ from anyone other than trilom or trilom-bot from a forked branch(**close_pr.yml**):
- Close the **Pull Request** and put the dunce cap on.
- When any `labeled`, or `closed` **Pull Request** type runs on _master_, _next_, _alpha_, or _beta_(**automerge.yml**):
- If _linted_, _tested-unit_, _tested-integration_, _builds_, _lintdogged_, and _hold merge_ or _automated merge_ **does not** labels exist:
- Merge the PR and add the _automated merge_ label
- If failure, put some output on the original PR.
- When any `opened`, `reopened`, or `synchronize` **Pull Request** type runs(**pr.yml**):
- Assign it to trilom (**add-reviews**)
- Build code with `yarn build` which runs `yarn` and `tsc` (**build**)
- Label with builds if passing and on inner workspace
- Test code with `yarn test-coverage` which runs `jest --coverage` (**test-unit**)
- Label with tested-unit if passing and on inner workspace
- Test code with `yarn test-integration` which runs `jest -c jest.config.integration.js` (**test-integration**)
- Label with tested-integration if passing and on inner workspace
- Test code with eslint reviewdog and report back if inner workspace (**lintdog**)
- Label with pretty if passing and on inner workspace
- Check format of code with `yarn format-check` which runs `prettier --check` (**format_check_push**)
- If:
- Fork then pull **Pull Request** github.ref with GITHUB_TOKEN
- Inner **Pull Request** then pull HEAD repo ref
- Build code with `yarn build` which runs `yarn` and `tsc`
- If format-check succeeds and on inner workspace
- Label with pretty
- If format-check fails and on inner workspace and actor is not trilom-bot
- Run `yarn format` which runs `prettier --write`
- Clean build files with `yarn clean`
- Commit the format changes as trilom-bot to **Pull Request** head
## Push
- When any **Push** type runs to _master_:
- Run integration tests via Github Actions.
- When any **Push** type runs to _master_, _next_, _alpha_, or _beta_(**push.yml**):
- Build code with `yarn build` which runs `yarn` and `tsc` (**build**)
- Test code with `yarn test-coverage` which runs `jest` (**test**)
- Test code with eslint reviewdog and report back with github checks(**lintdog**)
- When any **Push** type runs to _master_, _next_, _alpha_, or _beta_ with a head_commit message **NOT** containing 'trilom/v1.' or 'trilom/v2.':
- Build with `yarn build-release` which runs `yarn && tsc --build tsconfig.build.json && ncc build --minify` to build the **dist/\*\*.js** files, update **AUTHORS**, format **src/\*\*.ts** files and commit.
- Test [semantic-release](https://github.com/semantic-release/semantic-release) if a release is ready then create a **Pull Request**
- Echo release outputs
- Get changed files with [file-changes-action](https://github.com/trilom/file-changes-action) and build a message to post to new **Pull Request**
- Comment on the original **Pull Request** with the new details of the release.
- If no release, then **Push** changes directly back to master.
- When any **Push** type runs to _master_, _next_, _alpha_, or _beta_ with a head_commit message containing 'trilom/v1.' or 'trilom/v2.':
- Run [semantic-release](https://github.com/semantic-release/semantic-release) to prepare Github Release, release notes, changelog, notify Slack, package and deploy to NPM and Github Package Repo, label the release, and notify any issues of it's deployment.
- When any **Push** type runs to _master_, _next_, _alpha_, or _beta_ from semantic-release-bot with a head_commit message containing 'chore(release):':
- Get the **Pull Request** number from the **Push** and push the semantic-release changes to the tagged release branch.

View File

@@ -0,0 +1,100 @@
lib
**/outputs/**
# Dependency directory
node_modules
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
jspm_packages/
# # TypeScript v1 declaration files
# typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# OS metadata
.DS_Store
Thumbs.db
# Ignore built ts files
__tests__/runner/*

View File

@@ -0,0 +1,2 @@
/dist
/node_modules

View File

@@ -0,0 +1,9 @@
printWidth: 80
tabWidth: 2
useTabs: false
semi: false
singleQuote: true
trailingComma: none
bracketSpacing: false
arrowParens: avoid
parser: typescript

View File

@@ -0,0 +1,62 @@
branches:
- "+([1-9])?(.{+([1-9]),x}).x"
- master
- next
- name: alpha
prerelease: true
- name: beta
prerelease: true
dryRun: false
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
-
- semantic-release-slack-bot
- notifyOnSuccess: true
notifyOnFail: true
markdownReleaseNotes: true
onSuccessTemplate:
text: "$package_name version v$npm_package_version!\n\n$release_notes"
-
- "@semantic-release/changelog"
- changelogFile: CHANGELOG.md
- "@semantic-release/npm"
-
- "@semantic-release/github"
- assets:
- path: "dist/**/*.js"
label: Packaged JS Code
successComment: >
# 🎉🦍🎉 This <% issue.pull_request ? 'pull request' : 'issue' %>
has been resolved in version *<%= nextRelease.version %>* at
*trilom/file-changes-action@<%= nextRelease.gitTag %>*
` - name: File Changes Action
uses: trilom/file-changes-action@<%= nextRelease.gitTag %>`
## Release<%= _.size(releases) > 1 ? 's' : '' %>
<% _.forEach(releases, function(release) { %>
\n\t\t**Release Name:** [<%= release.name %>](<%= release.url %>)<% }); %>
\n\n ## Commits<% _.forEach(commits, function(commit) { %>
\n\t\t@<%= commit.author %> - [_<%= commit.message %>_](https://github.com/trilom/file-changes-action/commit/<%= commit.hash %>)<% }); %>"
**Release Name:** [<%= release.name %>](<%= release.url %>)<% }); %>
## Commits
<% _.forEach(commits, function(commit) { %>
@<%= commit.author.name %> - [_<%= commit.message.toString().replace(/[()\\\/_\*]/g, '') %>_](https://github.com/trilom/file-changes-action/commit/<%= commit.hash %>)<% }); %>
labels: [failure]
releasedLabels: ["releases/${nextRelease.gitTag}"]
assignees: trilom
-
- "@semantic-release/git"
- assets: [CHANGELOG.md, package.json, yarn.lock]
message: >
chore(release): 🎉🦍🎉 Release <%= nextRelease.version %> -
<%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> [skip ci]
`- name: File Changes Action
uses: trilom/file-changes-action@<%= nextRelease.gitTag %>`
<%= nextRelease.notes %>

View File

@@ -0,0 +1,5 @@
Bryan Killian <bryan.v.killian@gmail.com>
Daniel Orner <daniel.orner@wishabi.com>
Sergey Kluchkovsky <kaineer@gmail.com>
Thu May 21 14:42:36 UTC 2020

View File

@@ -0,0 +1,45 @@
## [1.2.4](https://github.com/trilom/file-changes-action/compare/v1.2.3...v1.2.4) (2020-05-21)
### Bug Fixes
* **change in api:** github api had a change, this should trigger release 1.2.4. this change here quiets a quacker during the intergration test ([99f8f91](https://github.com/trilom/file-changes-action/commit/99f8f91f3ed1430713973d8f1e2848b5acc58163))
## [1.2.3](https://github.com/trilom/file-changes-action/compare/v1.2.2...v1.2.3) (2020-03-25)
### Bug Fixes
* **test release:** testing a release ([dfca448](https://github.com/trilom/file-changes-action/commit/dfca448d9d1f04825a549ba0bc7d6b097df295a2))
## [1.2.2](https://github.com/trilom/file-changes-action/compare/v1.2.1...v1.2.2) (2020-03-25)
### Bug Fixes
* **issue_comment:** this needs to return PR info not commit info if before and after explicitly set, else PR ([eee976b](https://github.com/trilom/file-changes-action/commit/eee976b2219f243f83583baab84fa89376006acc))
* **naming:** renamed "deleted" to "removed". sorry if this is breaking for you. ([800537f](https://github.com/trilom/file-changes-action/commit/800537f435a66454c64fc2b42cfd82ca33cc093d))
* **pull_request_synchronize events:** issue with PR Synchronize events, it would return commit files instead of PR files, this is adjusted to return ALL PR files with PR synchronize event ([fb7bcc7](https://github.com/trilom/file-changes-action/commit/fb7bcc76581402f20aa64da82cd1174e313ec02c))
* **space issue:** this should resolve the issue with using a blank space. the assumption here is that 'json' is default, if you use ' ' it will be '' which is the app default, not the action default of 'json' ([0e4184f](https://github.com/trilom/file-changes-action/commit/0e4184fe04f87323c60b71c1ccf2af95f9f35b8c)), closes [#81](https://github.com/trilom/file-changes-action/issues/81)
## [1.2.1](https://github.com/trilom/file-changes-action/compare/v1.2.0...v1.2.1) (2020-03-19)
### Bug Fixes
* **everything:** very proud to say this is 100% coverage according to default jest of all src code (including test) ([dd31d02](https://github.com/trilom/file-changes-action/commit/dd31d0220fdc9e6eb3469b3443239359d7da33d4))
* **redesign:** a lot of things changed here in the project ([32903fd](https://github.com/trilom/file-changes-action/commit/32903fd341ce6a5471e3df73393784cb43adb397))
# [1.2.0](https://github.com/trilom/file-changes-action/compare/v1.1.0...v1.2.0) (2020-03-02)
### Features
* **action:** githubToken is optional (uses action token), added githubRepo, prNumber, and pushBefore & After ([b24e2c3](https://github.com/trilom/file-changes-action/commit/b24e2c30c72710da8704a02f9d05141a19f27f83))
# [1.2.0](https://github.com/trilom/file-changes-action/compare/v1.1.0...v1.2.0) (2020-03-02)
### Features
* **action:** githubToken is optional (uses action token), added githubRepo, prNumber, and pushBefore & After ([b24e2c3](https://github.com/trilom/file-changes-action/commit/b24e2c30c72710da8704a02f9d05141a19f27f83))

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