This pull request includes several changes to improve tenant handling, enhance error handling, and update configuration settings. The most important changes include modifications to tenant filtering, error handling in API calls, and updates to the .env file to reflect the new configuration settings.
.env: Removed unused Vue app configuration parameters and updated database connection settings for the Node.js server.
Code Refactoring:
src/api/FileUsageStorage.ts: Refactored file path generation logic to include the team name if provided and updated methods to handle team-specific file names. [1][2]
This pull request includes several changes to improve tenant handling, enhance error handling, and update configuration settings. The most important changes include modifications to tenant filtering, error handling in API calls, and updates to the
.env
file to reflect the new configuration settings.Tenant Handling Improvements:
src/api/CopilotSeatStorageService.ts
: Added tenant filtering logic to filter seats by the assigned team if the tenant's team is specified.src/api/FileTenantStorage.ts
: Updated tenant comparison logic to be case-insensitive and added a method to remove tenant data. [1] [2]Error Handling Enhancements:
src/api/GitHubApi_copilot_seat.ts
: Added error handling to return an emptyTotalSeats
object if an error occurs while fetching copilot seat data.src/api/GitHubApi_copilot_usage.ts
: Improved error handling ingetMetricsApi
to return an empty array if the GitHub API call fails.Configuration Updates:
.env
: Removed unused Vue app configuration parameters and updated database connection settings for the Node.js server.Code Refactoring:
src/api/FileUsageStorage.ts
: Refactored file path generation logic to include the team name if provided and updated methods to handle team-specific file names. [1] [2]API Service Updates:
src/api/CopilotServiceFactory.ts
: Simplified thecreateUsageService
method to require a tenant parameter and removed the scopeName parameter. [1] [2]