tech_lead / coder 2roles
This commit is contained in:
@@ -2,37 +2,24 @@
|
||||
|
||||
## Entities
|
||||
|
||||
### Dashboard
|
||||
Represents a Superset dashboard with extended metadata for migration selection.
|
||||
### DashboardMetadata
|
||||
**Source**: Superset API (`/api/v1/dashboard/`)
|
||||
**Purpose**: Represents a dashboard available for migration.
|
||||
|
||||
| Field | Type | Description | Source |
|
||||
|-------|------|-------------|--------|
|
||||
| `id` | `int` | Unique identifier | Superset API |
|
||||
| `title` | `string` | Display name of the dashboard | Superset API (`dashboard_title`) |
|
||||
| `changed_on` | `datetime` | Last modification timestamp (UTC) | Superset API (`changed_on_utc`) |
|
||||
| `published` | `boolean` | Publication status (True=Published, False=Draft) | Superset API |
|
||||
| `url` | `string` | Link to the dashboard (optional, for preview) | Superset API (`url`) |
|
||||
| Field | Type | Description | Source Mapping |
|
||||
|-------|------|-------------|----------------|
|
||||
| `id` | Integer | Unique identifier | `id` |
|
||||
| `title` | String | Display name of the dashboard | `dashboard_title` |
|
||||
| `last_modified` | String (ISO 8601) | Timestamp of last modification | `changed_on_utc` |
|
||||
| `status` | Enum ('published', 'draft') | Publication status | `published` (boolean) -> 'published'/'draft' |
|
||||
|
||||
## Value Objects
|
||||
|
||||
### DashboardSelection
|
||||
State of the user's selection in the grid.
|
||||
**Purpose**: Represents the user's selection of dashboards to migrate.
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `selected_ids` | `Set<int>` | IDs of selected dashboards |
|
||||
| `is_all_selected` | `boolean` | Helper for "Select All" logic (optional) |
|
||||
|
||||
## Component State (Frontend)
|
||||
|
||||
### DashboardGrid
|
||||
State managed within the Svelte component.
|
||||
|
||||
| State | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `dashboards` | `Array<Dashboard>` | Full list of fetched dashboards |
|
||||
| `filtered_dashboards` | `Array<Dashboard>` | List after applying text filter |
|
||||
| `paginated_dashboards` | `Array<Dashboard>` | Slice of filtered list for current view |
|
||||
| `filter_text` | `string` | Current search query |
|
||||
| `sort_by` | `string` | Column key to sort by (`title`, `changed_on`, `published`) |
|
||||
| `sort_asc` | `boolean` | Sort direction |
|
||||
| `page` | `int` | Current page number (0-indexed) |
|
||||
| `page_size` | `int` | Items per page (default 20) |
|
||||
| `selected_ids` | List[Integer] | List of dashboard IDs selected for migration |
|
||||
| `source_env_id` | String | ID of the source environment |
|
||||
| `target_env_id` | String | ID of the target environment |
|
||||
Reference in New Issue
Block a user