[Beta]: Budgets and rate limits alongwith UI and everything#1375
[Beta]: Budgets and rate limits alongwith UI and everything#1375narengogi wants to merge 7 commits into
Conversation
narengogi
commented
Oct 10, 2025
DescriptionMotivationType of Change
How Has This Been Tested?
Screenshots (if applicable)N/A Checklist
Related IssuesN/A Summary By MatterAI
🔄 What ChangedThis pull request introduces a new admin API endpoint and corresponding UI functionality to reset integration rate limits. In 🔍 Impact of the ChangeThese changes empower administrators to directly manage and reset rate limits for specific integrations via the local admin UI, enhancing control over resource consumption. The JSON editor streamlines local configuration management for integrations, including budgets and rate limits. The 📁 Total Files Changed
🧪 Test AddedManual testing is implied for the new admin UI to verify the functionality of the JSON editor, saving integrations, and resetting rate limits. No explicit unit or integration tests were provided for the new backend endpoint or UI logic. 🔒Security VulnerabilitiesThe admin UI in Caution Package Vulnerabilities
Tip Quality Recommendations
Tanka Poem ♫
Sequence DiagramsequenceDiagram
participant AdminUI as Admin UI (index.html)
participant AdminAPI as Admin API (adminRoutesHandler.ts)
participant Cache as Cache Service
AdminUI->>AdminAPI: PUT /admin/integrations/ratelimit/:integrationId/reset (adminApiKey)
Note over AdminAPI: resetIntegrationRateLimitHandler(c)
AdminAPI->>AdminAPI: Get integrationId from c.req.param('integrationId')
AdminAPI->>AdminAPI: Get settings, organisationId, workspaceId
AdminAPI->>AdminAPI: Find rate_limits for integrationId
opt If rate_limits exist
loop For each rateLimit in rate_limits
AdminAPI->>AdminAPI: Generate rateLimitKey(organisationId, rateLimit.type, RateLimiterKeyTypes.INTEGRATION_WORKSPACE, workspaceKey, rateLimit.unit)
AdminAPI->>AdminAPI: Construct finalKey (e.g., {rate:key}:type)
AdminAPI->>Cache: delete(finalKey)
Cache-->>AdminAPI: Deletion confirmation
end
end
AdminAPI-->>AdminUI: 200 OK / Error Response
AdminUI-->>AdminUI: Display success/error alert
|
|
closing as stale |