ydb-embedded-ui 1.2.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.0](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.2.6...v1.3.0) (2022-05-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * **Storage:** red progress bars for unavailable disks ([17cf94d](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/17cf94defb23681bc62c768d3282eed00c7e974d))
9
+
10
+ ### [1.2.6](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.2.5...v1.2.6) (2022-05-05)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * code-review ([1068339](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/1068339d128fb44b661837b7d777b5e5f725a611))
16
+ * **Diagnostics:** layout ([2b11c35](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/2b11c35c14cd1fa17d36bbeb2a371fb2fef3fb70))
17
+
18
+ ### [1.2.5](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.2.4...v1.2.5) (2022-05-05)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **Node:** right padding on the storage page ([3a09d80](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/3a09d8030c2b9d8f34675f3a790e19bba5b864e4))
24
+ * **Tenant:** fix horizontal scrollbar on diagnostics storage page ([017f5f3](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/017f5f3470875824b11575c506837ab461a4e840))
25
+ * **Tenant:** keep acl heading at top ([7859fc6](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/7859fc6a2e47071daf18b48a23974f2393e31417))
26
+ * **Storage:** move filters out of scrollable container ([66baaec](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/66baaec170449c89da2d9f8e2170875c13334e68))
27
+ * **NodesViewer:** match default control styles ([c007674](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/c0076742e78fdb87aadae9b22e073b923e7ca57e))
28
+
3
29
  ### [1.2.4](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.2.3...v1.2.4) (2022-05-05)
4
30
 
5
31
 
@@ -5,11 +5,7 @@
5
5
  @include flex-container();
6
6
 
7
7
  &__controls {
8
- display: flex;
9
- align-items: center;
10
- gap: 12px;
11
-
12
- margin: 0 0 8px;
8
+ @include controls;
13
9
  }
14
10
 
15
11
  &__name {
@@ -15,7 +15,7 @@
15
15
  overflow: auto;
16
16
 
17
17
  height: 100%;
18
- padding-left: 20px;
18
+ padding: 0 20px;
19
19
  }
20
20
 
21
21
  &__tabs {
@@ -13,6 +13,8 @@ import DiskStateProgressBar, {
13
13
  } from '../DiskStateProgressBar/DiskStateProgressBar';
14
14
  import {STRUCTURE} from '../../Node/NodePages';
15
15
 
16
+ import {colorSeverity, NOT_AVAILABLE_SEVERITY} from '../utils';
17
+
16
18
  import './Pdisk.scss';
17
19
 
18
20
  const b = cn('pdisk-storage');
@@ -34,14 +36,6 @@ const stateSeverity = {
34
36
  DeviceIoError: 5,
35
37
  };
36
38
 
37
- const colorSeverity = {
38
- Grey: 0,
39
- Green: 1,
40
- Blue: 2,
41
- Yellow: 3,
42
- Orange: 4,
43
- Red: 5,
44
- };
45
39
  type PDiskState = keyof typeof stateSeverity;
46
40
 
47
41
  interface PDiskProps {
@@ -57,7 +51,7 @@ interface PDiskProps {
57
51
  }
58
52
 
59
53
  const getStateSeverity = (pDiskState?: PDiskState) => {
60
- return pDiskState ? stateSeverity[pDiskState] : colorSeverity.Grey;
54
+ return pDiskState ? stateSeverity[pDiskState] : NOT_AVAILABLE_SEVERITY;
61
55
  };
62
56
 
63
57
  function Pdisk(props: PDiskProps) {
@@ -40,7 +40,6 @@ const FILTER_OPTIONS = {
40
40
  const tableSettings = {
41
41
  ...DEFAULT_TABLE_SETTINGS,
42
42
  defaultOrder: DataTable.DESCENDING,
43
- stickyTop: 62,
44
43
  };
45
44
 
46
45
  class Storage extends React.Component {
@@ -1,22 +1,11 @@
1
1
  @import '../../styles/mixins.scss';
2
2
 
3
3
  .global-storage {
4
- display: flex;
5
- overflow: auto;
6
- flex-direction: column;
7
- align-items: flex-start;
8
-
9
4
  height: 100%;
10
5
  max-height: 100%;
6
+ @include flex-container;
11
7
 
12
8
  &__controls {
13
- position: sticky;
14
- z-index: 2;
15
- top: 0;
16
-
17
- width: 100%;
18
-
19
- background-color: var(--yc-color-base-background);
20
9
  @include controls();
21
10
  }
22
11
  &__search {
@@ -24,11 +13,8 @@
24
13
  }
25
14
 
26
15
  &__table-wrapper {
27
- display: flex;
28
- flex: 1 1 auto;
29
- flex-direction: column;
30
-
31
- min-width: 100%;
16
+ overflow: auto;
17
+ flex-grow: 1;
32
18
 
33
19
  font-size: var(--yc-text-body2-font-size);
34
20
  line-height: var(--yc-text-body2-line-height);
@@ -12,6 +12,8 @@ import DiskStateProgressBar, {
12
12
  } from '../DiskStateProgressBar/DiskStateProgressBar';
13
13
  import {STRUCTURE} from '../../Node/NodePages';
14
14
 
15
+ import {colorSeverity, NOT_AVAILABLE_SEVERITY} from '../utils';
16
+
15
17
  import './Vdisk.scss';
16
18
 
17
19
  const b = cn('vdisk-storage');
@@ -34,17 +36,8 @@ const stateSeverity = {
34
36
  OK: 1,
35
37
  };
36
38
 
37
- const colorSeverity = {
38
- Grey: 0,
39
- Green: 1,
40
- Blue: 2,
41
- Yellow: 3,
42
- Orange: 4,
43
- Red: 5,
44
- };
45
-
46
39
  const getStateSeverity = (vDiskState) => {
47
- return stateSeverity[vDiskState] ?? colorSeverity.Grey;
40
+ return stateSeverity[vDiskState] ?? NOT_AVAILABLE_SEVERITY;
48
41
  };
49
42
 
50
43
  const getColorSeverity = (color) => {
@@ -57,15 +50,25 @@ function Vdisk(props) {
57
50
 
58
51
  const anchor = useRef();
59
52
 
53
+ // determine disk status severity
60
54
  useEffect(() => {
61
55
  const {DiskSpace, VDiskState, FrontQueues, Replicated} = props;
56
+
57
+ // if the disk is not available, this determines its status severity regardless of other features
58
+ if (!VDiskState) {
59
+ setSeverity(NOT_AVAILABLE_SEVERITY);
60
+ return;
61
+ }
62
+
62
63
  const DiskSpaceSeverity = getColorSeverity(DiskSpace);
63
64
  const VDiskSpaceSeverity = getStateSeverity(VDiskState);
64
65
  const FrontQueuesSeverity = Math.min(colorSeverity.Orange, getColorSeverity(FrontQueues));
66
+
65
67
  let newSeverity = Math.max(DiskSpaceSeverity, VDiskSpaceSeverity, FrontQueuesSeverity);
66
68
  if (!Replicated && newSeverity === colorSeverity.Green) {
67
69
  newSeverity = colorSeverity.Blue;
68
70
  }
71
+
69
72
  setSeverity(newSeverity);
70
73
  }, [props.VDiskState, props.DiskSpace, props.FrontQueues, props.Replicated]);
71
74
 
@@ -0,0 +1,10 @@
1
+ export const colorSeverity = {
2
+ Grey: 0,
3
+ Green: 1,
4
+ Blue: 2,
5
+ Yellow: 3,
6
+ Orange: 4,
7
+ Red: 5,
8
+ };
9
+
10
+ export const NOT_AVAILABLE_SEVERITY = colorSeverity.Red;
@@ -0,0 +1 @@
1
+ export * from './constants';
@@ -7,6 +7,11 @@
7
7
 
8
8
  padding: 0 12px 16px;
9
9
  @include query-data-table;
10
+
11
+ &__result {
12
+ align-self: flex-start;
13
+ }
14
+
10
15
  &__message-container {
11
16
  padding: 0 12px 16px;
12
17
  }
@@ -1,13 +1,11 @@
1
1
  .kv-tenant-diagnostics {
2
+ display: flex;
2
3
  overflow: hidden;
4
+ flex-direction: column;
3
5
 
4
6
  height: 100%;
5
- &__header-wrapper {
6
- position: sticky;
7
- z-index: 2;
8
- top: 0;
9
- left: 0;
10
7
 
8
+ &__header-wrapper {
11
9
  padding: 13px 20px 16px;
12
10
 
13
11
  background-color: var(--yc-color-base-background);
@@ -36,15 +34,16 @@
36
34
 
37
35
  &__page-wrapper {
38
36
  overflow: auto;
37
+ flex-grow: 1;
39
38
 
40
39
  width: 100%;
41
- height: calc(100% - 69px);
42
40
  padding: 0 20px;
43
41
 
42
+ & .nodes-viewer,
44
43
  & .global-storage {
45
- height: calc(100% + 16px);
46
- max-height: calc(100% + 16px);
47
- margin-top: -16px;
44
+ &__controls {
45
+ padding-top: 0;
46
+ }
48
47
  }
49
48
  }
50
49
  }
@@ -3,6 +3,14 @@
3
3
  .healthcheck {
4
4
  padding: 25px 20px 20px;
5
5
 
6
+ &__issues {
7
+ overflow-x: hidden;
8
+ overflow-y: auto;
9
+
10
+ height: 70vh;
11
+ max-height: 70vh;
12
+ }
13
+
6
14
  &__loader {
7
15
  display: flex;
8
16
  justify-content: center;
@@ -29,18 +37,23 @@
29
37
 
30
38
  &__status-wrapper {
31
39
  display: flex;
32
- gap: 8px;
40
+ align-items: baseline;
33
41
 
34
42
  margin-bottom: 15px;
43
+ gap: 8px;
35
44
  }
36
45
 
37
46
  &__preview-title {
38
47
  font-weight: 600;
48
+ line-height: 24px;
39
49
  }
40
50
 
41
51
  &__self-check-status-indicator {
42
52
  padding: 0 8px;
43
53
 
54
+ font-size: 13px;
55
+ line-height: 24px;
56
+
44
57
  border-radius: 4px;
45
58
 
46
59
  &_good,
@@ -21,11 +21,11 @@
21
21
  }
22
22
 
23
23
  &__top-label {
24
- gap: 10px;
25
-
26
24
  margin-bottom: 20px;
27
25
 
28
26
  font-weight: 600;
27
+ line-height: 24px;
28
+ gap: 10px;
29
29
  }
30
30
 
31
31
  &__common-info {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],