Skip to content

Commit

Permalink
add 30 minutes support under time granularity (apache#4954)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuance authored and timifasubaa committed May 31, 2018
1 parent 9b843fa commit 6b0d18c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions superset/assets/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ export const controls = {
['PT30S', '30 seconds'],
['PT1M', '1 minute'],
['PT5M', '5 minutes'],
['PT30M', '30 minutes'],
['PT1H', '1 hour'],
['PT6H', '6 hour'],
['P1D', '1 day'],
Expand Down
5 changes: 3 additions & 2 deletions superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ def full_name(self):
def time_column_grains(self):
return {
'time_columns': [
'all', '5 seconds', '30 seconds', '1 minute',
'5 minutes', '1 hour', '6 hour', '1 day', '7 days',
'all', '5 seconds', '30 seconds', '1 minute', '5 minutes'
'30 minutes', '1 hour', '6 hour', '1 day', '7 days',
'week', 'week_starting_sunday', 'week_ending_saturday',
'month',
],
Expand Down Expand Up @@ -762,6 +762,7 @@ def granularity(period_name, timezone=None, origin=None):
'30 seconds': 'PT30S',
'1 minute': 'PT1M',
'5 minutes': 'PT5M',
'30 minutes': 'PT30M',
'1 hour': 'PT1H',
'6 hour': 'PT6H',
'one day': 'P1D',
Expand Down

0 comments on commit 6b0d18c

Please sign in to comment.