ydb-embedded-ui 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ### [1.0.3](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.2...v1.0.3) (2022-03-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * query status should not be shown when query is loading ([d214eee](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/d214eee575b63341082f0be33163e3fce520df88))
9
+ * should set correct initial current index in queries history ([c3228d7](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/c3228d7a6a0c810982db1bdbec7762889ac44ffa))
10
+ * **Storage:** wording fixed [YDB-1552] ([3f487ff](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/3f487ff01117963760b676d14281e93e5f3002c0))
11
+
3
12
  ### [1.0.2](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.1...v1.0.2) (2022-03-11)
4
13
 
5
14
 
@@ -210,13 +210,16 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
210
210
  ];
211
211
 
212
212
  let columns = allColumns;
213
+ let emptyMessage = 'No such groups.';
213
214
 
214
215
  if (visibleEntities === VisibleEntities.Space) {
215
216
  columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
217
+ emptyMessage = 'No storage groups with space problems.';
216
218
  }
217
219
 
218
220
  if (visibleEntities === VisibleEntities.Missing) {
219
221
  columns = allColumns.filter((col) => col.name !== TableColumnsIds.UsedSpaceFlag);
222
+ emptyMessage = 'No degraded groups.';
220
223
  }
221
224
  return data ? (
222
225
  <DataTable
@@ -226,7 +229,7 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
226
229
  columns={columns}
227
230
  settings={tableSettings}
228
231
  initialSortOrder={setSortOrder(visibleEntities)}
229
- emptyDataMessage="No such groups."
232
+ emptyDataMessage={emptyMessage}
230
233
  />
231
234
  ) : null;
232
235
  }
@@ -114,9 +114,14 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
114
114
  ];
115
115
 
116
116
  let columns = allColumns;
117
+ let emptyMessage = 'No such nodes.';
117
118
 
118
119
  if (visibleEntities === VisibleEntities.Space) {
119
120
  columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
121
+ emptyMessage = 'No nodes with space problems.';
122
+ }
123
+ if (visibleEntities === VisibleEntities.Missing) {
124
+ emptyMessage = 'No degraded nodes.';
120
125
  }
121
126
 
122
127
  return data ? (
@@ -127,7 +132,7 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
127
132
  columns={columns}
128
133
  settings={tableSettings}
129
134
  initialSortOrder={setSortOrder(visibleEntities)}
130
- emptyDataMessage="No such nodes."
135
+ emptyDataMessage={emptyMessage}
131
136
  />
132
137
  ) : null;
133
138
  }
@@ -154,7 +154,7 @@ function QueryEditor(props) {
154
154
  useEffect(() => {
155
155
  const {monacoHotKey, setMonacoHotKey} = props;
156
156
  if (monacoHotKey === null) {
157
- return
157
+ return;
158
158
  }
159
159
  setMonacoHotKey(null);
160
160
  switch (monacoHotKey) {
@@ -464,19 +464,12 @@ function QueryEditor(props) {
464
464
  };
465
465
 
466
466
  const getExecuteResult = () => {
467
- const {
468
- data = [],
469
- error,
470
- loading,
471
- history: {queries},
472
- } = props.executeQuery;
467
+ const {data = [], error} = props.executeQuery;
473
468
 
474
469
  if (error) {
475
470
  return error.data || error;
476
471
  } else if (data.length > 0) {
477
472
  return data;
478
- } else if (!loading && queries.length) {
479
- return 'The request was successful';
480
473
  } else {
481
474
  return '';
482
475
  }
@@ -252,28 +252,32 @@ function QueryExplain(props) {
252
252
  return (
253
253
  <React.Fragment>
254
254
  <div className={b('controls')}>
255
- <div className={b('controls-right')}>
256
- <QueryExecutionStatus hasError={Boolean(props.error)} />
257
- {!props.error && (
258
- <React.Fragment>
259
- <Divider />
260
- <RadioButton
261
- options={explainOptions}
262
- value={activeOption}
263
- onUpdate={onSelectOption}
255
+ {!props.loading && (
256
+ <React.Fragment>
257
+ <div className={b('controls-right')}>
258
+ <QueryExecutionStatus hasError={Boolean(props.error)} />
259
+ {!props.error && (
260
+ <React.Fragment>
261
+ <Divider />
262
+ <RadioButton
263
+ options={explainOptions}
264
+ value={activeOption}
265
+ onUpdate={onSelectOption}
266
+ />
267
+ </React.Fragment>
268
+ )}
269
+ </div>
270
+ <div className={b('controls-left')}>
271
+ <EnableFullscreenButton disabled={Boolean(props.error)} />
272
+ <PaneVisibilityToggleButtons
273
+ onCollapse={props.onCollapseResults}
274
+ onExpand={props.onExpandResults}
275
+ isCollapsed={props.isResultsCollapsed}
276
+ initialDirection="bottom"
264
277
  />
265
- </React.Fragment>
266
- )}
267
- </div>
268
- <div className={b('controls-left')}>
269
- <EnableFullscreenButton disabled={Boolean(props.error)} />
270
- <PaneVisibilityToggleButtons
271
- onCollapse={props.onCollapseResults}
272
- onExpand={props.onExpandResults}
273
- isCollapsed={props.isResultsCollapsed}
274
- initialDirection="bottom"
275
- />
276
- </div>
278
+ </div>
279
+ </React.Fragment>
280
+ )}
277
281
  </div>
278
282
  <div className={b('result')}>{renderContent()}</div>
279
283
  </React.Fragment>
@@ -19,6 +19,7 @@
19
19
  justify-content: space-between;
20
20
  align-items: center;
21
21
 
22
+ height: 53px;
22
23
  padding: 12px 20px;
23
24
 
24
25
  border-bottom: 1px solid var(--yc-color-line-generic);
@@ -28,6 +28,7 @@
28
28
  justify-content: space-between;
29
29
  align-items: center;
30
30
 
31
+ height: 53px;
31
32
  padding: 12px 20px;
32
33
 
33
34
  border-bottom: 1px solid var(--yc-color-line-generic);
@@ -34,7 +34,10 @@ const initialState = {
34
34
  input: '',
35
35
  history: {
36
36
  queries: queriesHistoryInitial.slice(sliceLimit < 0 ? 0 : sliceLimit),
37
- currentIndex: -1,
37
+ currentIndex:
38
+ queriesHistoryInitial.length > MAXIMUM_QUERIES_IN_HISTORY
39
+ ? MAXIMUM_QUERIES_IN_HISTORY - 1
40
+ : queriesHistoryInitial.length - 1,
38
41
  },
39
42
  runAction: RUN_ACTIONS_VALUES.script,
40
43
  monacoHotKey: null,
@@ -6,8 +6,8 @@ import {calcUptime} from '../../utils';
6
6
 
7
7
  export const VisibleEntities = {
8
8
  All: 'All',
9
- Missing: 'Missing',
10
- Space: 'Space',
9
+ Missing: 'Degraded',
10
+ Space: 'Out of space',
11
11
  };
12
12
 
13
13
  export const StorageTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "files": [
5
5
  "dist"
6
6
  ],