Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,18 @@ jobs:

if [ << parameters.env >> == 'prod' ]; then
yarn package:prod
yarn package:mas
rm -rf release/mac
exit 0;
fi

if [ << parameters.env >> == 'stage' ]; then
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage && yarn package:mas
rm -rf release/mac
exit 0;
fi

UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage && yarn package:mas
rm -rf release/mac
no_output_timeout: 60m

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

Check out the [release notes](https://docs.redis.com/latest/ri/release-notes/).
Expand Down
1 change: 1 addition & 0 deletions configs/webpack.config.main.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default merge(baseConfig, {
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
RI_HOSTNAME: '127.0.0.1',
BUILD_TYPE: 'ELECTRON',
APP_VERSION: version,
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',
Expand Down
1 change: 1 addition & 0 deletions configs/webpack.config.main.stage.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default merge(mainProdConfig, {
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
RI_HOSTNAME: '127.0.0.1',
BUILD_TYPE: 'ELECTRON',
APP_VERSION: version,
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',
Expand Down
Binary file modified dev.provisionprofile
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/plugins/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Data visualization provided by the plugin is rendered within the
Workbench results area and is based on the executed command, ie. a certain
Redis command can generate its own custom data visualization.

We have included the following [plugin package example](https://github.com/RedisInsight/RedisInsight/tree/main/redisinsight/ui/src/packages/clients-list-example) for your reference: running the CLIENT LIST command presents the output in a tabular format for easier reading.
We have included the following [plugin package example](https://github.com/RedisInsight/RedisInsight/tree/main/redisinsight/ui/src/packages/clients-list) for your reference: running the CLIENT LIST command presents the output in a tabular format for easier reading.

## Wiki

Expand Down
9 changes: 9 additions & 0 deletions electron-builder-mas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const electronBuilder = require('./electron-builder.json');

const config = {
...electronBuilder,
appId: 'com.redis.RedisInsight',
productName: 'RedisInsight',
};

module.exports = config;
6 changes: 1 addition & 5 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@
{
"target": "zip",
"arch": ["x64", "arm64"]
},
{
"target": "mas",
"arch": ["universal"]
}
],
"type": "distribution",
"hardenedRuntime": true,
"darkModeSupport": true,
"bundleVersion": "1",
"bundleVersion": "3",
"icon": "resources/icon.icns",
"artifactName": "${productName}-${os}-${arch}.${ext}",
"entitlements": "resources/entitlements.mac.plist",
Expand Down
Binary file modified embedded.provisionprofile
Binary file not shown.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"package": "yarn package:dev",
"package:prod": "yarn build:prod && electron-builder build -p never",
"package:stage": "yarn build:stage && electron-builder build -p never",
"build:mas": "electron-builder build -p never -m mas:universal",
"build:mas:dev": "electron-builder build -p never -m mas-dev:universal",
"package:mas": "electron-builder build -p never -m mas:universal -c ./electron-builder-mas.js",
"package:mas:dev": "electron-builder build -p never -m mas-dev:universal -c ./electron-builder-mas.js",
"package:dev": "yarn build && cross-env DEBUG=electron-builder electron-builder build -p never",
"package:win": "yarn build:prod && electron-builder build --win --x64 -p never",
"package:mac": "yarn build:prod && electron-builder build --mac -p never",
Expand Down Expand Up @@ -128,6 +128,7 @@
"@types/jsonpath": "^0.2.0",
"@types/lodash": "^4.14.171",
"@types/node": "14.14.10",
"@types/pako": "^2.0.0",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.5",
"@types/react-redux": "^7.1.12",
Expand Down Expand Up @@ -222,6 +223,7 @@
"@reduxjs/toolkit": "^1.6.2",
"@stablelib/snappy": "^1.0.2",
"axios": "^0.25.0",
"brotli-unicode": "^1.0.2",
"buffer": "^6.0.3",
"classnames": "^2.3.1",
"connection-string": "^4.3.2",
Expand All @@ -243,6 +245,7 @@
"jsonpath": "^1.1.1",
"lodash": "^4.17.21",
"lz4js": "^0.2.0",
"pako": "^2.1.0",
"php-serialize": "^4.0.2",
"rawproto": "^0.7.6",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/about-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ICON_PATH = app.isPackaged
export default {
applicationName: 'RedisInsight-v2',
applicationVersion:
`${app.getVersion() || '2.24.0'}${process.env.NODE_ENV !== 'production' && `-dev-${process.getCreationTime()}`}`,
`${app.getVersion() || '2.24.0'}${process.env.NODE_ENV !== 'production' ? `-dev-${process.getCreationTime()}` : ''}`,
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,
iconPath: ICON_PATH,
};
1 change: 1 addition & 0 deletions redisinsight/api/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default {
},
server: {
env: 'development',
listenInterface: process.env.RI_HOSTNAME ?? '0.0.0.0',
port: 5000,
docPrefix: 'api/docs',
globalPrefix: 'api',
Expand Down
6 changes: 6 additions & 0 deletions redisinsight/api/src/__mocks__/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const mockMainCommands = {
complexity: 'O(N). Where N is the number of configured users.',
since: '6.0.0',
group: 'server',
provider: 'main',
},
};

Expand All @@ -19,6 +20,7 @@ export const mockRedisearchCommands = {
],
since: '1.0.0',
group: 'search',
provider: 'search',
},
};

Expand All @@ -39,6 +41,7 @@ export const mockRedijsonCommands = {
],
since: '1.0.0',
group: 'json',
provider: 'json',
},
};

Expand Down Expand Up @@ -102,6 +105,7 @@ export const mockRedistimeseriesCommands = {
],
since: '1.0.0',
group: 'timeseries',
provider: 'timeseries',
},
};

Expand Down Expand Up @@ -143,6 +147,7 @@ export const mockRedisaiCommands = {
],
since: '1.2.5',
group: 'tensor',
provider: 'sai',
},
};

Expand All @@ -161,6 +166,7 @@ export const mockRedisgraphCommands = {
],
since: '1.0.0',
group: 'graph',
provider: 'graph',
},
};

Expand Down
7 changes: 5 additions & 2 deletions redisinsight/api/src/__mocks__/redis.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import IORedis from 'ioredis';

const getRedisCommanderMockFunctions = () => ({
export const mockIORedisClientExec = jest.fn();
const getRedisCommanderMockFunctions = jest.fn(() => ({
sendCommand: jest.fn(),
info: jest.fn(),
monitor: jest.fn(),
Expand All @@ -12,9 +13,11 @@ const getRedisCommanderMockFunctions = () => ({
unsubscribe: jest.fn(),
punsubscribe: jest.fn(),
publish: jest.fn(),
pipeline: jest.fn().mockReturnThis(),
exec: mockIORedisClientExec,
cluster: jest.fn(),
quit: jest.fn(),
});
}));

export const mockIORedisClient = {
...Object.create(IORedis.prototype),
Expand Down
5 changes: 5 additions & 0 deletions redisinsight/api/src/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SlowLogModule } from 'src/modules/slow-log/slow-log.module';
import { PubSubModule } from 'src/modules/pub-sub/pub-sub.module';
import { ClusterMonitorModule } from 'src/modules/cluster-monitor/cluster-monitor.module';
import { DatabaseAnalysisModule } from 'src/modules/database-analysis/database-analysis.module';
import { BulkActionsModule } from 'src/modules/bulk-actions/bulk-actions.module';

export const routes: Routes = [
{
Expand Down Expand Up @@ -39,6 +40,10 @@ export const routes: Routes = [
path: '/:dbInstance',
module: DatabaseAnalysisModule,
},
{
path: '/:dbInstance',
module: BulkActionsModule,
},
],
},
];
5 changes: 3 additions & 2 deletions redisinsight/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import { AppModule } from './app.module';
import SWAGGER_CONFIG from '../config/swagger';
import LOGGER_CONFIG from '../config/logger';

const serverConfig = get('server');

export default async function bootstrap(): Promise<Function> {
await migrateHomeFolder();

const serverConfig = get('server');
const port = process.env.API_PORT || serverConfig.port;
const logger = WinstonModule.createLogger(LOGGER_CONFIG);

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

const logFileProvider = app.get(LogFileProvider);

await app.listen(port);
await app.listen(port, serverConfig.listenInterface);
logger.log({
message: `Server is running on http(s)://localhost:${port}`,
context: 'bootstrap',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import {
NotFoundException,
} from '@nestjs/common';
import { chunk, flatMap, isNull } from 'lodash';
import * as isGlob from 'is-glob';
import { catchAclError, catchTransactionError, unescapeGlob } from 'src/utils';
import {
catchAclError, catchTransactionError, isRedisGlob, unescapeRedisGlob,
} from 'src/utils';
import ERROR_MESSAGES from 'src/constants/error-messages';
import { RedisErrorCodes } from 'src/constants';
import config from 'src/utils/config';
Expand Down Expand Up @@ -105,8 +106,8 @@ export class HashBusinessService {
new NotFoundException(ERROR_MESSAGES.KEY_NOT_EXIST),
);
}
if (dto.match && !isGlob(dto.match, { strict: false })) {
const field = unescapeGlob(dto.match);
if (dto.match && !isRedisGlob(dto.match)) {
const field = unescapeRedisGlob(dto.match);
result.nextCursor = 0;
const value = await this.browserTool.execCommand(
clientMetadata,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { toNumber, omit, isNull } from 'lodash';
import * as isGlob from 'is-glob';
import config from 'src/utils/config';
import { unescapeGlob } from 'src/utils';
import { isRedisGlob, unescapeRedisGlob } from 'src/utils';
import {
BrowserToolClusterService,
} from 'src/modules/browser/services/browser-tool-cluster/browser-tool-cluster.service';
Expand Down Expand Up @@ -46,8 +45,8 @@ export class ClusterStrategy extends AbstractStrategy {
const settings = await this.settingsService.getAppSettings('1');
await this.calculateNodesTotalKeys(nodes);

if (!isGlob(match, { strict: false })) {
const keyName = Buffer.from(unescapeGlob(match));
if (!isRedisGlob(match)) {
const keyName = Buffer.from(unescapeRedisGlob(match));
nodes.forEach((node) => {
// eslint-disable-next-line no-param-reassign
node.cursor = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as isGlob from 'is-glob';
import { isNull } from 'lodash';
import config from 'src/utils/config';
import { unescapeGlob } from 'src/utils';
import { isRedisGlob, unescapeRedisGlob } from 'src/utils';
import {
GetKeyInfoResponse,
GetKeysWithDetailsResponse,
Expand Down Expand Up @@ -47,8 +46,8 @@ export class StandaloneStrategy extends AbstractStrategy {

node.total = await getTotal(client);

if (!isGlob(match, { strict: false })) {
const keyName = Buffer.from(unescapeGlob(match));
if (!isRedisGlob(match)) {
const keyName = Buffer.from(unescapeRedisGlob(match));
node.cursor = 0;
node.scanned = isNull(node.total) ? 1 : node.total;
node.keys = await this.getKeysInfo(client, [keyName]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import {
Logger,
NotFoundException,
} from '@nestjs/common';
import * as isGlob from 'is-glob';
import { RedisErrorCodes } from 'src/constants';
import ERROR_MESSAGES from 'src/constants/error-messages';
import config from 'src/utils/config';
import { catchAclError, catchTransactionError, unescapeGlob } from 'src/utils';
import {
catchAclError, catchTransactionError, isRedisGlob, unescapeRedisGlob,
} from 'src/utils';
import { ReplyError } from 'src/models';
import { ClientMetadata } from 'src/common/models';
import {
Expand Down Expand Up @@ -101,8 +102,8 @@ export class SetBusinessService {
new NotFoundException(ERROR_MESSAGES.KEY_NOT_EXIST),
);
}
if (dto.match && !isGlob(dto.match, { strict: false })) {
const member = unescapeGlob(dto.match);
if (dto.match && !isRedisGlob(dto.match)) {
const member = unescapeRedisGlob(dto.match);
result.nextCursor = 0;
const memberIsExist = await this.browserTool.execCommand(
clientMetadata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import {
NotFoundException,
} from '@nestjs/common';
import { isNull, isNaN } from 'lodash';
import * as isGlob from 'is-glob';
import config from 'src/utils/config';
import { catchAclError, catchTransactionError, unescapeGlob } from 'src/utils';
import {
catchAclError, catchTransactionError, isRedisGlob, unescapeRedisGlob,
} from 'src/utils';
import {
AddMembersToZSetDto,
CreateZSetWithExpireDto,
Expand Down Expand Up @@ -269,8 +270,8 @@ export class ZSetBusinessService {
new NotFoundException(ERROR_MESSAGES.KEY_NOT_EXIST),
);
}
if (dto.match && !isGlob(dto.match, { strict: false })) {
const member = unescapeGlob(dto.match);
if (dto.match && !isRedisGlob(dto.match)) {
const member = unescapeRedisGlob(dto.match);
result.nextCursor = 0;
const score = await this.browserTool.execCommand(
clientMetadata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export class BulkActionsAnalyticsService extends TelemetryBaseService {
type: overview.type,
duration: overview.duration,
filter: {
match: overview.filter.match === '*' ? '*' : 'PATTERN',
type: overview.filter.type,
match: overview.filter?.match === '*' ? '*' : 'PATTERN',
type: overview.filter?.type,
},
progress: {
scanned: overview.progress.scanned,
total: overview.progress.total,
scanned: overview.progress?.scanned,
total: overview.progress?.total,
},
},
);
Expand All @@ -54,16 +54,16 @@ export class BulkActionsAnalyticsService extends TelemetryBaseService {
type: overview.type,
duration: overview.duration,
filter: {
match: overview.filter.match === '*' ? '*' : 'PATTERN',
type: overview.filter.type,
match: overview.filter?.match === '*' ? '*' : 'PATTERN',
type: overview.filter?.type,
},
progress: {
scanned: overview.progress.scanned,
total: overview.progress.total,
scanned: overview.progress?.scanned,
total: overview.progress?.total,
},
summary: {
processed: overview.summary.processed,
succeed: overview.summary.succeed,
processed: overview.summary?.processed,
succeed: overview.summary?.succeed,
failed: overview.summary.failed,
},
},
Expand Down
Loading