Skip to content

Commit fe7807f

Browse files
committed
Merge branch 'main' into feature/RI-4141_Data_decompressors
2 parents 8808805 + a39a199 commit fe7807f

File tree

85 files changed

+4536
-750
lines changed

Some content is hidden

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

85 files changed

+4536
-750
lines changed

configs/webpack.config.web.prod.babel.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,5 @@ export default merge(commonConfig, {
207207
},
208208
],
209209
},
210-
externals: {
211-
react: 'React',
212-
'react-dom': 'ReactDOM',
213-
},
210+
externals: {},
214211
});

electron-builder.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"productName": "RedisInsight-v2",
33
"appId": "org.RedisLabs.RedisInsight-V2",
4-
"copyright": "Copyright © 2021 Redis Ltd.",
4+
"copyright": "Copyright © 2023 Redis Ltd.",
55
"files": [
66
"dist/",
77
"node_modules/",

redisinsight/api/src/modules/database/database.analytics.spec.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ describe('DatabaseAnalytics', () => {
103103
numberedDatabases: mockRedisGeneralInfo.databases,
104104
numberOfModules: 0,
105105
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
106+
databaseIndex: 0,
106107
...DEFAULT_REDIS_MODULES_SUMMARY,
107108
},
108109
);
@@ -132,6 +133,7 @@ describe('DatabaseAnalytics', () => {
132133
numberedDatabases: mockRedisGeneralInfo.databases,
133134
numberOfModules: 0,
134135
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
136+
databaseIndex: 0,
135137
...DEFAULT_REDIS_MODULES_SUMMARY,
136138
},
137139
);
@@ -163,6 +165,45 @@ describe('DatabaseAnalytics', () => {
163165
numberedDatabases: undefined,
164166
numberOfModules: 2,
165167
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
168+
databaseIndex: 0,
169+
...DEFAULT_REDIS_MODULES_SUMMARY,
170+
RediSearch: {
171+
loaded: true,
172+
version: 20000,
173+
},
174+
customModules: [{ name: 'rediSQL', version: 1 }],
175+
},
176+
);
177+
});
178+
it('should emit event without db index', () => {
179+
const instance = {
180+
...mockDatabaseWithTlsAuth,
181+
db: 2,
182+
modules: [{ name: 'search', version: 20000 }, { name: 'rediSQL', version: 1 }],
183+
};
184+
service.sendInstanceAddedEvent(instance, {
185+
version: mockRedisGeneralInfo.version,
186+
});
187+
188+
expect(sendEventSpy).toHaveBeenCalledWith(
189+
TelemetryEvents.RedisInstanceAdded,
190+
{
191+
databaseId: instance.id,
192+
connectionType: instance.connectionType,
193+
provider: instance.provider,
194+
useTLS: 'enabled',
195+
verifyTLSCertificate: 'enabled',
196+
useTLSAuthClients: 'enabled',
197+
useSNI: 'enabled',
198+
useSSH: 'disabled',
199+
version: mockRedisGeneralInfo.version,
200+
numberOfKeys: undefined,
201+
numberOfKeysRange: undefined,
202+
totalMemory: undefined,
203+
numberedDatabases: undefined,
204+
numberOfModules: 2,
205+
timeout: mockDatabaseWithTlsAuth.timeout / 1_000, // milliseconds to seconds
206+
databaseIndex: 2,
166207
...DEFAULT_REDIS_MODULES_SUMMARY,
167208
RediSearch: {
168209
loaded: true,

redisinsight/api/src/modules/database/database.analytics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export class DatabaseAnalytics extends TelemetryBaseService {
6666
numberedDatabases: additionalInfo.databases,
6767
numberOfModules: instance.modules?.length || 0,
6868
timeout: instance.timeout / 1_000, // milliseconds to seconds
69+
databaseIndex: instance.db || 0,
6970
...modulesSummary,
7071
},
7172
);

redisinsight/splash.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
const copyrightEl = document.getElementById('copyright') || null
8888

8989
if (copyrightEl) {
90-
copyrightEl.innerHTML = `RedisInsight ${appVersion}  © ${new Date().getFullYear() || '2022'} Redis Ltd.`
90+
copyrightEl.innerHTML = `RedisInsight ${appVersion}  © ${new Date().getFullYear() || '2023'} Redis Ltd.`
9191
}
9292
}
9393

redisinsight/ui/index.html.ejs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
<div id="root"></div>
1111

1212
<!-- Dependencies -->
13-
<% if (webpackConfig.mode=='production' ) { %>
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"
15-
integrity="sha512-8Q6Y9XnTbOE+JNvjBQwJ2H8S+UV4uA6hiRykhdtIyDYZ2TprdNmWOUaKdGzOhyr4dCyk287OejbPvwl7lrfqrQ==" crossorigin="anonymous"></script>
16-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"
17-
integrity="sha512-MOCpqoRoisCTwJ8vQQiciZv0qcpROCidek3GTFS6KTk2+y7munJIlKCVkFCYY+p3ErYFXCjmFjnfTTRSC1OHWQ==" crossorigin="anonymous"></script>
18-
<% } else { %>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"
20-
integrity="sha512-m7nhpWHotpucPI37I4lPovL28Bm2BhAMV8poF3F8Z9oOEZ3jlxGzkgvG0EMt1mVL1xydr1erlBbmN90js/ssUw==" crossorigin="anonymous"></script>
21-
<% } %>
13+
<% if (webpackConfig.mode=='development' ) { %>
14+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js"
15+
integrity="sha512-m7nhpWHotpucPI37I4lPovL28Bm2BhAMV8poF3F8Z9oOEZ3jlxGzkgvG0EMt1mVL1xydr1erlBbmN90js/ssUw==" crossorigin="anonymous"></script>
16+
<% } %>
2217
</body>
2318
</html>
Lines changed: 3 additions & 0 deletions
Loading

redisinsight/ui/src/components/monaco-json/MonacoJson.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const MonacoJson = (props: Props) => {
6060
preview: false,
6161
showStatusBar: false,
6262
showIcons: false,
63+
showProperties: false,
6364
},
6465
quickSuggestions: false,
6566
minimap: {

redisinsight/ui/src/components/multi-search/MultiSearch.tsx

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface Props {
1818
value: string
1919
options: string[]
2020
placeholder: string
21+
disableSubmit?: boolean
2122
onSubmit: () => void
2223
onKeyDown?: (e: React.KeyboardEvent) => void
2324
suggestions?: {
@@ -45,6 +46,7 @@ const MultiSearch = (props: Props) => {
4546
options = [],
4647
suggestions,
4748
placeholder,
49+
disableSubmit,
4850
onSubmit,
4951
onChangeOptions,
5052
onChange,
@@ -137,6 +139,18 @@ const MultiSearch = (props: Props) => {
137139
onSubmit()
138140
}
139141

142+
const SubmitBtn = () => (
143+
<EuiButtonIcon
144+
iconType="search"
145+
color="primary"
146+
aria-label="Search"
147+
disabled={disableSubmit}
148+
className={styles.searchButton}
149+
onClick={handleSubmit}
150+
data-testid="search-btn"
151+
/>
152+
)
153+
140154
return (
141155
<EuiOutsideClickDetector onOutsideClick={exitAutoSuggestions}>
142156
<div
@@ -255,14 +269,17 @@ const MultiSearch = (props: Props) => {
255269
</EuiToolTip>
256270
)}
257271
</div>
258-
<EuiButtonIcon
259-
iconType="search"
260-
color="primary"
261-
aria-label="Search"
262-
className={styles.searchButton}
263-
onClick={handleSubmit}
264-
data-testid="search-btn"
265-
/>
272+
{disableSubmit && (
273+
<EuiToolTip
274+
position="top"
275+
display="inlineBlock"
276+
anchorClassName={styles.anchorSubmitBtn}
277+
content="Please choose index in order to preform the search"
278+
>
279+
{SubmitBtn()}
280+
</EuiToolTip>
281+
)}
282+
{!disableSubmit && SubmitBtn()}
266283
</div>
267284
</EuiOutsideClickDetector>
268285
)

redisinsight/ui/src/components/multi-search/styles.module.scss

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@
1818
background-color: var(--browserTableRowEven);
1919
background-repeat: no-repeat;
2020
background-size: 0 100%;
21-
transition: box-shadow 150ms ease-in, background-image 150ms ease-in, background-size 150ms ease-in, background-color 150ms ease-in;
21+
transition: box-shadow 150ms ease-in, background-image 150ms ease-in, background-size 150ms ease-in,
22+
background-color 150ms ease-in;
2223

2324
&.isFocused {
2425
background-size: 100% 100%;
25-
background-image: linear-gradient(to top, var(--euiColorPrimary), var(--euiColorPrimary) 2px, transparent 2px, transparent 100%) !important;
26+
background-image: linear-gradient(
27+
to top,
28+
var(--euiColorPrimary),
29+
var(--euiColorPrimary) 2px,
30+
transparent 2px,
31+
transparent 100%
32+
) !important;
2633
}
2734
}
2835

@@ -48,7 +55,8 @@
4855
border-radius: 100%;
4956
margin-left: 5px;
5057

51-
&:hover, &:focus {
58+
&:hover,
59+
&:focus {
5260
background-color: var(--separatorColor) !important;
5361
}
5462

@@ -83,7 +91,8 @@
8391
padding: 6px 10px;
8492
cursor: default;
8593

86-
&:hover, &.focused {
94+
&:hover,
95+
&.focused {
8796
background: var(--comboBoxBadgeBgColor);
8897
.suggestionRemoveBtn {
8998
visibility: visible;
@@ -139,13 +148,25 @@
139148
color: var(--euiColorPrimaryText) !important;
140149
border-radius: 0 4px 4px 0;
141150

142-
&:hover, &:focus, &:focus-within {
151+
&:hover:not(:disabled),
152+
&:focus,
153+
&:focus-within {
143154
background-color: var(--buttonSecondaryHoverColor) !important;
144155
transform: none !important;
145156
}
146157

147158
&:hover {
148159
transform: none;
149160
}
161+
162+
&:disabled {
163+
border: 1px solid var(--separatorColor);
164+
border-left: none;
165+
background-color: var(--euiColorLightestShade);
166+
}
167+
}
168+
169+
.anchorSubmitBtn {
170+
height: 100%;
150171
}
151172
}

0 commit comments

Comments
 (0)