Skip to content

Commit

Permalink
Fixing the dashboards positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 21, 2016
1 parent f731b4d commit 6c1d985
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions caravel/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def load_world_bank_health_n_pop():
dash.position_json = json.dumps(l, indent=4)
dash.slug = "world_health"

dash.slices = slices
dash.slices = slices[:-1]
db.session.merge(dash)
db.session.commit()

Expand Down Expand Up @@ -649,16 +649,6 @@ def load_birth_names():
defaults,
viz_type="big_number", granularity="ds",
compare_lag="5", compare_suffix="over 5Y")),
Slice(
slice_name="Number of Girls",
viz_type='big_number_total',
datasource_type='table',
table=tbl,
params=get_slice_json(
defaults,
viz_type="big_number_total", granularity="ds",
flt_col_1='gender', flt_eq_1='girl',
subheader='total female participants')),
Slice(
slice_name="Genders",
viz_type='pie',
Expand Down Expand Up @@ -723,6 +713,16 @@ def load_birth_names():
defaults,
viz_type="pivot_table", metrics=['sum__num'],
groupby=['name'], columns=['state'])),
Slice(
slice_name="Number of Girls",
viz_type='big_number_total',
datasource_type='table',
table=tbl,
params=get_slice_json(
defaults,
viz_type="big_number_total", granularity="ds",
flt_col_1='gender', flt_eq_1='girl',
subheader='total female participants')),
]
for slc in slices:
merge_slice(slc)
Expand Down Expand Up @@ -805,6 +805,6 @@ def load_birth_names():
dash.dashboard_title = "Births"
dash.position_json = json.dumps(l, indent=4)
dash.slug = "births"
dash.slices = slices
dash.slices = slices[:-1]
db.session.merge(dash)
db.session.commit()
2 changes: 1 addition & 1 deletion caravel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from sqlalchemy.types import TypeDecorator, TEXT


def flasher(msg, severity):
def flasher(msg, severity=None):
"""Flask's flash if available, logging call if not"""
try:
flash(msg, severity)
Expand Down

0 comments on commit 6c1d985

Please sign in to comment.