Skip to content

Feature/admin cli sla tracking contract analytics 526 536 542 577#697

Open
toni-toni2 wants to merge 4 commits into
SoroScan:mainfrom
toni-toni2:feature/admin-cli-sla-tracking-contract-analytics-526-536-542-577
Open

Feature/admin cli sla tracking contract analytics 526 536 542 577#697
toni-toni2 wants to merge 4 commits into
SoroScan:mainfrom
toni-toni2:feature/admin-cli-sla-tracking-contract-analytics-526-536-542-577

Conversation

@toni-toni2
Copy link
Copy Markdown

feat: add admin CLI commands, SLA event completeness tracking, contract comparison view, and real-time event rate meter (#526 #536 #542 #577)

closes #526
closes #536
closes #542
closes #577

- create_organization: create new organization with name, owner, slug, quota
- add_user_to_org: add user to organization with role (owner/admin/member)
- reset_api_key: reset/rotate API key for a user
- generate_invoice: generate invoice for organization with amount, dates, line items

All commands include help text and confirmation/error messages.
- Added ContractCompletenessSLA and SLAAlert models (in migration 0042)
- Added calculate_sla management command to compute hourly SLA %
- Added SLA alerts when violation detected (<95% threshold)
- Added sla_metrics_view API endpoint for dashboard
- Added admin frontend dashboard for SLA visibility
- Added tests for SLA models, command, and API endpoint

Acceptance Criteria:
✓ Missing event detection (compares expected vs indexed events)
✓ SLA % calculated hourly (processes hourly buckets)
✓ Alerts when SLA violated (creates SLAAlert records)
✓ Dashboard for visibility (admin/frontend page with charts and table)
, SoroScan#577)

- Added GET_CONTRACT_RATE_QUERY to contract-graphql.ts for fetching contract event rate data
- Added listWebhooks function to contract-graphql.ts for fetching webhook subscriptions
- Created EventRateMeter component that displays real-time event ingestion rate as a gauge
- Added tests for EventRateMeter component covering loading, error, and various rate scenarios
- Created contract detail page ([id]/page.tsx) that displays contract information and EventRateMeter
- Created contract comparison page (compare/page.tsx) for side-by-side comparison of two contracts
- Comparison view shows event counts, webhook subscriptions, and activity patterns with diff highlighting
- Added proper loading and error states throughout

Issue SoroScan#542: Contract Comparison View
- Comparison view created
- Can select 2 contracts
- Side-by-side display
- Diff highlighting

Issue SoroScan#577: Contract Event Rate Meter
- Gauge component created
- Real-time updates (via Apollo polling)
- Threshold indicators (green/yellow/red based on 80%/100% of max rate)
- Tests verify updates
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@toni-toni2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Contract Event Rate Meter Contract Comparison View Event Completeness SLA Tracking Admin Dashboard CLI Commands

1 participant