ydb-embedded-ui 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +2 -2
  4. package/dist/assets/icons/cluster.svg +1 -0
  5. package/dist/assets/icons/hide.svg +1 -0
  6. package/dist/assets/icons/show.svg +1 -0
  7. package/dist/assets/icons/user-check.svg +1 -1
  8. package/dist/assets/icons/user-secret.svg +1 -1
  9. package/dist/components/AsideNavigation/AsideHeader.scss +1 -2
  10. package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.scss +7 -7
  11. package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.scss +2 -2
  12. package/dist/components/AsideNavigation/CompositeBar/CompositeBar.scss +6 -6
  13. package/dist/components/AsideNavigation/Drawer/Drawer.scss +5 -5
  14. package/dist/components/AsideNavigation/Logo/Logo.scss +3 -4
  15. package/dist/components/AsideNavigation/Settings/Settings.scss +27 -12
  16. package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.scss +14 -6
  17. package/dist/components/Breadcrumbs/Breadcrumbs.scss +2 -1
  18. package/dist/components/ClusterInfo/ClusterInfo.scss +19 -12
  19. package/dist/components/ClusterInfo/ClusterInfo.tsx +110 -10
  20. package/dist/components/CopyToClipboard/CopyToClipboard.tsx +39 -0
  21. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +5 -4
  22. package/dist/components/Divider/Divider.scss +7 -0
  23. package/dist/components/Divider/Divider.tsx +11 -0
  24. package/dist/components/EmptyState/EmptyState.scss +14 -10
  25. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.tsx +22 -0
  26. package/dist/components/EntityStatus/EntityStatus.js +5 -3
  27. package/dist/components/EntityStatus/EntityStatus.scss +35 -13
  28. package/dist/components/FullGroupViewer/FullGroupViewer.js +2 -4
  29. package/dist/components/FullGroupViewer/FullGroupViewer.scss +6 -3
  30. package/dist/components/FullNodeViewer/FullNodeViewer.scss +19 -11
  31. package/dist/components/Fullscreen/Fullscreen.scss +28 -0
  32. package/dist/components/Fullscreen/Fullscreen.tsx +81 -0
  33. package/dist/components/GroupTreeViewer/GroupTreeViewer.scss +1 -0
  34. package/dist/components/GroupViewer/GroupViewer.scss +8 -4
  35. package/dist/components/Icon/Icon.js +2 -0
  36. package/dist/components/InfoViewer/InfoViewer.scss +22 -16
  37. package/dist/components/NodesViewer/NodesViewer.js +25 -35
  38. package/dist/components/NodesViewer/NodesViewer.scss +15 -11
  39. package/dist/components/PDiskViewer/PDiskViewer.scss +10 -4
  40. package/dist/components/Pagination/Pagination.scss +6 -3
  41. package/dist/components/PoolBar/PoolBar.scss +14 -10
  42. package/dist/components/PoolUsage/PoolUsage.scss +17 -9
  43. package/dist/components/ProgressViewer/ProgressViewer.js +1 -1
  44. package/dist/components/ProgressViewer/ProgressViewer.scss +28 -18
  45. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +14 -0
  46. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.tsx +29 -0
  47. package/dist/components/SplitPane/SplitPane.scss +33 -40
  48. package/dist/components/SplitPane/SplitPane.tsx +94 -0
  49. package/dist/components/Tablet/Tablet.scss +9 -6
  50. package/dist/components/TabletsOverall/TabletsOverall.scss +19 -0
  51. package/dist/components/TabletsOverall/TabletsOverall.tsx +105 -0
  52. package/dist/components/TabletsStatistic/TabletsStatistic.scss +24 -18
  53. package/dist/components/TabletsViewer/TabletsViewer.scss +12 -9
  54. package/dist/components/Tag/Tag.scss +6 -4
  55. package/dist/components/Tags/Tags.scss +1 -1
  56. package/dist/components/TreeView/TreeView.js +1 -1
  57. package/dist/components/TreeView/TreeView.scss +9 -0
  58. package/dist/components/TruncatedQuery/TruncatedQuery.scss +4 -3
  59. package/dist/containers/App/App.js +1 -0
  60. package/dist/containers/App/App.scss +50 -31
  61. package/dist/containers/App/Content.js +2 -2
  62. package/dist/containers/App/NodesTable.scss +25 -0
  63. package/dist/containers/App/TipPopup/TipPopup.scss +10 -6
  64. package/dist/containers/AppIcons/AppIcons.js +46 -22
  65. package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -1
  66. package/dist/containers/AsideNavigation/AsideNavigation.tsx +12 -5
  67. package/dist/containers/Authentication/Authentication.scss +63 -14
  68. package/dist/containers/Authentication/Authentication.tsx +42 -9
  69. package/dist/containers/Cluster/Cluster.scss +5 -3
  70. package/dist/containers/Cluster/Cluster.tsx +49 -0
  71. package/dist/containers/Group/Group.scss +1 -1
  72. package/dist/containers/Header/Header.scss +15 -59
  73. package/dist/containers/Header/Header.tsx +75 -0
  74. package/dist/containers/Header/Host/Host.scss +10 -3
  75. package/dist/containers/Heatmap/Heatmap.js +1 -1
  76. package/dist/containers/Heatmap/Heatmap.scss +16 -7
  77. package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +3 -3
  78. package/dist/containers/Heatmap/Histogram/Histogram.scss +21 -9
  79. package/dist/containers/Node/Node.js +1 -1
  80. package/dist/containers/Node/Node.scss +6 -4
  81. package/dist/containers/Nodes/Nodes.js +28 -27
  82. package/dist/containers/Nodes/Nodes.scss +5 -17
  83. package/dist/containers/Pdisk/Pdisk.scss +6 -4
  84. package/dist/containers/Pool/Pool.scss +7 -4
  85. package/dist/containers/ReduxTooltip/ReduxTooltip.scss +5 -1
  86. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +77 -0
  87. package/dist/containers/{StorageV2 → Storage}/DiskStateProgressBar/DiskStateProgressBar.tsx +1 -1
  88. package/dist/containers/{StorageV2 → Storage}/Pdisk/Pdisk.scss +6 -4
  89. package/dist/containers/{StorageV2 → Storage}/Pdisk/Pdisk.tsx +1 -2
  90. package/dist/containers/{StorageV2 → Storage}/Storage.js +72 -34
  91. package/dist/containers/{StorageV2 → Storage}/Storage.scss +12 -14
  92. package/dist/containers/{StorageV2 → Storage}/StorageFilter/StorageFilter.js +1 -9
  93. package/dist/containers/{StorageV2 → Storage}/StorageGroups/StorageGroups.scss +2 -0
  94. package/dist/containers/{StorageV2 → Storage}/StorageGroups/StorageGroups.tsx +1 -1
  95. package/dist/containers/{StorageV2 → Storage}/StorageNodes/StorageNodes.scss +2 -0
  96. package/dist/containers/{StorageV2 → Storage}/StorageNodes/StorageNodes.tsx +1 -1
  97. package/dist/containers/{StorageV2 → Storage}/Vdisk/Vdisk.js +0 -0
  98. package/dist/containers/{StorageV2 → Storage}/Vdisk/Vdisk.scss +6 -4
  99. package/dist/containers/Tablet/Tablet.scss +13 -9
  100. package/dist/containers/Tablets/Tablets.js +21 -90
  101. package/dist/containers/Tablets/Tablets.scss +9 -35
  102. package/dist/containers/TabletsFilters/TabletsFilters.js +2 -75
  103. package/dist/containers/TabletsFilters/TabletsFilters.scss +15 -35
  104. package/dist/containers/Tenant/Acl/Acl.js +54 -47
  105. package/dist/containers/Tenant/Acl/Acl.scss +15 -4
  106. package/dist/containers/Tenant/{Compute → Diagnostics/Compute}/Compute.js +35 -12
  107. package/dist/containers/Tenant/Diagnostics/Compute/Compute.scss +14 -0
  108. package/dist/containers/Tenant/{Describe → Diagnostics/Describe}/Describe.js +50 -1
  109. package/dist/containers/Tenant/{Describe → Diagnostics/Describe}/Describe.scss +5 -3
  110. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +27 -0
  111. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +88 -0
  112. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +50 -0
  113. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +208 -0
  114. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +75 -0
  115. package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.js +191 -0
  116. package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.scss +79 -0
  117. package/dist/containers/Tenant/{Healthcheck → Diagnostics/Healthcheck}/IssuesViewer/IssueViewer.scss +25 -13
  118. package/dist/containers/Tenant/{Healthcheck → Diagnostics/Healthcheck}/IssuesViewer/IssuesViewer.js +2 -2
  119. package/dist/containers/Tenant/{Schema → Diagnostics}/HotKeys/HotKeys.js +14 -8
  120. package/dist/containers/Tenant/{Schema → Diagnostics}/HotKeys/HotKeys.scss +7 -5
  121. package/dist/containers/Tenant/{Network → Diagnostics/Network}/Network.js +39 -9
  122. package/dist/containers/Tenant/{Network → Diagnostics/Network}/Network.scss +35 -36
  123. package/dist/containers/Tenant/{Network → Diagnostics/Network}/NodeNetwork/NodeNetwork.js +0 -0
  124. package/dist/containers/Tenant/{Network → Diagnostics/Network}/NodeNetwork/NodeNetwork.scss +11 -9
  125. package/dist/containers/Tenant/Diagnostics/Overview/Overview.scss +13 -0
  126. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +123 -0
  127. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +200 -0
  128. package/dist/{components → containers/Tenant/Diagnostics}/TenantOverview/TenantOverview.scss +24 -17
  129. package/dist/containers/Tenant/{TopQueries → Diagnostics/TopQueries}/TopQueries.js +32 -30
  130. package/dist/containers/Tenant/{TopQueries → Diagnostics/TopQueries}/TopQueries.scss +10 -9
  131. package/dist/containers/Tenant/{TopShards → Diagnostics/TopShards}/TopShards.js +25 -29
  132. package/dist/containers/Tenant/{TopShards → Diagnostics/TopShards}/TopShards.scss +1 -13
  133. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.scss +38 -0
  134. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +104 -0
  135. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +165 -0
  136. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +310 -0
  137. package/dist/containers/Tenant/Preview/Preview.js +50 -12
  138. package/dist/containers/Tenant/Preview/Preview.scss +45 -3
  139. package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.scss +85 -0
  140. package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.tsx +94 -0
  141. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +291 -264
  142. package/dist/containers/Tenant/QueryEditor/QueryEditor.scss +47 -18
  143. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +132 -32
  144. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.scss +47 -11
  145. package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +89 -20
  146. package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.scss +60 -6
  147. package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.js +10 -23
  148. package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.scss +15 -7
  149. package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.js +7 -3
  150. package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.scss +28 -17
  151. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +7 -7
  152. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +1 -11
  153. package/dist/containers/Tenant/Schema/SchemaNode/SchemaNode.js +37 -17
  154. package/dist/containers/Tenant/Schema/SchemaNode/SchemaNode.scss +33 -12
  155. package/dist/containers/Tenant/Schema/SchemaNodeActions/SchemaNodeActions.scss +17 -0
  156. package/dist/containers/Tenant/Schema/SchemaNodeActions/SchemaNodeActions.tsx +125 -0
  157. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +5 -4
  158. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.scss +6 -2
  159. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +53 -34
  160. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.scss +1 -22
  161. package/dist/containers/Tenant/Tenant.scss +3 -32
  162. package/dist/containers/Tenant/Tenant.tsx +161 -0
  163. package/dist/containers/Tenant/TenantPages.tsx +48 -0
  164. package/dist/containers/Tenant/utils/ToggleButton.scss +26 -0
  165. package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +126 -0
  166. package/dist/containers/Tenants/Tenants.js +41 -55
  167. package/dist/containers/Tenants/Tenants.scss +4 -17
  168. package/dist/containers/UserSettings/UserSettings.tsx +0 -2
  169. package/dist/containers/Vdisk/Vdisk.scss +6 -4
  170. package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.js +1 -1
  171. package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.scss +5 -5
  172. package/dist/{routes.js → routes.ts} +14 -4
  173. package/dist/store/reducers/clusterNodes.js +1 -1
  174. package/dist/store/reducers/fullscreen.ts +31 -0
  175. package/dist/store/reducers/header.ts +23 -0
  176. package/dist/store/reducers/hotKeys.js +1 -1
  177. package/dist/store/reducers/index.js +6 -0
  178. package/dist/store/reducers/saveQuery.ts +33 -0
  179. package/dist/store/reducers/schema.js +14 -0
  180. package/dist/store/reducers/shardsWorkload.js +1 -1
  181. package/dist/store/state-url-mapping.js +1 -1
  182. package/dist/store/utils.js +2 -6
  183. package/dist/styles/mixins.scss +49 -34
  184. package/dist/utils/autofetcher.ts +51 -0
  185. package/dist/utils/constants.js +25 -7
  186. package/dist/utils/createToast.tsx +23 -0
  187. package/dist/utils/getNodesColumns.js +25 -28
  188. package/dist/utils/index.js +6 -2
  189. package/package.json +8 -4
  190. package/dist/components/SplitPane/SplitPane.js +0 -368
  191. package/dist/components/TenantOverview/TenantOverview.js +0 -148
  192. package/dist/containers/Cluster/Cluster.js +0 -168
  193. package/dist/containers/Header/Header.js +0 -88
  194. package/dist/containers/StorageV2/DiskStateProgressBar/DiskStateProgressBar.scss +0 -81
  195. package/dist/containers/Tenant/Compute/Compute.scss +0 -6
  196. package/dist/containers/Tenant/Healthcheck/Healthcheck.js +0 -116
  197. package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +0 -64
  198. package/dist/containers/Tenant/Schema/Info/Info.js +0 -84
  199. package/dist/containers/Tenant/Schema/Info/Info.scss +0 -3
  200. package/dist/containers/Tenant/Schema/SchemaMain/SchemaMain.js +0 -439
  201. package/dist/containers/Tenant/Schema/SchemaMain/SchemaMain.scss +0 -90
  202. package/dist/containers/Tenant/Schema/SchemaPages.js +0 -56
  203. package/dist/containers/Tenant/Tenant.js +0 -199
  204. package/dist/containers/Tenant/TenantPages.js +0 -35
@@ -0,0 +1,81 @@
1
+ import React, {useEffect} from 'react';
2
+ import ReactDOM from 'react-dom';
3
+
4
+ import {Button} from '@yandex-cloud/uikit';
5
+ import cn from 'bem-cn-lite';
6
+
7
+ import {useDispatch} from 'react-redux';
8
+ import {disableFullscreen} from '../../store/reducers/fullscreen';
9
+ import Icon from '../Icon/Icon';
10
+
11
+ import './Fullscreen.scss';
12
+
13
+ const b = cn('kv-fullscreen');
14
+
15
+ interface FullscreenProps {
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ }
19
+
20
+ interface FullscreenWrapperProps {
21
+ children: React.ReactNode;
22
+ }
23
+
24
+ class FullscreenWrapper extends React.Component<FullscreenWrapperProps> {
25
+ constructor(props: FullscreenWrapperProps) {
26
+ super(props);
27
+ this.el = document.createElement('div');
28
+ }
29
+
30
+ componentDidMount() {
31
+ this.modalRoot = document.getElementById('fullscreen-root');
32
+ if (this.modalRoot) {
33
+ this.modalRoot.appendChild(this.el);
34
+ }
35
+ }
36
+
37
+ componentWillUnmount() {
38
+ if (this.modalRoot) {
39
+ this.modalRoot.removeChild(this.el);
40
+ }
41
+ }
42
+
43
+ render() {
44
+ return ReactDOM.createPortal(this.props.children, this.el);
45
+ }
46
+
47
+ modalRoot: null | HTMLElement = null;
48
+ private el: HTMLElement;
49
+ }
50
+
51
+ function Fullscreen(props: FullscreenProps) {
52
+ const dispatch = useDispatch();
53
+ const escFunction = (event: KeyboardEvent) => {
54
+ if (event.key === 'Escape') {
55
+ onDisableFullScreen();
56
+ }
57
+ };
58
+ useEffect(() => {
59
+ document.addEventListener('keydown', escFunction, false);
60
+ return () => {
61
+ document.removeEventListener('keydown', escFunction, false);
62
+ };
63
+ }, []);
64
+
65
+ const onDisableFullScreen = () => {
66
+ dispatch(disableFullscreen());
67
+ };
68
+
69
+ return (
70
+ <FullscreenWrapper>
71
+ <div className={b(null, props.className)}>
72
+ <Button onClick={onDisableFullScreen} view="raised" className={b('close-button')}>
73
+ <Icon name="disableFullscreen" viewBox={'0 0 16 16 '} width={16} height={16} />
74
+ </Button>
75
+ {props.children}
76
+ </div>
77
+ </FullscreenWrapper>
78
+ );
79
+ }
80
+
81
+ export default Fullscreen;
@@ -4,6 +4,7 @@
4
4
  &__row {
5
5
  display: flex;
6
6
  align-items: center;
7
+
7
8
  height: 34px;
8
9
  }
9
10
 
@@ -6,16 +6,20 @@
6
6
  }
7
7
 
8
8
  &__label {
9
- color: var(--yc-color-text-complementary);
10
- font-size: var(--yc-text-body-font-size);
11
9
  margin-right: 20px;
10
+
11
+ font-size: var(--yc-text-body-font-size);
12
+
13
+ color: var(--yc-color-text-complementary);
12
14
  }
13
15
 
14
16
  &__name {
15
- color: var(--yc-color-base-special);
16
- text-decoration: none;
17
17
  display: inline-block;
18
18
 
19
+ text-decoration: none;
20
+
21
+ color: var(--yc-color-base-special);
22
+
19
23
  &:before {
20
24
  transform: translateY(3px);
21
25
  }
@@ -18,6 +18,8 @@ Icon.propTypes = {
18
18
  height: PropTypes.number,
19
19
  width: PropTypes.number,
20
20
  viewBox: PropTypes.string,
21
+ className: PropTypes.string,
22
+ onClick: PropTypes.func,
21
23
  };
22
24
  Icon.defaultProps = {
23
25
  height: 16,
@@ -2,47 +2,53 @@
2
2
  font-size: var(--yc-text-body2-font-size);
3
3
  line-height: var(--yc-text-body2-line-height);
4
4
  &__title {
5
+ margin: 0 0 16px;
6
+
5
7
  font-size: var(--yc-text-body2-font-size);
6
- line-height: var(--yc-text-body2-line-height);
7
8
  font-weight: 500;
8
- margin: 0 0 16px;
9
+ line-height: var(--yc-text-body2-line-height);
9
10
  }
10
11
 
11
12
  &__items {
12
- display: grid;
13
- grid-template-columns: max-content max-content;
14
- grid-column-gap: 15px;
15
- grid-row-gap: 7px;
13
+ display: flex;
14
+ flex-direction: column;
15
+ gap: 7px;
16
+
17
+ max-width: 100%;
16
18
  }
17
19
 
18
20
  &__row {
19
21
  display: flex;
20
- align-items: center;
21
22
  align-items: flex-end;
23
+
24
+ max-width: 100%;
22
25
  height: 24px;
23
26
  }
24
27
 
25
28
  &__label {
26
- color: var(--yc-color-text-primary);
27
- // font-size: var(--yc-text-body-font-size);
28
- white-space: nowrap;
29
- max-width: 200px;
30
- min-width: 200px;
31
- align-items: baseline;
32
29
  display: flex;
33
30
  flex: 1 1 auto;
31
+ align-items: baseline;
32
+
33
+ max-width: 200px;
34
+
35
+ white-space: nowrap;
36
+
37
+ color: var(--yc-color-text-secondary);
34
38
  }
35
39
 
36
40
  &__dots {
37
- min-width: 20px;
38
41
  display: flex;
39
42
  flex: 1 1 auto;
40
- border-bottom: 1px dotted var(--yc-color-text-complementary);
43
+
41
44
  margin: 0 2px;
45
+
46
+ border-bottom: 1px dotted var(--yc-color-text-secondary);
42
47
  }
43
48
 
44
49
  &__value {
45
- white-space: nowrap;
46
50
  display: flex;
51
+
52
+ white-space: nowrap;
47
53
  }
48
54
  }
@@ -11,7 +11,7 @@ import ProblemFilter, {problemFilterType} from '../ProblemFilter/ProblemFilter';
11
11
 
12
12
  import {withSearch} from '../../HOCS';
13
13
  import {calcUptime} from '../../utils';
14
- import {ALL} from '../../utils/constants';
14
+ import {ALL, DEFAULT_TABLE_SETTINGS} from '../../utils/constants';
15
15
  import {changeFilter} from '../../store/reducers/settings';
16
16
  import {hideTooltip, showTooltip} from '../../store/reducers/tooltip';
17
17
  import {getNodesColumns} from '../../utils/getNodesColumns';
@@ -20,13 +20,6 @@ import './NodesViewer.scss';
20
20
 
21
21
  const b = cn('nodes-viewer');
22
22
 
23
- const tableSettings = {
24
- displayIndices: false,
25
- stickyHead: DataTable.MOVING,
26
- syncHeadOnResize: true,
27
- dynamicRender: true,
28
- };
29
-
30
23
  class NodesViewer extends React.PureComponent {
31
24
  static propTypes = {
32
25
  nodes: PropTypes.array.isRequired,
@@ -127,9 +120,9 @@ class NodesViewer extends React.PureComponent {
127
120
  showControls,
128
121
  hideTooltip,
129
122
  showTooltip,
130
- additionalNodesInfo={},
123
+ additionalNodesInfo = {},
131
124
  } = this.props;
132
- const {filteredNodes} = this.state;
125
+ const {filteredNodes = []} = this.state;
133
126
 
134
127
  const columns = getNodesColumns({
135
128
  tabletsPath: path,
@@ -138,32 +131,29 @@ class NodesViewer extends React.PureComponent {
138
131
  getNodeRef: additionalNodesInfo.getNodeRef,
139
132
  });
140
133
 
141
- if (filteredNodes && Array.isArray(filteredNodes)) {
142
- const nodesToShow = NodesViewer.selectNodesToShow(filteredNodes, searchQuery);
143
-
144
- return (
145
- <div className={`${b()} ${className}`}>
146
- {showControls ? this.renderControls() : null}
147
- <div className={b('table-wrapper')}>
148
- {nodesToShow.length === 0 ? (
149
- <div className="no-problem" />
150
- ) : (
151
- <div className={b('table-content')}>
152
- <DataTable
153
- theme="internal"
154
- key={filter}
155
- data={nodesToShow}
156
- columns={columns}
157
- settings={tableSettings}
158
- />
159
- </div>
160
- )}
161
- </div>
162
- </div>
163
- );
164
- }
134
+ const nodesToShow = NodesViewer.selectNodesToShow(filteredNodes, searchQuery);
165
135
 
166
- return <div className="error">no nodes data</div>;
136
+ return (
137
+ <div className={`${b()} ${className}`}>
138
+ {showControls ? this.renderControls() : null}
139
+ <div className={b('table-wrapper')}>
140
+ {nodesToShow.length === 0 ? (
141
+ <div className="no-problem" />
142
+ ) : (
143
+ <div className={b('table-content')}>
144
+ <DataTable
145
+ theme="yandex-cloud"
146
+ key={filter}
147
+ data={nodesToShow}
148
+ columns={columns}
149
+ settings={DEFAULT_TABLE_SETTINGS}
150
+ emptyDataMessage="No such nodes"
151
+ />
152
+ </div>
153
+ )}
154
+ </div>
155
+ </div>
156
+ );
167
157
  }
168
158
  }
169
159
 
@@ -1,24 +1,24 @@
1
1
  @import '../../styles/mixins.scss';
2
2
 
3
3
  .nodes-viewer {
4
- @include flex-container();
5
4
  overflow: auto;
5
+ @include flex-container();
6
6
 
7
7
  &__controls {
8
- margin: 25px 0 20px 20px;
9
8
  display: flex;
10
9
  align-items: center;
10
+ gap: 12px;
11
11
 
12
- & > * {
13
- margin-right: 25px;
14
- }
12
+ margin: 0 0 8px;
15
13
  }
16
14
 
17
15
  &__name {
18
- color: var(--yc-color-base-special);
16
+ display: inline-block;
17
+
19
18
  cursor: pointer;
20
19
  text-decoration: none;
21
- display: inline-block;
20
+
21
+ color: var(--yc-color-base-special);
22
22
  }
23
23
 
24
24
  &__search {
@@ -30,9 +30,10 @@
30
30
  }
31
31
 
32
32
  &__tablets {
33
- padding: 0 !important;
34
33
  overflow-x: auto;
35
34
 
35
+ padding: 0 !important;
36
+
36
37
  .tablets-viewer__grid {
37
38
  justify-content: center;
38
39
  grid-template-columns: 125px;
@@ -40,16 +41,17 @@
40
41
  }
41
42
 
42
43
  &__table-wrapper {
43
- @include flex-container();
44
44
  overflow: auto;
45
+ @include flex-container();
45
46
  }
46
47
 
47
48
  &__table-content {
48
49
  overflow: auto;
50
+
49
51
  height: 100%;
50
52
  @include freeze-nth-column(1);
51
53
  @include freeze-nth-column(2, 80px);
52
- @include freeze-nth-column(3, 120px);
54
+ @include freeze-nth-column(3, 430px);
53
55
 
54
56
  @include table-styles;
55
57
  @include table-sticky-styles;
@@ -58,8 +60,10 @@
58
60
  width: 100%;
59
61
  span {
60
62
  display: block;
61
- width: 100%;
62
63
  overflow: hidden;
64
+
65
+ width: 100%;
66
+
63
67
  text-overflow: ellipsis;
64
68
  }
65
69
  }
@@ -5,9 +5,11 @@
5
5
  &__item,
6
6
  &__size {
7
7
  margin-right: 24px;
8
- color: var(--yc-color-text-complementary);
8
+
9
9
  font-size: var(--yc-text-body2-font-size);
10
10
  line-height: 0;
11
+
12
+ color: var(--yc-color-text-complementary);
11
13
  }
12
14
 
13
15
  &__item .entity-status {
@@ -25,16 +27,20 @@
25
27
 
26
28
  &__size {
27
29
  width: 120px;
28
- color: var(--yc-color-text-complementary);
30
+
29
31
  font-size: 10px;
32
+
33
+ color: var(--yc-color-text-complementary);
30
34
  }
31
35
 
32
36
  &__label {
33
37
  margin: 0 5px;
34
38
  &_link {
35
- color: var(--yc-color-base-special);
36
- text-decoration: none;
37
39
  display: inline-block;
40
+
41
+ text-decoration: none;
42
+
43
+ color: var(--yc-color-base-special);
38
44
  }
39
45
  }
40
46
  }
@@ -1,5 +1,6 @@
1
1
  .elements-pagination {
2
2
  display: flex;
3
+
3
4
  padding-left: 1px;
4
5
 
5
6
  &__divider {
@@ -7,16 +8,18 @@
7
8
  }
8
9
 
9
10
  &__control {
10
- margin: 0 -1px;
11
11
  display: flex;
12
12
  align-items: center;
13
+
14
+ margin: 0 -1px;
13
15
  }
14
16
 
15
17
  &__icon {
16
- color: var(--yc-color-text-primary);
17
18
  display: flex;
18
- align-items: center;
19
19
  justify-content: center;
20
+ align-items: center;
21
+
22
+ color: var(--yc-color-text-primary);
20
23
  }
21
24
 
22
25
  &__control:hover {
@@ -1,40 +1,44 @@
1
1
  .pool-bar {
2
2
  position: relative;
3
- width: 7px;
3
+
4
+ width: 6px;
4
5
  height: 20px;
5
- margin-right: 3px;
6
- border-radius: 2px;
7
- border: 1px solid;
6
+ margin-right: 2px;
7
+
8
8
  cursor: pointer;
9
9
 
10
+ border: 1px solid;
11
+ border-radius: 1px;
12
+
10
13
  &:last-child {
11
14
  margin-right: 0;
12
15
  }
13
16
 
14
17
  &_type_normal {
15
- border-color: var(--yc-color-base-positive-heavy);
18
+ border-color: var(--yc-color-infographics-positive-heavy);
16
19
  }
17
20
  &_type_warning {
18
- border-color: var(--yc-color-text-warning-heavy);
21
+ border-color: var(--yc-color-infographics-warning-heavy);
19
22
  }
20
23
  &_type_danger {
21
- border-color: var(--yc-color-base-danger-heavy);
24
+ border-color: var(--yc-color-infographics-danger-heavy);
22
25
  }
23
26
 
24
27
  &__value {
25
28
  position: absolute;
26
29
  bottom: 0;
30
+
27
31
  width: 100%;
28
32
  min-height: 1px;
29
33
 
30
34
  &_type_normal {
31
- background-color: var(--yc-color-base-positive-heavy);
35
+ background-color: var(--yc-color-infographics-positive-heavy);
32
36
  }
33
37
  &_type_warning {
34
- background-color: var(--yc-color-text-warning-heavy);
38
+ background-color: var(--yc-color-infographics-warning-heavy);
35
39
  }
36
40
  &_type_danger {
37
- background-color: var(--yc-color-base-danger-heavy);
41
+ background-color: var(--yc-color-infographics-danger-heavy);
38
42
  }
39
43
  }
40
44
  }
@@ -3,8 +3,8 @@
3
3
  line-height: var(--yc-text-body2-line-height);
4
4
  &__info {
5
5
  display: flex;
6
- align-items: center;
7
6
  justify-content: space-between;
7
+ align-items: center;
8
8
  }
9
9
 
10
10
  &__pool-name {
@@ -18,6 +18,7 @@
18
18
 
19
19
  &__threads {
20
20
  font-size: var(--yc-text-body-font-size);
21
+
21
22
  color: var(--yc-color-text-hint);
22
23
 
23
24
  .yc-root_theme_dark & {
@@ -26,27 +27,34 @@
26
27
  }
27
28
 
28
29
  &__percents {
29
- color: var(--yc-color-text-primary);
30
- font-size: var(--yc-text-body-font-size);
31
30
  margin-right: 2px;
31
+
32
+ font-size: var(--yc-text-body-font-size);
33
+
34
+ color: var(--yc-color-text-primary);
32
35
  }
33
36
 
34
37
  &__visual {
35
- height: 6px;
36
- font-size: var(--yc-text-body2-font-size);
38
+ position: relative;
39
+
37
40
  display: flex;
38
- align-items: center;
41
+ overflow: hidden;
39
42
  justify-content: center;
43
+ align-items: center;
44
+
45
+ height: 6px;
46
+
47
+ font-size: var(--yc-text-body2-font-size);
48
+
40
49
  border-radius: 4px;
41
- position: relative;
42
- overflow: hidden;
43
50
  background-color: var(--yc-color-base-generic-accent);
44
51
  }
45
52
 
46
53
  &__usage-line {
47
54
  position: absolute;
48
- left: 0;
49
55
  top: 0;
56
+ left: 0;
57
+
50
58
  height: 100%;
51
59
 
52
60
  &_type_green {
@@ -27,7 +27,7 @@ export class ProgressViewer extends React.Component {
27
27
  };
28
28
 
29
29
  static defaultProps = {
30
- size: 'ns',
30
+ size: 'xs',
31
31
  colorizeProgress: false,
32
32
  capacity: 100,
33
33
  inverseColorize: false,
@@ -1,32 +1,37 @@
1
1
  .progress-viewer {
2
+ position: relative;
3
+
4
+ display: flex;
5
+ overflow: hidden;
6
+ justify-content: center;
7
+ align-items: center;
8
+
2
9
  min-width: 120px;
3
- padding: 0 4px;
4
10
  height: 23px;
11
+ padding: 0 4px;
12
+
5
13
  font-size: var(--yc-text-body2-font-size);
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- color: var(--yc-color-text-light-primary);
10
- background: var(--yc-color-base-generic-accent);
11
- position: relative;
12
- overflow: hidden;
13
- border-radius: 4px;
14
14
  white-space: nowrap;
15
15
 
16
+ color: var(--yc-color-text-light-primary);
17
+ border-radius: 2px;
18
+ background: var(--yc-color-base-generic);
19
+
16
20
  &__line {
17
21
  position: absolute;
18
- height: 100%;
19
- left: 0;
20
22
  top: 0;
23
+ left: 0;
24
+
25
+ height: 100%;
21
26
 
22
27
  &_bg_scarlet {
23
- background: var(--yc-color-base-danger-heavy);
28
+ background: var(--yc-color-infographics-danger-heavy);
24
29
  }
25
30
  &_bg_apple {
26
- background: var(--yc-color-base-positive-heavy);
31
+ background: var(--yc-color-infographics-positive-heavy);
27
32
  }
28
33
  &_bg_saffron {
29
- background: var(--yc-color-base-warning-heavy);
34
+ background: var(--yc-color-infographics-warning-heavy);
30
35
  }
31
36
  }
32
37
 
@@ -42,38 +47,43 @@
42
47
  }
43
48
 
44
49
  &_size_xs {
45
- height: 18px;
46
- font-size: 10px;
47
- line-height: var(--yc-text-lead-line-height);
50
+ height: 20px;
51
+
52
+ font-size: var(--yc-text-body2-font-size);
53
+ line-height: var(--yc-text-body2-line-height);
48
54
  }
49
55
 
50
56
  &_size_s {
51
57
  height: 28px;
58
+
52
59
  font-size: var(--yc-text-body-font-size);
53
60
  line-height: 28px;
54
61
  }
55
62
  &_size_m {
56
63
  height: 32px;
64
+
57
65
  font-size: var(--yc-text-body2-font-size);
58
66
  line-height: 32px;
59
67
  }
60
68
 
61
69
  &_size_ns {
62
70
  height: 24px;
71
+
63
72
  font-size: 13px;
64
73
  line-height: var(--yc-text-lead-line-height);
65
74
  }
66
75
 
67
76
  &_size_n {
68
77
  height: 36px;
78
+
69
79
  font-size: var(--yc-text-body-font-size);
70
80
  line-height: 36px;
71
81
  }
72
82
 
73
83
  &_size_l {
74
84
  height: 38px;
85
+
75
86
  font-size: var(--yc-text-lead-font-size);
76
- line-height: var(--yc-text-lead-line-height);
77
87
  line-height: 38px;
78
88
  }
79
89
 
@@ -0,0 +1,14 @@
1
+ .kv-query-execution-status {
2
+ display: flex;
3
+ gap: 4px;
4
+
5
+ align-items: center;
6
+
7
+ color: var(--yc-color-text-complementary);
8
+ &__result-status-icon {
9
+ color: var(--yc-color-text-positive);
10
+ &_error {
11
+ color: var(--yc-color-text-danger);
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,29 @@
1
+ import cn from 'bem-cn-lite';
2
+
3
+ import Icon from '../Icon/Icon';
4
+
5
+ import './QueryExecutionStatus.scss';
6
+
7
+ const b = cn('kv-query-execution-status');
8
+
9
+ interface QueryExecutionStatusProps {
10
+ className?: string;
11
+ hasError?: boolean;
12
+ }
13
+
14
+ function QueryExecutionStatus({className, hasError}: QueryExecutionStatusProps) {
15
+ return hasError === undefined ? null : (
16
+ <div className={b(null, className)}>
17
+ <Icon
18
+ name={hasError ? 'failure' : 'success'}
19
+ viewBox={hasError ? '0 0 512 512' : '0 0 16 16'}
20
+ width={16}
21
+ height={16}
22
+ className={b('result-status-icon', {error: hasError})}
23
+ />
24
+ {hasError ? 'Failed' : 'Completed'}
25
+ </div>
26
+ );
27
+ }
28
+
29
+ export default QueryExecutionStatus;