ydb-embedded-ui 2.5.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/components/InfoViewer/InfoViewer.scss +3 -3
  3. package/dist/components/InfoViewer/schemaInfo/CDCStreamInfo.tsx +23 -9
  4. package/dist/containers/Storage/Pdisk/Pdisk.tsx +3 -9
  5. package/dist/containers/Storage/Pdisk/__tests__/colors.tsx +1 -1
  6. package/dist/containers/Storage/Storage.js +11 -1
  7. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +39 -32
  8. package/dist/containers/Tenant/Diagnostics/Compute/Compute.js +21 -13
  9. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.tsx +22 -6
  10. package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +40 -9
  11. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +15 -9
  12. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +1 -1
  13. package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.tsx +13 -5
  14. package/dist/containers/Tenant/Diagnostics/Network/Network.js +17 -4
  15. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +50 -16
  16. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +16 -2
  17. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +1 -0
  18. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +2 -2
  19. package/dist/containers/Tenant/utils/schema.ts +84 -0
  20. package/dist/services/api.d.ts +17 -11
  21. package/dist/store/reducers/describe.ts +56 -14
  22. package/dist/store/reducers/healthcheckInfo.ts +23 -8
  23. package/dist/store/reducers/network.js +22 -1
  24. package/dist/store/reducers/nodes.js +13 -0
  25. package/dist/store/reducers/schema.ts +84 -11
  26. package/dist/store/reducers/storage.js +13 -0
  27. package/dist/types/api/enums.ts +10 -0
  28. package/dist/types/api/nodes.ts +96 -0
  29. package/dist/types/api/pdisk.ts +48 -0
  30. package/dist/types/api/schema.ts +148 -9
  31. package/dist/types/api/storage.ts +3 -173
  32. package/dist/types/api/tablet.ts +97 -0
  33. package/dist/types/api/vdisk.ts +120 -0
  34. package/dist/types/store/describe.ts +8 -2
  35. package/dist/types/store/healthcheck.ts +12 -0
  36. package/dist/types/store/schema.ts +7 -1
  37. package/dist/utils/pdisk.ts +1 -1
  38. package/dist/utils/storage.ts +1 -1
  39. package/package.json +3 -2
@@ -1,7 +1,16 @@
1
1
  import {Reducer} from 'redux';
2
+ import {createSelector, Selector} from 'reselect';
2
3
 
3
- import {ISchemaAction, ISchemaData, ISchemaState} from '../../types/store/schema';
4
+ import {
5
+ ISchemaAction,
6
+ ISchemaData,
7
+ ISchemaHandledResponse,
8
+ ISchemaRootStateSlice,
9
+ ISchemaState,
10
+ } from '../../types/store/schema';
11
+ import {EPathType} from '../../types/api/schema';
4
12
  import '../../services/api';
13
+ import {isEntityWithMergedImplementation} from '../../containers/Tenant/utils/schema';
5
14
 
6
15
  import {createRequestActionTypes, createApiRequest} from '../utils';
7
16
 
@@ -31,22 +40,24 @@ const schema: Reducer<ISchemaState, ISchemaAction> = (state = initialState, acti
31
40
  };
32
41
  }
33
42
  case FETCH_SCHEMA.SUCCESS: {
34
- const newData = JSON.parse(JSON.stringify(state.data));
43
+ const isCurrentSchema =
44
+ !state.currentSchemaPath || state.currentSchemaPath === action.data.path;
35
45
 
36
- if (action.data.Path) {
37
- newData[action.data.Path] = action.data;
46
+ const newData = {...state.data, ...action.data.data};
47
+
48
+ if (!isCurrentSchema) {
49
+ return {
50
+ ...state,
51
+ data: newData,
52
+ };
38
53
  }
39
54
 
40
- const currentSchema = state.currentSchemaPath
41
- ? newData[state.currentSchemaPath]
42
- : action.data;
43
- const currentSchemaPath = state.currentSchemaPath || action.data.Path;
44
55
  return {
45
56
  ...state,
46
57
  error: undefined,
47
58
  data: newData,
48
- currentSchema,
49
- currentSchemaPath,
59
+ currentSchema: action.data.currentSchema,
60
+ currentSchemaPath: action.data.path,
50
61
  loading: false,
51
62
  wasLoaded: true,
52
63
  };
@@ -109,9 +120,48 @@ const schema: Reducer<ISchemaState, ISchemaAction> = (state = initialState, acti
109
120
  };
110
121
 
111
122
  export function getSchema({path}: {path: string}) {
123
+ const request = window.api.getSchema({path});
112
124
  return createApiRequest({
113
- request: window.api.getSchema({path}),
125
+ request,
114
126
  actions: FETCH_SCHEMA,
127
+ dataHandler: (data): ISchemaHandledResponse => {
128
+ const newData: ISchemaData = {};
129
+ if (data.Path) {
130
+ newData[data.Path] = data;
131
+ }
132
+ return {
133
+ path: data.Path,
134
+ currentSchema: data,
135
+ data: newData,
136
+ };
137
+ },
138
+ });
139
+ }
140
+
141
+ export function getSchemaBatched(paths: string[]) {
142
+ const requestArray = paths.map((p) =>
143
+ window.api.getSchema({path: p}, {concurrentId: `getSchemaBatched|${p}`}),
144
+ );
145
+ const request = Promise.all(requestArray);
146
+
147
+ return createApiRequest({
148
+ request,
149
+ actions: FETCH_SCHEMA,
150
+ dataHandler: (data): ISchemaHandledResponse => {
151
+ const newData: ISchemaData = {};
152
+
153
+ data.forEach((dataItem) => {
154
+ if (dataItem.Path) {
155
+ newData[dataItem.Path] = dataItem;
156
+ }
157
+ });
158
+
159
+ return {
160
+ path: data[0].Path,
161
+ currentSchema: data[0],
162
+ data: newData,
163
+ };
164
+ },
115
165
  });
116
166
  }
117
167
 
@@ -153,4 +203,27 @@ export function resetLoadingState() {
153
203
  } as const;
154
204
  }
155
205
 
206
+ export const selectSchemaChildren = (state: ISchemaRootStateSlice, path?: string) =>
207
+ path ? state.schema.data[path]?.PathDescription?.Children : undefined;
208
+
209
+ export const selectSchemaData = (state: ISchemaRootStateSlice, path?: string) =>
210
+ path ? state.schema.data[path] : undefined;
211
+
212
+ export const selectSchemaMergedChildrenPaths: Selector<
213
+ ISchemaRootStateSlice,
214
+ string[] | undefined,
215
+ [string | undefined, EPathType | undefined]
216
+ > = createSelector(
217
+ [
218
+ (_, path?: string) => path,
219
+ (_, _path, type: EPathType | undefined) => type,
220
+ selectSchemaChildren,
221
+ ],
222
+ (path, type, children) => {
223
+ return isEntityWithMergedImplementation(type)
224
+ ? children?.map(({Name}) => path + '/' + Name)
225
+ : undefined;
226
+ },
227
+ );
228
+
156
229
  export default schema;
@@ -34,6 +34,7 @@ const SET_USAGE_FILTER = 'storage/SET_USAGE_FILTER';
34
34
  const SET_VISIBLE_GROUPS = 'storage/SET_VISIBLE_GROUPS';
35
35
  const SET_STORAGE_TYPE = 'storage/SET_STORAGE_TYPE';
36
36
  const SET_NODES_UPTIME_FILTER = 'storage/SET_NODES_UPTIME_FILTER';
37
+ const SET_DATA_WAS_NOT_LOADED = 'storage/SET_DATA_WAS_NOT_LOADED';
37
38
 
38
39
  const initialState = {
39
40
  loading: true,
@@ -116,6 +117,12 @@ const storage = (state = initialState, action) => {
116
117
  error: undefined,
117
118
  };
118
119
  }
120
+ case SET_DATA_WAS_NOT_LOADED: {
121
+ return {
122
+ ...state,
123
+ wasLoaded: false,
124
+ };
125
+ }
119
126
  default:
120
127
  return state;
121
128
  }
@@ -169,6 +176,12 @@ export function setNodesUptimeFilter(value) {
169
176
  };
170
177
  }
171
178
 
179
+ export const setDataWasNotLoaded = () => {
180
+ return {
181
+ type: SET_DATA_WAS_NOT_LOADED,
182
+ };
183
+ };
184
+
172
185
  export const getStoragePools = (state) => state.storage.data?.StoragePools;
173
186
  export const getStoragePoolsGroupsCount = (state) => ({
174
187
  total: state.storage.data?.TotalGroups || 0,
@@ -0,0 +1,10 @@
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
4
+ export enum EFlag {
5
+ Grey = 'Grey',
6
+ Green = 'Green',
7
+ Yellow = 'Yellow',
8
+ Orange = 'Orange',
9
+ Red = 'Red',
10
+ }
@@ -0,0 +1,96 @@
1
+ import {EFlag} from './enums';
2
+ import {TPDiskStateInfo} from './pdisk';
3
+ import {TTabletStateInfo} from './tablet';
4
+
5
+ export interface TNodesInfo {
6
+ Overall: EFlag;
7
+ Nodes?: TNodeInfo[];
8
+
9
+ /** uint64 */
10
+ TotalNodes: string;
11
+ /** uint64 */
12
+ FoundNodes: string;
13
+ }
14
+
15
+ interface TNodeInfo {
16
+ NodeId: number;
17
+ SystemState: TSystemStateInfo;
18
+ PDisks?: TPDiskStateInfo[];
19
+ Tablets?: TTabletStateInfo[];
20
+ }
21
+
22
+ interface TSystemStateInfo {
23
+ /** uint64 */
24
+ StartTime?: string;
25
+ /** uint64 */
26
+ ChangeTime?: string;
27
+ SystemLocation?: TLegacyNodeLocation;
28
+ /** double */
29
+ LoadAverage?: number[];
30
+ NumberOfCpus?: number;
31
+ SystemState?: EFlag;
32
+ MessageBusState?: EFlag;
33
+ GRpcState?: EFlag;
34
+ NodeId?: number;
35
+ Count?: number;
36
+ DataCenterId?: number;
37
+ DataCenterDescription?: string;
38
+ DataCenter?: string;
39
+ RackId?: number;
40
+ Rack?: string;
41
+ Host?: string;
42
+ Version?: string;
43
+ PoolStats?: TPoolStats[];
44
+ Endpoints?: TEndpoint[];
45
+ Roles?: string[];
46
+ Tenants?: string[];
47
+ ClusterName?: string;
48
+ /** uint64 */
49
+ MemoryUsed?: string;
50
+ /** uint64 */
51
+ MemoryLimit?: string;
52
+ ConfigState?: EConfigState; //default = Consistent
53
+ /** uint64 */
54
+ MemoryUsedInAlloc?: string;
55
+ /** double */
56
+ MaxDiskUsage?: number;
57
+ Location?: TNodeLocation;
58
+ }
59
+
60
+ interface TPoolStats {
61
+ Name?: string;
62
+ /** double */
63
+ Usage?: number;
64
+ Threads?: number;
65
+ }
66
+
67
+ interface TEndpoint {
68
+ Name?: string;
69
+ Address?: string;
70
+ }
71
+
72
+ interface TLegacyNodeLocation {
73
+ DataCenter?: number;
74
+ Room?: number;
75
+ Rack?: number;
76
+ Body?: number;
77
+ }
78
+
79
+ interface TNodeLocation {
80
+ // compatibility section -- will be removed in future versions
81
+ DataCenterNum?: number; // deprecated
82
+ RoomNum?: number; // deprecated
83
+ RackNum?: number; // deprecated
84
+ BodyNum?: number; // deprecated
85
+ Body?: number; // deprecated
86
+
87
+ DataCenter?: string;
88
+ Module?: string;
89
+ Rack?: string;
90
+ Unit?: string;
91
+ }
92
+
93
+ enum EConfigState {
94
+ 'Consistent' = 'Consistent',
95
+ 'Outdated' = 'Outdated',
96
+ }
@@ -0,0 +1,48 @@
1
+ import {EFlag} from './enums';
2
+
3
+ export interface TPDiskStateInfo {
4
+ PDiskId?: number;
5
+ /** uint64 */
6
+ CreateTime?: string;
7
+ /** uint64 */
8
+ ChangeTime?: string;
9
+ Path?: string;
10
+ /** uint64 */
11
+ Guid?: string;
12
+ /** uint64 */
13
+ Category?: string;
14
+ /** uint64 */
15
+ AvailableSize?: string;
16
+ /** uint64 */
17
+ TotalSize?: string;
18
+ State?: TPDiskState;
19
+ NodeId?: number;
20
+ Count?: number;
21
+ Device?: EFlag;
22
+ Realtime?: EFlag;
23
+ StateFlag?: EFlag;
24
+ Overall?: EFlag;
25
+ SerialNumber?: string;
26
+ }
27
+
28
+ export enum TPDiskState {
29
+ Initial = 'Initial',
30
+ InitialFormatRead = 'InitialFormatRead',
31
+ InitialFormatReadError = 'InitialFormatReadError',
32
+ InitialSysLogRead = 'InitialSysLogRead',
33
+ InitialSysLogReadError = 'InitialSysLogReadError',
34
+ InitialSysLogParseError = 'InitialSysLogParseError',
35
+ InitialCommonLogRead = 'InitialCommonLogRead',
36
+ InitialCommonLogReadError = 'InitialCommonLogReadError',
37
+ InitialCommonLogParseError = 'InitialCommonLogParseError',
38
+ CommonLoggerInitError = 'CommonLoggerInitError',
39
+ Normal = 'Normal',
40
+ OpenFileError = 'OpenFileError',
41
+ ChunkQuotaError = 'ChunkQuotaError',
42
+ DeviceIoError = 'DeviceIoError',
43
+
44
+ Missing = 'Missing',
45
+ Timeout = 'Timeout',
46
+ NodeDisconnected = 'NodeDisconnected',
47
+ Unknown = 'Unknown',
48
+ }
@@ -41,7 +41,7 @@ enum EStatus {
41
41
  interface TPathDescription {
42
42
  /** info about the path itself */
43
43
  Self?: TDirEntry;
44
- DomainDescription?: unknown;
44
+ DomainDescription?: TDomainDescription;
45
45
 
46
46
  // for directory
47
47
  Children?: TDirEntry[];
@@ -85,6 +85,145 @@ export interface TDirEntry {
85
85
  Version?: TPathVersion;
86
86
  }
87
87
 
88
+ interface TDomainDescription {
89
+ ProcessingParams?: TProcessingParams;
90
+
91
+ DomainKey?: TDomainKey;
92
+
93
+ StoragePools?: TStoragePool[];
94
+
95
+ /** uint64 */
96
+ PathsInside?: string;
97
+ /** uint64 */
98
+ PathsLimit?: string;
99
+ /** uint64 */
100
+ ShardsInside?: string;
101
+ /** uint64 */
102
+ ShardsLimit?: string;
103
+
104
+ ResourcesDomainKey?: TDomainKey;
105
+
106
+ DiskSpaceUsage?: TDiskSpaceUsage;
107
+
108
+ /** uint64 */
109
+ PQPartitionsInside?: string;
110
+ /** uint64 */
111
+ PQPartitionsLimit?: string;
112
+
113
+ DomainState?: TDomainState;
114
+
115
+ DeclaredSchemeQuotas?: TSchemeQuotas;
116
+ DatabaseQuotas?: DatabaseQuotas;
117
+ SecurityState?: TSecurityState;
118
+ }
119
+
120
+ interface TDomainKey {
121
+ /** fixed64 */
122
+ SchemeShard?: string;
123
+ /** fixed64 */
124
+ PathId?: string;
125
+ }
126
+
127
+ interface TProcessingParams {
128
+ Version?: number;
129
+ /** uint64 */
130
+ PlanResolution?: string;
131
+ /** fixed64 */
132
+ Coordinators?: string[];
133
+ /** uint64 */
134
+ TimeCastBucketsPerMediator?: string;
135
+ /** fixed64 */
136
+ Mediators?: string[];
137
+ /** fixed64 */
138
+ SchemeShard?: string;
139
+ /** fixed64 */
140
+ Hive?: string;
141
+ /** fixed64 */
142
+ SysViewProcessor?: string;
143
+ }
144
+
145
+ interface TDomainState {
146
+ DiskQuotaExceeded?: boolean;
147
+ }
148
+
149
+ interface TDiskSpaceUsage {
150
+ Tables?: TTables;
151
+ }
152
+
153
+ interface TTables {
154
+ /** uint64 */
155
+ TotalSize?: string;
156
+ /** uint64 */
157
+ DataSize?: string;
158
+ /** uint64 */
159
+ IndexSize?: string;
160
+ }
161
+
162
+ interface TStoragePool {
163
+ Name?: string;
164
+ Kind?: string;
165
+ }
166
+
167
+ interface TSchemeQuotas {
168
+ SchemeQuotas?: TSchemeQuota[];
169
+ }
170
+
171
+ interface TSchemeQuota {
172
+ /** double */
173
+ BucketSize?: number;
174
+ /** uint64 */
175
+ BucketSeconds?: string;
176
+ }
177
+
178
+ interface TSecurityState {
179
+ PublicKeys?: TPublicKey[];
180
+ Sids?: TSid[];
181
+ Audience: string;
182
+ }
183
+
184
+ interface TPublicKey {
185
+ /** uint64 */
186
+ KeyId: string;
187
+ KeyDataPEM: string;
188
+ /** uint64 */
189
+ ExpiresAt: string;
190
+ }
191
+
192
+ interface TSid {
193
+ Name: string;
194
+ Type: SidType;
195
+
196
+ Hash: string;
197
+ Members?: string[];
198
+ }
199
+
200
+ enum SidType {
201
+ 'UNKNOWN' = 'UNKNOWN',
202
+ 'USER' = 'USER',
203
+ 'GROUP' = 'GROUP',
204
+ }
205
+
206
+ interface DatabaseQuotas {
207
+ /** uint64 */
208
+ // eslint-disable-next-line camelcase
209
+ data_size_hard_quota: string;
210
+
211
+ /** uint64 */
212
+ // eslint-disable-next-line camelcase
213
+ data_size_soft_quota: string;
214
+
215
+ /** uint64 */
216
+ // eslint-disable-next-line camelcase
217
+ data_stream_shards_quota: string;
218
+
219
+ /** uint64 */
220
+ // eslint-disable-next-line camelcase
221
+ data_stream_reserved_storage_quota: string;
222
+
223
+ // eslint-disable-next-line camelcase
224
+ ttl_min_run_internal_seconds: number;
225
+ }
226
+
88
227
  // FIXME: incomplete
89
228
  export interface TTableDescription {
90
229
  PartitionConfig?: TPartitionConfig;
@@ -520,8 +659,8 @@ export interface TColumnTableDescription {
520
659
  }
521
660
 
522
661
  interface TColumnTableSchema {
523
- Columns: TOlapColumnDescription[];
524
- KeyColumnNames: string[];
662
+ Columns?: TOlapColumnDescription[];
663
+ KeyColumnNames?: string[];
525
664
  Engine?: EColumnTableEngine;
526
665
  NextColumnId?: number;
527
666
 
@@ -585,7 +724,7 @@ interface TStorageTier {
585
724
  Eviction?: TTtl;
586
725
  }
587
726
  interface TStorageTiering {
588
- Tiers: TStorageTier[];
727
+ Tiers?: TStorageTier[];
589
728
  }
590
729
 
591
730
  enum EUnit {
@@ -601,10 +740,10 @@ interface TColumnTableSharding {
601
740
  Version?: string;
602
741
 
603
742
  /** uint64 */
604
- ColumnShards: string[];
743
+ ColumnShards?: string[];
605
744
 
606
745
  /** uint64 */
607
- AdditionalColumnShards: string[];
746
+ AdditionalColumnShards?: string[];
608
747
 
609
748
  UniquePrimaryKey?: boolean;
610
749
 
@@ -614,7 +753,7 @@ interface TColumnTableSharding {
614
753
 
615
754
  interface THashSharding {
616
755
  Function?: EHashFunction;
617
- Columns: string[];
756
+ Columns?: string[];
618
757
  UniqueShardKey?: boolean;
619
758
  ActiveShardsCount?: number;
620
759
  }
@@ -637,9 +776,9 @@ export interface TColumnStoreDescription {
637
776
  ColumnShardCount?: number;
638
777
 
639
778
  /** uint64 */
640
- ColumnShards: string[];
779
+ ColumnShards?: string[];
641
780
 
642
- SchemaPresets: TColumnTableSchemaPreset[];
781
+ SchemaPresets?: TColumnTableSchemaPreset[];
643
782
  StorageConfig?: TColumnStorageConfig;
644
783
 
645
784
  NextSchemaPresetId?: number;
@@ -1,175 +1,5 @@
1
- enum EFlag {
2
- Grey = 'Grey',
3
- Green = 'Green',
4
- Yellow = 'Yellow',
5
- Orange = 'Orange',
6
- Red = 'Red',
7
- }
8
-
9
- export enum TPDiskState {
10
- Initial = 'Initial',
11
- InitialFormatRead = 'InitialFormatRead',
12
- InitialFormatReadError = 'InitialFormatReadError',
13
- InitialSysLogRead = 'InitialSysLogRead',
14
- InitialSysLogReadError = 'InitialSysLogReadError',
15
- InitialSysLogParseError = 'InitialSysLogParseError',
16
- InitialCommonLogRead = 'InitialCommonLogRead',
17
- InitialCommonLogReadError = 'InitialCommonLogReadError',
18
- InitialCommonLogParseError = 'InitialCommonLogParseError',
19
- CommonLoggerInitError = 'CommonLoggerInitError',
20
- Normal = 'Normal',
21
- OpenFileError = 'OpenFileError',
22
- ChunkQuotaError = 'ChunkQuotaError',
23
- DeviceIoError = 'DeviceIoError',
24
-
25
- Missing = 'Missing',
26
- Timeout = 'Timeout',
27
- NodeDisconnected = 'NodeDisconnected',
28
- Unknown = 'Unknown',
29
- }
30
-
31
- export interface TPDiskStateInfo {
32
- PDiskId?: number;
33
- /** uint64 */
34
- CreateTime?: string;
35
- /** uint64 */
36
- ChangeTime?: string;
37
- Path?: string;
38
- /** uint64 */
39
- Guid?: string;
40
- /** uint64 */
41
- Category?: string;
42
- /** uint64 */
43
- AvailableSize?: string;
44
- /** uint64 */
45
- TotalSize?: string;
46
- State?: TPDiskState;
47
- NodeId?: number;
48
- Count?: number;
49
- Device?: EFlag;
50
- Realtime?: EFlag;
51
- StateFlag?: EFlag;
52
- Overall?: EFlag;
53
- SerialNumber?: string;
54
- }
55
-
56
- export enum EVDiskState {
57
- Initial = 'Initial',
58
- LocalRecoveryError = 'LocalRecoveryError',
59
- SyncGuidRecovery = 'SyncGuidRecovery',
60
- SyncGuidRecoveryError = 'SyncGuidRecoveryError',
61
- OK = 'OK',
62
- PDiskError = 'PDiskError',
63
- }
64
-
65
- interface TRank {
66
- /**
67
- * Rank in percents; 0-100% is good; >100% is bad.
68
- * Formula for rank calculation is the following:
69
- * Rank = actual_value / max_allowed_value * 100
70
- */
71
- RankPercent?: number;
72
-
73
- /**
74
- * Flag is the Rank transformed to something simple
75
- * to understand: Green, Yellow or Red
76
- */
77
- Flag?: EFlag;
78
- }
79
-
80
- interface TVDiskSatisfactionRank {
81
- FreshRank?: TRank;
82
- LevelRank?: TRank;
83
- }
84
-
85
- interface TVDiskID {
86
- GroupID?: number;
87
- GroupGeneration?: number;
88
- Ring?: number;
89
- Domain?: number;
90
- VDisk?: number;
91
- }
92
-
93
- export interface TVSlotId {
94
- NodeId?: number;
95
- PDiskId?: number;
96
- VSlotId?: number;
97
- }
98
-
99
- export interface TVDiskStateInfo {
100
- VDiskId?: TVDiskID;
101
- /** uint64 */
102
- CreateTime?: string;
103
- /** uint64 */
104
- ChangeTime?: string;
105
- PDisk?: TPDiskStateInfo;
106
- VDiskSlotId?: number;
107
- /** uint64 */
108
- Guid?: string;
109
- /** uint64 */
110
- Kind?: string;
111
- NodeId?: number;
112
- Count?: number;
113
-
114
- Overall?: EFlag;
115
-
116
- /** Current state of VDisk */
117
- VDiskState?: EVDiskState;
118
- /** Disk space flags */
119
- DiskSpace?: EFlag;
120
- /** Compaction satisfaction rank */
121
- SatisfactionRank?: TVDiskSatisfactionRank;
122
- /** Is VDisk replicated? (i.e. contains all blobs it must have) */
123
- Replicated?: boolean;
124
- /** Does this VDisk has any yet unreplicated phantom-like blobs? */
125
- UnreplicatedPhantoms?: boolean;
126
- /** The same for the non-phantom-like blobs. */
127
- UnreplicatedNonPhantoms?: boolean;
128
- /**
129
- * uint64
130
- * How many unsynced VDisks from current BlobStorage group we see
131
- */
132
- UnsyncedVDisks?: string;
133
- /**
134
- * uint64
135
- * How much this VDisk have allocated on corresponding PDisk
136
- */
137
- AllocatedSize?: string;
138
- /**
139
- * uint64
140
- * How much space is available for VDisk corresponding to PDisk's hard space limits
141
- */
142
- AvailableSize?: string;
143
- /** Does this disk has some unreadable but not yet restored blobs? */
144
- HasUnreadableBlobs?: boolean;
145
- /** fixed64 */
146
- IncarnationGuid?: string;
147
- DonorMode?: boolean;
148
- /**
149
- * fixed64
150
- * VDisk actor instance guid
151
- */
152
- InstanceGuid?: string;
153
- // in reality it is `Donors: TVDiskStateInfo[] | TVSlotId[]`, but this way it is more error-proof
154
- Donors?: Array<TVDiskStateInfo | TVSlotId>;
155
-
156
- /** VDisk (Skeleton) Front Queue Status */
157
- FrontQueues?: EFlag;
158
-
159
- /** VDisk storage pool label */
160
- StoragePoolName?: string;
161
-
162
- /**
163
- * uint64
164
- * Read bytes per second from PDisk for TEvVGet blobs only
165
- */
166
- ReadThroughput?: string;
167
- /**
168
- * uint64
169
- * Write bytes per second to PDisk for TEvVPut blobs and replication bytes only
170
- */
171
- WriteThroughput?: string;
172
- }
1
+ import {EFlag} from './enums';
2
+ import {TVDiskStateInfo} from './vdisk';
173
3
 
174
4
  export interface TBSGroupStateInfo {
175
5
  GroupID?: number;
@@ -214,7 +44,7 @@ interface THiveStorageGroupStats {
214
44
  AvailableSize?: string;
215
45
  }
216
46
 
217
- export interface TStoragePoolInfo {
47
+ interface TStoragePoolInfo {
218
48
  Overall?: EFlag;
219
49
  Name?: string;
220
50
  Kind?: string;