Define version 1 of User Dashboard Schema
Overview
We're aiming to define version 1 of a schema and directory structure to define user-defined dashboards. Collaboration on this goal should happen entirely in this issue.
How to use this issue
Discussion should occur in comments and threads.
Directory Structure
- Each project can have multiple dashboards and each dashboard should be contained within its own directory. The root directory should be
.gitlab/product_analytics_dashboards. Example:
.gitlab/product_analytics_dashboards
├── conversion_funnels
│ └── conversion_funnels.yaml
├── demographic_breakdown
│ └── demographic_breakdown.yaml
├── north_star_metrics
└── north_star_metrics.yaml
- Only YAML files are supported.
- The name of the directory should be a unique slug name of the dashboard. We can use that as the URL route.
- Each dashboard folder should at a minimum contain a dashboard definition file. The filename should match the folder name +
.yaml.
Dashboard Definition Example
---
version: '1'
title: North Star Metrics
description: North Star Metrics across all departments for the last 3 quarters.
# Filters are applied to every widget
filters:
timeDimensions:
dateRange:
- '2016-01-01'
- '2016-01-30'
widgets:
- title: Overall Conversion Rate
gridAttributes:
yPos: 4
xPos: 1
width: 12
height: 2
visualization: CubeLineChart
Visualization Definition Example
---
version: '1'
type: LineChart
options:
xAxis
name: Time
type: time
yAxis:
name: Counts
data:
type: Cube
query:
measures:
- Stories.count
dimensions:
- Stories.category
filters:
- member: Stories.isDraft
operator: equals
values:
- 'No'
timeDimensions:
- dimension: Stories.time
# dateRange set by the dashboard filter
granularity: month
limit: 100
offset: 50
order:
Stories.time: asc
Stories.count: desc
timezone: America/Los_Angeles
Edited by Jiaan Louw