Skip to content

Commit 673f673

Browse files
author
arthosofteq
authored
Merge pull request #1052 from RedisInsight/release/2.8.0
Release/2.8.0
2 parents 8406856 + 594db4e commit 673f673

File tree

423 files changed

+16344
-7621
lines changed

Some content is hidden

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

423 files changed

+16344
-7621
lines changed

.circleci/config.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ executors:
129129
linux-executor:
130130
machine:
131131
image: ubuntu-2004:202010-01
132+
linux-executor-dlc:
133+
machine:
134+
image: ubuntu-2004:202010-01
135+
docker_layer_caching: true
132136

133137
jobs:
134138
# Test jobs
@@ -216,7 +220,7 @@ jobs:
216220
paths:
217221
- ./redisinsight/api/node_modules
218222
integration-tests-run:
219-
executor: linux-executor
223+
executor: linux-executor-dlc
220224
parameters:
221225
rte:
222226
description: Redis Test Environment name
@@ -1092,10 +1096,10 @@ workflows:
10921096
name: Build app - Linux (stage)
10931097
requires:
10941098
- Setup build (stage)
1095-
- windows:
1096-
name: Build app - Windows (stage)
1097-
requires:
1098-
- Setup build (stage)
1099+
# - windows:
1100+
# name: Build app - Windows (stage)
1101+
# requires:
1102+
# - Setup build (stage)
10991103
# integration tests on docker image build
11001104
- integration-tests-run:
11011105
matrix:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ vendor
5454

5555
# E2E tests report
5656
/tests/e2e/report
57+
/tests/e2e/.redisinsight-v2
5758

5859
# Parcel
5960
.parcel-cache

jest.config.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
const { TextDecoder, TextEncoder } = require('util');
2+
3+
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
4+
module.exports = {
5+
testURL: 'http://localhost/',
6+
moduleNameMapper: {
7+
'\\.(jpg|jpeg|png|ico|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
8+
'<rootDir>/redisinsight/__mocks__/fileMock.js',
9+
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
10+
'uiSrc/(.*)': '<rootDir>/redisinsight/ui/src/$1',
11+
'monaco-editor': '<rootDir>/redisinsight/__mocks__/monacoMock.js',
12+
unified: '<rootDir>/redisinsight/__mocks__/unified.js',
13+
'remark-parse': '<rootDir>/redisinsight/__mocks__/remarkParse.js',
14+
'remark-gfm': '<rootDir>/redisinsight/__mocks__/remarkGfm.js',
15+
'remark-rehype': '<rootDir>/redisinsight/__mocks__/remarkRehype.js',
16+
'rehype-stringify': '<rootDir>/redisinsight/__mocks__/rehypeStringify.js',
17+
'unist-util-visit': '<rootDir>/redisinsight/__mocks__/unistUtilsVisit.js',
18+
'react-children-utilities': '<rootDir>/redisinsight/__mocks__/react-children-utilities.js',
19+
},
20+
setupFilesAfterEnv: [
21+
'<rootDir>/redisinsight/ui/src/setup-tests.ts',
22+
],
23+
moduleDirectories: [
24+
'node_modules',
25+
'redisinsight/node_modules',
26+
],
27+
moduleFileExtensions: [
28+
'js',
29+
'jsx',
30+
'ts',
31+
'tsx',
32+
'json',
33+
],
34+
testEnvironment: 'jsdom',
35+
transformIgnorePatterns: [
36+
'node_modules/(?!(monaco-editor|react-monaco-editor)/)',
37+
],
38+
coverageThreshold: {
39+
global: {
40+
statements: 70,
41+
branches: 50,
42+
functions: 60,
43+
lines: 72,
44+
},
45+
// './redisinsight/ui/src/slices/**/*.ts': {
46+
// statements: 90,
47+
// },
48+
},
49+
globals: {
50+
TextDecoder,
51+
TextEncoder,
52+
},
53+
};

package.json

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -71,39 +71,6 @@
7171
"webpack"
7272
],
7373
"homepage": "https://github.com/RedisInsight/RedisInsight#readme",
74-
"jest": {
75-
"testURL": "http://localhost/",
76-
"moduleNameMapper": {
77-
"\\.(jpg|jpeg|png|ico|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/redisinsight/__mocks__/fileMock.js",
78-
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
79-
"uiSrc/(.*)": "<rootDir>/redisinsight/ui/src/$1",
80-
"monaco-editor": "<rootDir>/redisinsight/__mocks__/monacoMock.js",
81-
"unified": "<rootDir>/redisinsight/__mocks__/unified.js",
82-
"remark-parse": "<rootDir>/redisinsight/__mocks__/remarkParse.js",
83-
"remark-gfm": "<rootDir>/redisinsight/__mocks__/remarkGfm.js",
84-
"remark-rehype": "<rootDir>/redisinsight/__mocks__/remarkRehype.js",
85-
"rehype-stringify": "<rootDir>/redisinsight/__mocks__/rehypeStringify.js",
86-
"unist-util-visit": "<rootDir>/redisinsight/__mocks__/unistUtilsVisit.js"
87-
},
88-
"setupFilesAfterEnv": [
89-
"<rootDir>/redisinsight/ui/src/setup-tests.ts"
90-
],
91-
"moduleDirectories": [
92-
"node_modules",
93-
"redisinsight/node_modules"
94-
],
95-
"moduleFileExtensions": [
96-
"js",
97-
"jsx",
98-
"ts",
99-
"tsx",
100-
"json"
101-
],
102-
"testEnvironment": "jsdom",
103-
"transformIgnorePatterns": [
104-
"node_modules/(?!(monaco-editor|react-monaco-editor)/)"
105-
]
106-
},
10774
"resolutions": {
10875
"**/node-sass": "^6.0.1"
10976
},
@@ -149,6 +116,7 @@
149116
"@types/ioredis": "^4.26.0",
150117
"@types/is-glob": "^4.0.2",
151118
"@types/jest": "^27.5.2",
119+
"@types/jsonpath": "^0.2.0",
152120
"@types/lodash": "^4.14.171",
153121
"@types/node": "14.14.10",
154122
"@types/react-dom": "^18.0.5",
@@ -201,7 +169,6 @@
201169
"ioredis-mock": "^5.5.4",
202170
"ip": "^1.1.8",
203171
"jest": "^27.5.1",
204-
"jest-environment-jsdom": "^27.5.1",
205172
"jest-when": "^3.2.1",
206173
"lint-staged": "^10.2.11",
207174
"mini-css-extract-plugin": "^1.3.1",
@@ -239,8 +206,10 @@
239206
"dependencies": {
240207
"@elastic/datemath": "^5.0.3",
241208
"@elastic/eui": "34.6.0",
209+
"@msgpack/msgpack": "^2.7.2",
242210
"@reduxjs/toolkit": "^1.6.2",
243211
"axios": "^0.25.0",
212+
"buffer": "^6.0.3",
244213
"classnames": "^2.3.1",
245214
"connection-string": "^4.3.2",
246215
"date-fns": "^2.16.1",
@@ -258,6 +227,7 @@
258227
"react-contenteditable": "^3.3.5",
259228
"react-dom": "^18.2.0",
260229
"react-hotkeys-hook": "^3.3.1",
230+
"react-json-pretty": "^2.2.0",
261231
"react-jsx-parser": "^1.28.4",
262232
"react-monaco-editor": "^0.44.0",
263233
"react-redux": "^7.2.2",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const onlyText = jest.fn()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {MigrationInterface, QueryRunner} from "typeorm";
2+
3+
export class notificationCategory1659687030433 implements MigrationInterface {
4+
name = 'notificationCategory1659687030433'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`CREATE TABLE "temporary_notification" ("type" varchar NOT NULL, "timestamp" integer NOT NULL, "title" varchar NOT NULL, "body" text NOT NULL, "read" boolean NOT NULL DEFAULT (0), "category" varchar, "categoryColor" varchar, PRIMARY KEY ("type", "timestamp"))`);
8+
await queryRunner.query(`INSERT INTO "temporary_notification"("type", "timestamp", "title", "body", "read") SELECT "type", "timestamp", "title", "body", "read" FROM "notification"`);
9+
await queryRunner.query(`DROP TABLE "notification"`);
10+
await queryRunner.query(`ALTER TABLE "temporary_notification" RENAME TO "notification"`);
11+
}
12+
13+
public async down(queryRunner: QueryRunner): Promise<void> {
14+
await queryRunner.query(`ALTER TABLE "notification" RENAME TO "temporary_notification"`);
15+
await queryRunner.query(`CREATE TABLE "notification" ("type" varchar NOT NULL, "timestamp" integer NOT NULL, "title" varchar NOT NULL, "body" text NOT NULL, "read" boolean NOT NULL DEFAULT (0), PRIMARY KEY ("type", "timestamp"))`);
16+
await queryRunner.query(`INSERT INTO "notification"("type", "timestamp", "title", "body", "read") SELECT "type", "timestamp", "title", "body", "read" FROM "temporary_notification"`);
17+
await queryRunner.query(`DROP TABLE "temporary_notification"`);
18+
}
19+
20+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {MigrationInterface, QueryRunner} from "typeorm";
2+
3+
export class workbenchMode1660664717573 implements MigrationInterface {
4+
name = 'workbenchMode1660664717573'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`DROP INDEX "IDX_5cd90dd6def1fd7c521e53fb2c"`);
8+
await queryRunner.query(`CREATE TABLE "temporary_command_execution" ("id" varchar PRIMARY KEY NOT NULL, "databaseId" varchar NOT NULL, "command" text NOT NULL, "result" text NOT NULL, "role" varchar, "nodeOptions" varchar, "encryption" varchar, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "mode" varchar, CONSTRAINT "FK_ea8adfe9aceceb79212142206b8" FOREIGN KEY ("databaseId") REFERENCES "database_instance" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
9+
await queryRunner.query(`INSERT INTO "temporary_command_execution"("id", "databaseId", "command", "result", "role", "nodeOptions", "encryption", "createdAt") SELECT "id", "databaseId", "command", "result", "role", "nodeOptions", "encryption", "createdAt" FROM "command_execution"`);
10+
await queryRunner.query(`DROP TABLE "command_execution"`);
11+
await queryRunner.query(`ALTER TABLE "temporary_command_execution" RENAME TO "command_execution"`);
12+
await queryRunner.query(`CREATE INDEX "IDX_5cd90dd6def1fd7c521e53fb2c" ON "command_execution" ("createdAt") `);
13+
}
14+
15+
public async down(queryRunner: QueryRunner): Promise<void> {
16+
await queryRunner.query(`DROP INDEX "IDX_5cd90dd6def1fd7c521e53fb2c"`);
17+
await queryRunner.query(`ALTER TABLE "command_execution" RENAME TO "temporary_command_execution"`);
18+
await queryRunner.query(`CREATE TABLE "command_execution" ("id" varchar PRIMARY KEY NOT NULL, "databaseId" varchar NOT NULL, "command" text NOT NULL, "result" text NOT NULL, "role" varchar, "nodeOptions" varchar, "encryption" varchar, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "FK_ea8adfe9aceceb79212142206b8" FOREIGN KEY ("databaseId") REFERENCES "database_instance" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
19+
await queryRunner.query(`INSERT INTO "command_execution"("id", "databaseId", "command", "result", "role", "nodeOptions", "encryption", "createdAt") SELECT "id", "databaseId", "command", "result", "role", "nodeOptions", "encryption", "createdAt" FROM "temporary_command_execution"`);
20+
await queryRunner.query(`DROP TABLE "temporary_command_execution"`);
21+
await queryRunner.query(`CREATE INDEX "IDX_5cd90dd6def1fd7c521e53fb2c" ON "command_execution" ("createdAt") `);
22+
}
23+
24+
}

redisinsight/api/migration/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { commandExecution1641795882696 } from './1641795882696-command-execution
1414
import { pluginState1641805606399 } from './1641805606399-plugin-state';
1515
import { sni1650278664000 } from "./1650278664000-sni";
1616
import { notification1655821010349 } from './1655821010349-notification';
17+
import { notificationCategory1659687030433 } from './1659687030433-notification-category';
18+
import { workbenchMode1660664717573 } from './1660664717573-workbench-mode';
1719

1820
export default [
1921
initialMigration1614164490968,
@@ -32,4 +34,6 @@ export default [
3234
pluginState1641805606399,
3335
sni1650278664000,
3436
notification1655821010349,
37+
notificationCategory1659687030433,
38+
workbenchMode1660664717573,
3539
];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './redis-string';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { TransformOptions } from 'class-transformer';
2+
3+
export const REDIS_STRING_ENCODING_QUERY_PARAM_NAME = 'encoding';
4+
5+
export enum RedisStringResponseEncoding {
6+
UTF8 = 'utf8',
7+
ASCII = 'ascii',
8+
Buffer = 'buffer',
9+
}
10+
11+
export type RedisString = string | Buffer;
12+
13+
export interface RedisStringTransformOptions extends TransformOptions {
14+
each: boolean;
15+
}

0 commit comments

Comments
 (0)