ydb-embedded-ui 4.16.1 → 4.16.2

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.16.2](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.16.1...v4.16.2) (2023-08-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix topic templates ([#524](https://github.com/ydb-platform/ydb-embedded-ui/issues/524)) ([f593b57](https://github.com/ydb-platform/ydb-embedded-ui/commit/f593b575fb64d0c69b56e743fd4cd6faba1e9d0e))
9
+ * rename additionalInfo params to additionalProps ([#525](https://github.com/ydb-platform/ydb-embedded-ui/issues/525)) ([dd2b040](https://github.com/ydb-platform/ydb-embedded-ui/commit/dd2b04039cd80072fe11744f3490c176fe21b16b))
10
+
3
11
  ## [4.16.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.16.0...v4.16.1) (2023-08-25)
4
12
 
5
13
 
@@ -13,13 +13,13 @@ const b = cn('basic-node-viewer');
13
13
 
14
14
  interface BasicNodeViewerProps {
15
15
  node: TSystemStateInfo;
16
- additionalNodesInfo?: AdditionalNodesProps;
16
+ additionalNodesProps?: AdditionalNodesProps;
17
17
  className?: string;
18
18
  }
19
19
 
20
- export const BasicNodeViewer = ({node, additionalNodesInfo, className}: BasicNodeViewerProps) => {
21
- const nodeHref = additionalNodesInfo?.getNodeRef
22
- ? additionalNodesInfo.getNodeRef(node) + 'internal'
20
+ export const BasicNodeViewer = ({node, additionalNodesProps, className}: BasicNodeViewerProps) => {
21
+ const nodeHref = additionalNodesProps?.getNodeRef
22
+ ? additionalNodesProps.getNodeRef(node) + 'internal'
23
23
  : undefined;
24
24
 
25
25
  return (
@@ -35,7 +35,7 @@ const b = cn('cluster');
35
35
 
36
36
  interface ClusterProps {
37
37
  additionalTenantsProps?: AdditionalTenantsProps;
38
- additionalNodesInfo?: AdditionalNodesProps;
38
+ additionalNodesProps?: AdditionalNodesProps;
39
39
  additionalClusterProps?: AdditionalClusterProps;
40
40
  additionalVersionsProps?: AdditionalVersionsProps;
41
41
  }
@@ -43,7 +43,7 @@ interface ClusterProps {
43
43
  function Cluster({
44
44
  additionalClusterProps,
45
45
  additionalTenantsProps,
46
- additionalNodesInfo,
46
+ additionalNodesProps,
47
47
  additionalVersionsProps,
48
48
  }: ClusterProps) {
49
49
  const dispatch = useDispatch();
@@ -104,10 +104,10 @@ function Cluster({
104
104
  return <Tenants additionalTenantsProps={additionalTenantsProps} />;
105
105
  }
106
106
  case clusterTabsIds.nodes: {
107
- return <Nodes additionalNodesInfo={additionalNodesInfo} />;
107
+ return <Nodes additionalNodesProps={additionalNodesProps} />;
108
108
  }
109
109
  case clusterTabsIds.storage: {
110
- return <Storage additionalNodesInfo={additionalNodesInfo} />;
110
+ return <Storage additionalNodesProps={additionalNodesProps} />;
111
111
  }
112
112
  case clusterTabsIds.versions: {
113
113
  return <Versions versionToColor={versionToColor} />;
@@ -34,7 +34,7 @@ export const STORAGE_ROLE = 'Storage';
34
34
  const autofetcher = new AutoFetcher();
35
35
 
36
36
  interface NodeProps {
37
- additionalNodesInfo?: AdditionalNodesProps;
37
+ additionalNodesProps?: AdditionalNodesProps;
38
38
  className?: string;
39
39
  }
40
40
 
@@ -115,7 +115,7 @@ function Node(props: NodeProps) {
115
115
  );
116
116
  };
117
117
  const renderTabContent = () => {
118
- const {additionalNodesInfo} = props;
118
+ const {additionalNodesProps} = props;
119
119
 
120
120
  switch (activeTab) {
121
121
  case STORAGE: {
@@ -138,7 +138,7 @@ function Node(props: NodeProps) {
138
138
  <NodeStructure
139
139
  className={b('node-page-wrapper')}
140
140
  nodeId={nodeId}
141
- additionalNodesInfo={additionalNodesInfo}
141
+ additionalNodesProps={additionalNodesProps}
142
142
  />
143
143
  );
144
144
  }
@@ -157,7 +157,7 @@ function Node(props: NodeProps) {
157
157
  <div className={b(null, props.className)}>
158
158
  <BasicNodeViewer
159
159
  node={node}
160
- additionalNodesInfo={props.additionalNodesInfo}
160
+ additionalNodesProps={props.additionalNodesProps}
161
161
  className={b('header')}
162
162
  />
163
163
 
@@ -32,12 +32,12 @@ function generateId({type, id}: {type: 'pdisk' | 'vdisk'; id: string}) {
32
32
  interface NodeStructureProps {
33
33
  nodeId: string;
34
34
  className?: string;
35
- additionalNodesInfo?: AdditionalNodesProps;
35
+ additionalNodesProps?: AdditionalNodesProps;
36
36
  }
37
37
 
38
38
  const autofetcher = new AutoFetcher();
39
39
 
40
- function NodeStructure({nodeId, className, additionalNodesInfo}: NodeStructureProps) {
40
+ function NodeStructure({nodeId, className, additionalNodesProps}: NodeStructureProps) {
41
41
  const dispatch = useDispatch();
42
42
 
43
43
  const nodeStructure = useTypedSelector(selectNodeStructure);
@@ -46,10 +46,10 @@ function NodeStructure({nodeId, className, additionalNodesInfo}: NodeStructurePr
46
46
  const nodeData = useTypedSelector((state) => state.node?.data?.SystemStateInfo?.[0]);
47
47
 
48
48
  const nodeHref = useMemo(() => {
49
- return additionalNodesInfo?.getNodeRef
50
- ? additionalNodesInfo.getNodeRef(nodeData)
49
+ return additionalNodesProps?.getNodeRef
50
+ ? additionalNodesProps.getNodeRef(nodeData)
51
51
  : undefined;
52
- }, [nodeData, additionalNodesInfo]);
52
+ }, [nodeData, additionalNodesProps]);
53
53
 
54
54
  const {pdiskId: pdiskIdFromUrl, vdiskId: vdiskIdFromUrl} = url.parse(
55
55
  window.location.href,
@@ -54,10 +54,10 @@ const b = cn('ydb-nodes');
54
54
  interface NodesProps {
55
55
  path?: string;
56
56
  type?: EPathType;
57
- additionalNodesInfo?: AdditionalNodesProps;
57
+ additionalNodesProps?: AdditionalNodesProps;
58
58
  }
59
59
 
60
- export const Nodes = ({path, type, additionalNodesInfo = {}}: NodesProps) => {
60
+ export const Nodes = ({path, type, additionalNodesProps = {}}: NodesProps) => {
61
61
  const dispatch = useDispatch();
62
62
 
63
63
  const isClusterNodes = !path;
@@ -154,7 +154,7 @@ export const Nodes = ({path, type, additionalNodesInfo = {}}: NodesProps) => {
154
154
 
155
155
  const renderTable = () => {
156
156
  const columns = getNodesColumns({
157
- getNodeRef: additionalNodesInfo.getNodeRef,
157
+ getNodeRef: additionalNodesProps.getNodeRef,
158
158
  });
159
159
 
160
160
  if (nodes && nodes.length === 0) {
@@ -60,12 +60,12 @@ import './Storage.scss';
60
60
  const b = cn('global-storage');
61
61
 
62
62
  interface StorageProps {
63
- additionalNodesInfo?: AdditionalNodesProps;
63
+ additionalNodesProps?: AdditionalNodesProps;
64
64
  tenant?: string;
65
65
  nodeId?: string;
66
66
  }
67
67
 
68
- export const Storage = ({additionalNodesInfo, tenant, nodeId}: StorageProps) => {
68
+ export const Storage = ({additionalNodesProps, tenant, nodeId}: StorageProps) => {
69
69
  const dispatch = useDispatch();
70
70
 
71
71
  const {autorefresh} = useTypedSelector((state) => state.schema);
@@ -189,7 +189,7 @@ export const Storage = ({additionalNodesInfo, tenant, nodeId}: StorageProps) =>
189
189
  data={storageNodes}
190
190
  tableSettings={DEFAULT_TABLE_SETTINGS}
191
191
  onShowAll={handleShowAllNodes}
192
- additionalNodesInfo={additionalNodesInfo}
192
+ additionalNodesProps={additionalNodesProps}
193
193
  sort={nodesSort}
194
194
  handleSort={handleNodesSort}
195
195
  />
@@ -40,7 +40,7 @@ interface StorageNodesProps {
40
40
  visibleEntities: VisibleEntities;
41
41
  nodesUptimeFilter: keyof typeof NodesUptimeFilterValues;
42
42
  onShowAll?: VoidFunction;
43
- additionalNodesInfo?: AdditionalNodesProps;
43
+ additionalNodesProps?: AdditionalNodesProps;
44
44
  sort?: SortOrder;
45
45
  handleSort?: HandleSort;
46
46
  }
@@ -63,11 +63,11 @@ export function StorageNodes({
63
63
  visibleEntities,
64
64
  onShowAll,
65
65
  nodesUptimeFilter,
66
- additionalNodesInfo,
66
+ additionalNodesProps,
67
67
  sort,
68
68
  handleSort,
69
69
  }: StorageNodesProps) {
70
- const getNodeRef = additionalNodesInfo?.getNodeRef;
70
+ const getNodeRef = additionalNodesProps?.getNodeRef;
71
71
 
72
72
  const rawColumns: Column<PreparedStorageNode>[] = [
73
73
  {
@@ -17,7 +17,7 @@ interface DetailedOverviewProps {
17
17
  type?: EPathType;
18
18
  className?: string;
19
19
  tenantName: string;
20
- additionalTenantInfo?: AdditionalTenantsProps;
20
+ additionalTenantProps?: AdditionalTenantsProps;
21
21
  }
22
22
 
23
23
  const b = cn('kv-detailed-overview');
@@ -52,7 +52,7 @@ function DetailedOverview(props: DetailedOverviewProps) {
52
52
  };
53
53
 
54
54
  const renderContent = () => {
55
- const {type, tenantName, additionalTenantInfo} = props;
55
+ const {type, tenantName, additionalTenantProps} = props;
56
56
  const isTenant = tenantName === currentSchemaPath;
57
57
  return (
58
58
  <div className={b()}>
@@ -61,7 +61,7 @@ function DetailedOverview(props: DetailedOverviewProps) {
61
61
  <div className={b('section')}>
62
62
  <TenantOverview
63
63
  tenantName={tenantName}
64
- additionalTenantInfo={additionalTenantInfo}
64
+ additionalTenantProps={additionalTenantProps}
65
65
  />
66
66
  </div>
67
67
  <div className={b('section')}>
@@ -42,8 +42,8 @@ import './Diagnostics.scss';
42
42
 
43
43
  interface DiagnosticsProps {
44
44
  type?: EPathType;
45
- additionalTenantInfo?: AdditionalTenantsProps;
46
- additionalNodesInfo?: AdditionalNodesProps;
45
+ additionalTenantProps?: AdditionalTenantsProps;
46
+ additionalNodesProps?: AdditionalNodesProps;
47
47
  }
48
48
 
49
49
  const b = cn('kv-tenant-diagnostics');
@@ -108,7 +108,7 @@ function Diagnostics(props: DiagnosticsProps) {
108
108
  <DetailedOverview
109
109
  type={type}
110
110
  tenantName={tenantNameString}
111
- additionalTenantInfo={props.additionalTenantInfo}
111
+ additionalTenantProps={props.additionalTenantProps}
112
112
  />
113
113
  );
114
114
  }
@@ -123,7 +123,7 @@ function Diagnostics(props: DiagnosticsProps) {
123
123
  <Nodes
124
124
  path={currentSchemaPath}
125
125
  type={type}
126
- additionalNodesInfo={props.additionalNodesInfo}
126
+ additionalNodesProps={props.additionalNodesProps}
127
127
  />
128
128
  );
129
129
  }
@@ -24,10 +24,10 @@ const b = cn('tenant-overview');
24
24
 
25
25
  interface TenantOverviewProps {
26
26
  tenantName: string;
27
- additionalTenantInfo?: AdditionalTenantsProps;
27
+ additionalTenantProps?: AdditionalTenantsProps;
28
28
  }
29
29
 
30
- export function TenantOverview({tenantName, additionalTenantInfo}: TenantOverviewProps) {
30
+ export function TenantOverview({tenantName, additionalTenantProps}: TenantOverviewProps) {
31
31
  const {tenant, loading, wasLoaded} = useTypedSelector((state) => state.tenant);
32
32
  const {autorefresh} = useTypedSelector((state) => state.schema);
33
33
  const dispatch = useDispatch();
@@ -119,7 +119,7 @@ export function TenantOverview({tenantName, additionalTenantInfo}: TenantOvervie
119
119
  <div className={b('top-label')}>{tenantType}</div>
120
120
  <div className={b('top')}>
121
121
  {renderName()}
122
- {additionalTenantInfo?.getMonitoringLink?.(Name, Type)}
122
+ {additionalTenantProps?.getMonitoringLink?.(Name, Type)}
123
123
  </div>
124
124
  <div className={b('system-tablets')}>
125
125
  {SystemTablets &&
@@ -19,8 +19,8 @@ const b = cn('object-general');
19
19
 
20
20
  interface ObjectGeneralProps {
21
21
  type?: EPathType;
22
- additionalTenantInfo?: AdditionalTenantsProps;
23
- additionalNodesInfo?: AdditionalNodesProps;
22
+ additionalTenantProps?: AdditionalTenantsProps;
23
+ additionalNodesProps?: AdditionalNodesProps;
24
24
  }
25
25
 
26
26
  function ObjectGeneral(props: ObjectGeneralProps) {
@@ -33,7 +33,7 @@ function ObjectGeneral(props: ObjectGeneralProps) {
33
33
  const {name: tenantName, tenantPage = initialPage} = queryParams;
34
34
 
35
35
  const renderTabContent = () => {
36
- const {type, additionalTenantInfo, additionalNodesInfo} = props;
36
+ const {type, additionalTenantProps, additionalNodesProps} = props;
37
37
  switch (tenantPage) {
38
38
  case TENANT_PAGES_IDS.query: {
39
39
  return <Query path={tenantName as string} theme={theme} type={type} />;
@@ -42,8 +42,8 @@ function ObjectGeneral(props: ObjectGeneralProps) {
42
42
  return (
43
43
  <Diagnostics
44
44
  type={type}
45
- additionalTenantInfo={additionalTenantInfo}
46
- additionalNodesInfo={additionalNodesInfo}
45
+ additionalTenantProps={additionalTenantProps}
46
+ additionalNodesProps={additionalNodesProps}
47
47
  />
48
48
  );
49
49
  }
@@ -38,8 +38,8 @@ const initialTenantSummaryState = {
38
38
  };
39
39
 
40
40
  interface TenantProps {
41
- additionalTenantInfo?: AdditionalTenantsProps;
42
- additionalNodesInfo?: AdditionalNodesProps;
41
+ additionalTenantProps?: AdditionalTenantsProps;
42
+ additionalNodesProps?: AdditionalNodesProps;
43
43
  }
44
44
 
45
45
  function Tenant(props: TenantProps) {
@@ -125,8 +125,8 @@ function Tenant(props: TenantProps) {
125
125
  />
126
126
  <ObjectGeneral
127
127
  type={preloadedPathType || currentPathType}
128
- additionalTenantInfo={props.additionalTenantInfo}
129
- additionalNodesInfo={props.additionalNodesInfo}
128
+ additionalTenantProps={props.additionalTenantProps}
129
+ additionalNodesProps={props.additionalNodesProps}
130
130
  />
131
131
  </SplitPane>
132
132
  )}
@@ -69,42 +69,42 @@ export const createTopicTemplate = (path: string) => {
69
69
  return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/create_topic
70
70
  CREATE TOPIC \`${path}/my_topic\` (
71
71
  CONSUMER consumer1,
72
- CONSUMER consumer2 WITH (read_from = Datetime('2022-12-01T12:13:22Z')) -- Sets up the message write time starting from which the consumer will receive data.
72
+ CONSUMER consumer2 WITH (read_from = Datetime('1970-01-01T00:00:00Z')) -- Sets up the message write time starting from which the consumer will receive data.
73
73
  -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
74
74
  -- Default value: now
75
75
  ) WITH (
76
- min_active_partitions = 5, -- Minimum number of topic partitions.
77
- partition_count_limit = 10, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
78
- retention_period = Interval('PT12H'), -- Data retention period in the topic. Value type: Interval, default value: 18h.
79
- retention_storage_mb = 1, -- Limit on the maximum disk space occupied by the topic data.
76
+ min_active_partitions = 1, -- Minimum number of topic partitions.
77
+ partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
78
+ retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval.
79
+ retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data.
80
80
  -- When this value is exceeded, the older data is cleared, like under a retention policy.
81
81
  -- 0 is interpreted as unlimited.
82
- partition_write_speed_bytes_per_second = 2097152, -- Maximum allowed write speed per partition.
83
- partition_write_burst_bytes = 2097152 -- Write quota allocated for write bursts.
84
- -- When set to zero, the actual write_burst value is equalled to
85
- -- the quota value (this allows write bursts of up to one second).
82
+ partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition.
83
+ partition_write_burst_bytes = 0 -- Write quota allocated for write bursts.
84
+ -- When set to zero, the actual write_burst value is equalled to
85
+ -- the quota value (this allows write bursts of up to one second).
86
86
  );`;
87
87
  };
88
88
 
89
89
  export const alterTopicTemplate = (path: string) => {
90
90
  return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/alter_topic
91
91
  ALTER TOPIC \`${path}\`
92
- ADD CONSUMER new_consumer WITH (read_from = 0), -- Sets up the message write time starting from which the consumer will receive data.
93
- -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
94
- -- Default value: now
95
- ALTER CONSUMER consumer1 SET (read_from = Datetime('2023-12-01T12:13:22Z')),
92
+ ADD CONSUMER new_consumer WITH (read_from = Datetime('1970-01-01T00:00:00Z')), -- Sets up the message write time starting from which the consumer will receive data.
93
+ -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
94
+ -- Default value: now
95
+ ALTER CONSUMER consumer1 SET (read_from = Datetime('1970-01-01T00:00:00Z')),
96
96
  DROP CONSUMER consumer2,
97
97
  SET (
98
- min_active_partitions = 10, -- Minimum number of topic partitions.
99
- partition_count_limit = 15, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
100
- retention_period = Interval('PT36H'), -- Data retention period in the topic. Value type: Interval, default value: 18h.
101
- retention_storage_mb = 10, -- Limit on the maximum disk space occupied by the topic data.
102
- -- When this value is exceeded, the older data is cleared, like under a retention policy.
103
- -- 0 is interpreted as unlimited.
104
- partition_write_speed_bytes_per_second = 3145728, -- Maximum allowed write speed per partition.
105
- partition_write_burst_bytes = 1048576 -- Write quota allocated for write bursts.
106
- -- When set to zero, the actual write_burst value is equalled to
107
- -- the quota value (this allows write bursts of up to one second).
98
+ min_active_partitions = 1, -- Minimum number of topic partitions.
99
+ partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
100
+ retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval.
101
+ retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data.
102
+ -- When this value is exceeded, the older data is cleared, like under a retention policy.
103
+ -- 0 is interpreted as unlimited.
104
+ partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition.
105
+ partition_write_burst_bytes = 0 -- Write quota allocated for write bursts.
106
+ -- When set to zero, the actual write_burst value is equalled to
107
+ -- the quota value (this allows write bursts of up to one second).
108
108
  );`;
109
109
  };
110
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "4.16.1",
3
+ "version": "4.16.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],