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
@@ -0,0 +1,97 @@
1
+ import {EFlag} from './enums';
2
+
3
+ export interface TTabletStateInfo {
4
+ /** uint64 */
5
+ TabletId?: string;
6
+ /** uint64 */
7
+ CreateTime?: string;
8
+ /** uint64 */
9
+ ChangeTime?: string;
10
+
11
+ State?: ETabletState;
12
+ UserState?: number;
13
+ Generation?: number;
14
+ Type?: EType;
15
+ Host?: string;
16
+ ChannelGroupIDs?: number[]; // BS Group per channel
17
+ Attributes?: TCustomTabletAttribute[];
18
+ NodeId?: number;
19
+ Leader?: boolean; // leader or follower
20
+ Count?: number;
21
+ FollowerId?: number;
22
+ Overall?: EFlag;
23
+ TenantId?: TDomainKey;
24
+ /** fixed64 */
25
+ HiveId?: string;
26
+ }
27
+
28
+ interface TCustomTabletAttribute {
29
+ Key?: number;
30
+ Value?: string;
31
+ }
32
+
33
+ interface TDomainKey {
34
+ /** fixed64 */
35
+ SchemeShard?: string;
36
+ /** fixed64 */
37
+ PathId?: string;
38
+ }
39
+
40
+ enum EType {
41
+ 'Unknown' = 'Unknown',
42
+ 'OldSchemeShard' = 'OldSchemeShard',
43
+ 'OldDataShard' = 'OldDataShard',
44
+ 'OldHive' = 'OldHive',
45
+ 'OldCoordinator' = 'OldCoordinator',
46
+ 'Mediator' = 'Mediator',
47
+ 'OldTxProxy' = 'OldTxProxy',
48
+ 'OldBSController' = 'OldBSController',
49
+ 'Dummy' = 'Dummy',
50
+ 'RTMRPartition' = 'RTMRPartition',
51
+ 'OldKeyValue' = 'OldKeyValue',
52
+ 'KeyValue' = 'KeyValue',
53
+ 'Coordinator' = 'Coordinator',
54
+ 'Hive' = 'Hive',
55
+ 'BSController' = 'BSController',
56
+ 'SchemeShard' = 'SchemeShard',
57
+ 'TxProxy' = 'TxProxy',
58
+ 'DataShard' = 'DataShard',
59
+ 'PersQueue' = 'PersQueue',
60
+ 'Cms' = 'Cms',
61
+ 'NodeBroker' = 'NodeBroker',
62
+ 'TxAllocator' = 'TxAllocator',
63
+ 'PersQueueReadBalancer' = 'PersQueueReadBalancer',
64
+ 'BlockStoreVolume' = 'BlockStoreVolume',
65
+ 'BlockStorePartition' = 'BlockStorePartition',
66
+ 'TenantSlotBroker' = 'TenantSlotBroker',
67
+ 'Console' = 'Console',
68
+ 'Kesus' = 'Kesus',
69
+ 'BlockStorePartition2' = 'BlockStorePartition2',
70
+ 'BlockStoreDiskRegistry' = 'BlockStoreDiskRegistry',
71
+ 'SysViewProcessor' = 'SysViewProcessor',
72
+ 'FileStore' = 'FileStore',
73
+ 'ColumnShard' = 'ColumnShard',
74
+ 'TestShard' = 'TestShard',
75
+ 'SequenceShard' = 'SequenceShard',
76
+ 'ReplicationController' = 'ReplicationController',
77
+ 'BlobDepot' = 'BlobDepot',
78
+ 'UserTypeStart' = 'UserTypeStart',
79
+ 'TypeInvalid' = 'TypeInvalid',
80
+ }
81
+
82
+ enum ETabletState {
83
+ 'Created' = 'Created',
84
+ 'ResolveStateStorage' = 'ResolveStateStorage',
85
+ 'Candidate' = 'Candidate',
86
+ 'BlockBlobStorage' = 'BlockBlobStorage',
87
+ 'RebuildGraph' = 'RebuildGraph',
88
+ 'WriteZeroEntry' = 'WriteZeroEntry',
89
+ 'Restored' = 'Restored',
90
+ 'Discover' = 'Discover',
91
+ 'Lock' = 'Lock',
92
+ 'Dead' = 'Dead',
93
+ 'Active' = 'Active',
94
+ 'ResolveLeader' = 'ResolveLeader',
95
+ 'Deleted' = 'Deleted',
96
+ 'Stopped' = 'Stopped',
97
+ }
@@ -0,0 +1,120 @@
1
+ import {EFlag} from './enums';
2
+ import {TPDiskStateInfo} from './pdisk';
3
+
4
+ export interface TVDiskStateInfo {
5
+ VDiskId?: TVDiskID;
6
+ /** uint64 */
7
+ CreateTime?: string;
8
+ /** uint64 */
9
+ ChangeTime?: string;
10
+ PDisk?: TPDiskStateInfo;
11
+ VDiskSlotId?: number;
12
+ /** uint64 */
13
+ Guid?: string;
14
+ /** uint64 */
15
+ Kind?: string;
16
+ NodeId?: number;
17
+ Count?: number;
18
+
19
+ Overall?: EFlag;
20
+
21
+ /** Current state of VDisk */
22
+ VDiskState?: EVDiskState;
23
+ /** Disk space flags */
24
+ DiskSpace?: EFlag;
25
+ /** Compaction satisfaction rank */
26
+ SatisfactionRank?: TVDiskSatisfactionRank;
27
+ /** Is VDisk replicated? (i.e. contains all blobs it must have) */
28
+ Replicated?: boolean;
29
+ /** Does this VDisk has any yet unreplicated phantom-like blobs? */
30
+ UnreplicatedPhantoms?: boolean;
31
+ /** The same for the non-phantom-like blobs. */
32
+ UnreplicatedNonPhantoms?: boolean;
33
+ /**
34
+ * uint64
35
+ * How many unsynced VDisks from current BlobStorage group we see
36
+ */
37
+ UnsyncedVDisks?: string;
38
+ /**
39
+ * uint64
40
+ * How much this VDisk have allocated on corresponding PDisk
41
+ */
42
+ AllocatedSize?: string;
43
+ /**
44
+ * uint64
45
+ * How much space is available for VDisk corresponding to PDisk's hard space limits
46
+ */
47
+ AvailableSize?: string;
48
+ /** Does this disk has some unreadable but not yet restored blobs? */
49
+ HasUnreadableBlobs?: boolean;
50
+ /** fixed64 */
51
+ IncarnationGuid?: string;
52
+ DonorMode?: boolean;
53
+ /**
54
+ * fixed64
55
+ * VDisk actor instance guid
56
+ */
57
+ InstanceGuid?: string;
58
+ // in reality it is `Donors: TVDiskStateInfo[] | TVSlotId[]`, but this way it is more error-proof
59
+ Donors?: Array<TVDiskStateInfo | TVSlotId>;
60
+
61
+ /** VDisk (Skeleton) Front Queue Status */
62
+ FrontQueues?: EFlag;
63
+
64
+ /** VDisk storage pool label */
65
+ StoragePoolName?: string;
66
+
67
+ /**
68
+ * uint64
69
+ * Read bytes per second from PDisk for TEvVGet blobs only
70
+ */
71
+ ReadThroughput?: string;
72
+ /**
73
+ * uint64
74
+ * Write bytes per second to PDisk for TEvVPut blobs and replication bytes only
75
+ */
76
+ WriteThroughput?: string;
77
+ }
78
+
79
+ export interface TVSlotId {
80
+ NodeId?: number;
81
+ PDiskId?: number;
82
+ VSlotId?: number;
83
+ }
84
+
85
+ interface TVDiskSatisfactionRank {
86
+ FreshRank?: TRank;
87
+ LevelRank?: TRank;
88
+ }
89
+
90
+ interface TVDiskID {
91
+ GroupID?: number;
92
+ GroupGeneration?: number;
93
+ Ring?: number;
94
+ Domain?: number;
95
+ VDisk?: number;
96
+ }
97
+
98
+ interface TRank {
99
+ /**
100
+ * Rank in percents; 0-100% is good; >100% is bad.
101
+ * Formula for rank calculation is the following:
102
+ * Rank = actual_value / max_allowed_value * 100
103
+ */
104
+ RankPercent?: number;
105
+
106
+ /**
107
+ * Flag is the Rank transformed to something simple
108
+ * to understand: Green, Yellow or Red
109
+ */
110
+ Flag?: EFlag;
111
+ }
112
+
113
+ enum EVDiskState {
114
+ Initial = 'Initial',
115
+ LocalRecoveryError = 'LocalRecoveryError',
116
+ SyncGuidRecovery = 'SyncGuidRecovery',
117
+ SyncGuidRecoveryError = 'SyncGuidRecoveryError',
118
+ OK = 'OK',
119
+ PDiskError = 'PDiskError',
120
+ }
@@ -13,14 +13,20 @@ export interface IDescribeState {
13
13
  loading: boolean;
14
14
  wasLoaded: boolean;
15
15
  data: IDescribeData;
16
- currentDescribe?: TEvDescribeSchemeResult;
16
+ currentDescribe?: IDescribeData;
17
17
  currentDescribePath?: string;
18
18
  error?: IResponseError;
19
19
  }
20
20
 
21
+ export interface IDescribeHandledResponse {
22
+ path: string | undefined;
23
+ data: IDescribeData | undefined;
24
+ currentDescribe: IDescribeData | undefined;
25
+ }
26
+
21
27
  type IDescribeApiRequestAction = ApiRequestAction<
22
28
  typeof FETCH_DESCRIBE,
23
- TEvDescribeSchemeResult,
29
+ IDescribeHandledResponse,
24
30
  IResponseError
25
31
  >;
26
32
 
@@ -1,3 +1,5 @@
1
+ import {ApiRequestAction} from '../../store/utils';
2
+ import {FETCH_HEALTHCHECK, setDataWasNotLoaded} from '../../store/reducers/healthcheckInfo';
1
3
  import {IResponseError} from '../api/error';
2
4
  import type {HealthCheckAPIResponse, IssueLog} from '../api/healthcheck';
3
5
 
@@ -14,6 +16,16 @@ export interface IHealthcheckInfoState {
14
16
  error?: IResponseError;
15
17
  }
16
18
 
19
+ type IHealthCheckApiRequestAction = ApiRequestAction<
20
+ typeof FETCH_HEALTHCHECK,
21
+ HealthCheckAPIResponse,
22
+ IResponseError
23
+ >;
24
+
25
+ export type IHealthCheckInfoAction =
26
+ | IHealthCheckApiRequestAction
27
+ | ReturnType<typeof setDataWasNotLoaded>;
28
+
17
29
  export interface IHealthcheckInfoRootStateSlice {
18
30
  healthcheckInfo: IHealthcheckInfoState;
19
31
  }
@@ -24,9 +24,15 @@ export interface ISchemaState {
24
24
  error?: IResponseError;
25
25
  }
26
26
 
27
+ export interface ISchemaHandledResponse {
28
+ path: string | undefined;
29
+ currentSchema: TEvDescribeSchemeResult | undefined;
30
+ data: ISchemaData | undefined;
31
+ }
32
+
27
33
  type ISchemaApiRequestAction = ApiRequestAction<
28
34
  typeof FETCH_SCHEMA,
29
- TEvDescribeSchemeResult,
35
+ ISchemaHandledResponse,
30
36
  IResponseError
31
37
  >;
32
38
 
@@ -1,4 +1,4 @@
1
- import type {TPDiskStateInfo} from "../types/api/storage";
1
+ import type {TPDiskStateInfo} from '../types/api/pdisk';
2
2
 
3
3
  // TODO: move to utils or index after converting them to TS
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type {TVDiskStateInfo, TVSlotId} from '../types/api/storage';
1
+ import type {TVSlotId, TVDiskStateInfo} from '../types/api/vdisk';
2
2
  import type {IStoragePoolGroup} from '../types/store/storage';
3
3
 
4
4
  export const isFullDonorData = (donor: TVDiskStateInfo | TVSlotId): donor is TVDiskStateInfo =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "2.5.0",
3
+ "version": "3.0.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -42,7 +42,8 @@
42
42
  "start": "react-app-rewired start",
43
43
  "dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://localhost:8765 npm start",
44
44
  "build": "react-app-rewired build",
45
- "build:embedded": "rm -rf build && REACT_APP_BACKEND=http://localhost:8765 npm run build && ./prepare-build.sh",
45
+ "//build:embedded": "echo 'PUBLIC_URL is a setting for create-react-app. Embedded version is built and hosted as is on ydb servers, with no way of knowing the final URL pattern. PUBLIC_URL=. keeps paths to all static relative, allowing servers to handle them as needed'",
46
+ "build:embedded": "rm -rf build && PUBLIC_URL=. REACT_APP_BACKEND=http://localhost:8765 npm run build",
46
47
  "lint:styles": "stylelint 'src/**/*.scss'",
47
48
  "package": "rm -rf dist && copyfiles -u 1 'src/**/*' dist",
48
49
  "test": "react-app-rewired test",