Add Tenant Information panel to Data Dictionary#28
Open
Conversation
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
|
Prerelease: pr-28 Wheel will be attached once the build completes. Updated on each push. |
Tianhao-Gu
approved these changes
Mar 26, 2026
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 |
There was a problem hiding this comment.
we could also use the notebook method - but this is also working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan