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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.5.3...v1.6.0) (2022-06-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * query issues displaying ([3ba4c25](https://github.com/ydb-platform/ydb-embedded-ui/commit/3ba4c2591542ef902eba4f7c44550f3c59618575))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * code-review ([742c58a](https://github.com/ydb-platform/ydb-embedded-ui/commit/742c58a9bc4fa0dd0b24aa0119b7352e2be6fc8e))
14
+ * **package.json:** typecheck script ([111b525](https://github.com/ydb-platform/ydb-embedded-ui/commit/111b525f51a050010bbc03a3d0990be00c18ccd8))
15
+
16
+ ### [1.5.3](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.5.2...v1.5.3) (2022-05-26)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * explicitly set lang for ydb-ui-components i18n ([5684524](https://github.com/ydb-platform/ydb-embedded-ui/commit/5684524267e2cbf19a44de75b0e0b2bf98b617fd))
22
+ * proper icon size in uikit/Select ([a665d6d](https://github.com/ydb-platform/ydb-embedded-ui/commit/a665d6d829dae61ccf25566dd7b8cd1e46a743bb))
23
+ * update code for @yandex-cloud/uikit@^2.0.0 ([49d67a1](https://github.com/ydb-platform/ydb-embedded-ui/commit/49d67a1bddcba6fa138b5ebaeb280f16366b3329))
24
+
25
+
26
+ ### chore
27
+
28
+ * update @yandex-cloud/uikit to 2.4.0 ([d2eb2e5](https://github.com/ydb-platform/ydb-embedded-ui/commit/d2eb2e5db147604ae346aea295ae22759712eaa4))
29
+ * add @yandex-cloud/uikit to peer deps ([9c9f599](https://github.com/ydb-platform/ydb-embedded-ui/commit/9c9f5997dcca1be5868d013da311a28e495e7faa))
30
+ * update ydb-ui-components to v2.0.1 ([3d6a8d3](https://github.com/ydb-platform/ydb-embedded-ui/commit/3d6a8d30ab2ab47203eb956904e891ae106c0bc7))
31
+
32
+ ### [1.5.2](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.5.1...v1.5.2) (2022-05-26)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * **Tenant:** always update diagnostics tabs for root ([db03266](https://github.com/ydb-platform/ydb-embedded-ui/commit/db03266fd7dd6e4588c1db0d109bdfaa8f693e2d))
38
+ * **Tenant:** don't use HistoryAPI and redux-location-state together ([c1bc562](https://github.com/ydb-platform/ydb-embedded-ui/commit/c1bc5621e3ead44b1b84e592f8d7106bbc918e37))
39
+
3
40
  ### [1.5.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v1.5.0...v1.5.1) (2022-05-25)
4
41
 
5
42
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"/></svg>
@@ -29,9 +29,9 @@
29
29
  &__heading {
30
30
  margin: 20px 20px 0;
31
31
 
32
- font-size: var(--yc-text-body2-font-size);
32
+ font-size: var(--yc-text-body-2-font-size);
33
33
  font-weight: 500;
34
- line-height: var(--yc-text-body2-line-height);
34
+ line-height: var(--yc-text-body-2-line-height);
35
35
  }
36
36
 
37
37
  &__search {
@@ -48,9 +48,9 @@
48
48
  &-heading {
49
49
  margin: 0;
50
50
 
51
- font-size: var(--yc-text-body2-font-size);
51
+ font-size: var(--yc-text-body-2-font-size);
52
52
  font-weight: 500;
53
- line-height: var(--yc-text-body2-line-height);
53
+ line-height: var(--yc-text-body-2-line-height);
54
54
 
55
55
  &_badge {
56
56
  position: relative;
@@ -1,5 +1,5 @@
1
1
  .kv-breadcrumbs {
2
2
  padding: 20px 0;
3
3
 
4
- font-size: var(--yc-text-body2-font-size);
4
+ font-size: var(--yc-text-body-2-font-size);
5
5
  }
@@ -20,18 +20,18 @@
20
20
 
21
21
  &__title_size {
22
22
  &_s {
23
- font-size: var(--yc-text-body-font-size);
24
- line-height: var(--yc-text-body-line-height);
23
+ font-size: var(--yc-text-body-1-font-size);
24
+ line-height: var(--yc-text-body-1-line-height);
25
25
  }
26
26
 
27
27
  &_m {
28
- font-size: var(--yc-text-body2-font-size);
29
- line-height: var(--yc-text-body2-line-height);
28
+ font-size: var(--yc-text-body-2-font-size);
29
+ line-height: var(--yc-text-body-2-line-height);
30
30
  }
31
31
 
32
32
  &_l {
33
- font-size: var(--yc-text-body3-font-size);
34
- line-height: var(--yc-text-body3-line-height);
33
+ font-size: var(--yc-text-body-3-font-size);
34
+ line-height: var(--yc-text-body-3-line-height);
35
35
  }
36
36
  }
37
37
 
@@ -55,9 +55,9 @@
55
55
  }
56
56
 
57
57
  &__empty-state-title {
58
- font-size: var(--yc-text-body-font-size);
58
+ font-size: var(--yc-text-body-1-font-size);
59
59
  font-weight: normal;
60
- line-height: var(--yc-text-body-line-height);
60
+ line-height: var(--yc-text-body-1-line-height);
61
61
 
62
62
  opacity: 0.5;
63
63
  }
@@ -47,21 +47,21 @@
47
47
  font-weight: 500;
48
48
 
49
49
  &_size_s {
50
- font-size: var(--yc-text-lead-font-size);
51
- line-height: var(--yc-text-lead-line-height);
50
+ font-size: var(--yc-text-subheader-3-font-size);
51
+ line-height: var(--yc-text-subheader-3-line-height);
52
52
  }
53
53
 
54
54
  &_size_m {
55
- font-size: var(--yc-text-title-font-size);
56
- line-height: var(--yc-text-title-line-height);
55
+ font-size: var(--yc-text-header-2-font-size);
56
+ line-height: var(--yc-text-header-2-line-height);
57
57
  }
58
58
  }
59
59
 
60
60
  &__description {
61
61
  grid-area: description;
62
62
 
63
- font-size: var(--yc-text-body2-font-size);
64
- line-height: var(--yc-text-body2-line-height);
63
+ font-size: var(--yc-text-body-2-font-size);
64
+ line-height: var(--yc-text-body-2-line-height);
65
65
  }
66
66
 
67
67
  &__actions {
@@ -5,8 +5,8 @@
5
5
  max-width: 100%;
6
6
  height: 100%;
7
7
 
8
- font-size: var(--yc-text-body2-font-size);
9
- line-height: var(--yc-text-body2-line-height);
8
+ font-size: var(--yc-text-body-2-font-size);
9
+ line-height: var(--yc-text-body-2-line-height);
10
10
 
11
11
  &__clipboard-button {
12
12
  display: none;
@@ -42,8 +42,8 @@
42
42
  &__label {
43
43
  margin-right: 2px;
44
44
 
45
- font-size: var(--yc-text-body2-font-size);
46
- line-height: var(--yc-text-body2-line-height);
45
+ font-size: var(--yc-text-body-2-font-size);
46
+ line-height: var(--yc-text-body-2-line-height);
47
47
 
48
48
  color: var(--yc-color-text-complementary);
49
49
  }
@@ -96,7 +96,7 @@
96
96
  }
97
97
 
98
98
  &_size_m {
99
- font-size: var(--yc-text-body2-font-size);
100
- line-height: var(--yc-text-body2-line-height);
99
+ font-size: var(--yc-text-body-2-font-size);
100
+ line-height: var(--yc-text-body-2-line-height);
101
101
  }
102
102
  }
@@ -1,15 +1,15 @@
1
1
  @import '../../styles/mixins.scss';
2
2
 
3
3
  .full-node-viewer {
4
- font-size: var(--yc-text-body2-font-size);
5
- line-height: var(--yc-text-body2-line-height);
4
+ font-size: var(--yc-text-body-2-font-size);
5
+ line-height: var(--yc-text-body-2-line-height);
6
6
 
7
7
  &__title {
8
8
  margin: 0 20px 0 0;
9
9
 
10
- font-size: var(--yc-text-body2-font-size);
10
+ font-size: var(--yc-text-body-2-font-size);
11
11
  font-weight: 600;
12
- line-height: var(--yc-text-body2-line-height);
12
+ line-height: var(--yc-text-body-2-line-height);
13
13
  text-transform: uppercase;
14
14
  }
15
15
 
@@ -50,7 +50,7 @@
50
50
  min-width: 100px;
51
51
  margin-right: 25px;
52
52
 
53
- font-size: var(--yc-text-body2-font-size);
53
+ font-size: var(--yc-text-body-2-font-size);
54
54
  line-height: 18px;
55
55
  white-space: nowrap;
56
56
 
@@ -69,9 +69,9 @@
69
69
  &__section-title {
70
70
  margin: 15px 0 10px;
71
71
 
72
- font-size: var(--yc-text-body2-font-size);
72
+ font-size: var(--yc-text-body-2-font-size);
73
73
  font-weight: 600;
74
- line-height: var(--yc-text-body2-line-height);
74
+ line-height: var(--yc-text-body-2-line-height);
75
75
  }
76
76
 
77
77
  &__link {
@@ -8,7 +8,7 @@
8
8
  &__label {
9
9
  margin-right: 20px;
10
10
 
11
- font-size: var(--yc-text-body-font-size);
11
+ font-size: var(--yc-text-body-1-font-size);
12
12
 
13
13
  color: var(--yc-color-text-complementary);
14
14
  }
@@ -1,12 +1,12 @@
1
1
  .info-viewer {
2
- font-size: var(--yc-text-body2-font-size);
3
- line-height: var(--yc-text-body2-line-height);
2
+ font-size: var(--yc-text-body-2-font-size);
3
+ line-height: var(--yc-text-body-2-line-height);
4
4
  &__title {
5
5
  margin: 15px 0 10px;
6
6
 
7
- font-size: var(--yc-text-body2-font-size);
7
+ font-size: var(--yc-text-body-2-font-size);
8
8
  font-weight: 600;
9
- line-height: var(--yc-text-body2-line-height);
9
+ line-height: var(--yc-text-body-2-line-height);
10
10
  }
11
11
 
12
12
  &__items {
@@ -6,7 +6,7 @@
6
6
  &__size {
7
7
  margin-right: 24px;
8
8
 
9
- font-size: var(--yc-text-body2-font-size);
9
+ font-size: var(--yc-text-body-2-font-size);
10
10
  line-height: 0;
11
11
 
12
12
  color: var(--yc-color-text-complementary);
@@ -1,6 +1,6 @@
1
1
  .pool-usage {
2
- font-size: var(--yc-text-body2-font-size);
3
- line-height: var(--yc-text-body2-line-height);
2
+ font-size: var(--yc-text-body-2-font-size);
3
+ line-height: var(--yc-text-body-2-line-height);
4
4
  &__info {
5
5
  display: flex;
6
6
  justify-content: space-between;
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  &__threads {
20
- font-size: var(--yc-text-body-font-size);
20
+ font-size: var(--yc-text-body-1-font-size);
21
21
 
22
22
  color: var(--yc-color-text-hint);
23
23
 
@@ -29,7 +29,7 @@
29
29
  &__percents {
30
30
  margin-right: 2px;
31
31
 
32
- font-size: var(--yc-text-body-font-size);
32
+ font-size: var(--yc-text-body-1-font-size);
33
33
 
34
34
  color: var(--yc-color-text-primary);
35
35
  }
@@ -44,7 +44,7 @@
44
44
 
45
45
  height: 6px;
46
46
 
47
- font-size: var(--yc-text-body2-font-size);
47
+ font-size: var(--yc-text-body-2-font-size);
48
48
 
49
49
  border-radius: 4px;
50
50
  background-color: var(--yc-color-base-generic-accent);
@@ -10,7 +10,7 @@
10
10
  height: 23px;
11
11
  padding: 0 4px;
12
12
 
13
- font-size: var(--yc-text-body2-font-size);
13
+ font-size: var(--yc-text-body-2-font-size);
14
14
  white-space: nowrap;
15
15
 
16
16
  color: var(--yc-color-text-light-primary);
@@ -49,20 +49,20 @@
49
49
  &_size_xs {
50
50
  height: 20px;
51
51
 
52
- font-size: var(--yc-text-body2-font-size);
53
- line-height: var(--yc-text-body2-line-height);
52
+ font-size: var(--yc-text-body-2-font-size);
53
+ line-height: var(--yc-text-body-2-line-height);
54
54
  }
55
55
 
56
56
  &_size_s {
57
57
  height: 28px;
58
58
 
59
- font-size: var(--yc-text-body-font-size);
59
+ font-size: var(--yc-text-body-1-font-size);
60
60
  line-height: 28px;
61
61
  }
62
62
  &_size_m {
63
63
  height: 32px;
64
64
 
65
- font-size: var(--yc-text-body2-font-size);
65
+ font-size: var(--yc-text-body-2-font-size);
66
66
  line-height: 32px;
67
67
  }
68
68
 
@@ -70,25 +70,25 @@
70
70
  height: 24px;
71
71
 
72
72
  font-size: 13px;
73
- line-height: var(--yc-text-lead-line-height);
73
+ line-height: var(--yc-text-subheader-3-line-height);
74
74
  }
75
75
 
76
76
  &_size_n {
77
77
  height: 36px;
78
78
 
79
- font-size: var(--yc-text-body-font-size);
79
+ font-size: var(--yc-text-body-1-font-size);
80
80
  line-height: 36px;
81
81
  }
82
82
 
83
83
  &_size_l {
84
84
  height: 38px;
85
85
 
86
- font-size: var(--yc-text-lead-font-size);
86
+ font-size: var(--yc-text-subheader-3-font-size);
87
87
  line-height: 38px;
88
88
  }
89
89
 
90
90
  &_size_head {
91
- font-size: var(--yc-text-body-font-size);
91
+ font-size: var(--yc-text-body-1-font-size);
92
92
  line-height: 36px;
93
93
  }
94
94
  }
@@ -0,0 +1,7 @@
1
+ .kv-shorty-string {
2
+ &__toggle {
3
+ margin-left: 2em;
4
+
5
+ font-size: 0.85em;
6
+ }
7
+ }
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+ import cn from 'bem-cn-lite';
3
+
4
+ import {Link} from '@yandex-cloud/uikit';
5
+
6
+ import './ShortyString.scss';
7
+
8
+ const block = cn('kv-shorty-string');
9
+
10
+ type Props = {
11
+ value?: string;
12
+ limit?: number;
13
+ displayLength?: boolean;
14
+ render?: (value: string) => React.ReactNode;
15
+ onToggle?: () => void;
16
+ expandLabel?: string;
17
+ collapseLabel?: string;
18
+ };
19
+
20
+ export default function ShortyString({
21
+ value = '',
22
+ limit = 200,
23
+ displayLength = true,
24
+ render = (v: string) => v,
25
+ onToggle,
26
+ expandLabel = 'Show more',
27
+ collapseLabel = 'Show less',
28
+ }: Props) {
29
+ const [expanded, setExpanded] = React.useState(false);
30
+ const hasToggle = value.length > limit;
31
+ const length =
32
+ displayLength && !expanded ? `(${value.length} symbols)` : undefined;
33
+
34
+ const text = expanded || value.length <= limit ? value : value.slice(0, limit - 4) + '\u00a0...';
35
+ const label = expanded ? collapseLabel : expandLabel;
36
+ return (
37
+ <div className={block()}>
38
+ {render(text)}
39
+ {hasToggle ? (
40
+ <Link
41
+ className={block('toggle')}
42
+ onClick={(e) => {
43
+ e.stopPropagation();
44
+ setExpanded((v) => !v);
45
+ onToggle?.();
46
+ }}
47
+ >
48
+ {label} {length}
49
+ </Link>
50
+ ) : null}
51
+ </div>
52
+ );
53
+ }
@@ -8,7 +8,7 @@
8
8
  height: var(--data-table-row-height);
9
9
 
10
10
  .yc-skeleton {
11
- height: var(--yc-text-body2-line-height);
11
+ height: var(--yc-text-body-2-line-height);
12
12
  }
13
13
  }
14
14
 
@@ -17,7 +17,7 @@
17
17
  min-width: 60px;
18
18
  margin-right: 20px;
19
19
 
20
- font-size: var(--yc-text-body-font-size);
20
+ font-size: var(--yc-text-body-1-font-size);
21
21
  line-height: 18px;
22
22
  white-space: nowrap;
23
23
  text-transform: capitalize;
@@ -33,7 +33,7 @@
33
33
  margin: 0;
34
34
  margin-bottom: 16px;
35
35
 
36
- font-size: var(--yc-text-body2-font-size);
36
+ font-size: var(--yc-text-body-2-font-size);
37
37
  font-weight: bold;
38
38
  line-height: 20px;
39
39
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import {connect} from 'react-redux';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
+ import {i18n as YDBComponentsI18N} from 'ydb-ui-components/build/components/i18n';
5
6
  import {I18N, i18n} from '../../utils/i18n';
6
7
 
7
8
  import ContentWrapper, {Content} from './Content';
@@ -25,7 +26,7 @@ class App extends React.Component {
25
26
  constructor(props) {
26
27
  super(props);
27
28
  i18n.setLang(I18N.LANGS.en);
28
- I18N.setDefaultLang(I18N.LANGS.en); // for the peer dependency ydb-ui-components, should match the language above
29
+ YDBComponentsI18N.setLang(I18N.LANGS.en);
29
30
  }
30
31
 
31
32
  componentDidMount() {
@@ -3,9 +3,15 @@
3
3
  @import './NodesTable';
4
4
 
5
5
  * {
6
+ // FIXME: this is an overkill, potentially could break external components, needs refactoring
6
7
  box-sizing: border-box;
7
8
  }
8
9
 
10
+ .yc-select-popup__tick-icon {
11
+ // this is a local fix, remove after the refactoring
12
+ box-sizing: content-box;
13
+ }
14
+
9
15
  html,
10
16
  body,
11
17
  #root {
@@ -54,7 +54,7 @@ function TipPopup({dbChangePopupVisibility, dataAttribute, initialIsPopupVisible
54
54
  <div className={b('title')}>{tipData.title}</div>
55
55
  <div className={b('content')}>{tipData.description}</div>
56
56
  <div className={b('cross-icon-wrapper')}>
57
- <Button view="clear" onClick={onClosePopupClick}>
57
+ <Button view="flat-secondary" onClick={onClosePopupClick}>
58
58
  <Icon data={closeIcon} size={10} className={b('cross-icon')} />
59
59
  </Button>
60
60
  </div>
@@ -6,7 +6,7 @@
6
6
 
7
7
  margin-left: 16px;
8
8
 
9
- line-height: var(--yc-text-body2-line-height);
9
+ line-height: var(--yc-text-body-2-line-height);
10
10
  }
11
11
  &__user-info-wrapper {
12
12
  display: flex;
@@ -28,8 +28,8 @@
28
28
 
29
29
  width: 100%;
30
30
 
31
- font-size: var(--yc-text-body-font-size);
32
- line-height: var(--yc-text-header-line-height);
31
+ font-size: var(--yc-text-body-1-font-size);
32
+ line-height: var(--yc-text-header-1-line-height);
33
33
  }
34
34
 
35
35
  &__logo {
@@ -15,14 +15,14 @@
15
15
  @include body2-typography;
16
16
 
17
17
  &__cluster-info-title {
18
- font-size: var(--yc-text-body-font-size);
18
+ font-size: var(--yc-text-body-1-font-size);
19
19
  text-transform: uppercase;
20
20
 
21
21
  color: var(--yc-color-text-secondary);
22
22
  }
23
23
 
24
24
  &__cluster-info-name {
25
- font-size: var(--yc-text-body2-font-size);
25
+ font-size: var(--yc-text-body-2-font-size);
26
26
  font-weight: 500;
27
27
  }
28
28
 
@@ -13,8 +13,8 @@
13
13
 
14
14
  margin-right: 15px;
15
15
 
16
- font-size: var(--yc-text-body2-font-size);
17
- line-height: var(--yc-text-body2-line-height);
16
+ font-size: var(--yc-text-body-2-font-size);
17
+ line-height: var(--yc-text-body-2-line-height);
18
18
  }
19
19
  &__info {
20
20
  display: flex;
@@ -32,8 +32,8 @@
32
32
  &__label {
33
33
  margin-right: 10px;
34
34
 
35
- font-size: var(--yc-text-body-font-size);
36
- line-height: var(--yc-text-body-line-height);
35
+ font-size: var(--yc-text-body-1-font-size);
36
+ line-height: var(--yc-text-body-1-line-height);
37
37
 
38
38
  color: var(--yc-color-text-hint);
39
39
 
@@ -42,8 +42,8 @@
42
42
  }
43
43
  }
44
44
  &__value {
45
- font-size: var(--yc-text-body-font-size);
46
- line-height: var(--yc-text-body-line-height);
45
+ font-size: var(--yc-text-body-1-font-size);
46
+ line-height: var(--yc-text-body-1-line-height);
47
47
 
48
48
  color: var(--yc-color-text-primary);
49
49
  }
@@ -8,8 +8,7 @@ import {showTooltip, hideTooltip} from '../../store/reducers/tooltip';
8
8
  import {COLORS_RANGE_SIZE, getColorRange, getColorIndex, getCurrentMetricLimits} from './util';
9
9
  import {formatNumber} from '../../utils';
10
10
 
11
- import {Loader, Checkbox} from '@yandex-cloud/uikit';
12
- import {Select} from '@yandex-cloud/uikit/build/esm/components/unstable/Select';
11
+ import {Loader, Checkbox, Select} from '@yandex-cloud/uikit';
13
12
  import {HeatmapCanvas} from './HeatmapCanvas/HeatmapCanvas';
14
13
  import {Histogram} from './Histogram/Histogram';
15
14
  import {AutoFetcher} from '../../utils/autofetcher';
@@ -49,9 +49,9 @@
49
49
  &__label {
50
50
  margin-right: 16px;
51
51
 
52
- font-size: var(--yc-text-body2-font-size);
52
+ font-size: var(--yc-text-body-2-font-size);
53
53
  font-weight: 500;
54
- line-height: var(--yc-text-body2-line-height);
54
+ line-height: var(--yc-text-body-2-line-height);
55
55
  text-transform: uppercase;
56
56
 
57
57
  &_overall {
@@ -20,7 +20,6 @@
20
20
 
21
21
  &__tabs {
22
22
  padding: 16px 20px 0;
23
- @include body2-typography();
24
23
  }
25
24
 
26
25
  &__tab {
@@ -98,6 +98,7 @@ function Node(props: NodeProps) {
98
98
  return (
99
99
  <div className={b('tabs')}>
100
100
  <Tabs
101
+ size="l"
101
102
  items={nodeTabs}
102
103
  activeTab={activeTabVerified}
103
104
  wrapTo={({id}, node) => (
@@ -22,7 +22,7 @@
22
22
 
23
23
  width: 573px;
24
24
  margin-bottom: 8px;
25
- padding-left: 20px;
25
+ padding: 0 10px 0 20px;
26
26
 
27
27
  border: 1px solid var(--yc-color-line-generic);
28
28
  border-radius: 5px;
@@ -137,9 +137,9 @@
137
137
  &__title {
138
138
  margin-right: 16px;
139
139
 
140
- font-size: var(--yc-text-body2-font-size);
140
+ font-size: var(--yc-text-body-2-font-size);
141
141
  font-weight: 500;
142
- line-height: var(--yc-text-body2-line-height);
142
+ line-height: var(--yc-text-body-2-line-height);
143
143
  text-transform: uppercase;
144
144
  }
145
145
  }