-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Request: Add a new column named “Database” to the Cluster → Nodes table (route: /cluster/nodes).
Goal
- Display the database (tenant) associated with each node in the nodes table to help operators correlate nodes with their databases.
Scope
- UI only change if data is already available in the existing nodes API response; otherwise, extend the data plumbing via RTK Query and window.api to expose the needed field for the table.
Requirements
- Column name: use i18n, no hardcoded strings. Key suggestion: column_database.
- Value: the database/tenant name or EMPTY_DATA_PLACEHOLDER if unknown.
- Sorting: enable sorting by Database when data is present.
- Filtering: add optional quick filter for Database when feasible without heavy performance cost.
- Table integration: update Cluster → Nodes PaginatedTable columns config; ensure columns and computed values are memoized.
- Styling: use Gravity UI components; keep consistent ellipsis/tooltip behavior for long values.
- Performance: memoize columns with useMemo; callbacks with useCallback; maintain virtualized rendering.
- Safety: always guard against null/undefined; avoid division by zero if any ratios are displayed; do not log sensitive data.
- Architecture: do not call APIs directly. If additional data is needed, expose via window.api and wrap in RTK Query injectEndpoints.
- i18n: add keysets in the component’s i18n/ folder; register with registerKeysets(); follow i18n-naming-ruleset.md.
- Placeholders: use EMPTY_DATA_PLACEHOLDER for empty values.
- Testing: update/extend Playwright E2E tests for the nodes view to assert the presence of the Database column, basic sorting, and placeholder behavior; add unit tests if there are selectors/utilities.
Acceptance Criteria
- The Cluster → Nodes table shows a “Database” column using i18n key column_database.
- For nodes with a known database, the column shows the database name; otherwise, it shows EMPTY_DATA_PLACEHOLDER.
- Sorting by the Database column works as expected.
- No hardcoded user-facing strings; keysets are registered and shipped.
- E2E tests cover the new column visibility and basic interactions.
Notes / Open Questions
- Confirm which API field contains the database/tenant association per node. If absent in current nodes payload, define/align a non-breaking extension for the viewer API to include this mapping. If nodes can belong to multiple databases, decide on display format (comma-separated list with tooltip) and maintain sorting/filter behavior.
- Keep React Router v5 patterns and existing table patterns intact.
Context (from request)
- “Добавить колонку «database» на вьюшке cluster/nodes.”
Metadata
Metadata
Assignees
Labels
No labels