Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6504cf2
release/2.62.0
vlad-dargel Nov 21, 2024
6b000c1
Merge pull request #4131 from RedisInsight/main
vlad-dargel Nov 22, 2024
16d25f3
e2e/bugfix/fix-delimiter-tests
vlad-dargel Nov 22, 2024
3b2abc3
#RI-6351 - fix system theme changing
rsergeenko Nov 22, 2024
c1b7cce
revert reset data
rsergeenko Nov 22, 2024
a70da59
#RI-6352 - 'Delimiter must be a string' error for db analysis report
egor-zalenski Nov 24, 2024
88ffe9f
Merge pull request #4132 from RedisInsight/e2e/bugfix/fix-delimiter-t…
vlad-dargel Nov 25, 2024
350ec72
Merge pull request #4137 from RedisInsight/fe/bugfix/RI-6352_Delimite…
mariasergeenko Nov 25, 2024
1f46a1d
Merge pull request #4134 from RedisInsight/fe/bugfix/release/2.62.0
mariasergeenko Nov 25, 2024
3e94037
Merge pull request #4138 from RedisInsight/main
vlad-dargel Nov 25, 2024
233535f
RI-6351 fix theme
kchepikava Nov 25, 2024
ab5b84a
RI-6352 delimiter fix
kchepikava Nov 25, 2024
4cf463b
RI-6357 fix app start telemetry
kchepikava Nov 26, 2024
94b335b
RI-6357 refactor
kchepikava Nov 26, 2024
112d61a
Merge pull request #4140 from RedisInsight/fe/bugfix/release-2.62-fixes
vlad-dargel Nov 26, 2024
0a00170
Merge pull request #4141 from RedisInsight/be/bugfix/RI-6357-port-tel…
vlad-dargel Nov 26, 2024
d13cb30
Merge pull request #4145 from RedisInsight/release/2.62.0
vlad-dargel Nov 27, 2024
650bd95
e2e/bugfix/fix-e2e-tree-vew
vlad-dargel Nov 27, 2024
4950c9c
skip sso test electron
vlad-dargel Nov 27, 2024
7d60407
Merge pull request #4146 from RedisInsight/e2e/bugfix/fix-e2e-tree-view
vlad-dargel Nov 27, 2024
93ea9c9
ignore some of the artifacts
ArtemHoruzhenko Nov 27, 2024
038aa1b
ignore some of the artifacts
ArtemHoruzhenko Nov 27, 2024
2c593ba
add else condition
ArtemHoruzhenko Nov 27, 2024
b63b549
Merge pull request #4147 from RedisInsight/vt
ArtemHoruzhenko Nov 27, 2024
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 .circleci/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.60.0)
-v - Semver (2.62.0)
-d - Build image repository (Ex: -d redisinsight)
-r - Target repository (Ex: -r redis/redisinsight)
"
Expand Down
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.60.0)
-v - Semver (2.62.0)
-d - Build image repository (Ex: -d redisinsight)
-r - Target repository (Ex: -r redis/redisinsight)
"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/virustotal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
uploadZipFile="./${{ matrix.artifact }}.zip"

# Compress artifactes
zip -r "${uploadZipFile}" "./release"
zip -r "${uploadZipFile}" "./release" ${{ startsWith(matrix.artifact, 'macos-') && '-x "*/redisstack/*" "*.tar.gz" "*.zip"' || '' }}

# Generate url to download zip file
uploadUrl=$(curl -sq -XGET https://www.virustotal.com/api/v3/files/upload_url -H "x-apikey: $VIRUSTOTAL_API_KEY" | jq -r '.data')
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 @@ -80,7 +80,7 @@ export default {
migrateOldFolders: process.env.RI_MIGRATE_OLD_FOLDERS ? process.env.RI_MIGRATE_OLD_FOLDERS === 'true' : true,
autoBootstrap: process.env.RI_AUTO_BOOTSTRAP ? process.env.RI_AUTO_BOOTSTRAP === 'true' : true,
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
appVersion: process.env.RI_APP_VERSION || '2.60.0',
appVersion: process.env.RI_APP_VERSION || '2.62.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.60.0',
version: '2.62.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.60.0",
"version": "2.62.0",
"description": "Redis Insight API",
"private": true,
"author": {
Expand Down
9 changes: 7 additions & 2 deletions redisinsight/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
await migrateHomeFolder() && await removeOldFolders();
}

const { port, host } = serverConfig;
if (apiPort) {
serverConfig.port = apiPort;
}

const logger = WinstonModule.createLogger(LOGGER_CONFIG);

const options: NestApplicationOptions = {
Expand Down Expand Up @@ -75,7 +78,9 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {

const logFileProvider = app.get(LogFileProvider);

await app.listen(apiPort || port, host);
const { port, host } = serverConfig;

await app.listen(port, host);
logger.log({
message: `Server is running on http(s)://${host}:${port}`,
context: 'bootstrap',
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 @@ -8,7 +8,7 @@ const ICON_PATH = app.isPackaged

export const AboutPanelOptions = {
applicationName: 'Redis Insight',
applicationVersion: `${app.getVersion() || '2.60.0'}${
applicationVersion: `${app.getVersion() || '2.62.0'}${
!config.isProduction ? `-dev-${process.getCreationTime()}` : ''
}`,
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,
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.60.0",
"version": "2.62.0",
"description": "Redis Insight",
"main": "./dist/main/main.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "redisinsight",
"appName": "Redis Insight",
"productName": "RedisInsight",
"version": "2.60.0",
"version": "2.62.0",
"description": "Redis Insight",
"author": {
"name": "Redis Ltd.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { act, cleanup, mockedStore, render, screen,
mockedStoreFn,
} from 'uiSrc/utils/test-utils'

import { getUserInfo, logoutUser, oauthCloudUserSelector } from 'uiSrc/slices/oauth/cloud'
import { getUserInfo, logoutUser, oauthCloudUserSelector, setInitialLoadingState } from 'uiSrc/slices/oauth/cloud'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { loadSubscriptionsRedisCloud, setSSOFlow } from 'uiSrc/slices/instances/cloud'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
Expand All @@ -24,6 +24,7 @@ jest.mock('uiSrc/slices/oauth/cloud', () => ({
loading: false,
data: null,
error: '',
initialLoading: false
}),
}))

Expand Down Expand Up @@ -53,6 +54,12 @@ describe('OAuthUserProfile', () => {
})

it('should render loading spinner initially', () => {
(oauthCloudUserSelector as jest.Mock).mockReturnValueOnce({
loading: false,
data: null,
error: '',
initialLoading: true
})
render(<OAuthUserProfile {...mockedProps} />)

expect(screen.getByTestId('oath-user-profile-spinner')).toBeInTheDocument()
Expand Down Expand Up @@ -132,7 +139,11 @@ describe('OAuthUserProfile', () => {
}
})

expect(store.getActions()).toEqual([setSSOFlow(OAuthSocialAction.Import), loadSubscriptionsRedisCloud()]);
expect(store.getActions()).toEqual([
setInitialLoadingState(false),
setSSOFlow(OAuthSocialAction.Import),
loadSubscriptionsRedisCloud()
]);

(sendEventTelemetry as jest.Mock).mockRestore()
})
Expand All @@ -154,7 +165,7 @@ describe('OAuthUserProfile', () => {

fireEvent.click(screen.getByTestId('profile-account-2'))

expect(store.getActions()).toEqual([getUserInfo()]);
expect(store.getActions()).toEqual([setInitialLoadingState(false), getUserInfo()]);

(sendEventTelemetry as jest.Mock).mockRestore()
})
Expand Down Expand Up @@ -195,6 +206,6 @@ describe('OAuthUserProfile', () => {

fireEvent.click(screen.getByTestId('profile-logout'))

expect(store.getActions()).toEqual([logoutUser(), setSSOFlow()])
expect(store.getActions()).toEqual([setInitialLoadingState(false), logoutUser(), setSSOFlow()])
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import { EuiIcon, EuiLink, EuiLoadingSpinner, EuiPopover, EuiText } from '@elast
import cx from 'classnames'
import { useHistory } from 'react-router-dom'
import OAuthSignInButton from 'uiSrc/components/oauth/oauth-sign-in-button'
import { activateAccount, logoutUserAction, oauthCloudUserSelector } from 'uiSrc/slices/oauth/cloud'
import {
activateAccount,
logoutUserAction,
oauthCloudUserSelector,
setInitialLoadingState
} from 'uiSrc/slices/oauth/cloud'
import CloudIcon from 'uiSrc/assets/img/oauth/cloud.svg?react'

import { getUtmExternalLink } from 'uiSrc/utils/links'
Expand All @@ -27,26 +32,25 @@ export interface Props {
const OAuthUserProfile = (props: Props) => {
const { source } = props
const [selectingAccountId, setSelectingAccountId] = useState<number>()
const { loading, error, data } = useSelector(oauthCloudUserSelector)
const { error, data, initialLoading } = useSelector(oauthCloudUserSelector)
const { server } = useSelector(appInfoSelector)

const [isProfileOpen, setIsProfileOpen] = useState(false)
const [isImportLoading, setIsImportLoading] = useState(false)
const [profileLoading, setProfileLoading] = useState(true)

const dispatch = useDispatch()
const history = useHistory()

useEffect(() => {
if (!loading && (error || data)) {
setProfileLoading(false)
if (data || error) {
dispatch(setInitialLoadingState(false))
}
}, [data, loading, error])
}, [data, error])

if (!data) {
if (server?.packageType === PackageType.Mas) return null

if (profileLoading) {
if (initialLoading) {
return (
<div className={styles.loadingContainer}>
<EuiLoadingSpinner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@elastic/eui'
import { remove } from 'lodash'

import { Pages } from 'uiSrc/constants'
import { DEFAULT_DELIMITER, Pages } from 'uiSrc/constants'
import { ANALYZE_CLUSTER_TOOLTIP_MESSAGE, ANALYZE_TOOLTIP_MESSAGE } from 'uiSrc/constants/recommendations'
import {
recommendationsSelector,
Expand All @@ -26,6 +26,7 @@ import { IRecommendation } from 'uiSrc/slices/interfaces/recommendations'
import { appContextDbConfig, setRecommendationsShowHidden } from 'uiSrc/slices/app/context'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import { createNewAnalysis } from 'uiSrc/slices/analytics/dbAnalysis'
import { comboBoxToArray } from 'uiSrc/utils'

import InfoIcon from 'uiSrc/assets/img/icons/help_illus.svg'

Expand All @@ -45,7 +46,7 @@ const LiveTimeRecommendations = () => {
} = useSelector(recommendationsSelector)
const {
showHiddenRecommendations: isShowHidden,
treeViewDelimiter: delimiter = '',
treeViewDelimiter = [DEFAULT_DELIMITER],
} = useSelector(appContextDbConfig)

const { instanceId } = useParams<{ instanceId: string }>()
Expand All @@ -68,7 +69,7 @@ const LiveTimeRecommendations = () => {
}, [])

const handleClickDbAnalysisLink = () => {
dispatch(createNewAnalysis(instanceId, delimiter))
dispatch(createNewAnalysis(instanceId, comboBoxToArray(treeViewDelimiter)))
history.push(Pages.databaseAnalysis(instanceId))
sendEventTelemetry({
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import { useHistory, useParams } from 'react-router-dom'
import cx from 'classnames'
import { EuiText, EuiButton } from '@elastic/eui'

import { Pages } from 'uiSrc/constants'
import { DEFAULT_DELIMITER, Pages } from 'uiSrc/constants'
import { recommendationsSelector } from 'uiSrc/slices/recommendations/recommendations'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import WelcomeIcon from 'uiSrc/assets/img/icons/welcome.svg?react'
import { appContextDbConfig } from 'uiSrc/slices/app/context'
import { createNewAnalysis } from 'uiSrc/slices/analytics/dbAnalysis'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import { comboBoxToArray } from 'uiSrc/utils'
import { ANALYZE_CLUSTER_TOOLTIP_MESSAGE, ANALYZE_TOOLTIP_MESSAGE } from 'uiSrc/constants/recommendations'
import PopoverRunAnalyze from '../popover-run-analyze'

Expand All @@ -20,7 +21,7 @@ import styles from './styles.module.scss'
const NoRecommendationsScreen = () => {
const { provider, connectionType } = useSelector(connectedInstanceSelector)
const { data: { recommendations } } = useSelector(recommendationsSelector)
const { treeViewDelimiter: delimiter = '' } = useSelector(appContextDbConfig)
const { treeViewDelimiter = [DEFAULT_DELIMITER] } = useSelector(appContextDbConfig)

const [isShowInfo, setIsShowInfo] = useState(false)

Expand All @@ -29,7 +30,7 @@ const NoRecommendationsScreen = () => {
const history = useHistory()

const handleClickDbAnalysisLink = () => {
dispatch(createNewAnalysis(instanceId, delimiter))
dispatch(createNewAnalysis(instanceId, comboBoxToArray(treeViewDelimiter)))
history.push(Pages.databaseAnalysis(instanceId))
sendEventTelemetry({
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
Expand Down
8 changes: 5 additions & 3 deletions redisinsight/ui/src/contexts/themeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ export class ThemeProvider extends React.Component<Props> {

getSystemTheme = () => (window.matchMedia?.(THEME_MATCH_MEDIA_DARK)?.matches ? Theme.Dark : Theme.Light)

changeTheme = (themeValue: any) => {
changeTheme = async (themeValue: any) => {
let actualTheme = themeValue

// since change theme is async need to wait to have a proper prefers-color-scheme
await ipcThemeChange(themeValue)

if (themeValue === Theme.System) {
actualTheme = this.getSystemTheme()
}

ipcThemeChange(themeValue)

this.setState({ theme: actualTheme, usingSystemTheme: themeValue === Theme.System }, () => {
themeService.applyTheme(themeValue)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const RedisCloudDatabasesPage = () => {
} = useSelector(cloudSelector)
const { data: userOAuthProfile } = useSelector(oauthCloudUserSelector)
const currentAccountIdRef = useRef(userOAuthProfile?.id)
const ssoFlowRef = useRef(ssoFlow)

setTitle('Redis Cloud Databases')

Expand All @@ -60,7 +61,7 @@ const RedisCloudDatabasesPage = () => {
}, [])

useEffect(() => {
if (ssoFlow !== OAuthSocialAction.Import) return
if (ssoFlowRef.current !== OAuthSocialAction.Import) return

if (!userOAuthProfile) {
dispatch(resetDataRedisCloud())
Expand All @@ -73,7 +74,7 @@ const RedisCloudDatabasesPage = () => {
history.push(Pages.redisCloudSubscriptions)
}))
}
}, [ssoFlow, userOAuthProfile])
}, [userOAuthProfile])

useEffect(() => {
if (instancesAdded.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const RedisCloudSubscriptionsPage = () => {
} = useSelector(cloudSelector)
const { data: userOAuthProfile } = useSelector(oauthCloudUserSelector)
const currentAccountIdRef = useRef(userOAuthProfile?.id)
const ssoFlowRef = useRef(ssoFlow)

setTitle('Redis Cloud Subscriptions')

Expand All @@ -58,7 +59,7 @@ const RedisCloudSubscriptionsPage = () => {
}, [])

useEffect(() => {
if (ssoFlow !== OAuthSocialAction.Import) return
if (ssoFlowRef.current !== OAuthSocialAction.Import) return

if (!userOAuthProfile) {
history.push(Pages.home)
Expand All @@ -69,7 +70,7 @@ const RedisCloudSubscriptionsPage = () => {
dispatch(fetchSubscriptionsRedisCloud(null, true))
currentAccountIdRef.current = userOAuthProfile?.id
}
}, [ssoFlow, userOAuthProfile])
}, [userOAuthProfile])

useEffect(() => {
if (instancesLoaded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import { appContextDbConfig } from 'uiSrc/slices/app/context'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import AnalyticsTabs from 'uiSrc/components/analytics-tabs'
import { Nullable, getDbIndex } from 'uiSrc/utils'
import { Nullable, comboBoxToArray, getDbIndex } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { ANALYZE_CLUSTER_TOOLTIP_MESSAGE, ANALYZE_TOOLTIP_MESSAGE } from 'uiSrc/constants/recommendations'
import { FormatedDate } from 'uiSrc/components'
import { DEFAULT_DELIMITER } from 'uiSrc/constants'
import { ShortDatabaseAnalysis } from 'apiSrc/modules/database-analysis/models'
import { AnalysisProgress } from 'apiSrc/modules/database-analysis/models/analysis-progress'

Expand All @@ -50,7 +51,7 @@ const Header = (props: Props) => {
const { instanceId } = useParams<{ instanceId: string }>()
const dispatch = useDispatch()

const { treeViewDelimiter: delimiter = '' } = useSelector(appContextDbConfig)
const { treeViewDelimiter = [DEFAULT_DELIMITER] } = useSelector(appContextDbConfig)

const analysisOptions: EuiSuperSelectOption<any>[] = items.map((item) => {
const { createdAt, id, db } = item
Expand All @@ -76,7 +77,7 @@ const Header = (props: Props) => {
provider,
}
})
dispatch(createNewAnalysis(instanceId, delimiter))
dispatch(createNewAnalysis(instanceId, comboBoxToArray(treeViewDelimiter)))
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Table = (props: Props) => {

const handleRedirect = (name: string) => {
dispatch(changeSearchMode(SearchMode.Pattern))
dispatch(setBrowserTreeDelimiter(delimiter))
dispatch(setBrowserTreeDelimiter([{ label: delimiter }]))
dispatch(setFilter(null))
dispatch(setSearchMatch(name, SearchMode.Pattern))
dispatch(resetKeysData(SearchMode.Pattern))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const NameSpacesTable = (props: Props) => {

const handleRedirect = (nsp: string, filter: string) => {
dispatch(changeSearchMode(SearchMode.Pattern))
dispatch(setBrowserTreeDelimiter(delimiter))
dispatch(setBrowserTreeDelimiter([{ label: delimiter }]))
dispatch(setFilter(filter))
dispatch(setSearchMatch(`${nsp}${delimiter}*`, SearchMode.Pattern))
dispatch(resetKeysData(SearchMode.Pattern))
Expand Down
Loading
Loading