fix: "Check Quota Now" button not refreshing UI after polling (#42)
* feat: add React Query hooks for managing cloud accounts and update the generated route tree. * feat: implement React Query hooks for comprehensive cloud account management. * fix(cloud-accounts): add error handling to force poll mutation Add an onError handler to log failures when forcing a cloud monitor poll, improving debuggability. * fix: add error handling for cloud account polling failure Add error toast notification when force polling fails, providing localized error message to improve user feedback. * refactor: remove error logging from force poll cloud monitor hook The onError handler was removed as error handling is now managed at a higher level in the application. This simplifies the hook and prevents duplicate error logging. * fix(localization): add missing pollFailed translation keys Add missing English and Chinese translations for the 'pollFailed' error message used when quota polling fails for all accounts. * fix(CloudAccountList): prevent duplicate force poll requests Add guard clause to disable button while mutation is pending to avoid duplicate API calls. * fix: ensure UI updates after cloud quota poll and refresh * chore: remove "peer": true flags from package-lock.json --------- Co-authored-by: Draculabo <[email protected]>
This commit is contained in:
1 parent
5a2168030e
commit
e959ee346e
7 files changed
+21
-217
No files matched your search
@@ -53,6 +53,7 @@ export class CloudMonitorService {
|
||||
|
||||
// 3. Update DB
|
||||
await CloudAccountRepo.updateQuota(account.id, quota);
|
||||
await CloudAccountRepo.updateLastUsed(account.id);
|
||||
} catch (error) {
|
||||
logger.error(`Monitor: Failed to update ${account.email}`, error);
|
||||
// Could mark status as 'error' or 'rate_limited' if 429
|
||||
|
||||
Reference in new issue
Block a user