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(dashboard): library and database types #339

Closed
wants to merge 13 commits into from

Conversation

ecrupper
Copy link
Contributor

Executing on a concept where users can create pages wherein they can look at a collection of repositories at a high level. Below is a simple mock up of the eventual UI:

dashboard_mock

This back-end struct design accounts for a few key features: share-ability, admin access, and customizability.

Share-ability: using a uniquely generated UUID that will serve as the link to the dashboard along with user-specific user.Dashboards we will be able to allow open navigation to any dashboard via a link + easy navigation through the UI via "My Dashboards", much like many group-board applications such as Draw IO, Miro, etc.

Admin Access: since the dashboards will be public and discoverable, it's important to limit update/delete access. This can be done via the Dashboard.Admins field, which holds a slice of user_ids capable of editing the dashboard. There is also auditing in place in the form of created_at, created_by, updated_at, updated_by.

Customizability: choosing to store the dashboard repo collection as a JSON field allows users to customize their "subscription" to that repo, using the Events and Branches field. While it would have been possible to reference repositories in a slice field of repo_ids, that way makes customization to this degree much more challenging.

The server-side implementation is this can be found, in draft form, here

@ecrupper ecrupper requested a review from a team as a code owner December 19, 2023 22:17
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: Patch coverage is 92.38095% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 96.38%. Comparing base (f16c3e4) to head (4e6f169).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
- Coverage   96.54%   96.38%   -0.16%     
==========================================
  Files          69       72       +3     
  Lines        5330     5540     +210     
==========================================
+ Hits         5146     5340     +194     
- Misses        110      126      +16     
  Partials       74       74              
Files Coverage Δ
database/user.go 88.34% <100.00%> (+0.23%) ⬆️
library/dashboard.go 100.00% <100.00%> (ø)
library/dashboard_repo.go 100.00% <100.00%> (ø)
library/user.go 95.37% <54.54%> (-4.63%) ⬇️
database/dashboard.go 84.05% <84.05%> (ø)

@ecrupper
Copy link
Contributor Author

Closing with migration of types -> server: go-vela/server#1028

@ecrupper ecrupper closed this Apr 12, 2024
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