ydb-embedded-ui 3.1.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +2 -0
  3. package/dist/components/DateRange/DateRange.scss +11 -0
  4. package/dist/{containers/Tenant/Diagnostics/TopShards → components}/DateRange/DateRange.tsx +7 -7
  5. package/dist/{containers/Tenant/Diagnostics/TopShards → components}/DateRange/index.ts +0 -0
  6. package/dist/components/EntitiesCount/EntitiesCount.tsx +34 -0
  7. package/dist/components/EntitiesCount/i18n/en.json +3 -0
  8. package/dist/components/{AsideNavigation/Settings → EntitiesCount}/i18n/index.ts +2 -2
  9. package/dist/components/EntitiesCount/i18n/ru.json +3 -0
  10. package/dist/components/EntitiesCount/index.ts +1 -0
  11. package/dist/components/Fullscreen/Fullscreen.scss +7 -5
  12. package/dist/components/Illustration/Illustration.tsx +4 -11
  13. package/dist/components/InfoViewer/InfoViewer.scss +2 -0
  14. package/dist/components/TabletsOverall/TabletsOverall.tsx +4 -4
  15. package/dist/components/TabletsStatistic/TabletsStatistic.tsx +56 -0
  16. package/dist/components/TabletsStatistic/index.ts +1 -0
  17. package/dist/containers/App/App.scss +4 -12
  18. package/dist/containers/AsideNavigation/AsideNavigation.scss +0 -18
  19. package/dist/containers/AsideNavigation/AsideNavigation.tsx +95 -33
  20. package/dist/containers/Heatmap/Heatmap.scss +0 -7
  21. package/dist/containers/Heatmap/Heatmap.tsx +203 -0
  22. package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +2 -1
  23. package/dist/containers/Heatmap/index.ts +1 -0
  24. package/dist/containers/Node/Node.tsx +1 -1
  25. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.tsx +1 -1
  26. package/dist/containers/Storage/Storage.js +12 -19
  27. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +16 -0
  28. package/dist/containers/Tablets/Tablets.scss +0 -5
  29. package/dist/containers/Tablets/Tablets.tsx +172 -0
  30. package/dist/containers/Tablets/i18n/en.json +6 -0
  31. package/dist/{components/AsideNavigation → containers/Tablets}/i18n/index.ts +1 -1
  32. package/dist/containers/Tablets/i18n/ru.json +6 -0
  33. package/dist/containers/Tablets/index.ts +1 -0
  34. package/dist/containers/TabletsFilters/TabletsFilters.js +4 -8
  35. package/dist/containers/TabletsFilters/TabletsFilters.scss +6 -2
  36. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +8 -13
  37. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +7 -7
  38. package/dist/containers/Tenant/Diagnostics/{TopShards/TopShards.scss → OverloadedShards/OverloadedShards.scss} +1 -1
  39. package/dist/containers/Tenant/Diagnostics/{TopShards/TopShards.tsx → OverloadedShards/OverloadedShards.tsx} +10 -11
  40. package/dist/containers/Tenant/Diagnostics/{TopShards → OverloadedShards}/i18n/en.json +0 -0
  41. package/dist/containers/Tenant/Diagnostics/OverloadedShards/i18n/index.ts +11 -0
  42. package/dist/containers/Tenant/Diagnostics/{TopShards → OverloadedShards}/i18n/ru.json +0 -0
  43. package/dist/containers/Tenant/Diagnostics/OverloadedShards/index.ts +1 -0
  44. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -7
  45. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +16 -19
  46. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +202 -0
  47. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +4 -0
  48. package/dist/containers/Tenant/Diagnostics/{TopShards → TopQueries}/i18n/index.ts +1 -1
  49. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/ru.json +4 -0
  50. package/dist/containers/Tenant/Diagnostics/TopQueries/index.ts +1 -0
  51. package/dist/containers/Tenants/Tenants.js +1 -1
  52. package/dist/containers/UserSettings/UserSettings.tsx +5 -4
  53. package/dist/routes.ts +1 -1
  54. package/dist/services/api.d.ts +7 -0
  55. package/dist/store/reducers/describe.ts +4 -1
  56. package/dist/store/reducers/executeTopQueries.ts +170 -0
  57. package/dist/store/reducers/{heatmap.js → heatmap.ts} +33 -18
  58. package/dist/store/reducers/settings.js +13 -3
  59. package/dist/store/reducers/shardsWorkload.ts +9 -9
  60. package/dist/store/reducers/storage.js +2 -0
  61. package/dist/store/reducers/{tablets.js → tablets.ts} +30 -17
  62. package/dist/store/state-url-mapping.js +10 -2
  63. package/dist/types/api/compute.ts +52 -0
  64. package/dist/types/api/consumer.ts +257 -0
  65. package/dist/types/api/enums.ts +2 -2
  66. package/dist/types/api/nodes.ts +5 -2
  67. package/dist/types/api/pdisk.ts +3 -0
  68. package/dist/types/api/schema.ts +17 -3
  69. package/dist/types/api/storage.ts +31 -28
  70. package/dist/types/api/tablet.ts +18 -2
  71. package/dist/types/api/tenant.ts +4 -1
  72. package/dist/types/api/topic.ts +157 -0
  73. package/dist/types/api/vdisk.ts +3 -0
  74. package/dist/types/store/executeTopQueries.ts +29 -0
  75. package/dist/types/store/heatmap.ts +51 -0
  76. package/dist/types/store/schema.ts +3 -3
  77. package/dist/types/store/shardsWorkload.ts +3 -3
  78. package/dist/types/store/tablets.ts +42 -0
  79. package/dist/utils/constants.ts +1 -37
  80. package/dist/utils/getNodesColumns.js +14 -2
  81. package/dist/utils/tablet.ts +53 -0
  82. package/package.json +4 -3
  83. package/dist/components/AsideNavigation/AsideHeader.scss +0 -147
  84. package/dist/components/AsideNavigation/AsideHeader.tsx +0 -389
  85. package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.scss +0 -82
  86. package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.tsx +0 -138
  87. package/dist/components/AsideNavigation/AsideHeaderFooterSlot/AsideHeaderFooterSlot.tsx +0 -33
  88. package/dist/components/AsideNavigation/AsideHeaderFooterSlot/SlotsContext.tsx +0 -49
  89. package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.scss +0 -16
  90. package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.tsx +0 -37
  91. package/dist/components/AsideNavigation/CompositeBar/CompositeBar.scss +0 -108
  92. package/dist/components/AsideNavigation/CompositeBar/CompositeBar.tsx +0 -282
  93. package/dist/components/AsideNavigation/Content/Content.tsx +0 -35
  94. package/dist/components/AsideNavigation/Drawer/Drawer.scss +0 -76
  95. package/dist/components/AsideNavigation/Drawer/Drawer.tsx +0 -134
  96. package/dist/components/AsideNavigation/Drawer/index.ts +0 -1
  97. package/dist/components/AsideNavigation/Logo/Logo.scss +0 -43
  98. package/dist/components/AsideNavigation/Logo/Logo.tsx +0 -82
  99. package/dist/components/AsideNavigation/Settings/README.md +0 -92
  100. package/dist/components/AsideNavigation/Settings/Settings.scss +0 -128
  101. package/dist/components/AsideNavigation/Settings/Settings.tsx +0 -270
  102. package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.scss +0 -78
  103. package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.tsx +0 -141
  104. package/dist/components/AsideNavigation/Settings/SettingsSearch/SettingsSearch.tsx +0 -57
  105. package/dist/components/AsideNavigation/Settings/collect-settings.ts +0 -156
  106. package/dist/components/AsideNavigation/Settings/filter-settings.ts +0 -38
  107. package/dist/components/AsideNavigation/Settings/helpers.ts +0 -39
  108. package/dist/components/AsideNavigation/Settings/i18n/en.json +0 -5
  109. package/dist/components/AsideNavigation/Settings/i18n/ru.json +0 -5
  110. package/dist/components/AsideNavigation/Settings/index.ts +0 -1
  111. package/dist/components/AsideNavigation/constants.ts +0 -28
  112. package/dist/components/AsideNavigation/helpers.ts +0 -34
  113. package/dist/components/AsideNavigation/i18n/en.json +0 -4
  114. package/dist/components/AsideNavigation/i18n/ru.json +0 -4
  115. package/dist/components/AsideNavigation/icons.ts +0 -32
  116. package/dist/components/AsideNavigation/types.ts +0 -23
  117. package/dist/components/TabletsStatistic/TabletsStatistic.js +0 -58
  118. package/dist/containers/Heatmap/Heatmap.js +0 -244
  119. package/dist/containers/Tablets/Tablets.js +0 -228
  120. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +0 -188
  121. package/dist/containers/Tenant/Diagnostics/TopShards/DateRange/DateRange.scss +0 -13
  122. package/dist/containers/Tenant/Diagnostics/TopShards/index.ts +0 -1
  123. package/dist/store/reducers/executeTopQueries.js +0 -66
  124. package/dist/types/api/consumers.ts +0 -3
@@ -0,0 +1,257 @@
1
+ /* eslint-disable camelcase */
2
+
3
+ /**
4
+ * endpoint: /json/describe_consumer
5
+ *
6
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/public/api/protos/ydb_topic.proto
7
+ *
8
+ * Original proto file doesn't specify optional fields, so every field is considered optional
9
+ */
10
+ export interface DescribeConsumerResult {
11
+ self?: Entry;
12
+ consumer?: Consumer;
13
+ partitions?: PartitionInfo[];
14
+ }
15
+
16
+ /** Partition info types differs for consumer and topic, although they are very similar */
17
+ export interface PartitionInfo {
18
+ /** int64 */
19
+ partition_id?: string;
20
+
21
+ /** Is partition open for write. */
22
+ active?: boolean;
23
+
24
+ /**
25
+ * int64
26
+ *
27
+ * Ids of partitions which was formed when this partition was split or merged.
28
+ */
29
+ child_partition_ids?: string[];
30
+
31
+ /**
32
+ * int64
33
+ *
34
+ * Ids of partitions from which this partition was formed by split or merge.
35
+ */
36
+ parent_partition_ids?: string[];
37
+
38
+ /** Stats for partition, filled only when include_stats in request is true. */
39
+ partition_stats?: PartitionStats;
40
+
41
+ /** Stats for consumer of this partition, filled only when include_stats in request is true. */
42
+ partition_consumer_stats?: PartitionConsumerStats;
43
+ }
44
+
45
+ interface PartitionConsumerStats {
46
+ /**
47
+ * int64
48
+ *
49
+ * Last read offset from this partition.
50
+ */
51
+ last_read_offset?: string;
52
+
53
+ /**
54
+ * int64
55
+ *
56
+ * Committed offset for this partition.
57
+ */
58
+ committed_offset?: string;
59
+
60
+ /** Reading this partition read session identifier. */
61
+ read_session_id?: string;
62
+
63
+ /**
64
+ * google.protobuf.Timestamp
65
+ *
66
+ * Timestamp of providing this partition to this session by server.
67
+ */
68
+ partition_read_session_create_time?: string;
69
+
70
+ /**
71
+ * google.protobuf.Timestamp
72
+ *
73
+ * Timestamp of last read from this partition. */
74
+ last_read_time?: string;
75
+
76
+ /**
77
+ * google.protobuf.Duration
78
+ *
79
+ * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
80
+ */
81
+ max_read_time_lag?: string;
82
+
83
+ /**
84
+ * google.protobuf.Duration
85
+ *
86
+ * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
87
+ */
88
+ max_write_time_lag?: string;
89
+
90
+ /** How much bytes were read during several windows statistics from this partiton. */
91
+ bytes_read?: MultipleWindowsStat;
92
+
93
+ /** Read session name, provided by client. */
94
+ reader_name?: string;
95
+
96
+ /** Host where read session connected. */
97
+ connection_node_id?: number;
98
+ }
99
+
100
+ export interface PartitionStats {
101
+ /** Partition contains messages with offsets in range [start, end). */
102
+ partition_offsets?: OffsetsRange;
103
+
104
+ /**
105
+ * int64
106
+ *
107
+ * Approximate size of partition.
108
+ */
109
+ store_size_bytes?: string;
110
+
111
+ /**
112
+ * google.protobuf.Timestamp
113
+ *
114
+ * Timestamp of last write.
115
+ */
116
+ last_write_time?: string;
117
+
118
+ /**
119
+ * google.protobuf.Duration
120
+ *
121
+ * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
122
+ */
123
+ max_write_time_lag?: string;
124
+
125
+ /** How much bytes were written during several windows in this partition. */
126
+ bytes_written?: MultipleWindowsStat;
127
+
128
+ /** Host where tablet for this partition works. Useful for debugging purposes. */
129
+ partition_node_id?: number;
130
+ }
131
+
132
+ interface OffsetsRange {
133
+ /** int64 */
134
+ start?: string;
135
+ /** int64 */
136
+ end?: string;
137
+ }
138
+
139
+ export interface Consumer {
140
+ /** Must have valid not empty name as a key. */
141
+ name?: string;
142
+
143
+ /** Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention. */
144
+ important?: boolean;
145
+
146
+ /**
147
+ * google.protobuf.Timestamp
148
+ *
149
+ * All messages with smaller server written_at timestamp will be skipped.
150
+ */
151
+ read_from?: string;
152
+
153
+ /**
154
+ * List of supported codecs by this consumer.
155
+ *
156
+ * supported_codecs on topic must be contained inside this list.
157
+ */
158
+ supported_codecs?: SupportedCodecs;
159
+
160
+ /** Attributes of consumer */
161
+ attributes?: Record<string, string>;
162
+
163
+ /** Filled only when requested statistics in Describe*Request. */
164
+ consumer_stats?: ConsumerStats;
165
+ }
166
+
167
+ interface ConsumerStats {
168
+ /**
169
+ * google.protobuf.Timestamp
170
+ *
171
+ * Minimal timestamp of last read from partitions.
172
+ */
173
+ min_partitions_last_read_time?: string;
174
+
175
+ /**
176
+ * google.protobuf.Duration
177
+ *
178
+ * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
179
+ */
180
+ max_read_time_lag?: string;
181
+
182
+ /**
183
+ * google.protobuf.Duration
184
+ *
185
+ * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
186
+ */
187
+ max_write_time_lag?: string;
188
+
189
+ /** Bytes read stastics. */
190
+ bytes_read?: MultipleWindowsStat;
191
+ }
192
+
193
+ export interface MultipleWindowsStat {
194
+ /** int64 */
195
+ per_minute?: string;
196
+ /** int64 */
197
+ per_hour?: string;
198
+ /** int64 */
199
+ per_day?: string;
200
+ }
201
+
202
+ export interface SupportedCodecs {
203
+ /** List of supported codecs. */
204
+ codecs?: number[];
205
+ }
206
+
207
+ export interface Entry {
208
+ /** For consumer will be topic-name/consumer-name */
209
+ name?: string;
210
+
211
+ owner?: string;
212
+ type?: Type;
213
+ effective_permissions?: Permissions[];
214
+ permissions?: Permissions[];
215
+
216
+ /**
217
+ * uint64
218
+ *
219
+ * Size of entry in bytes. Currently filled for:
220
+ * - TABLE;
221
+ * - DATABASE.
222
+ *
223
+ * Empty (zero) in other cases.
224
+ */
225
+ size_bytes?: string;
226
+
227
+ /** Virtual timestamp when the object was created */
228
+ created_at?: VirtualTimestamp;
229
+ }
230
+
231
+ interface Permissions {
232
+ subject?: string;
233
+ permission_names?: string[];
234
+ }
235
+
236
+ interface VirtualTimestamp {
237
+ /** uint64 */
238
+ plan_step?: string;
239
+ /** uint64 */
240
+ tx_id?: string;
241
+ }
242
+
243
+ enum Type {
244
+ TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',
245
+ DIRECTORY = 'DIRECTORY',
246
+ TABLE = 'TABLE',
247
+ PERS_QUEUE_GROUP = 'PERS_QUEUE_GROUP',
248
+ DATABASE = 'DATABASE',
249
+ RTMR_VOLUME = 'RTMR_VOLUME',
250
+ BLOCK_STORE_VOLUME = 'BLOCK_STORE_VOLUME',
251
+ COORDINATION_NODE = 'COORDINATION_NODE',
252
+ COLUMN_STORE = 'COLUMN_STORE ',
253
+ COLUMN_TABLE = 'COLUMN_TABLE ',
254
+ SEQUENCE = 'SEQUENCE ',
255
+ REPLICATION = 'REPLICATION ',
256
+ TOPIC = 'TOPIC ',
257
+ }
@@ -1,6 +1,6 @@
1
1
  // Shows system status
2
- // Currently is used in response types of viewer/json/nodes and viewer/json/storage
3
- // Probably will appear in /viewer/json/tenantinfo /viewer/json/cluster /viewer/json/tabletinfo /viewer/json/compute
2
+ // Currently is used in response types viewer/json/ storage, nodes, compute
3
+ // pdiskinfo, vdiskinfo, tabletinfo, tenantinfo
4
4
  export enum EFlag {
5
5
  Grey = 'Grey',
6
6
  Green = 'Green',
@@ -2,6 +2,9 @@ import {EFlag} from './enums';
2
2
  import {TPDiskStateInfo} from './pdisk';
3
3
  import {TTabletStateInfo} from './tablet';
4
4
 
5
+ // endpoint: /viewer/json/nodes
6
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
7
+
5
8
  export interface TNodesInfo {
6
9
  Overall: EFlag;
7
10
  Nodes?: TNodeInfo[];
@@ -64,12 +67,12 @@ export interface TPoolStats {
64
67
  Threads?: number;
65
68
  }
66
69
 
67
- interface TEndpoint {
70
+ export interface TEndpoint {
68
71
  Name?: string;
69
72
  Address?: string;
70
73
  }
71
74
 
72
- interface TLegacyNodeLocation {
75
+ export interface TLegacyNodeLocation {
73
76
  DataCenter?: number;
74
77
  Room?: number;
75
78
  Rack?: number;
@@ -1,5 +1,8 @@
1
1
  import {EFlag} from './enums';
2
2
 
3
+ // endpoint: /viewer/json/pdiskinfo
4
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/node_whiteboard.proto
5
+
3
6
  export interface TPDiskStateInfo {
4
7
  PDiskId?: number;
5
8
  /** uint64 */
@@ -1,3 +1,5 @@
1
+ import {TMetrics} from './tenant';
2
+
1
3
  export interface TEvDescribeSchemeResult {
2
4
  Status?: EStatus;
3
5
  Reason?: string;
@@ -37,6 +39,7 @@ enum EStatus {
37
39
  StatusResourceExhausted = 'StatusResourceExhausted',
38
40
  }
39
41
 
42
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_scheme_op.proto
40
43
  // incomplete interface, only currently used fields are covered
41
44
  export interface TPathDescription {
42
45
  /** info about the path itself */
@@ -49,8 +52,10 @@ export interface TPathDescription {
49
52
  // for table
50
53
  Table?: TTableDescription;
51
54
  TableStats?: TTableStats;
52
- TabletMetrics?: unknown;
53
- TablePartitions?: unknown[];
55
+ TabletMetrics?: TMetrics;
56
+ TablePartitions?: TTablePartition[];
57
+ TablePartitionStats?: TTableStats[];
58
+ TablePartitionMetrics?: TMetrics[];
54
59
 
55
60
  ColumnStoreDescription?: TColumnStoreDescription;
56
61
  ColumnTableDescription?: TColumnTableDescription;
@@ -253,7 +258,7 @@ export interface TFollowerGroup {
253
258
  AllowedDataCenters?: string[];
254
259
  }
255
260
 
256
- interface TTableStats {
261
+ export interface TTableStats {
257
262
  /** uint64 */
258
263
  DataSize?: string;
259
264
  /** uint64 */
@@ -790,3 +795,12 @@ interface TColumnTableSchemaPreset {
790
795
  Name?: string;
791
796
  Schema?: TColumnTableSchema;
792
797
  }
798
+
799
+ interface TTablePartition {
800
+ /** bytes */
801
+ EndOfRangeKeyPrefix?: unknown;
802
+ IsPoint?: boolean;
803
+ IsInclusive?: boolean;
804
+ /** uint64 */
805
+ DatashardId?: string;
806
+ }
@@ -1,6 +1,37 @@
1
1
  import {EFlag} from './enums';
2
2
  import {TVDiskStateInfo} from './vdisk';
3
3
 
4
+ // endpoint: /viewer/json/storage
5
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
6
+
7
+ export interface TStorageInfo {
8
+ Overall?: EFlag;
9
+ StoragePools?: TStoragePoolInfo[];
10
+ /** uint64 */
11
+ TotalGroups?: string;
12
+ /** uint64 */
13
+ FoundGroups?: string;
14
+ }
15
+
16
+ interface TStoragePoolInfo {
17
+ Overall?: EFlag;
18
+ Name?: string;
19
+ Kind?: string;
20
+ Groups?: (TBSGroupStateInfo & THiveStorageGroupStats)[];
21
+ /** uint64 */
22
+ AcquiredUnits?: string;
23
+ AcquiredIOPS?: number;
24
+ /** uint64 */
25
+ AcquiredThroughput?: string;
26
+ /** uint64 */
27
+ AcquiredSize?: string;
28
+ MaximumIOPS?: number;
29
+ /** uint64 */
30
+ MaximumThroughput?: string;
31
+ /** uint64 */
32
+ MaximumSize?: string;
33
+ }
34
+
4
35
  export interface TBSGroupStateInfo {
5
36
  GroupID?: number;
6
37
  ErasureSpecies?: string;
@@ -43,31 +74,3 @@ interface THiveStorageGroupStats {
43
74
  /** uint64 */
44
75
  AvailableSize?: string;
45
76
  }
46
-
47
- interface TStoragePoolInfo {
48
- Overall?: EFlag;
49
- Name?: string;
50
- Kind?: string;
51
- Groups?: (TBSGroupStateInfo & THiveStorageGroupStats)[];
52
- /** uint64 */
53
- AcquiredUnits?: string;
54
- AcquiredIOPS?: number;
55
- /** uint64 */
56
- AcquiredThroughput?: string;
57
- /** uint64 */
58
- AcquiredSize?: string;
59
- MaximumIOPS?: number;
60
- /** uint64 */
61
- MaximumThroughput?: string;
62
- /** uint64 */
63
- MaximumSize?: string;
64
- }
65
-
66
- export interface TStorageInfo {
67
- Overall?: EFlag;
68
- StoragePools?: TStoragePoolInfo[];
69
- /** uint64 */
70
- TotalGroups?: string;
71
- /** uint64 */
72
- FoundGroups?: string;
73
- }
@@ -1,5 +1,21 @@
1
1
  import {EFlag} from './enums';
2
2
 
3
+ // endpoint: /viewer/json/tabletinfo
4
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/sys_view.proto
5
+
6
+ export interface TEvTabletStateResponse {
7
+ TabletStateInfo?: TTabletStateInfo[];
8
+
9
+ /** uint64 */
10
+ ResponseTime?: string;
11
+ /** uint64 */
12
+ ResponseDuration?: string;
13
+ /** uint64 */
14
+ ProcessDuration?: string;
15
+
16
+ Packed5?: unknown;
17
+ }
18
+
3
19
  export interface TTabletStateInfo {
4
20
  /** uint64 */
5
21
  TabletId?: string;
@@ -37,7 +53,7 @@ interface TDomainKey {
37
53
  PathId?: string;
38
54
  }
39
55
 
40
- enum EType {
56
+ export enum EType {
41
57
  'Unknown' = 'Unknown',
42
58
  'OldSchemeShard' = 'OldSchemeShard',
43
59
  'OldDataShard' = 'OldDataShard',
@@ -79,7 +95,7 @@ enum EType {
79
95
  'TypeInvalid' = 'TypeInvalid',
80
96
  }
81
97
 
82
- enum ETabletState {
98
+ export enum ETabletState {
83
99
  'Created' = 'Created',
84
100
  'ResolveStateStorage' = 'ResolveStateStorage',
85
101
  'Candidate' = 'Candidate',
@@ -2,6 +2,9 @@ import {EFlag} from './enums';
2
2
  import {TPoolStats, TSystemStateInfo} from './nodes';
3
3
  import {TTabletStateInfo} from './tablet';
4
4
 
5
+ // endpoint: /viewer/json/tenantinfo
6
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
7
+
5
8
  export interface TTenants {
6
9
  Tenants?: TTenant[];
7
10
  }
@@ -51,7 +54,7 @@ interface THiveDomainStatsStateCount {
51
54
  Count?: number;
52
55
  }
53
56
 
54
- interface TMetrics {
57
+ export interface TMetrics {
55
58
  /** uint64 */
56
59
  CPU?: string;
57
60
  /** uint64 */
@@ -0,0 +1,157 @@
1
+ /* eslint-disable camelcase */
2
+
3
+ import {Consumer, Entry, MultipleWindowsStat, PartitionStats, SupportedCodecs} from './consumer';
4
+
5
+ /**
6
+ * endpoint: /json/describe_topic
7
+ *
8
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/public/api/protos/ydb_topic.proto
9
+ *
10
+ * Original proto file doesn't specify optional fields, so every field is considered optional
11
+ */
12
+ export interface DescribeTopicResult {
13
+ /** Description of scheme object. */
14
+ self?: Entry;
15
+
16
+ /** Settings for partitioning */
17
+ partitioning_settings?: PartitioningSettings;
18
+
19
+ /** Partitions description. */
20
+ partitions?: PartitionInfo[];
21
+
22
+ // Retention settings.
23
+ // Currently, only one limit may be set, so other should not be set.
24
+
25
+ /**
26
+ * google.protobuf.Duration
27
+ *
28
+ * How long data in partition should be stored.
29
+ */
30
+ retention_period?: string;
31
+
32
+ /**
33
+ * int64
34
+ *
35
+ * How much data in partition should be stored.
36
+ * Zero value means infinite limit.
37
+ */
38
+ retention_storage_mb?: string;
39
+
40
+ /**
41
+ * List of allowed codecs for writers.
42
+ * Writes with codec not from this list are forbidden.
43
+ */
44
+ supported_codecs?: SupportedCodecs;
45
+
46
+ /**
47
+ * int64
48
+ *
49
+ * Partition write speed in bytes per second.
50
+ * Zero value means default limit: 1 MB per second.
51
+ */
52
+ partition_write_speed_bytes_per_second?: string;
53
+
54
+ /**
55
+ * int64
56
+ *
57
+ * Burst size for write in partition, in bytes.
58
+ * Zero value means default limit: 1 MB.
59
+ */
60
+ partition_write_burst_bytes?: string;
61
+
62
+ /** User and server attributes of topic. Server attributes starts from "_" and will be validated by server. */
63
+ attributes?: Record<string, string>;
64
+
65
+ /** List of consumers for this topic. */
66
+ consumers?: Consumer[];
67
+
68
+ /** Metering settings. */
69
+ metering_mode?: MeteringMode;
70
+
71
+ /** Statistics of topic. */
72
+ topic_stats?: TopicStats;
73
+ }
74
+
75
+ /** Partition info types differs for consumer and topic, although they are very similar */
76
+ interface PartitionInfo {
77
+ /** int64 */
78
+ partition_id?: string;
79
+
80
+ /** Is partition open for write. */
81
+ active?: boolean;
82
+
83
+ /**
84
+ * int64
85
+ *
86
+ * Ids of partitions which was formed when this partition was split or merged.
87
+ */
88
+ child_partition_ids?: string;
89
+
90
+ /**
91
+ * int64
92
+ *
93
+ * Ids of partitions from which this partition was formed by split or merge.
94
+ */
95
+ parent_partition_ids?: string;
96
+
97
+ /** Stats for partition, filled only when include_stats in request is true. */
98
+ partition_stats?: PartitionStats;
99
+ }
100
+
101
+ interface TopicStats {
102
+ /**
103
+ * int64
104
+ *
105
+ * Approximate size of topic.
106
+ */
107
+ store_size_bytes?: string;
108
+
109
+ /**
110
+ * google.protobuf.Timestamp
111
+ *
112
+ * Minimum of timestamps of last write among all partitions.
113
+ */
114
+ min_last_write_time?: string;
115
+
116
+ /**
117
+ * google.protobuf.Duration
118
+ *
119
+ * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
120
+ */
121
+ max_write_time_lag?: string;
122
+
123
+ /** How much bytes were written statistics. */
124
+ bytes_written?: MultipleWindowsStat;
125
+ }
126
+
127
+ /** Partitioning settings for topic. */
128
+ interface PartitioningSettings {
129
+ /**
130
+ * int64
131
+ *
132
+ * Minimum partition count auto merge would stop working at.
133
+ *
134
+ * Zero value means default - 1.
135
+ */
136
+ min_active_partitions?: string;
137
+
138
+ /**
139
+ * int64
140
+ *
141
+ * Limit for total partition count, including active (open for write) and read-only partitions.
142
+ *
143
+ * Zero value means default - 100.
144
+ */
145
+ partition_count_limit?: string;
146
+ }
147
+
148
+ enum MeteringMode {
149
+ /** Use default */
150
+ METERING_MODE_UNSPECIFIED = 'METERING_MODE_UNSPECIFIED',
151
+
152
+ /** Metering based on resource reservation */
153
+ METERING_MODE_RESERVED_CAPACITY = 'METERING_MODE_RESERVED_CAPACITY',
154
+
155
+ /** Metering based on actual consumption. Default. */
156
+ METERING_MODE_REQUEST_UNITS = 'METERING_MODE_REQUEST_UNITS',
157
+ }
@@ -1,6 +1,9 @@
1
1
  import {EFlag} from './enums';
2
2
  import {TPDiskStateInfo} from './pdisk';
3
3
 
4
+ // endpoint: /viewer/json/vdiskinfo
5
+ // source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/node_whiteboard.proto
6
+
4
7
  export interface TVDiskStateInfo {
5
8
  VDiskId?: TVDiskID;
6
9
  /** uint64 */
@@ -0,0 +1,29 @@
1
+ import {FETCH_TOP_QUERIES, setTopQueriesState, setTopQueriesFilters} from '../../store/reducers/executeTopQueries';
2
+ import type {ApiRequestAction} from '../../store/utils';
3
+ import type {IResponseError} from '../api/error';
4
+ import type {IQueryResult} from './query';
5
+
6
+ export interface ITopQueriesFilters {
7
+ /** ms from epoch */
8
+ from?: number;
9
+ /** ms from epoch */
10
+ to?: number;
11
+ text?: string;
12
+ }
13
+
14
+ export interface ITopQueriesState {
15
+ loading: boolean;
16
+ wasLoaded: boolean;
17
+ data?: IQueryResult;
18
+ error?: IResponseError;
19
+ filters: ITopQueriesFilters;
20
+ }
21
+
22
+ export type ITopQueriesAction =
23
+ | ApiRequestAction<typeof FETCH_TOP_QUERIES, IQueryResult, IResponseError>
24
+ | ReturnType<typeof setTopQueriesState>
25
+ | ReturnType<typeof setTopQueriesFilters>;
26
+
27
+ export interface ITopQueriesRootStateSlice {
28
+ executeTopQueries: ITopQueriesState;
29
+ }