Skip to content

feat: add dashboards feature with draggable chart widgets#1552

Merged
gugu merged 9 commits intomainfrom
feat/dashboards-feature
Feb 5, 2026
Merged

feat: add dashboards feature with draggable chart widgets#1552
gugu merged 9 commits intomainfrom
feat/dashboards-feature

Conversation

@gugu
Copy link
Contributor

@gugu gugu commented Feb 2, 2026

  • Add dashboards list page with search, create, edit, delete functionality
  • Add dashboard view with Gridster-based drag/resize grid for charts
  • Add chart widget renderer using ng2-charts (bar, line, pie, doughnut, polar)
  • Add widget edit dialog for adding charts linked to saved queries
  • Add dashboards service with rxResource for reactive data fetching
  • Replace Charts nav tab with Dashboards tab
  • Add link to manage saved queries from dashboards page

gugu and others added 3 commits February 2, 2026 20:30
- Add dashboards list page with search, create, edit, delete functionality
- Add dashboard view with Gridster-based drag/resize grid for charts
- Add chart widget renderer using ng2-charts (bar, line, pie, doughnut, polar)
- Add widget edit dialog for adding charts linked to saved queries
- Add dashboards service with rxResource for reactive data fetching
- Replace Charts nav tab with Dashboards tab
- Add link to manage saved queries from dashboards page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Refactor widget to only contain positioning data (position_x, position_y, width, height, query_id)
- Move widget display properties (widget_type, chart_type, widget_options) to SavedQuery
- Add dashboard-widget component to handle data fetching and widget rendering
- Display widget name from saved query in widget header
- Add drag and resize support for widgets in edit mode using angular-gridster2 v20
- Add "Label Type" option for bar/line charts with "Values" and "Datetime" options
- Update all widget renderer tests to use new structure with preloaded data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gugu gugu requested a review from lyubov-voloshko February 3, 2026 20:16
- Separate chart configuration from preview section in chart-edit
- Add "Configure Chart" link to dashboard widget menu
- Rename "Edit" to "Change Query" for clarity
- Add time-based X axis for datetime label type with gap support
- Install chartjs-adapter-date-fns for Chart.js time scale

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gugu gugu marked this pull request as ready for review February 4, 2026 08:36
Copilot AI review requested due to automatic review settings February 4, 2026 08:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive dashboards feature enabling users to create custom dashboards with draggable/resizable chart widgets powered by Gridster2. The implementation replaces the "Charts" navigation tab with "Dashboards" and adds reactive data fetching using Angular's rxResource.

Changes:

  • Added dashboards management UI with list, create, edit, and delete functionality
  • Implemented dashboard view with Gridster2-based drag-and-drop grid for chart widgets
  • Added chart widget renderers supporting multiple chart types (bar, line, pie, doughnut, polar) with datetime scale support
  • Added reactive dashboards service using rxResource for efficient data fetching
  • Updated navigation to replace "Charts" tab with "Dashboards"

Reviewed changes

Copilot reviewed 58 out of 59 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/yarn.lock Added angular-gridster2 and chartjs-adapter-date-fns dependencies
frontend/package.json Updated package.json with new gridster and chart adapter dependencies
frontend/src/app/services/dashboards.service.ts New service implementing reactive dashboard/widget CRUD with rxResource
frontend/src/app/services/connections.service.ts Updated visible tabs to replace 'charts' with 'dashboards'
frontend/src/app/services/connections.service.spec.ts Updated tests to reflect 'dashboards' tab name change
frontend/src/app/models/saved-query.ts Extended SavedQuery model with widget configuration fields
frontend/src/app/models/dashboard.ts New model definitions for dashboards and widgets
frontend/src/app/components/dashboards/* New dashboard components for list, view, edit, delete, and widget management
frontend/src/app/components/dashboards/widget-renderers/* New widget renderer components for chart, table, counter, and text widgets
frontend/src/app/components/charts/chart-preview/chart-preview.component.ts Enhanced chart preview with datetime scale support
frontend/src/app/components/charts/chart-edit/chart-edit.component.ts Extended chart editor to save widget configuration with queries
frontend/src/app/app.component.ts Updated navigation tab caption from 'Charts' to 'Dashboards'
frontend/src/app/app-routing.module.ts Added new routes for dashboards list and dashboard view

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

action: 'Dashboards: add widget dialog opened',
});

const result = await dialogRef.afterClosed().toPromise();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toPromise() method is deprecated in RxJS. Use firstValueFrom() or lastValueFrom() from 'rxjs' instead. For dialog results, firstValueFrom() is appropriate.

Copilot uses AI. Check for mistakes.
action: 'Dashboards: edit widget dialog opened',
});

const result = await dialogRef.afterClosed().toPromise();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toPromise() method is deprecated in RxJS. Use firstValueFrom() or lastValueFrom() from 'rxjs' instead. For dialog results, firstValueFrom() is appropriate.

Copilot uses AI. Check for mistakes.
action: 'Dashboards: delete widget dialog opened',
});

const result = await dialogRef.afterClosed().toPromise();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toPromise() method is deprecated in RxJS. Use firstValueFrom() or lastValueFrom() from 'rxjs' instead. For dialog results, firstValueFrom() is appropriate.

Copilot uses AI. Check for mistakes.
gugu and others added 3 commits February 5, 2026 13:16
Add provideCharts(withDefaultRegisterables()) to test providers to fix
"bar is not a registered controller" error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gugu gugu enabled auto-merge (squash) February 5, 2026 13:56
gugu and others added 2 commits February 5, 2026 14:14
The component now includes label_type: 'values' in widget_options
for bar/line charts by default.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gugu gugu merged commit 468d78a into main Feb 5, 2026
15 checks passed
@gugu gugu deleted the feat/dashboards-feature branch February 5, 2026 14:20
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.

1 participant