Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(explore): time picker enhancement #11418

Merged
merged 44 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2e81227
feat: Getting since and until tuple from calendar grains
zhaoyongjie Oct 25, 2020
4671f1f
Fix doc test
zhaoyongjie Oct 25, 2020
10d9052
Fix UT
zhaoyongjie Oct 26, 2020
1ff9129
wip
zhaoyongjie Nov 15, 2020
70dd437
refator get_since_until
zhaoyongjie Nov 16, 2020
b9a7010
wip
zhaoyongjie Nov 16, 2020
fe35c88
wip
zhaoyongjie Nov 16, 2020
5b5df18
WIP
zhaoyongjie Nov 17, 2020
9bd5484
code style
zhaoyongjie Nov 18, 2020
274cc97
fix mypy
zhaoyongjie Nov 18, 2020
c4a4588
remove typing ignore
zhaoyongjie Nov 18, 2020
04cde57
wip
zhaoyongjie Nov 18, 2020
d75cdc9
datetime parser done
zhaoyongjie Nov 23, 2020
ab31301
fix: No filter
zhaoyongjie Nov 23, 2020
eee80f9
fix relative
zhaoyongjie Nov 23, 2020
6253f51
adding quarter
zhaoyongjie Nov 24, 2020
64955d7
fix ut
zhaoyongjie Nov 24, 2020
faecceb
wip
zhaoyongjie Nov 24, 2020
a541110
remove unused filter control
zhaoyongjie Nov 24, 2020
35126bb
wip
zhaoyongjie Nov 24, 2020
6ad9cde
adding time_range api
zhaoyongjie Nov 26, 2020
5da7070
frontend WIP
zhaoyongjie Dec 3, 2020
4f1c58f
advanced range control
zhaoyongjie Dec 3, 2020
1679fa8
WIP
zhaoyongjie Dec 5, 2020
111c779
rebase master
zhaoyongjie Dec 15, 2020
9ceaed5
wip
zhaoyongjie Dec 9, 2020
a92df1d
compatible with Last/Next x
zhaoyongjie Dec 10, 2020
445c3d2
update Python depandence
zhaoyongjie Dec 10, 2020
e8229b3
rebase master
zhaoyongjie Dec 10, 2020
2f918e2
minor fix
zhaoyongjie Dec 10, 2020
26d5fa5
advanced time range errors
zhaoyongjie Dec 10, 2020
df2fd2e
fix Python UT
zhaoyongjie Dec 15, 2020
d9d4647
Python UT
zhaoyongjie Dec 15, 2020
82dc5a7
added apispec
zhaoyongjie Dec 15, 2020
3c6a340
fix eslint
zhaoyongjie Dec 15, 2020
fe26409
rebase master
zhaoyongjie Dec 15, 2020
12e5e71
cached parser
zhaoyongjie Dec 15, 2020
1da76a0
fix API test
zhaoyongjie Dec 16, 2020
10c4d4b
cosmetic buttons
zhaoyongjie Dec 16, 2020
3d941c8
fix chrome cosmetic
zhaoyongjie Dec 16, 2020
56cd7ad
coding style
zhaoyongjie Dec 17, 2020
fa23e55
move time_range endpoint
zhaoyongjie Dec 17, 2020
953aeb4
fix it
zhaoyongjie Dec 17, 2020
6e82c0b
fix lint
zhaoyongjie Dec 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ chardet==3.0.4 # via aiohttp
click==7.1.2 # via apache-superset, flask, flask-appbuilder
colorama==0.4.4 # via apache-superset, flask-appbuilder
contextlib2==0.6.0.post1 # via apache-superset
convertdate==2.3.0 # via holidays
cron-descriptor==1.2.24 # via apache-superset
croniter==0.3.36 # via apache-superset
cryptography==3.2.1 # via apache-superset
Expand All @@ -46,6 +47,7 @@ flask==1.1.2 # via apache-superset, flask-appbuilder, flask-babel,
geographiclib==1.50 # via geopy
geopy==2.0.0 # via apache-superset
gunicorn==20.0.4 # via apache-superset
holidays==0.10.3 # via apache-superset
humanize==3.1.0 # via apache-superset
idna==2.10 # via email-validator, yarl
importlib-metadata==2.1.1 # via -r requirements/base.in, jsonschema, kombu, markdown
Expand All @@ -54,6 +56,7 @@ itsdangerous==1.1.0 # via flask, flask-wtf
jinja2==2.11.2 # via flask, flask-babel
jsonschema==3.2.0 # via flask-appbuilder
kombu==4.6.11 # via celery
korean-lunar-calendar==0.2.1 # via holidays
mako==1.1.3 # via alembic
markdown==3.3.3 # via apache-superset
markupsafe==1.1.1 # via jinja2, mako, wtforms
Expand All @@ -75,20 +78,21 @@ py==1.9.0 # via retry
pyarrow==1.0.1 # via apache-superset
pycparser==2.20 # via cffi
pyjwt==1.7.1 # via flask-appbuilder, flask-jwt-extended
pyparsing==2.4.7 # via packaging
pymeeus==0.3.7 # via convertdate
pyparsing==2.4.7 # via apache-superset, packaging
pyrsistent==0.16.1 # via -r requirements/base.in, jsonschema
python-dateutil==2.8.1 # via alembic, apache-superset, croniter, flask-appbuilder, pandas
python-dateutil==2.8.1 # via alembic, apache-superset, croniter, flask-appbuilder, holidays, pandas
python-dotenv==0.15.0 # via apache-superset
python-editor==1.0.4 # via alembic
python-geohash==0.8.5 # via apache-superset
python3-openid==3.2.0 # via flask-openid
pytz==2020.4 # via babel, celery, flask-babel, pandas
pytz==2020.4 # via babel, celery, convertdate, flask-babel, pandas
pyyaml==5.3.1 # via apache-superset, apispec
redis==3.5.3 # via apache-superset
retry==0.9.2 # via apache-superset
selenium==3.141.0 # via apache-superset
simplejson==3.17.2 # via apache-superset
six==1.15.0 # via bleach, cryptography, flask-jwt-extended, flask-talisman, isodate, jsonschema, packaging, pathlib2, polyline, prison, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
six==1.15.0 # via bleach, cryptography, flask-jwt-extended, flask-talisman, holidays, isodate, jsonschema, pathlib2, polyline, prison, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
slackclient==2.5.0 # via apache-superset
sqlalchemy-utils==0.36.8 # via apache-superset, flask-appbuilder
sqlalchemy==1.3.20 # via alembic, apache-superset, flask-sqlalchemy, marshmallow-sqlalchemy, sqlalchemy-utils
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ combine_as_imports = true
include_trailing_comma = true
line_length = 88
known_first_party = superset
known_third_party =alembic,apispec,backoff,bleach,cachelib,celery,click,colorama,contextlib2,cron_descriptor,croniter,cryptography,dateutil,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,msgpack,numpy,pandas,parameterized,parsedatetime,pathlib2,pgsanity,pkg_resources,polyline,prison,pyarrow,pyhive,pytest,pytz,redis,retry,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,werkzeug,wtforms,wtforms_json,yaml
known_third_party =alembic,apispec,backoff,bleach,cachelib,celery,click,colorama,contextlib2,cron_descriptor,croniter,cryptography,dateutil,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,msgpack,numpy,pandas,parameterized,parsedatetime,pathlib2,pgsanity,pkg_resources,polyline,prison,pyarrow,pyhive,pyparsing,pytest,pytz,redis,retry,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,werkzeug,wtforms,wtforms_json,yaml
multi_line_output = 3
order_by_type = false

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def get_git_sha():
"sqlalchemy-utils>=0.36.6,<0.37",
"sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562
"wtforms-json",
"pyparsing>=2.4.7, <3.0.0",
"holidays==0.10.3", # PINNED! https://github.com/dr-prodigy/python-holidays/issues/406
],
extras_require={
"athena": ["pyathena>=1.10.8,<1.11"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,20 @@ describe('Time range filter', () => {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@postJson' });

cy.get('[data-test=time_range]').within(() => {
cy.get('span.label').click();
});

cy.get('#filter-popover').within(() => {
cy.get('div.ant-tabs-tabpane-active').within(() => {
cy.get('div.PopoverSection :not(.dimmed)').within(() => {
cy.get('[data-test=time-range-trigger]')
.click()
.then(() => {
cy.get('.ant-modal-footer')
.find('button')
.its('length')
.should('eq', 3);
cy.get('.ant-modal-body').within(() => {
cy.get('input[value="100 years ago"]');
cy.get('input[value="now"]');
});
cy.get('[data-test=modal-cancel-button]').click();
cy.get('[data-test=time-range-modal]').should('not.be.visible');
});
});
cy.get('#filter-popover button').contains('Ok').click();
cy.get('#filter-popover').should('not.be.visible');
});
});

Expand Down
3 changes: 3 additions & 0 deletions superset-frontend/src/common/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ export {
Avatar,
Button,
Card,
Col,
DatePicker,
Divider,
Dropdown,
Empty,
Input,
InputNumber,
Modal,
Popover,
Radio,
Row,
Select,
Skeleton,
Switch,
Expand Down
Loading