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

Implement dashboard generation from built-in templates #119

Merged
merged 12 commits into from
Jun 25, 2022

Conversation

jonathansick
Copy link
Member

This PR reimplements dashboard generation for LTD Keeper v2. This functionality was originally part of LTD Dasher. Since LTD Keeper v2 now support multiple missions, the dashboard generation code is being moved into LTD Keeper itself for easier maintainability.

The ultimate intent is for each organization to develop and configure their own dashboard HTML templates and assets. The default template though, will be built-in. This PR implements that BuiltinTemplateProvider and also enables us to develop other infrastructure related to dashaboard templates such as Jinja context objects and S3 uploading.

This is the first sketch of a dashboard generation service+domain
implementation in LTD Keeper itself.

- BuiltinTemplateProvider coordinates built-in templates; when we
  implement S3-based templates we'll create an S3TemplateProvider with a
  similar API.
- Context provides dataclass instances that provide information for the
  dashboard that are adapted from the DB models.
We're using ltd-conveyor's s3 functions for uploading objects and
directories.
@jonathansick jonathansick force-pushed the u/jsickcodes/builtin-dashboard branch 2 times, most recently from 4b2e0ba to 0fdb8e4 Compare June 16, 2022 04:38
This fixes some upload issues we found for individual objects into the
bucket.
You can now see the dashboard built with mock data in dashboard_dev/ by
running the test_dashboard_template.py module. This enables you to
quickly refine the built-in template.
@jonathansick jonathansick force-pushed the u/jsickcodes/builtin-dashboard branch from e02282f to 42b0ecb Compare June 24, 2022 18:54
@jonathansick jonathansick marked this pull request as ready for review June 24, 2022 18:56
@jonathansick jonathansick force-pushed the u/jsickcodes/builtin-dashboard branch from 42b0ecb to 11229f6 Compare June 24, 2022 19:12
Normally main editions should be marked with EditionKind.main, however
if they aren't these extra tests ensure they don't appear in the
releases or drafts lists.
@jonathansick jonathansick merged commit a027c32 into main Jun 25, 2022
@jonathansick jonathansick deleted the u/jsickcodes/builtin-dashboard branch June 25, 2022 01:49
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 this pull request may close these issues.

None yet

1 participant