Skip to content

Commit b51ac13

Browse files
author
Artem
committed
Merge branch 'main' into build/rstack
# Conflicts: # electron-builder.json
2 parents 30d8853 + 85dd551 commit b51ac13

Some content is hidden

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

44 files changed

+163
-55
lines changed

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ jobs:
455455
- run:
456456
name: install dependencies
457457
command: |
458+
sudo apt-get update -y && sudo apt-get install -y rpm
458459
yarn --cwd redisinsight/api/ install
459460
yarn install
460461
yarn build:statics
@@ -497,6 +498,7 @@ jobs:
497498
paths:
498499
- release/RedisInsight*.deb
499500
- release/RedisInsight*.AppImage
501+
- release/RedisInsight*.rpm
500502
- release/*-linux.yml
501503
- release/redisstack
502504
macosx:
@@ -675,6 +677,19 @@ jobs:
675677
echo "APP VERSION $applicationVersion"
676678
ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -prerelease -delete ${applicationVersion}
677679
680+
release-aws-test:
681+
executor: linux-executor
682+
steps:
683+
- checkout
684+
- attach_workspace:
685+
at: .
686+
- run:
687+
name: publish
688+
command: |
689+
rm release/._* ||:
690+
applicationVersion=$(jq -r '.version' redisinsight/package.json)
691+
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/rs-ri-builds/${CIRCLE_BUILD_NUM} --recursive --exclude "*.json"
692+
678693
release-aws-private:
679694
executor: linux-executor
680695
steps:
@@ -891,6 +906,13 @@ workflows:
891906
- Build app - MacOS (dev)
892907
- Build app - Windows (dev)
893908

909+
- release-aws-test:
910+
name: Release AWS test
911+
requires:
912+
- Build app - Linux (dev)
913+
- Build app - MacOS (dev)
914+
- Build app - Windows (dev)
915+
894916
# build and release electron app (stage)
895917
- setup-sign-certificates:
896918
name: Setup sign certificates (stage)
@@ -917,6 +939,14 @@ workflows:
917939
name: Build app - Windows (stage)
918940
requires: *stageElectronBuildRequires
919941
<<: *stageFilter
942+
943+
- release-aws-test:
944+
name: Release AWS test
945+
requires:
946+
- Build app - Linux (stage)
947+
- Build app - MacOS (stage)
948+
- Build app - Windows (stage)
949+
920950
# Needs approval from QA team that build was tested before merging to latest
921951
- qa-approve:
922952
name: Approved by QA team

electron-builder.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"productName": "RedisInsight-preview",
2+
"productName": "RedisInsight-V2",
33
"appId": "org.RedisLabs.RedisInsight-V2",
44
"copyright": "Copyright © 2021 Redis Ltd.",
55
"files": [
@@ -12,7 +12,7 @@
1212
"package.json"
1313
],
1414
"afterSign": "electron-builder-notarize",
15-
"artifactName": "${productName}.${ext}",
15+
"artifactName": "${productName}-${os}-${arch}.${ext}",
1616
"compression": "normal",
1717
"mac": {
1818
"target": [
@@ -32,7 +32,6 @@
3232
"gatekeeperAssess": false
3333
},
3434
"dmg": {
35-
"artifactName": "${productName}-${os}-${arch}.${ext}",
3635
"contents": [
3736
{
3837
"x": 130,
@@ -54,21 +53,21 @@
5453
"icon": "./resources/icons",
5554
"target": [
5655
{
57-
"target": "zip",
56+
"target": "AppImage",
5857
"arch": ["x64"]
5958
},
6059
{
6160
"target": "deb",
6261
"arch": ["x64"]
6362
},
6463
{
65-
"target": "AppImage",
64+
"target": "rpm",
6665
"arch": ["x64"]
6766
}
6867
],
6968
"synopsis": "Redis GUI by Redis Ltd.",
7069
"category": "Development",
71-
"artifactName": "${productName}-${os}.${ext}",
70+
"artifactName": "${productName}-${os}-${arch}.${ext}",
7271
"desktop": {
7372
"Name": "RedisInsight",
7473
"Type": "Application",

redisinsight/about-panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ICON_PATH = app.isPackaged
66
: path.join(__dirname, '../resources', 'icon.png');
77

88
export default {
9-
applicationName: 'RedisInsight-preview',
9+
applicationName: 'RedisInsight',
1010
applicationVersion: app.getVersion() || '2.0',
1111
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,
1212
iconPath: ICON_PATH,

redisinsight/api/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"scripts": {
1212
"build:defaults:commands": "ts-node ./scripts/default-commands.ts",
1313
"build:defaults:enablement-area": "ts-node ./scripts/default-enablement-area.ts",
14-
"build:defaults": "yarn build:defaults:enablement-area && yarn build:defaults:commands",
14+
"build:defaults:content": "ts-node ./scripts/default-content.ts",
15+
"build:defaults": "yarn build:defaults:enablement-area && yarn build:defaults:commands yarn build:defaults:content",
1516
"prebuild": "rimraf dist",
1617
"build": "nest build",
1718
"build:prod": "rimraf dist && nest build -p ./tsconfig.build.prod.json && cross-env NODE_ENV=production",
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import axios from 'axios';
2+
import * as fs from 'fs-extra';
3+
import * as path from 'path';
4+
import { join } from 'path';
5+
import { get } from '../src/utils/config';
6+
import * as AdmZip from 'adm-zip';
7+
8+
const PATH_CONFIG = get('dir_path');
9+
const CONTENT_CONFIG = get('content');
10+
11+
async function init() {
12+
try {
13+
await fs.remove(PATH_CONFIG.defaultContent);
14+
15+
await fs.ensureDir(PATH_CONFIG.defaultContent);
16+
17+
const { data } = await axios.get(
18+
new URL(path.join(
19+
CONTENT_CONFIG.updateUrl,
20+
CONTENT_CONFIG.zip,
21+
)).toString(),
22+
{
23+
responseType: 'arraybuffer',
24+
},
25+
);
26+
27+
// extract archive to default folder
28+
const zip = new AdmZip(data);
29+
zip.extractAllTo(PATH_CONFIG.defaultContent, true);
30+
31+
const { data: buildInfo } = await axios.get(
32+
new URL(path.join(
33+
CONTENT_CONFIG.updateUrl,
34+
CONTENT_CONFIG.buildInfo,
35+
)).toString(),
36+
{
37+
responseType: 'arraybuffer',
38+
},
39+
);
40+
41+
// save build info to default folder
42+
await fs.writeFile(
43+
join(PATH_CONFIG.defaultContent, CONTENT_CONFIG.buildInfo),
44+
buildInfo,
45+
);
46+
47+
process.exit(0);
48+
} catch (e) {
49+
console.error('Something went wrong trying to get default commands jsons', e);
50+
process.exit(1);
51+
}
52+
}
53+
54+
init();

redisinsight/main.dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const bootstrap = async () => {
126126
}
127127

128128
app.setName('RedisInsight');
129-
app.setAppUserModelId('RedisInsight-preview');
129+
app.setAppUserModelId('RedisInsight');
130130
if (process.platform !== 'darwin') {
131131
app.setAboutPanelOptions(AboutPanelOptions);
132132
}

redisinsight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "redisinsight",
33
"productName": "RedisInsight",
44
"private": true,
5-
"version": "2.0.4-preview",
5+
"version": "2.0.5",
66
"description": "RedisInsight",
77
"main": "./main.prod.js",
88
"author": {

redisinsight/ui/src/components/query-card/QueryCardHeader/QueryCardHeader.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ import QueryCardTooltip from '../QueryCardTooltip'
3232
import styles from './styles.module.scss'
3333

3434
export interface Props {
35-
query: string;
36-
isOpen: boolean;
37-
isFullScreen: boolean;
38-
createdAt?: Date;
39-
summaryText?: string;
40-
queryType: WBQueryType;
41-
selectedValue: string;
42-
loading?: boolean;
43-
toggleOpen: () => void;
44-
toggleFullScreen: () => void;
45-
setSelectedValue: (type: WBQueryType, value: string) => void;
46-
onQueryDelete: () => void;
47-
onQueryReRun: () => void;
35+
query: string
36+
isOpen: boolean
37+
isFullScreen: boolean
38+
createdAt?: Date
39+
summaryText?: string
40+
queryType: WBQueryType
41+
selectedValue: string
42+
loading?: boolean
43+
toggleOpen: () => void
44+
toggleFullScreen: () => void
45+
setSelectedValue: (type: WBQueryType, value: string) => void
46+
onQueryDelete: () => void
47+
onQueryReRun: () => void
4848
}
4949

5050
const QueryCardHeader = (props: Props) => {

redisinsight/ui/src/pages/instance/InstancePage.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { useParams } from 'react-router-dom'
55
import cx from 'classnames'
66

77
import {
8-
fetchInstanceAction,
9-
getDatabaseConfigInfoAction,
8+
fetchInstanceAction, fetchInstancesAction,
9+
getDatabaseConfigInfoAction, instancesSelector,
1010
} from 'uiSrc/slices/instances'
1111
import {
1212
appContextSelector,
@@ -53,13 +53,16 @@ const InstancePage = ({ routes = [] }: Props) => {
5353
const dispatch = useDispatch()
5454
const { instanceId: connectionInstanceId } = useParams<{ instanceId: string }>()
5555
const { isShowCli, isShowHelper } = useSelector(cliSettingsSelector)
56+
const { data: modulesData } = useSelector(instancesSelector)
5657
const { isShowMonitor } = useSelector(monitorSelector)
5758
const { contextInstanceId } = useSelector(appContextSelector)
5859

5960
const isShowBottomGroup = isShowCli || isShowHelper || isShowMonitor
6061

6162
useEffect(() => {
62-
dispatch(fetchInstanceAction(connectionInstanceId))
63+
dispatch(fetchInstanceAction(connectionInstanceId, () => {
64+
!modulesData.length && dispatch(fetchInstancesAction())
65+
}))
6366
dispatch(getDatabaseConfigInfoAction(connectionInstanceId))
6467

6568
if (contextInstanceId !== connectionInstanceId) {

redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import cx from 'classnames'
33
import { EuiIcon, EuiText } from '@elastic/eui'
44

55
import { Theme } from 'uiSrc/constants'
6+
import { Nullable } from 'uiSrc/utils'
67
import QueryCard from 'uiSrc/components/query-card'
7-
import { WBQueryType } from 'uiSrc/pages/workbench/constants'
88
import { CommandExecutionUI } from 'uiSrc/slices/interfaces'
99
import { ThemeContext } from 'uiSrc/contexts/themeContext'
1010
import MultiPlayIconDark from 'uiSrc/assets/img/multi_play_icon_dark.svg'
1111
import MultiPlayIconLight from 'uiSrc/assets/img/multi_play_icon_light.svg'
1212
import styles from './styles.module.scss'
1313

1414
export interface Props {
15-
items: CommandExecutionUI[];
16-
scrollDivRef: React.Ref<HTMLDivElement>;
17-
onQueryReRun: (query: string, commandId?: string, type?: WBQueryType) => void;
15+
items: CommandExecutionUI[]
16+
scrollDivRef: React.Ref<HTMLDivElement>
17+
onQueryReRun: (query: string, commandId?: Nullable<string>, clearEditor?: boolean) => void
1818
onQueryDelete: (commandId: string) => void
1919
onQueryOpen: (commandId: string) => void
2020
}
@@ -48,7 +48,7 @@ const WBResults = ({ items = [], onQueryReRun, onQueryDelete, onQueryOpen, scrol
4848
command={command}
4949
createdAt={createdAt}
5050
onQueryOpen={() => onQueryOpen(id)}
51-
onQueryReRun={() => onQueryReRun(command)}
51+
onQueryReRun={() => onQueryReRun(command, null, false)}
5252
onQueryDelete={() => onQueryDelete(id)}
5353
/>
5454
))}

0 commit comments

Comments
 (0)