ydb-embedded-ui 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/IndexInfoViewer/IndexInfoViewer.tsx +12 -9
  3. package/dist/components/InfoViewer/InfoViewer.scss +33 -9
  4. package/dist/components/InfoViewer/InfoViewer.tsx +43 -0
  5. package/dist/components/InfoViewer/index.ts +1 -0
  6. package/dist/components/InfoViewer/utils.ts +21 -11
  7. package/dist/components/Stack/Stack.scss +55 -0
  8. package/dist/components/Stack/Stack.tsx +35 -0
  9. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +2 -0
  10. package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.tsx +5 -0
  11. package/dist/containers/Storage/Pdisk/Pdisk.scss +2 -19
  12. package/dist/containers/Storage/Pdisk/Pdisk.tsx +30 -33
  13. package/dist/containers/Storage/Pdisk/__tests__/colors.tsx +40 -0
  14. package/dist/containers/Storage/StorageGroups/StorageGroups.scss +25 -3
  15. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +31 -7
  16. package/dist/containers/Storage/Vdisk/Vdisk.js +63 -64
  17. package/dist/containers/Storage/Vdisk/Vdisk.scss +9 -28
  18. package/dist/containers/Storage/Vdisk/__tests__/colors.tsx +163 -0
  19. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +15 -14
  20. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +12 -2
  21. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +164 -42
  22. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +18 -0
  23. package/dist/services/api.js +0 -1
  24. package/dist/setupTests.js +8 -0
  25. package/dist/store/reducers/executeQuery.js +3 -2
  26. package/dist/store/reducers/settings.js +20 -13
  27. package/dist/types/api/schema.ts +117 -4
  28. package/dist/types/api/storage.ts +121 -0
  29. package/dist/types/index.ts +1 -0
  30. package/dist/utils/constants.js +4 -0
  31. package/dist/utils/index.js +28 -4
  32. package/dist/utils/pdisk.ts +2 -2
  33. package/package.json +28 -5
  34. package/dist/components/InfoViewer/InfoViewer.js +0 -47
  35. package/dist/index.test.js +0 -5
@@ -28,7 +28,7 @@ export const parseBitField = <T extends Record<string, number>>(
28
28
  };
29
29
 
30
30
  export enum IPDiskType {
31
- ROT = 'ROT',
31
+ HDD = 'HDD', // ROT (Rotation?) = HDD
32
32
  SSD = 'SSD',
33
33
  MVME = 'NVME',
34
34
  }
@@ -67,7 +67,7 @@ export const getPDiskType = (data: TPDiskStateInfo): IPDiskType | undefined => {
67
67
  return IPDiskType.MVME;
68
68
  }
69
69
  } else if (categoryBitField.typeExt === '0') {
70
- return IPDiskType.ROT;
70
+ return IPDiskType.HDD;
71
71
  }
72
72
 
73
73
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -9,10 +9,6 @@
9
9
  "url": "git@github.com:ydb-platform/ydb-embedded-ui.git"
10
10
  },
11
11
  "dependencies": {
12
- "@testing-library/jest-dom": "5.15.0",
13
- "@testing-library/react": "11.2.7",
14
- "@testing-library/user-event": "12.8.3",
15
- "@types/qs": "6.9.7",
16
12
  "@yandex-cloud/i18n": "0.6.0",
17
13
  "@yandex-cloud/paranoid": "1.0.0",
18
14
  "@yandex-cloud/react-data-table": "0.2.1",
@@ -63,6 +59,27 @@
63
59
  "eslint --fix --quiet"
64
60
  ]
65
61
  },
62
+ "jest": {
63
+ "verbose": true,
64
+ "moduleFileExtensions": [
65
+ "js",
66
+ "json",
67
+ "ts",
68
+ "tsx"
69
+ ],
70
+ "rootDir": ".",
71
+ "transform": {
72
+ "^.+\\.[jt]sx?$": "ts-jest"
73
+ },
74
+ "coverageDirectory": "./coverage",
75
+ "collectCoverageFrom": [
76
+ "src/**/*.{ts,tsx,js,jsx}"
77
+ ],
78
+ "testEnvironment": "jsdom",
79
+ "moduleNameMapper": {
80
+ "\\.(css|less|scss|sass)$": "jest-transform-css"
81
+ }
82
+ },
66
83
  "browserslist": {
67
84
  "production": [
68
85
  ">0.2%",
@@ -78,7 +95,11 @@
78
95
  "devDependencies": {
79
96
  "@commitlint/cli": "^15.0.0",
80
97
  "@commitlint/config-conventional": "^15.0.0",
98
+ "@testing-library/jest-dom": "^5.15.0",
99
+ "@testing-library/react": "^11.2.7",
100
+ "@testing-library/user-event": "^12.8.3",
81
101
  "@types/lodash": "^4.14.178",
102
+ "@types/qs": "^6.9.7",
82
103
  "@types/react": "^17.0.44",
83
104
  "@types/react-dom": "^17.0.11",
84
105
  "@types/react-router": "^5.1.17",
@@ -95,6 +116,7 @@
95
116
  "copyfiles": "^2.4.1",
96
117
  "eslint-config-prettier": "^8.3.0",
97
118
  "husky": "^7.0.4",
119
+ "jest-transform-css": "^4.0.1",
98
120
  "lint-staged": "^12.3.7",
99
121
  "postcss": "^8.4.6",
100
122
  "prettier": "^2.5.1",
@@ -102,6 +124,7 @@
102
124
  "react-app-rewired": "^2.1.11",
103
125
  "react-dom": "^17.0.2",
104
126
  "stylelint": "^14.3.0",
127
+ "ts-jest": "^28.0.7",
105
128
  "typescript": "^4.5.5"
106
129
  },
107
130
  "peerDependencies": {
@@ -1,47 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import cn from 'bem-cn-lite';
4
- import './InfoViewer.scss';
5
-
6
- const b = cn('info-viewer');
7
-
8
- class InfoViewer extends React.Component {
9
- render() {
10
- const {info, className, title} = this.props;
11
-
12
- return (
13
- <div className={`${b()} ${className}`}>
14
- {title && <div className={b('title')}>{title}</div>}
15
- {info && info.length > 0 ? (
16
- <div className={b('items')}>
17
- {info.map((data, infoIndex) => (
18
- <div className={b('row')} key={infoIndex}>
19
- <div className={b('label')}>
20
- {data.label}
21
- <div className={b('dots')}></div>
22
- </div>
23
-
24
- <div className={b('value')}>{data.value}</div>
25
- </div>
26
- ))}
27
- </div>
28
- ) : (
29
- <div>no {title} data</div>
30
- )}
31
- </div>
32
- );
33
- }
34
- }
35
-
36
- InfoViewer.propTypes = {
37
- className: PropTypes.string,
38
- info: PropTypes.array.isRequired,
39
- title: PropTypes.string,
40
- dots: PropTypes.bool,
41
- };
42
-
43
- InfoViewer.defaultProps = {
44
- className: '',
45
- };
46
-
47
- export default InfoViewer;
@@ -1,5 +0,0 @@
1
- describe('Fake tests', () => {
2
- it('A fake test', () => {
3
- expect(true).toBe(true);
4
- });
5
- });