ydb-embedded-ui 3.3.3 → 3.4.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.
- package/CHANGELOG.md +28 -0
- package/dist/components/Errors/ResponseError/ResponseError.tsx +2 -2
- package/dist/components/InfoViewer/formatters/topicStats.tsx +8 -29
- package/dist/components/LabelWithPopover/LabelWithPopover.tsx +20 -0
- package/dist/components/LabelWithPopover/index.ts +1 -0
- package/dist/components/LagImages/LagImages.tsx +205 -0
- package/dist/components/LagImages/index.ts +1 -0
- package/dist/components/SpeedMultiMeter/SpeedMultiMeter.scss +92 -0
- package/dist/components/SpeedMultiMeter/SpeedMultiMeter.tsx +120 -0
- package/dist/components/SpeedMultiMeter/i18n/en.json +6 -0
- package/dist/components/SpeedMultiMeter/i18n/index.ts +13 -0
- package/dist/components/SpeedMultiMeter/i18n/ru.json +6 -0
- package/dist/components/SpeedMultiMeter/index.ts +1 -0
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +26 -14
- package/dist/containers/Storage/VDisk/VDisk.tsx +20 -5
- package/dist/containers/Storage/VDiskPopup/VDiskPopup.tsx +34 -5
- package/dist/containers/Storage/utils/types.ts +5 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +32 -3
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.tsx +62 -69
- package/dist/containers/Tenant/Diagnostics/Consumers/Headers/Headers.scss +13 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/Headers/Headers.tsx +27 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/Headers/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.scss +32 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.tsx +43 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/TopicStats/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/columns/Columns.scss +5 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.tsx +66 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/columns/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/i18n/en.json +4 -3
- package/dist/containers/Tenant/Diagnostics/Consumers/i18n/ru.json +4 -3
- package/dist/containers/Tenant/Diagnostics/Consumers/utils/constants.ts +23 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +7 -3
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +15 -9
- package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.scss +9 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.tsx +6 -8
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.scss +33 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.tsx +76 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +45 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.tsx +254 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsWrapper.tsx +79 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/Columns.scss +13 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.tsx +246 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/i18n/en.json +13 -0
- package/dist/containers/Tenant/Diagnostics/{OverloadedShards → Partitions}/i18n/index.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/i18n/ru.json +13 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/constants.ts +74 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/types.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.scss +8 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.tsx +56 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/{OverloadedShards/OverloadedShards.scss → TopShards/TopShards.scss} +2 -10
- package/dist/containers/Tenant/Diagnostics/{OverloadedShards/OverloadedShards.tsx → TopShards/TopShards.tsx} +61 -31
- package/dist/containers/Tenant/Diagnostics/TopShards/i18n/en.json +6 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/i18n/index.ts +11 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/i18n/ru.json +6 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/index.ts +1 -0
- package/dist/containers/Tenant/utils/schema.ts +1 -16
- package/dist/services/api.d.ts +4 -0
- package/dist/services/api.js +22 -6
- package/dist/store/reducers/authentication.js +0 -15
- package/dist/store/reducers/consumer.ts +160 -0
- package/dist/store/reducers/index.ts +2 -0
- package/dist/store/reducers/settings.js +2 -0
- package/dist/store/reducers/shardsWorkload.ts +28 -2
- package/dist/store/reducers/topic.ts +82 -2
- package/dist/store/state-url-mapping.js +3 -0
- package/dist/types/store/consumer.ts +55 -0
- package/dist/types/store/shardsWorkload.ts +6 -0
- package/dist/types/store/topic.ts +23 -6
- package/dist/utils/bytesParsers/convertBytesObjectToSpeed.ts +24 -0
- package/dist/utils/bytesParsers/formatBytesCustom.ts +57 -0
- package/dist/utils/bytesParsers/i18n/en.json +7 -0
- package/dist/utils/bytesParsers/i18n/index.ts +11 -0
- package/dist/utils/bytesParsers/i18n/ru.json +7 -0
- package/dist/utils/bytesParsers/index.ts +2 -0
- package/dist/utils/constants.ts +3 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/storage.ts +2 -2
- package/dist/utils/timeParsers/index.ts +2 -1
- package/dist/utils/timeParsers/parsers.ts +18 -0
- package/dist/utils/timeParsers/{protobuf.ts → protobufParsers.ts} +0 -0
- package/dist/utils/typecheckers.ts +5 -0
- package/dist/utils/utils.js +3 -3
- package/package.json +2 -2
- package/dist/containers/Tenant/Diagnostics/OverloadedShards/i18n/en.json +0 -4
- package/dist/containers/Tenant/Diagnostics/OverloadedShards/i18n/ru.json +0 -4
- package/dist/containers/Tenant/Diagnostics/OverloadedShards/index.ts +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {i18n, Lang} from '../../i18n';
|
|
2
|
+
|
|
3
|
+
import en from './en.json';
|
|
4
|
+
import ru from './ru.json';
|
|
5
|
+
|
|
6
|
+
const COMPONENT = 'ydb-bytes-parsers';
|
|
7
|
+
|
|
8
|
+
i18n.registerKeyset(Lang.En, COMPONENT, en);
|
|
9
|
+
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
|
|
10
|
+
|
|
11
|
+
export default i18n.keyset(COMPONENT);
|
package/dist/utils/constants.ts
CHANGED
|
@@ -9,6 +9,7 @@ export const AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
|
|
9
9
|
// by agreement, display all byte values in decimal scale
|
|
10
10
|
// values in data are always in bytes, never in higher units,
|
|
11
11
|
// therefore there is no issue arbitrary converting them in UI
|
|
12
|
+
export const KILOBYTE = 1_000;
|
|
12
13
|
export const MEGABYTE = 1_000_000;
|
|
13
14
|
export const GIGABYTE = 1_000_000_000;
|
|
14
15
|
export const TERABYTE = 1_000_000_000_000;
|
|
@@ -118,3 +119,5 @@ export const DEFAULT_TABLE_SETTINGS = {
|
|
|
118
119
|
|
|
119
120
|
export const TENANT_INITIAL_TAB_KEY = 'saved_tenant_initial_tab';
|
|
120
121
|
export const QUERY_INITIAL_RUN_ACTION_KEY = 'query_initial_run_action';
|
|
122
|
+
|
|
123
|
+
export const PARTITIONS_SELECTED_COLUMNS_KEY = 'partitionsSelectedColumns';
|
package/dist/utils/index.js
CHANGED
|
@@ -9,6 +9,8 @@ import {isNumeric} from './utils';
|
|
|
9
9
|
|
|
10
10
|
numeral.locale(i18n.lang);
|
|
11
11
|
|
|
12
|
+
// Here you can't control displayed size and precision
|
|
13
|
+
// If you need more custom format, use formatBytesCustom instead
|
|
12
14
|
export const formatBytes = (bytes) => {
|
|
13
15
|
if (!isNumeric(bytes)) {
|
|
14
16
|
return '';
|
|
@@ -42,6 +44,10 @@ export const formatUptime = (seconds) => {
|
|
|
42
44
|
return uptime;
|
|
43
45
|
};
|
|
44
46
|
|
|
47
|
+
export const formatMsToUptime = (ms) => {
|
|
48
|
+
return formatUptime(ms / 1000);
|
|
49
|
+
};
|
|
50
|
+
|
|
45
51
|
export const formatIOPS = (value, capacity) => {
|
|
46
52
|
return [Math.floor(value), Math.floor(capacity) + ' IOPS'];
|
|
47
53
|
};
|
package/dist/utils/storage.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type {TVSlotId, TVDiskStateInfo} from '../types/api/vdisk';
|
|
2
2
|
import type {IStoragePoolGroup} from '../types/store/storage';
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
'VDiskId' in
|
|
4
|
+
export const isFullVDiksData = (disk: TVDiskStateInfo | TVSlotId): disk is TVDiskStateInfo =>
|
|
5
|
+
'VDiskId' in disk;
|
|
6
6
|
|
|
7
7
|
export const getUsage = (data: IStoragePoolGroup, step = 1) => {
|
|
8
8
|
// if limit is 0, display 0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type {IProtobufTimeObject} from '../../types/api/common';
|
|
2
|
+
|
|
3
|
+
import {parseProtobufDurationToMs, parseProtobufTimestampToMs} from '.';
|
|
4
|
+
|
|
5
|
+
export const parseLag = (value: string | IProtobufTimeObject | undefined) =>
|
|
6
|
+
value ? parseProtobufDurationToMs(value) : 0;
|
|
7
|
+
|
|
8
|
+
export const parseTimestampToIdleTime = (value: string | IProtobufTimeObject | undefined) => {
|
|
9
|
+
if (!value) {
|
|
10
|
+
return 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const duration = Date.now() - parseProtobufTimestampToMs(value);
|
|
14
|
+
|
|
15
|
+
// Duration could be negative because of the difference between server and local time
|
|
16
|
+
// Usually it below 100ms, so it could be omitted
|
|
17
|
+
return duration < 0 ? 0 : duration;
|
|
18
|
+
};
|
|
File without changes
|
package/dist/utils/utils.js
CHANGED
|
@@ -76,9 +76,9 @@ export function bytesToGB(bytes, shouldRound) {
|
|
|
76
76
|
|
|
77
77
|
export function pad9(val) {
|
|
78
78
|
const len = String(val).length;
|
|
79
|
-
let result = val
|
|
79
|
+
let result = val;
|
|
80
80
|
for (let i = len; i < 9; i++) {
|
|
81
|
-
result =
|
|
81
|
+
result = '0' + result;
|
|
82
82
|
}
|
|
83
83
|
return result;
|
|
84
84
|
}
|
|
@@ -88,4 +88,4 @@ export function isNumeric(value) {
|
|
|
88
88
|
// - isNaN treats true/false/''/etc. as numbers, parseFloat fixes this
|
|
89
89
|
// - parseFloat treats '123qwe' as number, isNaN fixes this
|
|
90
90
|
return !isNaN(value) && !isNaN(parseFloat(value));
|
|
91
|
-
}
|
|
91
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-embedded-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"reselect": "4.1.6",
|
|
40
40
|
"sass": "1.32.8",
|
|
41
41
|
"web-vitals": "1.1.2",
|
|
42
|
-
"ydb-ui-components": "^3.0.
|
|
42
|
+
"ydb-ui-components": "^3.0.3"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"start": "react-app-rewired start",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './OverloadedShards';
|