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

Restructure the dashboards to leverage mosaicLayout #18

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

mattmoor
Copy link
Member

@mattmoor mattmoor commented Dec 20, 2023

This layout is more cumbersome because of the requirement to explicitly lay things out, however, this change introduces a number of helper modules to make this a bit more tolerable.

At a high-level, "sections" (our own intermediate concept) produce groupings of tiles laid out relative to (0, 0) with a width of module.width.size (see below).

The modules in ./dashboard/sections group our "widgets" into arrangements of "tiles" (e.g. logs, http, resources) with several special helper modules:

  1. width: This module exists to define a global constant for the dashboard width,
  2. collapsible: This wraps a list of tiles in a "collapsible" region with a title (it automagically figures out the bounding box, to avoid human error here),
  3. layout: This takes a list of "sections" (defined above) and rebases them so that the yPos of each section starts after the preceding section.

This also incorporates a change to give our networking module's DNS constructs unique names, so that we can provision multiple distinct private networks (I hit this creating a small example to test with, and it conflicted with my dev environment).

@mattmoor mattmoor force-pushed the widget-outputs branch 2 times, most recently from 7b40b5c to c7d1b88 Compare December 20, 2023 15:34
This layout is more cumbersome because of the requirement to explicitly lay things out, however, this change introduces a number of helper modules to make this a bit more tolerable.

At a high-level, "sections" (our own intermediate concept) produce groupings of tiles laid out relative to `(0, 0)` with a width of `module.swidth.size` (see below).

The modules in `./dashboard/sections` group our "widgets" into arrangements of "tiles" (e.g. logs, http, resources) with several special helper modules:
1. `width`: This module exists to define a global constant for the dashboard width,
1. `collapsible`: This wraps a list of tiles in a "collapsible" region with a title (it automagically figures out the bounding box, to avoid human error here),
1. `layout`: This takes a list of "sections" (defined above) and rebases them so that the `yPos` of each section starts after the preceding section.

Signed-off-by: Matt Moore <[email protected]>
@imjasonh imjasonh merged commit 763b08d into chainguard-dev:main Dec 20, 2023
19 checks passed
@mattmoor mattmoor deleted the widget-outputs branch December 20, 2023 16:08
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.

2 participants