ydb-embedded-ui 3.3.1 → 3.3.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
|
+
## [3.3.2](https://github.com/ydb-platform/ydb-embedded-ui/compare/v3.3.1...v3.3.2) (2023-01-31)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **QueryEditor:** collapse bottom panel if empty ([566db3b](https://github.com/ydb-platform/ydb-embedded-ui/commit/566db3b15c4393555071f058c88ad36b4073cc2d))
|
9
|
+
* **VDisk:** use pdiskid field for link ([5ee0705](https://github.com/ydb-platform/ydb-embedded-ui/commit/5ee0705416aa31be9bee4be0776ecb8a61d3e82c))
|
10
|
+
|
3
11
|
## [3.3.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v3.3.0...v3.3.1) (2023-01-31)
|
4
12
|
|
5
13
|
|
@@ -123,7 +123,7 @@ export const VDisk = ({data = {}, poolName, nodes, compact}: VDiskProps) => {
|
|
123
123
|
routes.node,
|
124
124
|
{id: data.NodeId, activeTab: STRUCTURE},
|
125
125
|
{
|
126
|
-
pdiskId: data.PDisk?.PDiskId,
|
126
|
+
pdiskId: data.PDiskId ?? data.PDisk?.PDiskId,
|
127
127
|
vdiskId: stringifyVdiskId(data.VDiskId),
|
128
128
|
},
|
129
129
|
)}
|
@@ -91,6 +91,8 @@ const initialTenantCommonInfoState = {
|
|
91
91
|
function QueryEditor(props) {
|
92
92
|
const [resultType, setResultType] = useState(RESULT_TYPES.EXECUTE);
|
93
93
|
|
94
|
+
const [isResultLoaded, setIsResultLoaded] = useState(false);
|
95
|
+
|
94
96
|
const [resultVisibilityState, dispatchResultVisibilityState] = useReducer(
|
95
97
|
paneVisibilityToggleReducerCreator(DEFAULT_IS_QUERY_RESULT_COLLAPSED),
|
96
98
|
initialTenantCommonInfoState,
|
@@ -117,11 +119,12 @@ function QueryEditor(props) {
|
|
117
119
|
}, []);
|
118
120
|
|
119
121
|
useEffect(() => {
|
120
|
-
|
121
|
-
if (showPreview && resultVisibilityState.collapsed) {
|
122
|
+
if (props.showPreview || isResultLoaded) {
|
122
123
|
dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
|
124
|
+
} else {
|
125
|
+
dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
|
123
126
|
}
|
124
|
-
}, [props.showPreview,
|
127
|
+
}, [props.showPreview, isResultLoaded]);
|
125
128
|
|
126
129
|
useEffect(() => {
|
127
130
|
const {
|
@@ -254,6 +257,7 @@ function QueryEditor(props) {
|
|
254
257
|
|
255
258
|
setResultType(RESULT_TYPES.EXECUTE);
|
256
259
|
sendQuery({query: input, database: path, action: runAction});
|
260
|
+
setIsResultLoaded(true);
|
257
261
|
setShowPreview(false);
|
258
262
|
|
259
263
|
const {queries, currentIndex} = history;
|
@@ -272,6 +276,7 @@ function QueryEditor(props) {
|
|
272
276
|
} = props;
|
273
277
|
setResultType(RESULT_TYPES.EXPLAIN);
|
274
278
|
getExplainQuery({query: input, database: path});
|
279
|
+
setIsResultLoaded(true);
|
275
280
|
setShowPreview(false);
|
276
281
|
dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
|
277
282
|
};
|