-
-
Notifications
You must be signed in to change notification settings - Fork 18
reworked ai dashboards generation #1633
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -193,21 +193,19 @@ export class DashboardWidgetController { | |||||
| @ApiOperation({ | ||||||
| summary: 'Generate a full table dashboard using AI', | ||||||
| description: | ||||||
| 'Analyzes a table structure and auto-generates multiple panel configurations for a dashboard using AI', | ||||||
| 'AI autonomously discovers database tables, analyzes their structure, and auto-generates multiple panel configurations for a dashboard', | ||||||
| }) | ||||||
| @ApiResponse({ | ||||||
| status: 201, | ||||||
| description: 'Dashboard with panels generated by AI and saved to database.', | ||||||
| }) | ||||||
| @ApiBody({ type: GenerateTableDashboardWithAiDto }) | ||||||
| @ApiParam({ name: 'connectionId', required: true }) | ||||||
| @ApiQuery({ name: 'tableName', required: true, description: 'The table name to generate the dashboard for' }) | ||||||
| @UseGuards(ConnectionEditGuard) | ||||||
| @Timeout(TimeoutDefaults.AI) | ||||||
| @Post('/dashboard/generate-table-dashboard/:connectionId') | ||||||
| async generateTableDashboardWithAi( | ||||||
| @SlugUuid('connectionId') connectionId: string, | ||||||
| @Query('tableName') tableName: string, | ||||||
| @MasterPassword() masterPwd: string, | ||||||
| @UserId() userId: string, | ||||||
| @Body() generateDto: GenerateTableDashboardWithAiDto, | ||||||
|
|
@@ -216,10 +214,9 @@ export class DashboardWidgetController { | |||||
| connectionId, | ||||||
| masterPassword: masterPwd, | ||||||
| userId, | ||||||
| table_name: tableName, | ||||||
| max_panels: generateDto.max_panels, | ||||||
| dashboard_name: generateDto.dashboard_name, | ||||||
| }; | ||||||
| return await this.generateTableDashboardWithAiUseCase.execute(inputData, InTransactionEnum.ON); | ||||||
| return await this.generateTableDashboardWithAiUseCase.execute(inputData, InTransactionEnum.OFF); | ||||||
|
||||||
| return await this.generateTableDashboardWithAiUseCase.execute(inputData, InTransactionEnum.OFF); | |
| return await this.generateTableDashboardWithAiUseCase.execute(inputData, InTransactionEnum.ON); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking API change. The endpoint previously required a
tableNamequery parameter and now it doesn't. Any existing API clients that call this endpoint with the tableName parameter will need to be updated. Consider documenting this breaking change in release notes or providing backward compatibility if needed.