ydb-embedded-ui 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/assets/icons/circle-exclamation.svg +1 -0
  3. package/dist/assets/icons/circle-info.svg +1 -0
  4. package/dist/assets/icons/circle-xmark.svg +1 -0
  5. package/dist/assets/icons/triangle-exclamation.svg +1 -0
  6. package/dist/components/AsideNavigation/Settings/Settings.scss +4 -4
  7. package/dist/components/Breadcrumbs/Breadcrumbs.scss +1 -1
  8. package/dist/components/Collapse/Collapse.scss +8 -8
  9. package/dist/components/EmptyState/EmptyState.scss +6 -6
  10. package/dist/components/EntityStatus/EntityStatus.scss +6 -6
  11. package/dist/components/FullNodeViewer/FullNodeViewer.scss +7 -7
  12. package/dist/components/GroupViewer/GroupViewer.scss +1 -1
  13. package/dist/components/InfoViewer/InfoViewer.scss +4 -4
  14. package/dist/components/PDiskViewer/PDiskViewer.scss +1 -1
  15. package/dist/components/PoolUsage/PoolUsage.scss +5 -5
  16. package/dist/components/ProgressViewer/ProgressViewer.scss +9 -9
  17. package/dist/components/ShortyString/ShortyString.scss +7 -0
  18. package/dist/components/ShortyString/ShortyString.tsx +53 -0
  19. package/dist/components/TableSkeleton/TableSkeleton.scss +1 -1
  20. package/dist/components/TabletsViewer/TabletsViewer.scss +2 -2
  21. package/dist/containers/App/App.js +2 -1
  22. package/dist/containers/App/App.scss +6 -0
  23. package/dist/containers/App/TipPopup/TipPopup.js +1 -1
  24. package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -1
  25. package/dist/containers/Authentication/Authentication.scss +2 -2
  26. package/dist/containers/Header/Header.scss +2 -2
  27. package/dist/containers/Header/Host/Host.scss +6 -6
  28. package/dist/containers/Heatmap/Heatmap.js +1 -2
  29. package/dist/containers/Heatmap/Heatmap.scss +2 -2
  30. package/dist/containers/Node/Node.scss +0 -1
  31. package/dist/containers/Node/Node.tsx +1 -0
  32. package/dist/containers/Node/NodeStructure/NodeStructure.scss +3 -3
  33. package/dist/containers/Node/NodeStructure/Pdisk.tsx +6 -6
  34. package/dist/containers/Pdisk/Pdisk.scss +2 -2
  35. package/dist/containers/Pool/Pool.scss +3 -3
  36. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +2 -2
  37. package/dist/containers/Storage/Storage.scss +3 -3
  38. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +4 -4
  39. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +4 -4
  40. package/dist/containers/Tablet/Tablet.scss +4 -4
  41. package/dist/containers/Tablets/Tablets.js +1 -2
  42. package/dist/containers/TabletsFilters/TabletsFilters.js +1 -2
  43. package/dist/containers/TabletsFilters/TabletsFilters.scss +2 -2
  44. package/dist/containers/Tenant/Acl/Acl.scss +2 -2
  45. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +15 -21
  46. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -2
  47. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +6 -6
  48. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +4 -4
  49. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -4
  50. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -2
  51. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -7
  52. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.scss +7 -8
  53. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +2 -12
  54. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +5 -8
  55. package/dist/containers/Tenant/Preview/Preview.js +2 -2
  56. package/dist/containers/Tenant/QueryEditor/Issues/Issues.scss +124 -0
  57. package/dist/containers/Tenant/QueryEditor/Issues/Issues.tsx +171 -0
  58. package/dist/containers/Tenant/QueryEditor/Issues/models.ts +27 -0
  59. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +38 -52
  60. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +4 -1
  61. package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +32 -5
  62. package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.scss +1 -1
  63. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +1 -3
  64. package/dist/containers/Tenant/Tenant.scss +2 -2
  65. package/dist/containers/Tenant/utils/schemaActions.ts +3 -18
  66. package/dist/containers/Vdisk/Vdisk.scss +2 -2
  67. package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.scss +2 -2
  68. package/dist/store/reducers/tenant.js +30 -0
  69. package/dist/store/state-url-mapping.js +6 -0
  70. package/dist/store/utils.js +1 -1
  71. package/dist/styles/mixins.scss +13 -13
  72. package/dist/utils/getNodesColumns.js +2 -3
  73. package/dist/utils/index.js +4 -0
  74. package/package.json +6 -7
@@ -3,6 +3,8 @@ import '../../services/api';
3
3
  import _ from 'lodash';
4
4
 
5
5
  const FETCH_TENANT = createRequestActionTypes('tenant', 'FETCH_TENANT');
6
+ const SET_TOP_LEVEL_TAB = 'tenant/SET_TOP_LEVEL_TAB';
7
+ const SET_DIAGNOSTICS_TAB = 'tenant/SET_DIAGNOSTICS_TAB';
6
8
 
7
9
  const tenantReducer = (state = {loading: false, tenant: {}}, action) => {
8
10
  switch (action.type) {
@@ -41,6 +43,20 @@ const tenantReducer = (state = {loading: false, tenant: {}}, action) => {
41
43
  };
42
44
  }
43
45
 
46
+ case SET_TOP_LEVEL_TAB: {
47
+ return {
48
+ ...state,
49
+ topLevelTab: action.data,
50
+ };
51
+ }
52
+
53
+ case SET_DIAGNOSTICS_TAB: {
54
+ return {
55
+ ...state,
56
+ diagnosticsTab: action.data,
57
+ };
58
+ }
59
+
44
60
  default:
45
61
  return state;
46
62
  }
@@ -73,4 +89,18 @@ export const getTenantInfo = ({path}) => {
73
89
  });
74
90
  };
75
91
 
92
+ export function setTopLevelTab(tab) {
93
+ return {
94
+ type: SET_TOP_LEVEL_TAB,
95
+ data: tab,
96
+ };
97
+ }
98
+
99
+ export function setDiagnosticsTab(tab) {
100
+ return {
101
+ type: SET_DIAGNOSTICS_TAB,
102
+ data: tab,
103
+ };
104
+ }
105
+
76
106
  export default tenantReducer;
@@ -42,6 +42,12 @@ const paramSetup = {
42
42
  stateKey: 'tablets.typeFilter',
43
43
  type: 'array',
44
44
  },
45
+ general: {
46
+ stateKey: 'tenant.topLevelTab',
47
+ },
48
+ generalTab: {
49
+ stateKey: 'tenant.diagnosticsTab',
50
+ },
45
51
  },
46
52
  };
47
53
 
@@ -32,7 +32,7 @@ export function createApiRequest({actions, request, dataHandler = nop}) {
32
32
  dispatch({
33
33
  type: SET_UNAUTHENTICATED.SUCCESS,
34
34
  });
35
- } else if (error && error.status && error.statusText) {
35
+ } else if (error && Number(error.status) >= 500 && error.statusText) {
36
36
  createToast({
37
37
  name: 'Request failure',
38
38
  title: 'Request failure',
@@ -16,25 +16,25 @@
16
16
  }
17
17
 
18
18
  @mixin body-typography() {
19
- font-size: var(--yc-text-body-font-size);
20
- line-height: var(--yc-text-body-line-height);
19
+ font-size: var(--yc-text-body-1-font-size);
20
+ line-height: var(--yc-text-body-1-line-height);
21
21
  }
22
22
  @mixin body2-typography() {
23
- font-size: var(--yc-text-body2-font-size);
24
- line-height: var(--yc-text-body2-line-height);
23
+ font-size: var(--yc-text-body-2-font-size);
24
+ line-height: var(--yc-text-body-2-line-height);
25
25
  }
26
26
  @mixin body3-typography() {
27
- font-size: var(--yc-text-body3-font-size);
28
- line-height: var(--yc-text-body3-line-height);
27
+ font-size: var(--yc-text-body-3-font-size);
28
+ line-height: var(--yc-text-body-3-line-height);
29
29
  }
30
30
  @mixin lead-typography() {
31
- font-size: var(--yc-text-lead-font-size);
32
- line-height: var(--yc-text-lead-line-height);
31
+ font-size: var(--yc-text-subheader-3-font-size);
32
+ line-height: var(--yc-text-subheader-3-line-height);
33
33
  }
34
34
 
35
35
  @mixin title-typography() {
36
- font-size: var(--yc-text-title-font-size);
37
- line-height: var(--yc-text-title-line-height);
36
+ font-size: var(--yc-text-header-2-font-size);
37
+ line-height: var(--yc-text-header-2-line-height);
38
38
  }
39
39
 
40
40
  @mixin sticky-top {
@@ -188,8 +188,8 @@
188
188
  @mixin json-tree-styles {
189
189
  // stylelint-disable
190
190
  font-family: var(--yc-font-family-monospace) !important;
191
- font-size: var(--yc-text-code-font-size) !important;
192
- line-height: var(--yc-text-code-line-height) !important;
191
+ font-size: var(--yc-text-code-1-font-size) !important;
192
+ line-height: var(--yc-text-code-1-line-height) !important;
193
193
  // stylelint-enable
194
194
 
195
195
  .json-inspector__leaf_composite:before {
@@ -239,7 +239,7 @@
239
239
  margin: 0;
240
240
  padding: 0;
241
241
 
242
- font-family: var(--yc-font-family);
242
+ font-family: var(--yc-text-body-font-family);
243
243
  font-size: 13px;
244
244
  vertical-align: top;
245
245
 
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import cn from 'bem-cn-lite';
3
2
  import DataTable from '@yandex-cloud/react-data-table';
4
- import {Button, Tooltip} from '@yandex-cloud/uikit';
3
+ import {Button, Popover} from '@yandex-cloud/uikit';
5
4
 
6
5
  import Icon from '../components/Icon/Icon';
7
6
  import EntityStatus from '../components/EntityStatus/EntityStatus';
@@ -62,7 +61,7 @@ export function getNodesColumns({showTooltip, hideTooltip, tabletsPath, getNodeR
62
61
  width: '200px',
63
62
  align: DataTable.LEFT,
64
63
  render: ({value}) => {
65
- return <Tooltip content={value}>{value}</Tooltip>;
64
+ return <Popover content={value}>{value}</Popover>;
66
65
  },
67
66
  },
68
67
  {
@@ -138,3 +138,7 @@ export const prepareQueryResponse = (data) => {
138
138
  return formattedData;
139
139
  });
140
140
  };
141
+
142
+ export function prepareQueryError(error) {
143
+ return error.data?.error?.message || error.data || error
144
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -40,7 +40,7 @@
40
40
  "reselect": "4.0.0",
41
41
  "sass": "1.32.8",
42
42
  "web-vitals": "1.1.2",
43
- "ydb-ui-components": "1.2.3"
43
+ "ydb-ui-components": "2.0.1"
44
44
  },
45
45
  "scripts": {
46
46
  "start": "react-app-rewired start",
@@ -52,9 +52,7 @@
52
52
  "test": "react-app-rewired test",
53
53
  "eject": "react-scripts eject",
54
54
  "prepublishOnly": "npm run package",
55
- "typecheck": "npm run typecheck:server && npm run typecheck:ui",
56
- "typecheck:server": "tsc -p src/server --noEmit",
57
- "typecheck:ui": "tsc -p src/ui --noEmit",
55
+ "typecheck": "tsc --noEmit",
58
56
  "prepare": "husky install"
59
57
  },
60
58
  "lint-staged": {
@@ -93,7 +91,7 @@
93
91
  "@yandex-cloud/prettier-config": "^1.0.0",
94
92
  "@yandex-cloud/stylelint-config": "^1.1.0",
95
93
  "@yandex-cloud/tsconfig": "^1.0.0",
96
- "@yandex-cloud/uikit": "^1.7.0",
94
+ "@yandex-cloud/uikit": "^2.4.0",
97
95
  "copyfiles": "^2.4.1",
98
96
  "eslint-config-prettier": "^8.3.0",
99
97
  "husky": "^7.0.4",
@@ -107,6 +105,7 @@
107
105
  "typescript": "^4.5.5"
108
106
  },
109
107
  "peerDependencies": {
110
- "@yandex-cloud/browserslist-config": "^1.0.1"
108
+ "@yandex-cloud/browserslist-config": "^1.0.1",
109
+ "@yandex-cloud/uikit": "^2.4.0"
111
110
  }
112
111
  }