Skip to content

Commit 9c0c6f8

Browse files
authored
feat: resource pool – add proper icon (#1982)
1 parent 689120c commit 9c0c6f8

File tree

9 files changed

+19
-5
lines changed

9 files changed

+19
-5
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
@@ -56,7 +56,7 @@
5656
"use-query-params": "^2.2.1",
5757
"uuid": "^10.0.0",
5858
"web-vitals": "^1.1.2",
59-
"ydb-ui-components": "^4.4.0",
59+
"ydb-ui-components": "^4.5.0",
6060
"zod": "^3.24.1"
6161
},
6262
"scripts": {

src/containers/Tenant/Diagnostics/DiagnosticsPages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ const pathTypeToPages: Record<EPathType, Page[] | undefined> = {
133133
[EPathType.EPathTypeView]: VIEW_PAGES,
134134

135135
[EPathType.EPathTypeReplication]: ASYNC_REPLICATION_PAGES,
136+
[EPathType.EPathTypeResourcePool]: DIR_PAGES,
136137
};
137138

138139
export const getPagesByType = (type?: EPathType) => (type && pathTypeToPages[type]) || DIR_PAGES;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ function Overview({type, path, database}: OverviewProps) {
6666
const pathTypeToComponent: Record<EPathType, (() => React.ReactNode) | undefined> = {
6767
[EPathType.EPathTypeInvalid]: undefined,
6868
[EPathType.EPathTypeDir]: undefined,
69+
[EPathType.EPathTypeResourcePool]: undefined,
6970
[EPathType.EPathTypeTable]: undefined,
7071
[EPathType.EPathTypeSubDomain]: undefined,
7172
[EPathType.EPathTypeTableIndex]: () => <TableIndexInfo data={data} />,

src/containers/Tenant/ObjectSummary/ObjectSummary.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export function ObjectSummary({
221221
> = {
222222
[EPathType.EPathTypeInvalid]: undefined,
223223
[EPathType.EPathTypeDir]: undefined,
224+
[EPathType.EPathTypeResourcePool]: undefined,
224225
[EPathType.EPathTypeTable]: () => [
225226
{
226227
name: i18n('field_partitions'),

src/containers/Tenant/utils/controls.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const getSchemaControls =
6464

6565
database: undefined,
6666
directory: undefined,
67+
resource_pool: undefined,
6768

6869
table: openPreview,
6970
column_table: openPreview,

src/containers/Tenant/utils/schema.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const pathTypeToNodeType: Record<EPathType, NavigationTreeNodeType | undefined>
3939
[EPathType.EPathTypeView]: 'view',
4040

4141
[EPathType.EPathTypeReplication]: 'async_replication',
42+
[EPathType.EPathTypeResourcePool]: 'resource_pool',
4243
};
4344

4445
export const nodeTableTypeToPathType: Partial<Record<NavigationTreeNodeType, EPathType>> = {
@@ -86,6 +87,7 @@ const pathTypeToEntityName: Record<EPathType, string | undefined> = {
8687
[EPathType.EPathTypeView]: 'View',
8788

8889
[EPathType.EPathTypeReplication]: 'Async Replication',
90+
[EPathType.EPathTypeResourcePool]: 'Resource Pool',
8991
};
9092

9193
export const mapPathTypeToEntityName = (
@@ -126,6 +128,7 @@ const pathTypeToIsTable: Record<EPathType, boolean> = {
126128
[EPathType.EPathTypePersQueueGroup]: false,
127129
[EPathType.EPathTypeExternalDataSource]: false,
128130
[EPathType.EPathTypeReplication]: false,
131+
[EPathType.EPathTypeResourcePool]: false,
129132
};
130133

131134
//if add entity with tableType, make sure that Schema is available in Diagnostics section
@@ -166,6 +169,7 @@ const pathTypeToIsColumn: Record<EPathType, boolean> = {
166169
[EPathType.EPathTypeView]: false,
167170

168171
[EPathType.EPathTypeReplication]: false,
172+
[EPathType.EPathTypeResourcePool]: false,
169173
};
170174

171175
export const isColumnEntityType = (type?: EPathType) => (type && pathTypeToIsColumn[type]) ?? false;
@@ -191,6 +195,7 @@ const pathTypeToIsDatabase: Record<EPathType, boolean> = {
191195
[EPathType.EPathTypeView]: false,
192196

193197
[EPathType.EPathTypeReplication]: false,
198+
[EPathType.EPathTypeResourcePool]: false,
194199
};
195200

196201
export const isDatabaseEntityType = (type?: EPathType) =>
@@ -221,6 +226,7 @@ const pathTypeToEntityWithMergedImplementation: Record<EPathType, boolean> = {
221226
[EPathType.EPathTypeView]: false,
222227

223228
[EPathType.EPathTypeReplication]: false,
229+
[EPathType.EPathTypeResourcePool]: false,
224230
};
225231

226232
export const isEntityWithMergedImplementation = (type?: EPathType) =>
@@ -244,6 +250,7 @@ const pathTypeToChildless: Record<EPathType, boolean> = {
244250
[EPathType.EPathTypeExternalTable]: true,
245251

246252
[EPathType.EPathTypeView]: true,
253+
[EPathType.EPathTypeResourcePool]: true,
247254

248255
[EPathType.EPathTypeReplication]: true,
249256

src/containers/Tenant/utils/schemaActions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export const getActions =
290290
database: DB_SET,
291291

292292
directory: DIR_SET,
293+
resource_pool: JUST_COPY,
293294

294295
table: ROW_TABLE_SET,
295296
column_table: COLUMN_TABLE_SET,

src/types/api/schema/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export enum EPathType {
297297
EPathTypeView = 'EPathTypeView',
298298

299299
EPathTypeReplication = 'EPathTypeReplication',
300+
EPathTypeResourcePool = 'EPathTypeResourcePool',
300301
}
301302

302303
export enum EPathSubType {

0 commit comments

Comments
 (0)