-
Notifications
You must be signed in to change notification settings - Fork 17
feat: support system view #2899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2ba9f6a to
9c0016c
Compare
9c0016c to
1ca2e2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds first-class support for “System view” entities across types, schema visualization, diagnostics pages, and summary/info panels.
- Introduces a new EPathTypeSysView and TSysViewDescription types and wires them into existing mappings.
- Extends SchemaViewer (data + columns) and Diagnostics pages to render System views similarly to row tables.
- Adds UI labels and info panel for System view type.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/schema.ts | Adds prepareSystemViewType to format ESysViewType for display. |
| src/types/api/schema/sysView.ts | Introduces TSysViewDescription and ESysViewType union. |
| src/types/api/schema/schema.ts | Adds SysViewDescription to TPathDescription and EPathTypeSysView. |
| src/containers/Tenant/utils/schema.ts | Maps EPathTypeSysView to node type, entity name, and boolean classifiers. |
| src/containers/Tenant/Schema/SchemaViewer/prepareData.ts | Treats System view like a row table for schema preparation. |
| src/containers/Tenant/Schema/SchemaViewer/columns.tsx | Adds getSystemViewColumns. |
| src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.tsx | Chooses System view columns when type is EPathTypeSysView. |
| src/containers/Tenant/ObjectSummary/i18n/en.json | Adds i18n key for “System view type” in Object Summary. |
| src/containers/Tenant/ObjectSummary/ObjectSummary.tsx | Shows System view type in summary via prepareSystemViewType. |
| src/containers/Tenant/Info/i18n/en.json | Adds i18n keys for System view info panel and generic “no data” message. |
| src/containers/Tenant/Info/SystemView/SystemView.tsx | New info panel for System view with type display. |
| src/containers/Tenant/Diagnostics/Overview/Overview.tsx | Renders SystemViewInfo in Overview for system views. |
| src/containers/Tenant/Diagnostics/DiagnosticsPages.ts | Defines SYSTEM_VIEW_PAGES and maps EPathTypeSysView to these pages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
9d166f1 to
0ce0656
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
11 files reviewed, 3 comments
| if (!type) { | ||
| return undefined; | ||
| } | ||
| if (type.startsWith('E')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fragile - would be great if you left some comment what and why is 'E'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment
| const entityName = getEntityName(data?.PathDescription); | ||
|
|
||
| if (!data) { | ||
| return <div className="error">{i18n('no-entity-data', {entityName})}</div>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know we use b() for classes usually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with <Text color='danger'>
Closes #2589
Stand: https://nda.ya.ru/t/dghhH4d_7K8SVn
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 85.40 MB | Main: 85.39 MB
Diff: +7.11 KB (0.01%)
ℹ️ CI Information
Updated On: 2025-09-19 09:23:03 UTC
This PR introduces comprehensive support for YDB system views throughout the embedded UI. System views are dynamically generated database objects that provide access to system information (like partition statistics, node data, query metrics) and differ fundamentally from regular tables - they don't have physical storage, partitions, or tablets since data is computed on-the-fly.
The implementation adds a new path type
EPathTypeSysViewto the schema system and creates dedicated UI components for displaying system view information. Key changes include:TSysViewDescriptioninterface and comprehensiveESysViewTypeunion type covering 34 different system view typesSystemViewInfocomponent displays system view metadata, andObjectSummaryshows system view type informationThe changes follow existing architectural patterns by extending type mappings, column configurations, and component routing to handle the new entity type. The implementation leverages the existing
prepareRowTableSchemafunction for system views since they share similar column structure characteristics with row tables.Important Files Changed
Changed Files
Confidence score: 4/5
Sequence Diagram
sequenceDiagram participant User participant DiagnosticsPages participant Overview participant overviewApi participant SystemViewInfo participant ObjectSummary participant SchemaViewer User->>DiagnosticsPages: "Navigate to system view" DiagnosticsPages->>DiagnosticsPages: "getPagesByType(EPathTypeSysView)" DiagnosticsPages->>DiagnosticsPages: "Returns SYSTEM_VIEW_PAGES" User->>Overview: "View system view overview" Overview->>overviewApi: "useGetOverviewQuery({path, database, databaseFullPath})" overviewApi-->>Overview: "Returns system view data" Overview->>Overview: "pathTypeToComponent[EPathTypeSysView]" Overview->>SystemViewInfo: "Render SystemViewInfo component" SystemViewInfo->>SystemViewInfo: "prepareSystemViewItems(data)" SystemViewInfo->>SystemViewInfo: "prepareSystemViewType(systemViewType)" SystemViewInfo-->>Overview: "YDBDefinitionList with system view type" User->>ObjectSummary: "View system view summary" ObjectSummary->>ObjectSummary: "getPathTypeOverview[EPathTypeSysView]()" ObjectSummary->>ObjectSummary: "prepareSystemViewType(PathDescription?.SysViewDescription?.Type)" ObjectSummary-->>User: "Display system view type field" User->>SchemaViewer: "View system view schema" SchemaViewer->>SchemaViewer: "isSystemViewType(type)" SchemaViewer->>SchemaViewer: "prepareSchemaData(type, tableSchemaData)" SchemaViewer->>SchemaViewer: "getSystemViewColumns(tableData)" SchemaViewer-->>User: "Display system view columns with id, name, type, notNull"Context used:
Style Guide - description of repository for agents (link)