ydb-embedded-ui 1.9.0 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/components/IndexInfoViewer/IndexInfoViewer.tsx +10 -7
  3. package/dist/components/InfoViewer/InfoViewer.scss +1 -2
  4. package/dist/components/InfoViewer/utils.ts +18 -10
  5. package/dist/containers/Storage/Pdisk/Pdisk.tsx +25 -33
  6. package/dist/containers/Storage/Vdisk/Vdisk.js +2 -0
  7. package/dist/containers/Tablet/Tablet.js +2 -2
  8. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +15 -14
  9. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +24 -14
  10. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
  11. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +20 -13
  12. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +80 -10
  13. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +12 -2
  14. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +164 -42
  15. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +18 -0
  16. package/dist/containers/Tenant/utils/schema.ts +73 -28
  17. package/dist/containers/Tenant/utils/schemaActions.ts +45 -32
  18. package/dist/services/api.js +13 -9
  19. package/dist/store/reducers/executeQuery.js +4 -3
  20. package/dist/store/reducers/executeTopQueries.js +1 -1
  21. package/dist/store/reducers/olapStats.js +5 -1
  22. package/dist/store/reducers/preview.js +1 -1
  23. package/dist/store/reducers/settings.js +20 -13
  24. package/dist/store/reducers/shardsWorkload.js +32 -4
  25. package/dist/types/api/schema.ts +123 -4
  26. package/dist/types/api/storage.ts +1 -1
  27. package/dist/utils/constants.js +4 -0
  28. package/dist/utils/index.js +7 -3
  29. package/dist/utils/pdisk.ts +2 -2
  30. package/package.json +2 -2
@@ -16,7 +16,7 @@ export interface TEvDescribeSchemeResult {
16
16
  PathOwnerId?: string;
17
17
  }
18
18
 
19
- enum EStatus {
19
+ enum EStatus {
20
20
  StatusSuccess = 'StatusSuccess',
21
21
  StatusAccepted = 'StatusAccepted',
22
22
  StatusPathDoesNotExist = 'StatusPathDoesNotExist',
@@ -47,8 +47,8 @@ interface TPathDescription {
47
47
  Children?: TDirEntry[];
48
48
 
49
49
  // for table
50
- Table?: unknown;
51
- TableStats?: unknown;
50
+ Table?: TTableDescription;
51
+ TableStats?: TTableStats;
52
52
  TabletMetrics?: unknown;
53
53
  TablePartitions?: unknown[];
54
54
 
@@ -82,6 +82,119 @@ interface TDirEntry {
82
82
  Version?: TPathVersion;
83
83
  }
84
84
 
85
+ // incomplete
86
+ export interface TTableDescription {
87
+ PartitionConfig?: TPartitionConfig;
88
+ }
89
+
90
+ // incomplete
91
+ export interface TPartitionConfig {
92
+ /** uint64 */
93
+ FollowerCount?: string;
94
+ /**
95
+ * uint32
96
+ * @deprecated use FollowerGroups
97
+ */
98
+ CrossDataCenterFollowerCount?: string;
99
+ /** 0 or 1 items */
100
+ FollowerGroups?: TFollowerGroup[];
101
+ }
102
+
103
+ export interface TFollowerGroup {
104
+ /** uint32 */
105
+ FollowerCount?: string;
106
+ AllowLeaderPromotion?: boolean;
107
+ AllowClientRead?: boolean;
108
+ /** uint32[] */
109
+ AllowedNodeIDs?: string[];
110
+ /**
111
+ * uint32[]
112
+ * @deprecated use AllowedDataCenters
113
+ */
114
+ AllowedDataCenterNumIDs?: string[];
115
+ RequireAllDataCenters?: boolean;
116
+ LocalNodeOnly?: boolean;
117
+ RequireDifferentNodes?: boolean;
118
+ FollowerCountPerDataCenter?: boolean; // multiplies FollowerCount by number of DataCenters
119
+ AllowedDataCenters?: string[];
120
+ }
121
+
122
+ interface TTableStats {
123
+ /** uint64 */
124
+ DataSize?: string;
125
+ /** uint64 */
126
+ RowCount?: string;
127
+ /** uint64 */
128
+ IndexSize?: string;
129
+ /** uint64 */
130
+ InMemSize?: string;
131
+
132
+ /**
133
+ * uint64
134
+ * unix time in millisec
135
+ */
136
+ LastAccessTime?: string;
137
+ /**
138
+ * uint64
139
+ * unix time in millisec
140
+ */
141
+ LastUpdateTime?: string;
142
+
143
+ RowCountHistogram?: THistogram;
144
+ DataSizeHistogram?: THistogram;
145
+
146
+ /** uint64 */
147
+ ImmediateTxCompleted?: string;
148
+ /** uint64 */
149
+ PlannedTxCompleted?: string;
150
+ /** uint64 */
151
+ TxRejectedByOverload?: string;
152
+ /** uint64 */
153
+ TxRejectedBySpace?: string;
154
+ /** uint64 */
155
+ TxCompleteLagMsec?: string;
156
+ /** uint64 */
157
+ InFlightTxCount?: string;
158
+
159
+ /** uint64 */
160
+ RowUpdates?: string;
161
+ /** uint64 */
162
+ RowDeletes?: string;
163
+ /** uint64 */
164
+ RowReads?: string;
165
+ /** uint64 */
166
+ RangeReads?: string;
167
+ /** uint64 */
168
+ RangeReadRows?: string;
169
+
170
+ /** uint64 */
171
+ PartCount?: string;
172
+
173
+ KeyAccessSample?: THistogram;
174
+
175
+ /** uint64 */
176
+ SearchHeight?: string;
177
+
178
+ /**
179
+ * uint64
180
+ * seconds since epoch
181
+ */
182
+ LastFullCompactionTs?: string;
183
+
184
+ // i.e. this shard lent to other shards
185
+ HasLoanedParts?: boolean;
186
+ }
187
+
188
+ interface THistogram {
189
+ Buckets?: THistogramBucket[];
190
+ }
191
+
192
+ interface THistogramBucket {
193
+ Key?: string;
194
+ /** uint64 */
195
+ Value?: string;
196
+ }
197
+
85
198
  export interface TIndexDescription {
86
199
  Name?: string;
87
200
  /** uint64 */
@@ -108,10 +221,16 @@ export enum EPathType {
108
221
  EPathTypeInvalid = 'EPathTypeInvalid',
109
222
  EPathTypeDir = 'EPathTypeDir',
110
223
  EPathTypeTable = 'EPathTypeTable',
224
+
111
225
  EPathTypeSubDomain = 'EPathTypeSubDomain',
226
+
227
+ EPathTypeTableIndex = 'EPathTypeTableIndex',
228
+ EPathTypeExtSubDomain = 'EPathTypeExtSubDomain',
229
+
112
230
  EPathTypeColumnStore = 'EPathTypeColumnStore',
113
231
  EPathTypeColumnTable = 'EPathTypeColumnTable',
114
- EPathTypeTableIndex = 'EPathTypeTableIndex',
232
+ EPathTypeCdcStream = 'EPathTypeCdcStream',
233
+
115
234
  }
116
235
 
117
236
  export enum EPathSubType {
@@ -6,7 +6,7 @@ enum EFlag {
6
6
  Red = 'Red',
7
7
  }
8
8
 
9
- enum TPDiskState {
9
+ export enum TPDiskState {
10
10
  Initial = 'Initial',
11
11
  InitialFormatRead = 'InitialFormatRead',
12
12
  InitialFormatReadError = 'InitialFormatReadError',
@@ -6,6 +6,9 @@ export const GROUP_AUTO_RELOAD_INTERVAL = 10 * SECOND;
6
6
  export const PDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
7
7
  export const VDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
8
8
  export const AUTO_RELOAD_INTERVAL = 10 * SECOND;
9
+ // by agreement, display all byte values in decimal scale
10
+ // values in data are always in bytes, never in higher units,
11
+ // therefore there is no issue arbitrary converting them in UI
9
12
  export const MEGABYTE = 1_000_000;
10
13
  export const GIGABYTE = 1_000_000_000;
11
14
  export const TERABYTE = 1_000_000_000_000;
@@ -139,3 +142,4 @@ export const DEFAULT_TABLE_SETTINGS = {
139
142
  };
140
143
 
141
144
  export const TENANT_INITIAL_TAB_KEY = 'saved_tenant_initial_tab';
145
+ export const QUERY_INITIAL_RUN_ACTION_KEY = 'query_initial_run_action';
@@ -1,16 +1,20 @@
1
1
  import numeral from 'numeral';
2
2
  import _ from 'lodash';
3
3
 
4
+ import {i18n} from './i18n';
4
5
  import {MEGABYTE, TERABYTE, DAY_IN_SECONDS, GIGABYTE} from './constants';
5
6
 
6
7
  import locales from 'numeral/locales'; // eslint-disable-line no-unused-vars
7
- numeral.locale('ru');
8
- numeral.localeData().delimiters.decimal = '.';
8
+
9
+ numeral.locale(i18n.lang);
9
10
 
10
11
  export const formatBytes = (bytes) => {
11
- return numeral(bytes).format('0 ib').replace('i', '');
12
+ // by agreement, display byte values in decimal scale
13
+ return numeral(bytes).format('0 b');
12
14
  };
13
15
 
16
+ export const formatBps = (bytes) => formatBytes(bytes) + '/s';
17
+
14
18
  export const formatBytesToGigabyte = (bytes) => {
15
19
  return `${Math.floor(bytes / GIGABYTE)} GB`;
16
20
  };
@@ -28,7 +28,7 @@ export const parseBitField = <T extends Record<string, number>>(
28
28
  };
29
29
 
30
30
  export enum IPDiskType {
31
- ROT = 'ROT',
31
+ HDD = 'HDD', // ROT (Rotation?) = HDD
32
32
  SSD = 'SSD',
33
33
  MVME = 'NVME',
34
34
  }
@@ -67,7 +67,7 @@ export const getPDiskType = (data: TPDiskStateInfo): IPDiskType | undefined => {
67
67
  return IPDiskType.MVME;
68
68
  }
69
69
  } else if (categoryBitField.typeExt === '0') {
70
- return IPDiskType.ROT;
70
+ return IPDiskType.HDD;
71
71
  }
72
72
 
73
73
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.9.0",
3
+ "version": "1.10.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -40,7 +40,7 @@
40
40
  "reselect": "4.0.0",
41
41
  "sass": "1.32.8",
42
42
  "web-vitals": "1.1.2",
43
- "ydb-ui-components": "2.4.0"
43
+ "ydb-ui-components": "2.4.1"
44
44
  },
45
45
  "scripts": {
46
46
  "start": "react-app-rewired start",