Skip to content

Commit b282bf9

Browse files
feat: add Streaming Query node type and actions/controls
1 parent f68c877 commit b282bf9

File tree

10 files changed

+30
-6
lines changed

10 files changed

+30
-6
lines changed

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"use-query-params": "^2.2.1",
6060
"uuid": "^10.0.0",
6161
"web-vitals": "^1.1.2",
62-
"ydb-ui-components": "^5.2.0",
62+
"ydb-ui-components": "^5.3.0",
6363
"zod": "^3.24.1"
6464
},
6565
"scripts": {

src/containers/Tenant/Diagnostics/DiagnosticsPages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ const EXTERNAL_TABLE_PAGES = [overview, schema, describe, access];
175175

176176
const VIEW_PAGES = [overview, schema, describe, access];
177177

178+
const STREAMING_QUERY_PAGES = [overview, topShards, nodes, describe, access];
179+
178180
// verbose mapping to guarantee correct tabs for new path types
179181
// TS will error when a new type is added but not mapped here
180182
const pathTypeToPages: Record<EPathType, Page[] | undefined> = {
@@ -198,6 +200,8 @@ const pathTypeToPages: Record<EPathType, Page[] | undefined> = {
198200
[EPathType.EPathTypeExternalDataSource]: EXTERNAL_DATA_SOURCE_PAGES,
199201
[EPathType.EPathTypeExternalTable]: EXTERNAL_TABLE_PAGES,
200202

203+
[EPathType.EPathTypeStreamingQuery]: STREAMING_QUERY_PAGES,
204+
201205
[EPathType.EPathTypeView]: VIEW_PAGES,
202206

203207
[EPathType.EPathTypeReplication]: ASYNC_REPLICATION_PAGES,

src/containers/Tenant/Diagnostics/Overview/Overview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function Overview({type, path, database, databaseFullPath}: OverviewProps) {
7777
data={data}
7878
/>
7979
),
80+
[EPathType.EPathTypeStreamingQuery]: undefined,
8081
};
8182

8283
return (type && pathTypeToComponent[type]?.()) || <TableInfo data={data} type={type} />;

src/containers/Tenant/ObjectSummary/ObjectSummary.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ export function ObjectSummary({
343343
},
344344
];
345345
},
346+
[EPathType.EPathTypeStreamingQuery]: undefined,
346347
};
347348

348349
const pathTypeOverview = (PathType && getPathTypeOverview[PathType]?.()) || [];

src/containers/Tenant/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,6 @@
9090
"entity-name_resource-pool": "Resource Pool",
9191
"entity-name_secondary-index-table": "Secondary Index Table",
9292
"entity-name_vector-index-table": "Vector Index Table",
93-
"entity-name_fulltext-index-table": "Fulltext Index Table"
93+
"entity-name_fulltext-index-table": "Fulltext Index Table",
94+
"entity-name_streaming_query": "Streaming Query"
9495
}

src/containers/Tenant/utils/controls.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export const getSchemaControls =
8787
external_data_source: undefined,
8888

8989
view: openPreview,
90+
91+
streaming_query: undefined,
9092
};
9193

9294
return nodeTypeToControls[type];

src/containers/Tenant/utils/schema.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const pathTypeToNodeType: Record<EPathType, NavigationTreeNodeType | undefined>
4545
[EPathType.EPathTypeReplication]: 'async_replication',
4646
[EPathType.EPathTypeTransfer]: 'transfer',
4747
[EPathType.EPathTypeResourcePool]: 'resource_pool',
48+
49+
[EPathType.EPathTypeStreamingQuery]: 'streaming_query',
4850
};
4951

5052
export const nodeTableTypeToPathType: Partial<Record<NavigationTreeNodeType, EPathType>> = {
@@ -94,6 +96,8 @@ const pathTypeToEntityName: Record<EPathType, string | undefined> = {
9496
[EPathType.EPathTypeExternalDataSource]: i18n('entity-name_external-data-source'),
9597
[EPathType.EPathTypeExternalTable]: i18n('entity-name_external-table'),
9698

99+
[EPathType.EPathTypeStreamingQuery]: i18n('entity-name_streaming_query'),
100+
97101
[EPathType.EPathTypeView]: i18n('entity-name_view'),
98102

99103
[EPathType.EPathTypeReplication]: i18n('entity-name_async-replication'),
@@ -154,6 +158,7 @@ const pathTypeToIsTable: Record<EPathType, boolean> = {
154158
[EPathType.EPathTypeReplication]: false,
155159
[EPathType.EPathTypeTransfer]: false,
156160
[EPathType.EPathTypeResourcePool]: false,
161+
[EPathType.EPathTypeStreamingQuery]: false,
157162
};
158163

159164
//if add entity with tableType, make sure that Schema is available in Diagnostics section
@@ -194,6 +199,8 @@ const pathTypeToIsColumn: Record<EPathType, boolean> = {
194199
[EPathType.EPathTypeExternalDataSource]: false,
195200
[EPathType.EPathTypeExternalTable]: false,
196201

202+
[EPathType.EPathTypeStreamingQuery]: false,
203+
197204
[EPathType.EPathTypeView]: false,
198205

199206
[EPathType.EPathTypeReplication]: false,
@@ -222,6 +229,8 @@ const pathTypeToIsDatabase: Record<EPathType, boolean> = {
222229
[EPathType.EPathTypeExternalDataSource]: false,
223230
[EPathType.EPathTypeExternalTable]: false,
224231

232+
[EPathType.EPathTypeStreamingQuery]: false,
233+
225234
[EPathType.EPathTypeView]: false,
226235

227236
[EPathType.EPathTypeReplication]: false,
@@ -272,6 +281,7 @@ const pathTypeToChildless: Record<EPathType, boolean> = {
272281
[EPathType.EPathTypeSubDomain]: false,
273282
[EPathType.EPathTypeTableIndex]: false,
274283
[EPathType.EPathTypeExtSubDomain]: false,
284+
[EPathType.EPathTypeStreamingQuery]: false,
275285
};
276286

277287
export const isChildlessPathType = (type?: EPathType, subType?: EPathSubType) =>

src/containers/Tenant/utils/schemaActions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ export const getActions =
361361
external_data_source: EXTERNAL_DATA_SOURCE_SET,
362362

363363
view: VIEW_SET,
364+
365+
streaming_query: JUST_COPY,
364366
};
365367

366368
return nodeTypeToActions[type];

src/types/api/schema/schema.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ export enum EPathType {
301301
EPathTypeReplication = 'EPathTypeReplication',
302302
EPathTypeTransfer = 'EPathTypeTransfer',
303303
EPathTypeResourcePool = 'EPathTypeResourcePool',
304+
305+
EPathTypeStreamingQuery = 'EPathTypeStreamingQuery',
304306
}
305307

306308
export enum EPathSubType {

0 commit comments

Comments
 (0)