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: import dasboard changes for UI de-clutter #947

Merged
merged 10 commits into from
Sep 24, 2024
6 changes: 4 additions & 2 deletions tutoraspects/asset_command_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ def process(self, content: dict, existing: dict):
if not metric.get("verbose_name"):
metric["verbose_name"] = metric["metric_name"].replace("_", " ").title()

content["sql"] = format_string(
content["sql"], mode=Mode(dialect_name="clickhouse")
content["sql"] = (
format_string(content["sql"], mode=Mode(dialect_name="clickhouse"))
if "filter indent" not in content["sql"]
else content["sql"]
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ params:
groupby:
- course_name
- org
- expressionType: SQL
label: More details
sqlExpression: |-
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_name', 'IfS-Rd0ZS') }}{% endraw %}
metrics:
- enrollees
- active_count
Expand All @@ -38,15 +42,14 @@ params:
percent_metrics: []
query_mode: aggregate
row_limit: 50000
server_page_length: 10
show_cell_bars: false
table_timestamp_format: smart_date
temporal_columns_lookup: {}
time_grain_sqla: P1M
viz_type: table
query_context:
datasource:
id: 221
id: 651
type: table
force: false
form_data:
Expand All @@ -71,13 +74,17 @@ query_context:
truncateLongCells: true
conditional_formatting: []
dashboards:
- 3141
datasource: 221__table
- 355
datasource: 651__table
extra_form_data: {}
force: false
groupby:
- course_name
- org
- expressionType: SQL
label: More details
sqlExpression: |-
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_name', 'IfS-Rd0ZS') }}{% endraw %}
metrics:
- enrollees
- active_count
Expand All @@ -89,9 +96,8 @@ query_context:
result_format: json
result_type: full
row_limit: 50000
server_page_length: 10
show_cell_bars: false
slice_id: 1181
slice_id: 1298
table_timestamp_format: smart_date
temporal_columns_lookup: {}
time_grain_sqla: P1M
Expand All @@ -102,6 +108,10 @@ query_context:
columns:
- course_name
- org
- expressionType: SQL
label: More details
sqlExpression: |-
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_name', 'IfS-Rd0ZS') }}{% endraw %}
custom_form_data: {}
custom_params: {}
extras:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ params:
groupby:
- course_run
- course_name
- expressionType: SQL
label: More details
sqlExpression: |
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_run', 'w863AfFgi') }}{% endraw %}
metrics:
- active_count
- tag_list
Expand All @@ -38,15 +42,14 @@ params:
percent_metrics: []
query_mode: aggregate
row_limit: 50000
server_page_length: 10
show_cell_bars: false
table_timestamp_format: smart_date
temporal_columns_lookup: {}
time_grain_sqla: P1M
viz_type: table
query_context:
datasource:
id: 221
id: 651
type: table
force: false
form_data:
Expand All @@ -71,13 +74,17 @@ query_context:
truncateLongCells: true
conditional_formatting: []
dashboards:
- 3141
datasource: 221__table
- 355
datasource: 651__table
extra_form_data: {}
force: false
groupby:
- course_run
- course_name
- expressionType: SQL
label: More details
sqlExpression: |
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_run', 'w863AfFgi') }}{% endraw %}
metrics:
- active_count
- tag_list
Expand All @@ -89,9 +96,8 @@ query_context:
result_format: json
result_type: full
row_limit: 50000
server_page_length: 10
show_cell_bars: false
slice_id: 1381
slice_id: 1286
table_timestamp_format: smart_date
temporal_columns_lookup: {}
time_grain_sqla: P1M
Expand All @@ -102,6 +108,10 @@ query_context:
columns:
- course_run
- course_name
- expressionType: SQL
label: More details
sqlExpression: |
{% raw %}{{ get_filtered_dashboard_link('course-dashboard', 'course_run', 'w863AfFgi') }}{% endraw %}
custom_form_data: {}
custom_params: {}
extras:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ _file_name: Course_Information_fa249d.yaml
cache_timeout: null
certification_details: null
certified_by: null
dataset_uuid: 633a1d4e-cd40-482f-a5dc-d5901c2181c2
dataset_uuid: f25fdc4e-ce79-4f4c-9fc6-3dfe91690493
description: null
params:
adhoc_filters:
Expand All @@ -12,6 +12,7 @@ params:
operator: TEMPORAL_RANGE
subject: enrolled_at
all_columns: []
annotation_layers: []
color_pn: true
column_config:
Avg Course Grade:
Expand All @@ -22,14 +23,9 @@ params:
d3SmallNumberFormat: ~g
conditional_formatting:
- colorScheme: '#ACE1C4'
column: graded_learners
operator: '>'
column: active_within
operator: "\u2265"
targetValue: 0
- colorScheme: '#FDE380'
column: avg_course_grade
operator: "\u2264 x \u2264"
targetValueLeft: '50'
targetValueRight: '70'
- colorScheme: '#EFA1AA'
column: avg_course_grade
operator: <
Expand Down Expand Up @@ -58,6 +54,7 @@ params:
- course_name
- course_run
metrics:
- active_within
- avg_course_grade
- median_course_grade
order_by_cols: []
Expand All @@ -74,7 +71,7 @@ params:
viz_type: table
query_context:
datasource:
id: 54
id: 38
type: table
force: false
form_data:
Expand All @@ -95,14 +92,9 @@ query_context:
d3SmallNumberFormat: ~g
conditional_formatting:
- colorScheme: '#ACE1C4'
column: graded_learners
operator: '>'
column: active_within
operator: "\u2265"
targetValue: 0
- colorScheme: '#FDE380'
column: avg_course_grade
operator: "\u2264 x \u2264"
targetValueLeft: '50'
targetValueRight: '70'
- colorScheme: '#EFA1AA'
column: avg_course_grade
operator: <
Expand All @@ -125,8 +117,8 @@ query_context:
operator: <
targetValue: 50
dashboards:
- 28
datasource: 54__table
- 17
datasource: 38__table
extra_form_data: {}
force: false
groupby:
Expand All @@ -135,6 +127,7 @@ query_context:
- course_name
- course_run
metrics:
- active_within
- avg_course_grade
- median_course_grade
order_by_cols: []
Expand All @@ -146,7 +139,7 @@ query_context:
row_limit: 1000
server_page_length: 10
show_cell_bars: true
slice_id: 5
slice_id: 49
table_timestamp_format: smart_date
temporal_columns_lookup:
enrolled_at: true
Expand All @@ -171,11 +164,12 @@ query_context:
op: TEMPORAL_RANGE
val: No filter
metrics:
- active_within
- avg_course_grade
- median_course_grade
order_desc: true
orderby:
- - avg_course_grade
- - active_within
- false
post_processing: []
row_limit: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ params:
operator: TEMPORAL_RANGE
subject: emission_time
aggregateFunction: Sum
annotation_layers: []
colOrder: key_a_to_z
colSubTotals: false
conditional_formatting: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ params:
operator: TEMPORAL_RANGE
subject: emission_time
aggregateFunction: Sum
annotation_layers: []
colOrder: key_a_to_z
colSubTotals: false
conditional_formatting: []
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
_file_name: Last_Visit_Date_6c2b10.yaml
cache_timeout: null
certification_details: null
certified_by: null
dataset_uuid: 92eadc61-2931-577e-95b7-34adb1a8f515
description: null
params:
adhoc_filters: []
annotation_layers: []
color_scheme: supersetColors
comparison_type: values
extra_form_data: {}
forecastInterval: 0.8
forecastPeriods: 10
groupby: []
legendOrientation: top
legendType: scroll
metrics:
- aggregate: COUNT
column:
advanced_data_type: null
certification_details: null
certified_by: null
column_name: actor_id
description: null
expression: null
filterable: true
groupby: true
id: 13538
is_certified: false
is_dttm: false
python_date_format: null
type: String
type_generic: 1
verbose_name: Actor ID
warning_markdown: null
datasourceWarning: false
expressionType: SIMPLE
hasCustomLabel: true
label: Number of Learners
optionName: metric_orthejcnotd_6ealxq45fqk
sqlExpression: null
only_total: true
order_desc: true
orientation: vertical
rich_tooltip: true
row_limit: 10000
show_empty_columns: true
show_legend: true
sort_series_type: sum
time_grain_sqla: P1D
tooltipTimeFormat: smart_date
truncateXAxis: true
truncate_metric: true
viz_type: echarts_timeseries_bar
xAxisLabelRotation: 45
x_axis: last_visited
x_axis_sort_asc: true
x_axis_sort_series: name
x_axis_sort_series_ascending: true
x_axis_time_format: '%Y-%m-%d'
x_axis_title: Date Visited
x_axis_title_margin: 100
y_axis_bounds:
- null
- null
y_axis_format: SMART_NUMBER
y_axis_title_margin: 15
y_axis_title_position: Left
query_context: null
slice_name: Last Visit Date
uuid: 6c2b1008-96c9-426d-b2fe-68aa1de7b10d
version: 1.0.0
viz_type: echarts_timeseries_bar
Loading
Loading