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

[TECH DEBT] Move create_dashboards to DashboardMetadata.as_lakeview #215

Closed
JCZuurmond opened this issue Jul 11, 2024 · 0 comments · Fixed by #216
Closed

[TECH DEBT] Move create_dashboards to DashboardMetadata.as_lakeview #215

JCZuurmond opened this issue Jul 11, 2024 · 0 comments · Fixed by #216

Comments

@JCZuurmond
Copy link
Member

It looks like the entire create_dashboard method from here should be converted to a method on DashboardMetadata:

def as_lakeview(self) -> Dashboard:
  self.validate()
  datasets = self.get_datasets() # make get_datasets private
  layouts = self.get_layouts() # make get_layouts private
  page = Page(
    name=dashboard_metadata.display_name,
    display_name=dashboard_metadata.display_name,
    layout=layouts,
  )
  return Dashboard(datasets=datasets, pages=[page])

Originally posted by @nfx in #210 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant