Skip to content

Commit 05f1376

Browse files
Merge branch 'main' of https://github.com/RedisInsight/RedisInsight into fe/feature/RI-5009_refactor_database_form
2 parents b339782 + 8c55936 commit 05f1376

File tree

126 files changed

+3095
-2062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+3095
-2062
lines changed

jest.config.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ module.exports = {
3939
'json',
4040
],
4141
testEnvironment: 'jest-environment-jsdom',
42-
// type: 'module',
4342
transformIgnorePatterns: [
4443
'node_modules/(?!(monaco-editor|react-monaco-editor)/)',
4544
],
@@ -61,8 +60,5 @@ module.exports = {
6160
functions: 72,
6261
lines: 80,
6362
},
64-
// './redisinsight/ui/src/slices/**/*.ts': {
65-
// statements: 90,
66-
// },
6763
},
6864
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"package:mac": "yarn build:prod && electron-builder build --mac -p never",
3434
"package:mac:arm": "yarn build:prod && electron-builder build --mac --arm64 -p never",
3535
"package:linux": "yarn build:prod && electron-builder build --linux -p never",
36-
"postinstall": "skip-postinstall || (electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./configs/webpack.config.renderer.dev.dll.ts && opencollective-postinstall && yarn-deduplicate yarn.lock)",
36+
"postinstall": "patch-package && skip-postinstall || (electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./configs/webpack.config.renderer.dev.dll.ts && opencollective-postinstall && yarn-deduplicate yarn.lock)",
3737
"start": "ts-node ./scripts/check-port-in-use.js && yarn start:renderer",
3838
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./configs/webpack.config.renderer.dev.ts",
3939
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./configs/webpack.config.preload.dev.ts",
@@ -42,7 +42,7 @@
4242
"start:web:public": "cross-env PUBLIC_DEV=true NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./configs/webpack.config.web.dev.ts",
4343
"test": "jest ./redisinsight/ui -w 1",
4444
"test:watch": "jest ./redisinsight/ui --watch -w 1",
45-
"test:cov": "jest ./redisinsight/ui --coverage --no-cache --forceExit -w 3",
45+
"test:cov": "jest ./redisinsight/ui --silent --coverage --no-cache --forceExit -w 3",
4646
"test:cov:unit": "jest ./redisinsight/ui --group=-component --coverage -w 1",
4747
"test:cov:component": "jest ./redisinsight/ui --group=component --coverage -w 1",
4848
"type-check:ui": "tsc --project redisinsight/ui --noEmit"
@@ -204,6 +204,8 @@
204204
"msw": "^1.3.2",
205205
"node-sass": "^8.0.0",
206206
"opencollective-postinstall": "^2.0.3",
207+
"patch-package": "^8.0.0",
208+
"postinstall-postinstall": "^2.1.0",
207209
"react-hot-loader": "^4.13.0",
208210
"react-refresh": "^0.9.0",
209211
"redux-mock-store": "^1.5.4",
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
diff --git a/node_modules/react-vtree/dist/cjs/Tree.js b/node_modules/react-vtree/dist/cjs/Tree.js
2+
index c46ce3e..879f0a6 100644
3+
--- a/node_modules/react-vtree/dist/cjs/Tree.js
4+
+++ b/node_modules/react-vtree/dist/cjs/Tree.js
5+
@@ -33,6 +33,7 @@ var Row = function Row(_ref) {
6+
return /*#__PURE__*/_react.default.createElement(Node, Object.assign({
7+
isScrolling: isScrolling,
8+
style: style,
9+
+ index: index,
10+
treeData: treeData
11+
}, data));
12+
};
13+
diff --git a/node_modules/react-vtree/dist/es/Tree.d.ts b/node_modules/react-vtree/dist/es/Tree.d.ts
14+
index 5e7f57e..b216b36 100644
15+
--- a/node_modules/react-vtree/dist/es/Tree.d.ts
16+
+++ b/node_modules/react-vtree/dist/es/Tree.d.ts
17+
@@ -24,6 +24,8 @@ export declare type NodePublicState<TData extends NodeData> = Readonly<{
18+
data: TData;
19+
setOpen: (state: boolean) => Promise<void>;
20+
}> & {
21+
+ index: number;
22+
+ style: object;
23+
isOpen: boolean;
24+
};
25+
export declare type NodeRecord<TNodePublicState extends NodePublicState<any>> = Readonly<{
26+
diff --git a/node_modules/react-vtree/dist/es/Tree.js b/node_modules/react-vtree/dist/es/Tree.js
27+
index 2b1c7c0..b22e873 100644
28+
--- a/node_modules/react-vtree/dist/es/Tree.js
29+
+++ b/node_modules/react-vtree/dist/es/Tree.js
30+
@@ -19,6 +19,7 @@ export var Row = function Row(_ref) {
31+
return /*#__PURE__*/React.createElement(Node, Object.assign({
32+
isScrolling: isScrolling,
33+
style: style,
34+
+ index: index,
35+
treeData: treeData
36+
}, data));
37+
};
38+
diff --git a/node_modules/react-vtree/dist/lib/Tree.js b/node_modules/react-vtree/dist/lib/Tree.js
39+
index fb824bd..6feba4e 100644
40+
--- a/node_modules/react-vtree/dist/lib/Tree.js
41+
+++ b/node_modules/react-vtree/dist/lib/Tree.js
42+
@@ -17,6 +17,7 @@ export const Row = ({
43+
return /*#__PURE__*/React.createElement(Node, Object.assign({
44+
isScrolling: isScrolling,
45+
style: style,
46+
+ index: index,
47+
treeData: treeData
48+
}, data));
49+
};
Lines changed: 10 additions & 0 deletions
Loading

redisinsight/ui/src/components/keys-summary/KeysSummary.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ import React from 'react'
22
import cx from 'classnames'
33
import { isNull } from 'lodash'
44
import { EuiText, EuiTextColor } from '@elastic/eui'
5+
import { useSelector } from 'react-redux'
56

67
import { numberWithSpaces, nullableNumberWithSpaces } from 'uiSrc/utils/numbers'
7-
import ScanMore from '../scan-more'
8+
import { KeyViewType } from 'uiSrc/slices/interfaces/keys'
9+
import { keysSelector } from 'uiSrc/slices/browser/keys'
10+
import { KeyTreeSettings } from 'uiSrc/pages/browser/components/key-tree'
811

12+
import ScanMore from '../scan-more'
913
import styles from './styles.module.scss'
1014

1115
export interface Props {
@@ -41,6 +45,8 @@ const KeysSummary = (props: Props) => {
4145
&& nextCursor !== '0'
4246
? '~' : ''
4347

48+
const { viewType } = useSelector(keysSelector)
49+
4450
return (
4551
<>
4652
{(!!totalItemsCount || isNull(totalItemsCount)) && (
@@ -88,6 +94,9 @@ const KeysSummary = (props: Props) => {
8894
</EuiText>
8995
)}
9096
</EuiText>
97+
{viewType === KeyViewType.Tree && (
98+
<KeyTreeSettings loading={loading} />
99+
)}
91100
</div>
92101
)}
93102
{loading && !totalItemsCount && !isNull(totalItemsCount) && (

redisinsight/ui/src/components/keys-summary/styles.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.content {
2+
display: flex;
3+
}
4+
15
.loading {
26
opacity: 0;
37
}

redisinsight/ui/src/components/messages/filter-not-available/FilterNotAvailable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const FilterNotAvailable = ({ onClose } : { onClose?: () => void }) => {
2828
{!!freeInstance && (
2929
<>
3030
<EuiText color="subdued">
31-
Use your free all-in-one Redis Enterprise Cloud database to start exploring these capabilities.
31+
Use your free all-in-one Redis Cloud database to start exploring these capabilities.
3232
</EuiText>
3333
<EuiSpacer size="l" />
3434
<OAuthConnectFreeDb source={OAuthSocialSource.BrowserFiltering} onSuccessClick={onClose} />

redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoaded.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
8484
</EuiText>
8585
) : (
8686
<EuiText className={cx(styles.text, styles.marginBottom, styles.textFooter)}>
87-
Use your free all-in-one Redis Enterprise Cloud database to start exploring these capabilities.
87+
Use your free all-in-one Redis Cloud database to start exploring these capabilities.
8888
</EuiText>
8989
)), [freeInstance])
9090

redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const INFINITE_MESSAGES = {
5555
>
5656
<EuiTitle className="infiniteMessage__title"><span>Congratulations!</span></EuiTitle>
5757
<EuiText size="xs">
58-
You can now use your Redis Stack database in Redis Enterprise Cloud
58+
You can now use your Redis Stack database in Redis Cloud
5959
to start exploring all its developer capabilities via RedisInsight tutorials.
6060
</EuiText>
6161
<EuiSpacer size="m" />
@@ -84,7 +84,7 @@ export const INFINITE_MESSAGES = {
8484
onMouseUp={(e) => { e.preventDefault() }}
8585
data-testid="database-exists-notification"
8686
>
87-
<EuiTitle className="infiniteMessage__title"><span>You already have a free Redis Enterprise Cloud subscription.</span></EuiTitle>
87+
<EuiTitle className="infiniteMessage__title"><span>You already have a free Redis Cloud subscription.</span></EuiTitle>
8888
<EuiText size="xs">
8989
Do you want to import your existing database into RedisInsight?
9090
</EuiText>
@@ -125,7 +125,7 @@ export const INFINITE_MESSAGES = {
125125
onMouseUp={(e) => { e.preventDefault() }}
126126
data-testid="subscription-exists-notification"
127127
>
128-
<EuiTitle className="infiniteMessage__title"><span>Your subscription does not have a free Redis Enterprise Cloud database.</span></EuiTitle>
128+
<EuiTitle className="infiniteMessage__title"><span>Your subscription does not have a free Redis Cloud database.</span></EuiTitle>
129129
<EuiText size="xs">
130130
Do you want to create a free database in your existing subscription?
131131
</EuiText>

redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const OAuthSelectAccountDialog = () => {
125125
<EuiModalBody className={styles.modalBody}>
126126
<section className={styles.content}>
127127
<EuiTitle size="s">
128-
<h3 className={styles.title}>Connect to Redis Enterprise Cloud</h3>
128+
<h3 className={styles.title}>Connect to Redis Cloud</h3>
129129
</EuiTitle>
130130
<EuiText className={styles.subTitle}>
131131
Select an account to connect to:

0 commit comments

Comments
 (0)