ydb-embedded-ui 4.9.0 → 4.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/BasicNodeViewer/BasicNodeViewer.tsx +7 -4
  3. package/dist/components/EntityStatus/EntityStatus.js +3 -1
  4. package/dist/components/FormattedBytes/FormattedBytes.tsx +10 -0
  5. package/dist/components/FormattedBytes/utils.tsx +13 -0
  6. package/dist/components/FullNodeViewer/FullNodeViewer.tsx +73 -0
  7. package/dist/components/InfoViewer/formatters/schema.ts +3 -1
  8. package/dist/components/InfoViewer/formatters/table.ts +6 -5
  9. package/dist/components/ProblemFilter/ProblemFilter.tsx +2 -2
  10. package/dist/components/SpeedMultiMeter/SpeedMultiMeter.tsx +4 -4
  11. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +32 -0
  12. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.tsx +43 -0
  13. package/dist/components/TruncatedQuery/{TruncatedQuery.js → TruncatedQuery.tsx} +10 -8
  14. package/dist/containers/AsideNavigation/AsideNavigation.tsx +8 -8
  15. package/dist/containers/Cluster/Cluster.scss +4 -5
  16. package/dist/containers/Cluster/Cluster.tsx +13 -28
  17. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -0
  18. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +7 -0
  19. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.tsx +1 -1
  20. package/dist/containers/Cluster/utils.tsx +0 -11
  21. package/dist/containers/Header/Header.scss +1 -5
  22. package/dist/containers/Node/Node.tsx +3 -3
  23. package/dist/containers/Nodes/Nodes.scss +1 -24
  24. package/dist/containers/Nodes/Nodes.tsx +30 -40
  25. package/dist/containers/Storage/PDisk/PDisk.tsx +2 -7
  26. package/dist/containers/Storage/Storage.scss +1 -14
  27. package/dist/containers/Storage/Storage.tsx +237 -0
  28. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +45 -40
  29. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +12 -16
  30. package/dist/containers/Storage/StorageTypeFilter/StorageTypeFilter.tsx +3 -1
  31. package/dist/containers/Storage/{StorageVisibleEntityFilter/StorageVisibleEntityFilter.tsx → StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.tsx} +4 -2
  32. package/dist/containers/Storage/UsageFilter/UsageFilter.scss +1 -0
  33. package/dist/containers/Storage/UsageFilter/UsageFilter.tsx +17 -17
  34. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +6 -2
  35. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +3 -3
  36. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -4
  37. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +0 -15
  38. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +10 -3
  39. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +3 -12
  40. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +2 -7
  41. package/dist/containers/Tenant/{Preview → Query/Preview}/Preview.scss +1 -1
  42. package/dist/containers/Tenant/Query/Preview/Preview.tsx +121 -0
  43. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx +1 -1
  44. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +6 -8
  45. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.tsx +1 -1
  46. package/dist/containers/Tenant/Query/i18n/en.json +9 -2
  47. package/dist/containers/Tenant/Query/i18n/ru.json +9 -2
  48. package/dist/containers/Tenants/Tenants.scss +1 -13
  49. package/dist/containers/Tenants/Tenants.tsx +262 -0
  50. package/dist/services/api.ts +8 -3
  51. package/dist/store/reducers/nodes/nodes.ts +4 -112
  52. package/dist/store/reducers/nodes/selectors.ts +74 -0
  53. package/dist/store/reducers/nodes/utils.ts +46 -0
  54. package/dist/store/reducers/partitions/types.ts +3 -3
  55. package/dist/store/reducers/settings/settings.ts +4 -2
  56. package/dist/store/reducers/settings/types.ts +3 -1
  57. package/dist/store/reducers/storage/selectors.ts +279 -0
  58. package/dist/store/reducers/storage/storage.ts +191 -0
  59. package/dist/store/reducers/storage/types.ts +80 -0
  60. package/dist/store/reducers/tenants/selectors.ts +46 -0
  61. package/dist/store/reducers/tenants/tenants.ts +21 -14
  62. package/dist/store/reducers/tenants/types.ts +20 -5
  63. package/dist/store/reducers/tenants/utils.ts +68 -0
  64. package/dist/types/additionalProps.ts +8 -0
  65. package/dist/types/api/compute.ts +27 -2
  66. package/dist/types/api/nodes.ts +12 -1
  67. package/dist/types/api/schema/cdcStream.ts +32 -0
  68. package/dist/types/api/schema/columnEntity.ts +138 -0
  69. package/dist/types/api/schema/externalDataSource.ts +24 -0
  70. package/dist/types/api/schema/externalTable.ts +14 -0
  71. package/dist/types/api/schema/index.ts +10 -0
  72. package/dist/types/api/schema/persQueueGroup.ts +191 -0
  73. package/dist/types/api/schema/schema.ts +299 -0
  74. package/dist/types/api/schema/shared.ts +42 -0
  75. package/dist/types/api/schema/table.ts +616 -0
  76. package/dist/types/api/schema/tableIndex.ts +33 -0
  77. package/dist/types/api/storage.ts +1 -1
  78. package/dist/types/store/topic.ts +3 -3
  79. package/dist/utils/bytesParsers/__test__/formatBytes.test.ts +38 -0
  80. package/dist/utils/bytesParsers/convertBytesObjectToSpeed.ts +2 -2
  81. package/dist/utils/bytesParsers/formatBytes.ts +132 -0
  82. package/dist/utils/bytesParsers/i18n/en.json +1 -0
  83. package/dist/utils/bytesParsers/i18n/ru.json +1 -0
  84. package/dist/utils/bytesParsers/index.ts +1 -1
  85. package/dist/utils/index.js +5 -10
  86. package/dist/utils/numeral.ts +8 -0
  87. package/package.json +1 -1
  88. package/dist/assets/icons/versions.svg +0 -3
  89. package/dist/components/FullNodeViewer/FullNodeViewer.js +0 -89
  90. package/dist/containers/Node/NodeOverview/NodeOverview.scss +0 -0
  91. package/dist/containers/Node/NodeOverview/NodeOverview.tsx +0 -21
  92. package/dist/containers/Storage/Storage.js +0 -350
  93. package/dist/containers/Tenant/Preview/Preview.js +0 -168
  94. package/dist/containers/Tenants/Tenants.js +0 -363
  95. package/dist/store/reducers/storage/storage.js +0 -404
  96. package/dist/types/api/schema.ts +0 -1326
  97. package/dist/utils/bytesParsers/formatBytesCustom.ts +0 -57
@@ -0,0 +1,299 @@
1
+ import type {TMetrics} from '../tenant';
2
+
3
+ import type {TCdcStreamDescription} from './cdcStream';
4
+ import type {TColumnStoreDescription, TColumnTableDescription} from './columnEntity';
5
+ import type {TExternalDataSourceDescription} from './externalDataSource';
6
+ import type {TExternalTableDescription} from './externalTable';
7
+ import type {TPersQueueGroupDescription} from './persQueueGroup';
8
+ import type {TTableDescription, TTableStats} from './table';
9
+ import type {TIndexDescription} from './tableIndex';
10
+
11
+ /**
12
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_tx_scheme.proto
13
+ */
14
+ export interface TEvDescribeSchemeResult {
15
+ Status?: EStatus;
16
+ Reason?: string;
17
+ Path?: string;
18
+ PathDescription?: TPathDescription;
19
+ /** fixed64 */
20
+ PathOwner?: string;
21
+ /** fixed64 */
22
+ PathId?: string;
23
+
24
+ LastExistedPrefixPath?: string;
25
+ /** fixed64 */
26
+ LastExistedPrefixPathId?: string;
27
+ LastExistedPrefixDescription?: TPathDescription;
28
+ /** fixed64 */
29
+ PathOwnerId?: string;
30
+ }
31
+
32
+ enum EStatus {
33
+ StatusSuccess = 'StatusSuccess',
34
+ StatusAccepted = 'StatusAccepted',
35
+ StatusPathDoesNotExist = 'StatusPathDoesNotExist',
36
+ StatusPathIsNotDirectory = 'StatusPathIsNotDirectory',
37
+ StatusAlreadyExists = 'StatusAlreadyExists',
38
+ StatusSchemeError = 'StatusSchemeError',
39
+ StatusNameConflict = 'StatusNameConflict',
40
+ StatusInvalidParameter = 'StatusInvalidParameter',
41
+ StatusMultipleModifications = 'StatusMultipleModifications',
42
+ StatusReadOnly = 'StatusReadOnly',
43
+ StatusTxIdNotExists = 'StatusTxIdNotExists',
44
+ StatusTxIsNotCancellable = 'StatusTxIsNotCancellable',
45
+ StatusAccessDenied = 'StatusAccessDenied',
46
+ StatusNotAvailable = 'StatusNotAvailable',
47
+ StatusPreconditionFailed = 'StatusPreconditionFailed',
48
+ StatusRedirectDomain = 'StatusRedirectDomain',
49
+ StatusQuotaExceeded = 'StatusQuotaExceeded',
50
+ StatusResourceExhausted = 'StatusResourceExhausted',
51
+ }
52
+
53
+ /**
54
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_scheme_op.proto
55
+ *
56
+ * incomplete interface, only currently used fields are covered
57
+ */
58
+ export interface TPathDescription {
59
+ /** info about the path itself */
60
+ Self?: TDirEntry;
61
+ DomainDescription?: TDomainDescription;
62
+
63
+ // for directory
64
+ Children?: TDirEntry[];
65
+
66
+ // for table
67
+ Table?: TTableDescription;
68
+ TableStats?: TTableStats;
69
+ TabletMetrics?: TMetrics;
70
+ TablePartitions?: TTablePartition[];
71
+ TablePartitionStats?: TTableStats[];
72
+ TablePartitionMetrics?: TMetrics[];
73
+
74
+ ColumnStoreDescription?: TColumnStoreDescription;
75
+ ColumnTableDescription?: TColumnTableDescription;
76
+
77
+ TableIndex?: TIndexDescription;
78
+
79
+ CdcStreamDescription?: TCdcStreamDescription;
80
+ PersQueueGroup?: TPersQueueGroupDescription;
81
+
82
+ ExternalTableDescription?: TExternalTableDescription;
83
+ ExternalDataSourceDescription?: TExternalDataSourceDescription;
84
+ }
85
+
86
+ export interface TDirEntry {
87
+ Name?: string;
88
+ /** uint64 */
89
+ PathId?: string;
90
+ /** uint64 */
91
+ SchemeshardId?: string;
92
+ PathType?: EPathType;
93
+ CreateFinished?: boolean;
94
+ /** uint64 */
95
+ CreateTxId?: string;
96
+ /** uint64 */
97
+ CreateStep?: string;
98
+ /** uint64 */
99
+ ParentPathId?: string;
100
+ PathState?: EPathState;
101
+ Owner?: string;
102
+ ACL?: string;
103
+ EffectiveACL?: string;
104
+ /** uint64 */
105
+ PathVersion?: string;
106
+ PathSubType?: EPathSubType;
107
+ Version?: TPathVersion;
108
+ }
109
+
110
+ interface TDomainDescription {
111
+ ProcessingParams?: TProcessingParams;
112
+
113
+ DomainKey?: TDomainKey;
114
+
115
+ StoragePools?: TStoragePool[];
116
+
117
+ /** uint64 */
118
+ PathsInside?: string;
119
+ /** uint64 */
120
+ PathsLimit?: string;
121
+ /** uint64 */
122
+ ShardsInside?: string;
123
+ /** uint64 */
124
+ ShardsLimit?: string;
125
+
126
+ ResourcesDomainKey?: TDomainKey;
127
+
128
+ DiskSpaceUsage?: TDiskSpaceUsage;
129
+
130
+ /** uint64 */
131
+ PQPartitionsInside?: string;
132
+ /** uint64 */
133
+ PQPartitionsLimit?: string;
134
+
135
+ DomainState?: TDomainState;
136
+
137
+ DeclaredSchemeQuotas?: TSchemeQuotas;
138
+ DatabaseQuotas?: DatabaseQuotas;
139
+ SecurityState?: TSecurityState;
140
+ }
141
+
142
+ interface TDomainKey {
143
+ /** fixed64 */
144
+ SchemeShard?: string;
145
+ /** fixed64 */
146
+ PathId?: string;
147
+ }
148
+
149
+ interface TProcessingParams {
150
+ Version?: number;
151
+ /** uint64 */
152
+ PlanResolution?: string;
153
+ /** fixed64 */
154
+ Coordinators?: string[];
155
+ /** uint64 */
156
+ TimeCastBucketsPerMediator?: string;
157
+ /** fixed64 */
158
+ Mediators?: string[];
159
+ /** fixed64 */
160
+ SchemeShard?: string;
161
+ /** fixed64 */
162
+ Hive?: string;
163
+ /** fixed64 */
164
+ SysViewProcessor?: string;
165
+ }
166
+
167
+ interface TDomainState {
168
+ DiskQuotaExceeded?: boolean;
169
+ }
170
+
171
+ interface TDiskSpaceUsage {
172
+ Tables?: TTables;
173
+ }
174
+
175
+ interface TTables {
176
+ /** uint64 */
177
+ TotalSize?: string;
178
+ /** uint64 */
179
+ DataSize?: string;
180
+ /** uint64 */
181
+ IndexSize?: string;
182
+ }
183
+
184
+ interface TStoragePool {
185
+ Name?: string;
186
+ Kind?: string;
187
+ }
188
+
189
+ interface TSchemeQuotas {
190
+ SchemeQuotas?: TSchemeQuota[];
191
+ }
192
+
193
+ interface TSchemeQuota {
194
+ /** double */
195
+ BucketSize?: number;
196
+ /** uint64 */
197
+ BucketSeconds?: string;
198
+ }
199
+
200
+ interface TSecurityState {
201
+ PublicKeys?: TPublicKey[];
202
+ Sids?: TSid[];
203
+ Audience: string;
204
+ }
205
+
206
+ interface TPublicKey {
207
+ /** uint64 */
208
+ KeyId: string;
209
+ KeyDataPEM: string;
210
+ /** uint64 */
211
+ ExpiresAt: string;
212
+ }
213
+
214
+ interface TSid {
215
+ Name: string;
216
+ Type: SidType;
217
+
218
+ Hash: string;
219
+ Members?: string[];
220
+ }
221
+
222
+ enum SidType {
223
+ 'UNKNOWN' = 'UNKNOWN',
224
+ 'USER' = 'USER',
225
+ 'GROUP' = 'GROUP',
226
+ }
227
+
228
+ interface DatabaseQuotas {
229
+ /** uint64 */
230
+ // eslint-disable-next-line camelcase
231
+ data_size_hard_quota: string;
232
+
233
+ /** uint64 */
234
+ // eslint-disable-next-line camelcase
235
+ data_size_soft_quota: string;
236
+
237
+ /** uint64 */
238
+ // eslint-disable-next-line camelcase
239
+ data_stream_shards_quota: string;
240
+
241
+ /** uint64 */
242
+ // eslint-disable-next-line camelcase
243
+ data_stream_reserved_storage_quota: string;
244
+
245
+ // eslint-disable-next-line camelcase
246
+ ttl_min_run_internal_seconds: number;
247
+ }
248
+
249
+ // incomplete
250
+ export enum EPathType {
251
+ EPathTypeInvalid = 'EPathTypeInvalid',
252
+ EPathTypeDir = 'EPathTypeDir',
253
+ EPathTypeTable = 'EPathTypeTable',
254
+ EPathTypePersQueueGroup = 'EPathTypePersQueueGroup',
255
+ EPathTypeSubDomain = 'EPathTypeSubDomain',
256
+
257
+ EPathTypeTableIndex = 'EPathTypeTableIndex',
258
+ EPathTypeExtSubDomain = 'EPathTypeExtSubDomain',
259
+
260
+ EPathTypeColumnStore = 'EPathTypeColumnStore',
261
+ EPathTypeColumnTable = 'EPathTypeColumnTable',
262
+ EPathTypeCdcStream = 'EPathTypeCdcStream',
263
+ }
264
+
265
+ export enum EPathSubType {
266
+ EPathSubTypeEmpty = 'EPathSubTypeEmpty',
267
+ EPathSubTypeSyncIndexImplTable = 'EPathSubTypeSyncIndexImplTable',
268
+ EPathSubTypeAsyncIndexImplTable = 'EPathSubTypeAsyncIndexImplTable',
269
+ EPathSubTypeStreamImpl = 'EPathSubTypeStreamImpl',
270
+ }
271
+
272
+ enum EPathState {
273
+ EPathStateNotExist = 'EPathStateNotExist',
274
+ EPathStateNoChanges = 'EPathStateNoChanges',
275
+ EPathStateCreate = 'EPathStateCreate',
276
+ EPathStateAlter = 'EPathStateAlter',
277
+ EPathStateDrop = 'EPathStateDrop',
278
+ EPathStateCopying = 'EPathStateCopying',
279
+ EPathStateBackup = 'EPathStateBackup',
280
+ EPathStateUpgrade = 'EPathStateUpgrade',
281
+ EPathStateMigrated = 'EPathStateMigrated',
282
+ EPathStateRestore = 'EPathStateRestore',
283
+ EPathStateMoving = 'EPathStateMoving',
284
+ }
285
+
286
+ // incomplete
287
+ interface TPathVersion {
288
+ /** uint64 */
289
+ GeneralVersion?: string;
290
+ }
291
+
292
+ interface TTablePartition {
293
+ /** bytes */
294
+ EndOfRangeKeyPrefix?: unknown;
295
+ IsPoint?: boolean;
296
+ IsInclusive?: boolean;
297
+ /** uint64 */
298
+ DatashardId?: string;
299
+ }
@@ -0,0 +1,42 @@
1
+ export interface TStorageSettings {
2
+ PreferredPoolKind?: string;
3
+ AllowOtherKinds?: boolean;
4
+ }
5
+
6
+ export interface TPathID {
7
+ /** fixed64 */
8
+ OwnerId?: string;
9
+ /** uint64 */
10
+ LocalId?: string;
11
+ }
12
+
13
+ export interface TTypeInfo {
14
+ PgTypeId?: number;
15
+ }
16
+
17
+ export interface TColumnDescription {
18
+ Name?: string;
19
+ Type?: string;
20
+ TypeId?: number;
21
+ TypeInfo?: TTypeInfo;
22
+ Id?: number;
23
+ Family?: number;
24
+ FamilyName?: string;
25
+ /** Path to sequence for default values */
26
+ DefaultFromSequence?: string;
27
+ NotNull?: boolean;
28
+ }
29
+
30
+ export enum EColumnCodec {
31
+ ColumnCodecPlain,
32
+ ColumnCodecLZ4,
33
+ ColumnCodecZSTD,
34
+ }
35
+
36
+ export enum EUnit {
37
+ UNIT_AUTO = 'UNIT_AUTO',
38
+ UNIT_SECONDS = 'UNIT_SECONDS',
39
+ UNIT_MILLISECONDS = 'UNIT_MILLISECONDS',
40
+ UNIT_MICROSECONDS = 'UNIT_MICROSECONDS',
41
+ UNIT_NANOSECONDS = 'UNIT_NANOSECONDS',
42
+ }