Skip to content

Add Tenant Information panel to Data Dictionary#28

Open
dauglyon wants to merge 6 commits intomainfrom
feat/tenant-info-panel
Open

Add Tenant Information panel to Data Dictionary#28
dauglyon wants to merge 6 commits intomainfrom
feat/tenant-info-panel

Conversation

@dauglyon
Copy link
Copy Markdown
Collaborator

@dauglyon dauglyon commented Mar 25, 2026

image

Summary

  • New tenant-detail server endpoint that fetches tenant metadata, stewards, and members from MMS via governance_client
  • Tenant Information panel in Data Dictionary tabs showing name, description, data steward(s), and members
  • Colorblind-safe filled/hollow dots for read_write vs read_only member access
  • Falls back to mock data when governance_client is unavailable (local dev)

Test plan

  • Open Data Dictionary for a tenant — verify info panel renders
  • Open Data Dictionary for User Data — verify no info panel
  • Verify mock data in local dev
  • Verify existing tree browser and table/schema flows are unaffected

Add a new tenant detail endpoint and UI panel that displays tenant
metadata, data stewards, and members in the Data Dictionary tabs.

Server extension:
- New GET /api/tenant-data-browser/tenant-detail?tenant=<name> endpoint
- Calls governance_client directly via berdl_notebook_utils, falls back
  to mock data when not available
- Mock tenant details for kbase, globalusers, and demo tenants

Frontend:
- TenantInfo component with four info cards: tenant name, description,
  data steward(s), and members list
- Members show colorblind-safe filled/hollow dots for read_write vs
  read_only access levels with tooltips
- Panel only renders for tenant-scoped tabs (not User Data)
- TypeScript interfaces matching TenantDetailResponse shape
@github-actions
Copy link
Copy Markdown

Prerelease: pr-28

Wheel will be attached once the build completes. Updated on each push.

Copy link
Copy Markdown

@Tianhao-Gu Tianhao-Gu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Comment on lines +75 to +102
from berdl_notebook_utils import get_governance_client
from governance_client.api.tenants import (
get_tenant_detail_tenants_tenant_name_get,
)
from governance_client.models import ErrorResponse
logger.info("Using governance_client for tenant details")

def get_tenant_detail(tenant_name, return_json=False):
import json
client = get_governance_client()
response = get_tenant_detail_tenants_tenant_name_get.sync(
tenant_name=tenant_name,
client=client,
)
if isinstance(response, ErrorResponse):
raise RuntimeError(
f"get_tenant_detail returned an error: {response.message}"
)
if response is None:
raise RuntimeError(
f"get_tenant_detail returned no response for tenant: {tenant_name}"
)
result = response.to_dict()
if return_json:
return json.dumps(result)
return result

return get_tenant_detail
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants