Skip to content

Commit 8d91596

Browse files
author
Artem
committed
Merge branch 'main' into feature/RI-4352-bulk_upload_from_tutorials
2 parents fa66406 + 49542c4 commit 8d91596

File tree

74 files changed

+11886
-601
lines changed

Some content is hidden

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

74 files changed

+11886
-601
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RedisInsight is an intuitive and efficient GUI for Redis, allowing you to intera
3232
* Visualizations of your [RediSearch](https://oss.redis.com/redisearch/) index, queries, and aggregations
3333
* Ability to build your own data visualization plugins
3434
* Built-in click-through guides for Redis capabilities
35-
* Oficially supported for Redis OSS, [Redis Cloud](https://redis.com/try-free/). Works with Microsoft Azure Cache for Redis (official support upcoming).
35+
* Officially supported for Redis OSS, [Redis Cloud](https://redis.com/try-free/). Works with Microsoft Azure Cache for Redis (official support upcoming).
3636
* Available for macOS (including M1), Windows and Linux
3737

3838
Check out the [release notes](https://docs.redis.com/latest/ri/release-notes/).

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export default merge(baseConfig, {
6666
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
6767
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
6868
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
69+
RI_HOSTNAME: '127.0.0.1',
6970
BUILD_TYPE: 'ELECTRON',
7071
APP_VERSION: version,
7172
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',

configs/webpack.config.main.stage.babel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default merge(mainProdConfig, {
2626
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
2727
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
2828
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
29+
RI_HOSTNAME: '127.0.0.1',
2930
BUILD_TYPE: 'ELECTRON',
3031
APP_VERSION: version,
3132
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',

redisinsight/api/config/default.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default {
3939
},
4040
server: {
4141
env: 'development',
42+
listenInterface: process.env.RI_HOSTNAME ?? '0.0.0.0',
4243
port: 5000,
4344
docPrefix: 'api/docs',
4445
globalPrefix: 'api',

redisinsight/api/src/__mocks__/commands.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const mockMainCommands = {
44
complexity: 'O(N). Where N is the number of configured users.',
55
since: '6.0.0',
66
group: 'server',
7+
provider: 'main',
78
},
89
};
910

@@ -19,6 +20,7 @@ export const mockRedisearchCommands = {
1920
],
2021
since: '1.0.0',
2122
group: 'search',
23+
provider: 'search',
2224
},
2325
};
2426

@@ -39,6 +41,7 @@ export const mockRedijsonCommands = {
3941
],
4042
since: '1.0.0',
4143
group: 'json',
44+
provider: 'json',
4245
},
4346
};
4447

@@ -102,6 +105,7 @@ export const mockRedistimeseriesCommands = {
102105
],
103106
since: '1.0.0',
104107
group: 'timeseries',
108+
provider: 'timeseries',
105109
},
106110
};
107111

@@ -143,6 +147,7 @@ export const mockRedisaiCommands = {
143147
],
144148
since: '1.2.5',
145149
group: 'tensor',
150+
provider: 'sai',
146151
},
147152
};
148153

@@ -161,6 +166,7 @@ export const mockRedisgraphCommands = {
161166
],
162167
since: '1.0.0',
163168
group: 'graph',
169+
provider: 'graph',
164170
},
165171
};
166172

redisinsight/api/src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import { AppModule } from './app.module';
1212
import SWAGGER_CONFIG from '../config/swagger';
1313
import LOGGER_CONFIG from '../config/logger';
1414

15+
const serverConfig = get('server');
16+
1517
export default async function bootstrap(): Promise<Function> {
1618
await migrateHomeFolder();
1719

18-
const serverConfig = get('server');
1920
const port = process.env.API_PORT || serverConfig.port;
2021
const logger = WinstonModule.createLogger(LOGGER_CONFIG);
2122

@@ -47,7 +48,7 @@ export default async function bootstrap(): Promise<Function> {
4748

4849
const logFileProvider = app.get(LogFileProvider);
4950

50-
await app.listen(port);
51+
await app.listen(port, serverConfig.listenInterface);
5152
logger.log({
5253
message: `Server is running on http(s)://localhost:${port}`,
5354
context: 'bootstrap',

redisinsight/api/src/modules/browser/services/hash-business/hash-business.service.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import {
66
NotFoundException,
77
} from '@nestjs/common';
88
import { chunk, flatMap, isNull } from 'lodash';
9-
import * as isGlob from 'is-glob';
10-
import { catchAclError, catchTransactionError, unescapeGlob } from 'src/utils';
9+
import {
10+
catchAclError, catchTransactionError, isRedisGlob, unescapeRedisGlob,
11+
} from 'src/utils';
1112
import ERROR_MESSAGES from 'src/constants/error-messages';
1213
import { RedisErrorCodes } from 'src/constants';
1314
import config from 'src/utils/config';
@@ -105,8 +106,8 @@ export class HashBusinessService {
105106
new NotFoundException(ERROR_MESSAGES.KEY_NOT_EXIST),
106107
);
107108
}
108-
if (dto.match && !isGlob(dto.match, { strict: false })) {
109-
const field = unescapeGlob(dto.match);
109+
if (dto.match && !isRedisGlob(dto.match)) {
110+
const field = unescapeRedisGlob(dto.match);
110111
result.nextCursor = 0;
111112
const value = await this.browserTool.execCommand(
112113
clientMetadata,

redisinsight/api/src/modules/browser/services/keys-business/scanner/strategies/cluster.strategy.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { toNumber, omit, isNull } from 'lodash';
2-
import * as isGlob from 'is-glob';
32
import config from 'src/utils/config';
4-
import { unescapeGlob } from 'src/utils';
3+
import { isRedisGlob, unescapeRedisGlob } from 'src/utils';
54
import {
65
BrowserToolClusterService,
76
} from 'src/modules/browser/services/browser-tool-cluster/browser-tool-cluster.service';
@@ -46,8 +45,8 @@ export class ClusterStrategy extends AbstractStrategy {
4645
const settings = await this.settingsService.getAppSettings('1');
4746
await this.calculateNodesTotalKeys(nodes);
4847

49-
if (!isGlob(match, { strict: false })) {
50-
const keyName = Buffer.from(unescapeGlob(match));
48+
if (!isRedisGlob(match)) {
49+
const keyName = Buffer.from(unescapeRedisGlob(match));
5150
nodes.forEach((node) => {
5251
// eslint-disable-next-line no-param-reassign
5352
node.cursor = 0;

redisinsight/api/src/modules/browser/services/keys-business/scanner/strategies/standalone.strategy.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import * as isGlob from 'is-glob';
21
import { isNull } from 'lodash';
32
import config from 'src/utils/config';
4-
import { unescapeGlob } from 'src/utils';
3+
import { isRedisGlob, unescapeRedisGlob } from 'src/utils';
54
import {
65
GetKeyInfoResponse,
76
GetKeysWithDetailsResponse,
@@ -47,8 +46,8 @@ export class StandaloneStrategy extends AbstractStrategy {
4746

4847
node.total = await getTotal(client);
4948

50-
if (!isGlob(match, { strict: false })) {
51-
const keyName = Buffer.from(unescapeGlob(match));
49+
if (!isRedisGlob(match)) {
50+
const keyName = Buffer.from(unescapeRedisGlob(match));
5251
node.cursor = 0;
5352
node.scanned = isNull(node.total) ? 1 : node.total;
5453
node.keys = await this.getKeysInfo(client, [keyName]);

redisinsight/api/src/modules/browser/services/set-business/set-business.service.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import {
55
Logger,
66
NotFoundException,
77
} from '@nestjs/common';
8-
import * as isGlob from 'is-glob';
98
import { RedisErrorCodes } from 'src/constants';
109
import ERROR_MESSAGES from 'src/constants/error-messages';
1110
import config from 'src/utils/config';
12-
import { catchAclError, catchTransactionError, unescapeGlob } from 'src/utils';
11+
import {
12+
catchAclError, catchTransactionError, isRedisGlob, unescapeRedisGlob,
13+
} from 'src/utils';
1314
import { ReplyError } from 'src/models';
1415
import { ClientMetadata } from 'src/common/models';
1516
import {
@@ -101,8 +102,8 @@ export class SetBusinessService {
101102
new NotFoundException(ERROR_MESSAGES.KEY_NOT_EXIST),
102103
);
103104
}
104-
if (dto.match && !isGlob(dto.match, { strict: false })) {
105-
const member = unescapeGlob(dto.match);
105+
if (dto.match && !isRedisGlob(dto.match)) {
106+
const member = unescapeRedisGlob(dto.match);
106107
result.nextCursor = 0;
107108
const memberIsExist = await this.browserTool.execCommand(
108109
clientMetadata,

0 commit comments

Comments
 (0)