Skip to content

feat(quotas): service-grouped collapsible quotas page#1309

Merged
yahyafakhroji merged 3 commits into
mainfrom
feat/quotas-service-grouping
Jun 10, 2026
Merged

feat(quotas): service-grouped collapsible quotas page#1309
yahyafakhroji merged 3 commits into
mainfrom
feat/quotas-service-grouping

Conversation

@yahyafakhroji

@yahyafakhroji yahyafakhroji commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Quotas — service-grouped, collapsible, searchable

Renders the Quotas page (org + project) as collapsible groups by owning service (Networking / DNS / Platform Core / Organization & Projects / Notes / …) with human-readable names, descriptions, and a GCP-style usage layout — instead of a flat list of raw CRD resourceType keys.

Before → After

  • Before: one undifferentiated table of raw keys like networking.datumapis.com/httpproxies, no names, no descriptions, no grouping.
  • After: each quota shows its display name + description, grouped under its owning service in a collapsible section with a per-group resource count and a near-limit warning badge. Usage and % are split into dedicated columns, with search across names and resource types.

How it works

  • Data layer — platform-root fetch fix. ResourceRegistration is cluster-scoped with a Platform parent-context, so it is served only at the platform API root; the previous org/project-scoped query returned an empty list (leaving every quota ungrouped). We now list once at the platform root and join to the scoped AllowanceBuckets by resourceType. The adapter/schema are widened to surface kubernetes.io/display-name / kubernetes.io/description annotations and the services.miloapis.com/owner label (and to tolerate the upstream Feature enum the codegen hasn't caught up with).
  • Resolve names + group. An interim service → displayName map (+ a resourceType bridge for registrations that haven't adopted the owner label yet) lives in service-catalog.ts until the milo service-catalog becomes the source of truth. quotas-grouping.ts groups A→Z with "Other" last; items sort by % used desc (at-risk first), ties broken by name.
  • Render. datum-ui v1.2.0 GroupedTable with GCP-style split columns (Resource · Usage · % Used · action), collapsible groups defaulting to expanded, and the >90% "Request Limit" action. Visual parity with Table.Client is achieved via two new shared primitives — sortableHeader (the chevron sort header) and a controlled TableSearch — exported from app/components/table, plus scoped custom.css rules that mirror the existing dt-* look. All existing data-e2e hooks preserved.

Refs

Preview

Screen.Recording.2026-06-10.at.10.38.25.mov

@github-actions

Copy link
Copy Markdown

🧪 Test Summary

Job Status
Bun Unit Tests ✅ success
E2E Regression (0) ⏭️ pending
E2E Regression (1) ⏭️ pending
E2E Regression (2) ⏭️ pending
E2E Regression (3) ⏭️ pending
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

Videos and screenshots from failed E2E tests:

@github-actions

Copy link
Copy Markdown

🧪 Test Summary

Job Status
Bun Unit Tests ✅ success
E2E Regression (0) ⏭️ pending
E2E Regression (1) ⏭️ pending
E2E Regression (2) ⏭️ pending
E2E Regression (3) ⏭️ pending
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

Videos and screenshots from failed E2E tests:

@yahyafakhroji yahyafakhroji force-pushed the feat/quotas-service-grouping branch 2 times, most recently from ae88c26 to fe541bd Compare June 10, 2026 03:35
@yahyafakhroji yahyafakhroji marked this pull request as ready for review June 10, 2026 03:35
@yahyafakhroji yahyafakhroji force-pushed the feat/quotas-service-grouping branch from fe541bd to d2b7ca6 Compare June 10, 2026 03:38
@yahyafakhroji yahyafakhroji requested a review from a team June 10, 2026 03:41
…tadata

ResourceRegistration is cluster-scoped with a Platform parent-context, so it
is served only at the platform API root — an org/project-scoped query returned
an empty list, leaving every quota ungrouped under raw resourceType keys. List
once at the platform root instead.

Enrich the adapter to surface display-name/description annotations and the
services.miloapis.com/owner label, and widen the schema's type union to
tolerate the upstream Feature enum the codegen hasn't caught up with.
Add a reusable `sortableHeader` column-def factory that renders the same
chevron SortableHeader Table.Client applies via useResolvedColumns, plus a
standalone controlled `TableSearch` matching the Table.Client search visual.
Both are surfaced through the table barrel so tables that don't run the
Table.Client pipeline (e.g. datum-ui's GroupedTable) can reuse the same sort
and search affordances.
Replace the flat raw-resourceType quota list with a service-grouped,
collapsible GroupedTable. Adds quotas-grouping (alphabetical groups, Other
last; items by usage desc) and an interim service-catalog mapping owner/
resourceType to human-readable group names until the milo service-catalog
ships.

The table mirrors Table.Client's look via the shared sortableHeader and a
controlled TableSearch, splits usage and %-used into GCP-style columns,
wraps long descriptions, and badges resource counts + near-limit warnings on
each group header. Both org and project quota routes now pass the full
registrations map. Bumps @datum-cloud/datum-ui to ^1.2.0 for GroupedTable
className slots.
@yahyafakhroji yahyafakhroji self-assigned this Jun 10, 2026
@yahyafakhroji yahyafakhroji force-pushed the feat/quotas-service-grouping branch from d2b7ca6 to 23f2544 Compare June 10, 2026 03:42
@github-actions

Copy link
Copy Markdown

🧪 Test Summary

Job Status
Bun Unit Tests ✅ success
E2E Regression (0) ⏭️ pending
E2E Regression (1) ⏭️ pending
E2E Regression (2) ⏭️ pending
E2E Regression (3) ⏭️ pending
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

📎 Artifacts

Videos and screenshots from failed E2E tests:

@yahyafakhroji yahyafakhroji merged commit f2522d4 into main Jun 10, 2026
18 checks passed
@yahyafakhroji yahyafakhroji deleted the feat/quotas-service-grouping branch June 10, 2026 05:18
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.

3 participants