ydb-embedded-ui 1.14.0 → 1.14.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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.14.2](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.14.1...v1.14.2) (2022-09-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * process new explain format ([2ede9ab](https://github.com/ydb-platform/ydb-embedded-ui/commit/2ede9ab11a29667204cca110858b0cca74588255))
9
+ * process new query format ([eb880be](https://github.com/ydb-platform/ydb-embedded-ui/commit/eb880be36b99efe7f0c0ff96b58401293ff080e1))
10
+
11
+ ## [1.14.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.14.0...v1.14.1) (2022-09-16)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **Tenants:** display nodes count 0 for undefined NodeIds ([4be42ec](https://github.com/ydb-platform/ydb-embedded-ui/commit/4be42eca84557929837e799d7d8dcebd858470d4))
17
+
3
18
  ## [1.14.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.13.2...v1.14.0) (2022-09-16)
4
19
 
5
20
 
@@ -69,7 +69,8 @@ function Overview(props: OverviewProps) {
69
69
  currentSchemaPath,
70
70
  } = useSelector((state: any) => state.schema);
71
71
 
72
- const {data: olapStats} = useSelector((state: any) => state.olapStats);
72
+ let {data: olapStats} = useSelector((state: any) => state.olapStats);
73
+ olapStats = olapStats && olapStats.result ? olapStats.result : olapStats;
73
74
 
74
75
  const fetchOverviewData = () => {
75
76
  const {tenantName, type} = props;
@@ -171,7 +171,7 @@ const mapStateToProps = (state) => {
171
171
  const {autorefresh} = state.schema;
172
172
  return {
173
173
  loading,
174
- data,
174
+ data: data && data.result ? data.result: data,
175
175
  error,
176
176
  wasLoaded,
177
177
  autorefresh,
@@ -220,7 +220,7 @@ const mapStateToProps = (state) => {
220
220
  const {autorefresh} = state.schema;
221
221
  return {
222
222
  loading,
223
- data,
223
+ data: data && data.result ? data.result : data,
224
224
  error,
225
225
  currentSchemaPath: state.schema?.currentSchema?.Path,
226
226
  autorefresh,
@@ -261,9 +261,9 @@ class Tenants extends React.Component {
261
261
  name: 'NodeIds',
262
262
  header: 'Nodes',
263
263
  width: 100,
264
- accessor: ({NodeIds}) => NodeIds.length,
265
- sortAccessor: ({NodeIds}) => NodeIds.length,
266
- render: ({value}) => formatNumber(value) || '—',
264
+ accessor: ({NodeIds}) => NodeIds?.length || 0,
265
+ sortAccessor: ({NodeIds}) => NodeIds?.length || 0,
266
+ render: ({value}) => formatNumber(value),
267
267
  align: DataTable.RIGHT,
268
268
  defaultOrder: DataTable.DESCENDING,
269
269
  },
@@ -72,6 +72,9 @@ export const getExplainQueryAst = ({query, database}) => {
72
72
  return createApiRequest({
73
73
  request: window.api.getExplainQueryAst(query, database),
74
74
  actions: GET_EXPLAIN_QUERY_AST,
75
+ dataHandler: (result) => {
76
+ return result && result.ast ? result.ast : result;
77
+ },
75
78
  });
76
79
  };
77
80
 
@@ -87,6 +90,7 @@ export const getExplainQuery = ({query, database}) => {
87
90
  request: window.api.getExplainQuery(query, database),
88
91
  actions: GET_EXPLAIN_QUERY,
89
92
  dataHandler: (result) => {
93
+ result = result && result.plan ? result.plan : result;
90
94
  let links = [];
91
95
  let nodes = [];
92
96
  let graphDepth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],