# Data Model: Migration Dashboard Grid ## Entities ### Dashboard Represents a Superset dashboard with extended metadata for migration selection. | 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`) | ### DashboardSelection State of the user's selection in the grid. | Field | Type | Description | |-------|------|-------------| | `selected_ids` | `Set` | 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` | Full list of fetched dashboards | | `filtered_dashboards` | `Array` | List after applying text filter | | `paginated_dashboards` | `Array` | 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) |