Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
581744c
Merge pull request #4463 from RedisInsight/release/2.68.0
Apr 2, 2025
36f811d
add additional info to getRedisNodeGeneralInfo
pd-redis May 5, 2025
70fb469
refactor calls to api in instances.ts, add instancesService.ts, add i…
pd-redis May 5, 2025
c78474d
updated tests
pd-redis May 5, 2025
ba483e4
fix double onClick handling
pd-redis May 5, 2025
4aca70a
RI-7129: fix Enterprise s3 upload path
KrumTy May 19, 2025
84c25c2
RI-7129: upload Enterprise statics for test builds only
KrumTy May 19, 2025
285c913
RI-7129: remove vendor plugins for Enterprise builds
KrumTy May 19, 2025
af05519
version bump
KIvanow May 19, 2025
497b2e5
Merge pull request #4559 from RedisInsight/RI-0000---version-bump
May 19, 2025
d3a1fc3
Merge pull request #4560 from RedisInsight/bugfix/RI-7129/enterprise-…
May 19, 2025
21148bf
RI-7138: fix suggested tag values (#4565)
KrumTy May 20, 2025
b298468
RI-7139: Fix json editor styles (#4566)
pawelangelow May 20, 2025
03dbc0f
RI-7137: Support Big integers in Monaco editor (#4563)
pawelangelow May 20, 2025
643edea
Merge branch 'release/2.70.0' into fe/feature/RI-7106-additiona-data-…
pd-redis May 22, 2025
e7a6eb5
fix InstancePage.spec.tsx
pd-redis May 22, 2025
ab41382
fix database-info.provider.spec.ts
pd-redis May 23, 2025
17298ba
added RedisDatabaseStatsDto
pd-redis May 23, 2025
75e59ac
Merge pull request #4539 from RedisInsight/fe/feature/RI-7106-additio…
May 23, 2025
6257a35
RI-7141 add db number to env
ArtemHoruzhenko May 27, 2025
3100e73
RI-7145 fix db id undefined state
ArtemHoruzhenko May 27, 2025
9abe1fc
RI-7145 fix /db/info ITests
ArtemHoruzhenko May 27, 2025
820edf7
RI-7145 fix /db/info ITests for cluster
ArtemHoruzhenko May 27, 2025
1690af0
RI-7145 fix /db/info ITests for cluster
ArtemHoruzhenko May 27, 2025
5ac6a67
Merge pull request #4581 from RedisInsight/bugfix/RI-7145-fix-pre-set…
May 27, 2025
0588626
Merge pull request #4584 from RedisInsight/release/2.70.0
May 27, 2025
4aa7d21
RI-000 fix api url for web builds
ArtemHoruzhenko May 27, 2025
fa9a47f
Merge pull request #4587 from RedisInsight/bugfix/RI-000-fix-docker-b…
May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/build/release-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

HELP="Args:
-v - Semver (2.66.0)
-v - Semver (2.70.0)
-d - Build image repository (Ex: -d redisinsight)
-r - Target repository (Ex: -r redis/redisinsight)
"
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/aws-upload-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,6 @@ jobs:
aws s3 cp release/ s3://${AWS_BUCKET_NAME_PROD}/releases/${APP_VERSION} --recursive
aws s3 cp release/ s3://${AWS_BUCKET_NAME_PROD}/latest --recursive

- name: Download vendor plugins
uses: actions/download-artifact@v4
id: download-vendor
continue-on-error: true
with:
name: 'vendor-plugins'
path: vendor

- name: Upload vendor plugins to s3 bucket
if: steps.download-vendor.outcome == 'success'
run: |
aws s3 cp vendor/ s3://${SELECTED_AWS_BUCKET_NAME}/public/plugins/static/ --recursive

- name: Generate job summary
run: |
node ./.github/generate-build-summary.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dev:electron:api": "cross-env RI_APP_PORT=5540 RI_APP_TYPE=ELECTRON NODE_ENV=development USE_TCP_CLOUD_AUTH=true yarn --cwd redisinsight/api start:dev",
"dev:electron": "cross-env RI_APP_TYPE=ELECTRON RI_AUTO_BOOTSTRAP=false NODE_ENV=development USE_TCP_CLOUD_AUTH=true yarn --cwd redisinsight/desktop dev",
"dev:desktop": "concurrently \"yarn dev:electron:api\" \"yarn dev:electron:ui\" \"yarn dev:electron\"",
"build:ui": "cross-env NODE_ENV=production RI_APP_TYPE=WEB yarn --cwd redisinsight/ui build",
"build:ui": "cross-env NODE_ENV=production RI_APP_TYPE=web yarn --cwd redisinsight/ui build",
"build:renderer": "cross-env NODE_ENV=production RI_APP_TYPE=ELECTRON yarn --cwd redisinsight/ui build --emptyOutDir && copyfiles ./redisinsight/desktop/splash.html ./redisinsight/dist/renderer -f",
"stats:ui": "yarn --cwd redisinsight/ui stats",
"build": "cross-env NODE_ENV=development concurrently \"yarn build:main\" \"yarn build:renderer\"",
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default {
: true,
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
appType: process.env.RI_APP_TYPE,
appVersion: process.env.RI_APP_VERSION || '2.68.0',
appVersion: process.env.RI_APP_VERSION || '2.70.0',
requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000,
excludeRoutes: [],
excludeAuthRoutes: [],
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit<OpenAPIObject, 'paths'> = {
info: {
title: 'Redis Insight Backend API',
description: 'Redis Insight Backend API',
version: '2.68.0',
version: '2.70.0',
},
tags: [],
};
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redisinsight-api",
"version": "2.68.0",
"version": "2.70.0",
"description": "Redis Insight API",
"private": true,
"author": {
Expand Down
4 changes: 3 additions & 1 deletion redisinsight/api/src/__mocks__/database-discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const mockDefaultDatabaseFields = {
modules: [],
caCert: null,
clientCert: null,
db: null,
db: 0,
nameFromProvider: null,
password: null,
provider: null,
Expand All @@ -24,6 +24,7 @@ export const mockDatabaseToImportFromEnvsInput = {
host: 'localhost',
port: 6379,
name: 'local database',
db: 0,
} as Partial<Database>;

export const mockDatabaseToImportFromEnvsPrepared = {
Expand All @@ -45,6 +46,7 @@ export const mockDatabaseToImportWithCertsFromEnvsInput = {
key: 'User key',
},
verifyServerCert: true,
db: 0,
} as Partial<Database>;

export const mockDatabaseToImportWithCertsFromEnvsPrepared = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { v4 as uuidv4 } from 'uuid';
import { pathExists, readFile } from 'fs-extra';
import { Database } from 'src/modules/database/models/database';
import {
Expand Down Expand Up @@ -34,7 +35,7 @@ export const populateDefaultValues = (
database: Partial<Database>,
): Database => {
const {
id,
id = uuidv4(),
host,
port = 6379,
name = `${host}:${port}`,
Expand Down Expand Up @@ -126,6 +127,7 @@ export const prepareDatabaseFromEnvs = async (
id: id || '0',
host: process.env[hostEnv],
port: parseInt(process.env[`RI_REDIS_PORT${id}`], 10) || 6379,
db: parseInt(process.env[`RI_REDIS_DB${id}`], 10) || 0,
name: process.env[`RI_REDIS_ALIAS${id}`],
username: process.env[`RI_REDIS_USERNAME${id}`],
password: process.env[`RI_REDIS_PASSWORD${id}`],
Expand Down
40 changes: 40 additions & 0 deletions redisinsight/api/src/modules/database/dto/redis-info.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

class RedisDatabaseStatsDto {
@ApiProperty({
type: String,
})
instantaneous_input_kbps: string | undefined;

@ApiProperty({
type: String,
})
instantaneous_ops_per_sec: string | undefined;

@ApiProperty({
type: String,
})
instantaneous_output_kbps: string | undefined;

@ApiProperty({
type: Number,
})
maxmemory_policy: string | undefined;

@ApiProperty({
description: 'Redis database mode',
type: String,
})
numberOfKeysRange: string | undefined;

@ApiProperty({
description: 'Redis database role',
type: String,
})
uptime_in_days: string | undefined;
}

export class RedisNodeInfoResponse {
@ApiProperty({
description: 'Redis database version',
Expand All @@ -22,6 +56,12 @@ export class RedisNodeInfoResponse {
})
server?: any;

@ApiPropertyOptional({
description: 'Various Redis stats',
type: RedisDatabaseStatsDto,
})
stats?: RedisDatabaseStatsDto;

@ApiPropertyOptional({
description: 'The number of Redis databases',
type: Number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,21 @@ const mockRedisServerInfoDto = {
tcp_port: '11113',
uptime_in_seconds: '1000',
};
const mockRedisStatsDto = {
instantaneous_input_kbps: undefined,
instantaneous_ops_per_sec: undefined,
instantaneous_output_kbps: undefined,
maxmemory_policy: undefined,
numberOfKeysRange: '0 - 500 000',
uptime_in_days: undefined,
};

const mockRedisGeneralInfo: RedisDatabaseInfoResponse = {
version: mockRedisServerInfoDto.redis_version,
databases: 16,
role: 'master',
server: mockRedisServerInfoDto,
stats: mockRedisStatsDto,
usedMemory: 1000000,
totalKeys: 1,
connectedClients: 1,
Expand Down Expand Up @@ -441,6 +450,10 @@ describe('DatabaseInfoProvider', () => {

expect(result).toEqual({
...mockRedisGeneralInfo,
stats: {
...mockRedisStatsDto,
numberOfKeysRange: undefined,
},
totalKeys: undefined,
usedMemory: undefined,
hitRatio: undefined,
Expand Down Expand Up @@ -481,6 +494,10 @@ describe('DatabaseInfoProvider', () => {

expect(result).toEqual({
...mockRedisGeneralInfo,
stats: {
...mockRedisStatsDto,
numberOfKeysRange: undefined,
},
server: {
redis_mode: mockRedisServerInfoDto.redis_mode,
redis_version: mockRedisGeneralInfo.version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {
calculateRedisHitRatio,
catchAclError,
convertIntToSemanticVersion,
getRangeForNumber,
TOTAL_KEYS_BREAKPOINTS,
} from 'src/utils';
import { AdditionalRedisModule } from 'src/modules/database/models/additional.redis.module';
import { REDIS_MODULES_COMMANDS, SUPPORTED_REDIS_MODULES } from 'src/constants';
Expand Down Expand Up @@ -162,11 +164,12 @@ export class DatabaseInfoProvider {
const statsInfo = info['stats'];
const replicationInfo = info['replication'];
const databases = await this.getDatabasesCount(client, keyspaceInfo);
const totalKeys = this.getRedisNodeTotalKeysCount(keyspaceInfo);
return {
version: serverInfo?.redis_version,
databases,
role: get(replicationInfo, 'role') || undefined,
totalKeys: this.getRedisNodeTotalKeysCount(keyspaceInfo),
role: get(replicationInfo, 'role'),
totalKeys,
usedMemory: parseInt(get(memoryInfo, 'used_memory'), 10) || undefined,
connectedClients:
parseInt(get(clientsInfo, 'connected_clients'), 10) || undefined,
Expand All @@ -177,6 +180,23 @@ export class DatabaseInfoProvider {
parseInt(get(memoryInfo, 'number_of_cached_scripts'), 10) ||
undefined,
server: serverInfo,
stats: {
instantaneous_ops_per_sec: get(
statsInfo,
'instantaneous_ops_per_sec',
),
instantaneous_input_kbps: get(statsInfo, 'instantaneous_input_kbps'),
instantaneous_output_kbps: get(
statsInfo,
'instantaneous_output_kbps',
),
uptime_in_days: get(serverInfo, 'uptime_in_days', undefined),
maxmemory_policy: get(memoryInfo, 'maxmemory_policy', undefined),
numberOfKeysRange: getRangeForNumber(
totalKeys,
TOTAL_KEYS_BREAKPOINTS,
),
},
};
} catch (error) {
throw catchAclError(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,24 @@ const responseSchema = Joi.object()
hitRatio: Joi.number().required(),
cashedScripts: Joi.number(),
server: Joi.object().required(),
stats: Joi.object().keys({
instantaneous_ops_per_sec: Joi.string(),
instantaneous_input_kbps: Joi.string(),
instantaneous_output_kbps: Joi.string(),
uptime_in_days: Joi.string(),
maxmemory_policy: Joi.string(),
numberOfKeysRange: Joi.string(),
}),
}),
),
stats: Joi.object().keys({
instantaneous_ops_per_sec: Joi.string(),
instantaneous_input_kbps: Joi.string(),
instantaneous_output_kbps: Joi.string(),
uptime_in_days: Joi.string(),
maxmemory_policy: Joi.string(),
numberOfKeysRange: Joi.string(),
}),
})
.required()
.strict();
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ICON_PATH = app.isPackaged
: path.join(__dirname, '../resources', 'icon.png')

const appVersionPrefix = config.isEnterprise ? 'Enterprise - ' : ''
const appVersion = app.getVersion() || '2.68.0'
const appVersion = app.getVersion() || '2.70.0'
const appVersionSuffix = !config.isProduction
? `-dev-${process.getCreationTime()}`
: ''
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"appName": "Redis Insight",
"productName": "RedisInsight",
"private": true,
"version": "2.68.0",
"version": "2.70.0",
"description": "Redis Insight",
"main": "./dist/main/main.js",
"author": {
Expand Down
1 change: 0 additions & 1 deletion redisinsight/ui/src/components/base/layout/list/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ const Item = ({
$isActive={isActive}
$isDisabled={isDisabled}
$color={color}
onClick={onClick}
className={cx(ListClassNames.listItem, className, {
[ListClassNames.listItemActive]: isActive,
[ListClassNames.listItemDisabled]: isDisabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
render,
screen,
} from 'uiSrc/utils/test-utils'
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { Instance, RdiInstance } from 'uiSrc/slices/interfaces'
import InstancesList, { InstancesListProps } from './InstancesList'
import { InstancesTabs } from '../../InstancesNavigationPopover'

Expand All @@ -22,25 +23,39 @@ beforeEach(() => {
store.clearActions()
})

const mockRdis = [
const mockRdis: RdiInstance[] = [
{
id: 'rdiDB_1',
name: 'RdiDB_1',
loading: false,
error: '',
url: '',
},
{
id: 'rdiDB_2',
name: 'RdiDB_2',
loading: false,
error: '',
url: '',
},
]

const mockDbs = [
const mockDbs: Instance[] = [
{
id: 'db_1',
name: 'DB_1',
host: 'localhost',
port: 6379,
modules: [],
version: '7.0.0',
},
{
id: 'db_2',
name: 'DB_2',
host: 'localhost',
port: 6379,
modules: [],
version: '7.0.0',
},
]

Expand Down Expand Up @@ -85,7 +100,7 @@ describe('InstancesList', () => {
/>,
)

expect(screen.getByText(mockDbs[0].name)).toBeInTheDocument()
expect(screen.getByText(mockDbs[0].name!)).toBeInTheDocument()
})

it('should render rdi instances when selected tab is rdi', () => {
Expand All @@ -99,26 +114,24 @@ describe('InstancesList', () => {
expect(screen.getByText(mockRdis[0].name)).toBeInTheDocument()
})

it('should send event telemetry', () => {
it('should send event telemetry', async () => {
const sendEventTelemetryMock = jest.fn()
;(sendEventTelemetry as jest.Mock).mockImplementation(
() => sendEventTelemetryMock,
)

render(
const { getByTestId } = render(
<InstancesList
{...instance(mockedProps)}
selectedTab={InstancesTabs.Databases}
filteredDbInstances={mockDbs}
/>,
)

const listItem = screen.getByTestId(`instance-item-${mockDbs[1].id}`)
act(() => {
fireEvent.click(listItem)
})
const listItem = getByTestId(`instance-item-${mockDbs[1].id}`)
await act(() => fireEvent.click(listItem))

expect(sendEventTelemetry).toBeCalledWith({
expect(sendEventTelemetry).toHaveBeenCalledWith({
event: TelemetryEvent.CONFIG_DATABASES_OPEN_DATABASE,
eventData: expect.any(Object),
})
Expand Down
Loading
Loading