lablup / lablup/backend.ai

Add dashboard/panel/scope-link tables, models, and seed

Open
#12,605 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
15h 13m
Merged PRs (30d)
368

Description

Three tables managed independently of the metric catalog:
- dashboard {id, title, metadata}
- panel {id, dashboard_id (FK), title, prometheus_query_preset_id, rank} - dashboard 1:N panel
- scope_dashboard_link {scope_type, dashboard_id}

Repository provides get_dashboard_for_scope(scope_type) returning the linked dashboard + rank-ordered panels. Seed a default dashboard + panels + link.

Panel query/display attributes (mode, unit) are owned by the referenced preset; viz is out of scope for now. One dashboard per scope_type (scope_type is the link PK). Panel FK cascades on dashboard delete.

Success Criteria:
- [ ] Migration creates dashboard/panel/link tables with the 1:N and link relations
- [ ] Seed: a default dashboard with >=1 rank-ordered panel linked to a scope_type
- [ ] get_dashboard_for_scope(scope_type) returns the dashboard with panels in rank order
- [ ] Deleting a dashboard cascades panels
- [ ] pants test passes for affected packages

JIRA Issue: BA-6751

Contributor guide

Open the contributing guide

Research direction

Start by locating the repository implementation of get_dashboard_for_scope(scope_type) and the migration and seed conventions in the affected packages. Add the dashboard, panel, and scope_dashboard_link tables, default linked data, rank-ordered retrieval, and cascade behavior, then run pants test for the affected packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.