diff --git a/.nvmrc b/.nvmrc
index fdb2eaaff0..2bd5a0a98a 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-22.11.0
\ No newline at end of file
+22
diff --git a/jest.config.cjs b/jest.config.cjs
index e2b2decde8..ce76e73784 100644
--- a/jest.config.cjs
+++ b/jest.config.cjs
@@ -13,6 +13,7 @@ module.exports = {
'\\.scss\\?inline$': '/redisinsight/__mocks__/scssRaw.js',
'uiSrc/slices/store$': '/redisinsight/ui/src/utils/test-store.ts',
'uiSrc/(.*)': '/redisinsight/ui/src/$1',
+ 'uiBase/(.*)': '/redisinsight/ui/src/components/base/$1',
'apiSrc/(.*)': '/redisinsight/api/src/$1',
'@redislabsdev/redis-ui-components': '@redis-ui/components',
'@redislabsdev/redis-ui-styles': '@redis-ui/styles',
diff --git a/redisinsight/desktop/vite.renderer.config.ts b/redisinsight/desktop/vite.renderer.config.ts
index e5b0d1603e..470eb08b15 100644
--- a/redisinsight/desktop/vite.renderer.config.ts
+++ b/redisinsight/desktop/vite.renderer.config.ts
@@ -27,6 +27,7 @@ export default defineConfig({
alias: {
uiSrc: path.resolve(__dirname, '../ui/src'),
apiSrc: path.resolve(__dirname, '../api/src'),
+ uiBase: path.resolve(__dirname, '../ui/src/components/base'),
},
},
optimizeDeps: {
diff --git a/redisinsight/ui/src/App.tsx b/redisinsight/ui/src/App.tsx
index 8f4a787b2a..302ab187d6 100644
--- a/redisinsight/ui/src/App.tsx
+++ b/redisinsight/ui/src/App.tsx
@@ -2,12 +2,12 @@ import React, { ReactElement, useEffect } from 'react'
import { Provider, useSelector } from 'react-redux'
import { Route, Switch } from 'react-router-dom'
+import { RiPage, RiPageBody } from 'uiBase/layout'
import { store } from 'uiSrc/slices/store'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { removePagePlaceholder } from 'uiSrc/utils'
import MonacoLanguages from 'uiSrc/components/monaco-laguages'
import AppInit from 'uiSrc/components/init/AppInit'
-import { Page, PageBody } from 'uiSrc/components/base/layout/page'
import { Pages, Theme } from './constants'
import { themeService } from './services'
import {
@@ -59,14 +59,14 @@ const App = ({ children }: { children?: ReactElement[] }) => {
path="*"
render={() => (
<>
-
+
-
+
-
-
+
+
diff --git a/redisinsight/ui/src/components/analytics-tabs/AnalyticsTabs.tsx b/redisinsight/ui/src/components/analytics-tabs/AnalyticsTabs.tsx
index 3e16ffc3d2..ccab0aef97 100644
--- a/redisinsight/ui/src/components/analytics-tabs/AnalyticsTabs.tsx
+++ b/redisinsight/ui/src/components/analytics-tabs/AnalyticsTabs.tsx
@@ -2,6 +2,8 @@ import React, { useEffect, useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams, useHistory } from 'react-router-dom'
+import { RiTabs, TabInfo } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { Pages } from 'uiSrc/constants'
import { AnalyticsViewTab } from 'uiSrc/slices/interfaces/analytics'
import {
@@ -18,8 +20,6 @@ import { renderOnboardingTourWithChild } from 'uiSrc/utils/onboarding'
import { OnboardingSteps } from 'uiSrc/constants/onboarding'
import { useConnectionType } from 'uiSrc/components/hooks/useConnectionType'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { Text } from 'uiSrc/components/base/text'
const AnalyticsTabs = () => {
const { viewTab } = useSelector(analyticsSettingsSelector)
@@ -46,7 +46,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.DatabaseAnalysis,
content: null,
label: renderOnboardingTourWithChild(
- Database Analysis ,
+ Database Analysis ,
{
options: ONBOARDING_FEATURES?.ANALYTICS_DATABASE_ANALYSIS,
anchorPosition: 'downLeft',
@@ -59,7 +59,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.SlowLog,
content: null,
label: renderOnboardingTourWithChild(
- Slow Log ,
+ Slow Log ,
{
options: ONBOARDING_FEATURES?.ANALYTICS_SLOW_LOG,
anchorPosition: 'downLeft',
@@ -75,7 +75,7 @@ const AnalyticsTabs = () => {
value: AnalyticsViewTab.ClusterDetails,
content: null,
label: renderOnboardingTourWithChild(
- Overview ,
+ Overview ,
{
options: ONBOARDING_FEATURES?.ANALYTICS_OVERVIEW,
anchorPosition: 'downLeft',
@@ -105,7 +105,7 @@ const AnalyticsTabs = () => {
}
return (
-
-
+
{displayText && (
{enableAutoRefresh ? 'Auto refresh:' : 'Last refresh:'}
@@ -222,7 +221,7 @@ const AutoRefresh = ({
{` ${enableAutoRefresh ? refreshRateMessage : refreshMessage}`}
)}
-
+
-
}
>
-
Refresh rate:
{!editingRate && (
- setEditingRate(true)}
@@ -288,7 +287,7 @@ const AutoRefresh = ({
-
+
)}
{editingRate && (
<>
@@ -307,7 +306,7 @@ const AutoRefresh = ({
onApply={(value) => handleApplyAutoRefreshRate(value)}
/>
- {' s'}
+ {' s'}
>
)}
diff --git a/redisinsight/ui/src/components/base/display/call-out/RiCallOut.tsx b/redisinsight/ui/src/components/base/display/call-out/RiCallOut.tsx
new file mode 100644
index 0000000000..a79ad7f54e
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/call-out/RiCallOut.tsx
@@ -0,0 +1,16 @@
+import React from 'react'
+import { Banner } from '@redis-ui/components'
+
+export type CallOutProps = Omit, 'show'> & {
+ children: React.ReactNode
+}
+
+export const RiCallOut = ({ children, ...rest }: CallOutProps) => (
+
+)
diff --git a/redisinsight/ui/src/components/base/display/collapsible-nav-group/RICollapsibleNavGroup.tsx b/redisinsight/ui/src/components/base/display/collapsible-nav-group/RiCollapsibleNavGroup.tsx
similarity index 77%
rename from redisinsight/ui/src/components/base/display/collapsible-nav-group/RICollapsibleNavGroup.tsx
rename to redisinsight/ui/src/components/base/display/collapsible-nav-group/RiCollapsibleNavGroup.tsx
index e709e2815e..0d366ff69f 100644
--- a/redisinsight/ui/src/components/base/display/collapsible-nav-group/RICollapsibleNavGroup.tsx
+++ b/redisinsight/ui/src/components/base/display/collapsible-nav-group/RiCollapsibleNavGroup.tsx
@@ -1,11 +1,8 @@
import React, { ReactNode } from 'react'
import cx from 'classnames'
-import {
- RiAccordion,
- RiAccordionProps,
-} from 'uiSrc/components/base/display/accordion/RiAccordion'
+import { RiAccordion, RiAccordionProps } from 'uiBase/display'
-export type RICollapsibleNavGroupProps = Omit<
+export type RiCollapsibleNavGroupProps = Omit<
RiAccordionProps,
'collapsible' | 'content' | 'defaultOpen' | 'title' | 'label'
> & {
@@ -17,7 +14,7 @@ export type RICollapsibleNavGroupProps = Omit<
onToggle?: (isOpen: boolean) => void
forceState?: 'open' | 'closed'
}
-export const RICollapsibleNavGroup = ({
+export const RiCollapsibleNavGroup = ({
children,
title,
isCollapsible = true,
@@ -27,7 +24,7 @@ export const RICollapsibleNavGroup = ({
forceState,
open,
...rest
-}: RICollapsibleNavGroupProps) => (
+}: RiCollapsibleNavGroupProps) => (
(
+export const RiImage = ({ $size, src, alt, ...rest }: RiImageProps) => (
)
-
-export default RiImage
diff --git a/redisinsight/ui/src/components/base/display/index.ts b/redisinsight/ui/src/components/base/display/index.ts
index fa2655349b..5cdbc12b02 100644
--- a/redisinsight/ui/src/components/base/display/index.ts
+++ b/redisinsight/ui/src/components/base/display/index.ts
@@ -1,11 +1,19 @@
-import Loader from './loader/Loader'
-import ProgressBarLoader from './progress-bar/ProgressBarLoader'
-import RiImage from './image/RiImage'
-import RiLoadingLogo from './loading-logo/RiLoadingLogo'
-import { Modal } from './modal'
+export { RiAccordion } from './accordion/RiAccordion'
+export type { RiAccordionProps } from './accordion/RiAccordion'
+export { RiBadge } from './badge/RiBadge'
+export { RiCallOut } from './call-out/RiCallOut'
+export { RiCollapsibleNavGroup } from './collapsible-nav-group/RiCollapsibleNavGroup'
+export { RiImage } from './image/RiImage'
+export { RiLoader } from './loader/RiLoader'
+export { RiLoadingLogo } from './loading-logo/RiLoadingLogo'
+export { RiModal } from './modal'
+export { RiProgressBarLoader } from './progress-bar/RiProgressBarLoader'
+export { RiToast, riToast } from './toast/RiToast'
+export { RiToaster } from './toast/RiToaster'
+export { RiTourStep } from './tour/RiTourStep'
+export { RiLink } from './link/RiLink'
+export { UserProfileLink } from './link/UserProfileLink'
+export * from './popover'
+export * from './tooltip'
-export { Loader, ProgressBarLoader, RiImage, RiLoadingLogo, Modal }
-
-export { RICollapsibleNavGroup } from './collapsible-nav-group/RICollapsibleNavGroup'
-
-export type { RICollapsibleNavGroupProps } from './collapsible-nav-group/RICollapsibleNavGroup'
+export type { RiCollapsibleNavGroupProps } from './collapsible-nav-group/RiCollapsibleNavGroup'
diff --git a/redisinsight/ui/src/components/base/display/link/RiLink.tsx b/redisinsight/ui/src/components/base/display/link/RiLink.tsx
new file mode 100644
index 0000000000..7c62ccf4a8
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/link/RiLink.tsx
@@ -0,0 +1,7 @@
+import React from 'react'
+import { LinkProps } from '@redis-ui/components'
+import { StyledLink } from './link.styles'
+
+export const RiLink = ({ color, ...props }: LinkProps) => (
+
+)
diff --git a/redisinsight/ui/src/components/base/link/UserProfileLink.tsx b/redisinsight/ui/src/components/base/display/link/UserProfileLink.tsx
similarity index 72%
rename from redisinsight/ui/src/components/base/link/UserProfileLink.tsx
rename to redisinsight/ui/src/components/base/display/link/UserProfileLink.tsx
index d66c4d6571..d12b98d418 100644
--- a/redisinsight/ui/src/components/base/link/UserProfileLink.tsx
+++ b/redisinsight/ui/src/components/base/display/link/UserProfileLink.tsx
@@ -1,8 +1,8 @@
-import styled from "styled-components"
-import { useTheme } from "@redis-ui/styles"
-import { Link } from "./Link"
+import styled from 'styled-components'
+import { useTheme } from '@redis-ui/styles'
+import { RiLink } from './RiLink'
-export const UserProfileLink = styled(Link)`
+export const UserProfileLink = styled(RiLink)`
padding: 8px 12px !important;
width: 100%;
color: ${({ theme }: { theme: ReturnType }) =>
@@ -12,7 +12,7 @@ export const UserProfileLink = styled(Link)`
&:not(:last-child) {
border-bottom: 1px solid
${({ theme }: { theme: ReturnType }) =>
- theme.color.gray400};
+ theme.color.gray400};
}
span {
diff --git a/redisinsight/ui/src/components/base/link/link.styles.ts b/redisinsight/ui/src/components/base/display/link/link.styles.ts
similarity index 100%
rename from redisinsight/ui/src/components/base/link/link.styles.ts
rename to redisinsight/ui/src/components/base/display/link/link.styles.ts
diff --git a/redisinsight/ui/src/components/base/display/loader/RiLoader.tsx b/redisinsight/ui/src/components/base/display/loader/RiLoader.tsx
new file mode 100644
index 0000000000..c8fb6a0e25
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/loader/RiLoader.tsx
@@ -0,0 +1,30 @@
+import React, { ComponentProps } from 'react'
+
+import { Loader as RedisLoader } from '@redis-ui/components'
+import { useTheme, theme } from '@redis-ui/styles'
+
+type Space = typeof theme.core.space
+
+export type RedisLoaderProps = ComponentProps
+
+const convertSizeToPx = (tShirtSize: string, space: Space) => {
+ switch (tShirtSize.toLowerCase()) {
+ case 's':
+ return space.space050
+ case 'm':
+ return space.space100
+ case 'l':
+ return space.space250
+ case 'xl':
+ return space.space300
+ default:
+ return space.space100
+ }
+}
+
+export const RiLoader = ({ size, ...rest }: RedisLoaderProps) => {
+ const theme = useTheme()
+ const { space } = theme.core
+ const sizeInPx = size ? convertSizeToPx(size, space) : space.space100
+ return
+}
diff --git a/redisinsight/ui/src/components/base/display/loading-logo/RiLoadingLogo.tsx b/redisinsight/ui/src/components/base/display/loading-logo/RiLoadingLogo.tsx
index b19e0c5c54..68d98df0d8 100644
--- a/redisinsight/ui/src/components/base/display/loading-logo/RiLoadingLogo.tsx
+++ b/redisinsight/ui/src/components/base/display/loading-logo/RiLoadingLogo.tsx
@@ -35,7 +35,7 @@ const BouncingLogo = styled.img`
infinite;
`
-const RiLoadingLogo = ({
+export const RiLoadingLogo = ({
src,
$size = 'XL',
$bounceSpeed = 1,
@@ -50,5 +50,3 @@ const RiLoadingLogo = ({
/>
)
-
-export default RiLoadingLogo
diff --git a/redisinsight/ui/src/components/base/display/modal/index.ts b/redisinsight/ui/src/components/base/display/modal/index.ts
index 9dddb54111..cd5b3db6ef 100644
--- a/redisinsight/ui/src/components/base/display/modal/index.ts
+++ b/redisinsight/ui/src/components/base/display/modal/index.ts
@@ -1 +1 @@
-export { Modal } from '@redis-ui/components'
+export { Modal as RiModal } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/display/popover/RiPopover.tsx b/redisinsight/ui/src/components/base/display/popover/RiPopover.tsx
new file mode 100644
index 0000000000..37bf118ba1
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/popover/RiPopover.tsx
@@ -0,0 +1,37 @@
+import React from 'react'
+import { Popover } from '@redis-ui/components'
+
+import { RiPopoverProps } from './types'
+import { anchorPositionMap, panelPaddingSizeMap } from './config'
+
+export const RiPopover = ({
+ isOpen,
+ closePopover,
+ children,
+ ownFocus,
+ button,
+ anchorPosition,
+ panelPaddingSize,
+ anchorClassName,
+ panelClassName,
+ maxWidth = '100%',
+ ...props
+}: RiPopoverProps) => (
+
+ {button}
+
+)
diff --git a/redisinsight/ui/src/components/base/display/popover/config.ts b/redisinsight/ui/src/components/base/display/popover/config.ts
new file mode 100644
index 0000000000..90f54694bf
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/popover/config.ts
@@ -0,0 +1,57 @@
+export const anchorPositionMap = {
+ upCenter: {
+ placement: 'top',
+ align: 'center',
+ },
+ upLeft: {
+ placement: 'top',
+ align: 'start',
+ },
+ upRight: {
+ placement: 'top',
+ align: 'end',
+ },
+ downCenter: {
+ placement: 'bottom',
+ align: 'center',
+ },
+ downLeft: {
+ placement: 'bottom',
+ align: 'start',
+ },
+ downRight: {
+ placement: 'bottom',
+ align: 'end',
+ },
+ leftCenter: {
+ placement: 'left',
+ align: 'center',
+ },
+ leftUp: {
+ placement: 'left',
+ align: 'start',
+ },
+ leftDown: {
+ placement: 'left',
+ align: 'end',
+ },
+ rightCenter: {
+ placement: 'right',
+ align: 'center',
+ },
+ rightUp: {
+ placement: 'right',
+ align: 'start',
+ },
+ rightDown: {
+ placement: 'right',
+ align: 'end',
+ },
+} as const
+
+export const panelPaddingSizeMap = {
+ l: 24,
+ m: 18,
+ s: 8,
+ none: 0,
+} as const
diff --git a/redisinsight/ui/src/components/base/display/popover/index.tsx b/redisinsight/ui/src/components/base/display/popover/index.tsx
new file mode 100644
index 0000000000..694e5ad24f
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/popover/index.tsx
@@ -0,0 +1,2 @@
+export { RiPopover } from './RiPopover'
+export type { RiPopoverProps } from './types'
diff --git a/redisinsight/ui/src/components/base/display/popover/types.ts b/redisinsight/ui/src/components/base/display/popover/types.ts
new file mode 100644
index 0000000000..f25792706f
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/popover/types.ts
@@ -0,0 +1,28 @@
+import { type PopoverProps } from '@redis-ui/components'
+
+import { anchorPositionMap, panelPaddingSizeMap } from './config'
+
+type AnchorPosition = keyof typeof anchorPositionMap
+
+type PanelPaddingSize = keyof typeof panelPaddingSizeMap
+
+export type RiPopoverProps = Omit<
+ PopoverProps,
+ | 'open'
+ | 'onClickOutside'
+ | 'autoFocus'
+ | 'content'
+ | 'className'
+ | 'placement'
+ | 'align'
+> & {
+ isOpen?: PopoverProps['open']
+ closePopover?: PopoverProps['onClickOutside']
+ ownFocus?: PopoverProps['autoFocus']
+ button: PopoverProps['content']
+ anchorPosition?: AnchorPosition
+ panelPaddingSize?: PanelPaddingSize
+ anchorClassName?: string
+ panelClassName?: string
+ 'data-testid'?: string
+}
diff --git a/redisinsight/ui/src/components/base/display/progress-bar/RiProgressBarLoader.tsx b/redisinsight/ui/src/components/base/display/progress-bar/RiProgressBarLoader.tsx
new file mode 100644
index 0000000000..85083a8315
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/progress-bar/RiProgressBarLoader.tsx
@@ -0,0 +1,17 @@
+import React from 'react'
+import {
+ LoaderBar,
+ ProgressBarLoaderProps,
+ LoaderContainer,
+} from './progress-bar-loader.styles'
+
+export const RiProgressBarLoader = ({
+ className,
+ style,
+ color,
+ ...rest
+}: ProgressBarLoaderProps) => (
+
+
+
+)
diff --git a/redisinsight/ui/src/components/base/display/toast/RiToast.tsx b/redisinsight/ui/src/components/base/display/toast/RiToast.tsx
index 9d0f691b91..6d2b8e04ca 100644
--- a/redisinsight/ui/src/components/base/display/toast/RiToast.tsx
+++ b/redisinsight/ui/src/components/base/display/toast/RiToast.tsx
@@ -6,9 +6,9 @@ import {
ToastOptions,
} from '@redis-ui/components'
import styled from 'styled-components'
-import { CommonProps, Theme } from 'uiSrc/components/base/theme/types'
-import { CancelIcon } from 'uiSrc/components/base/icons'
-import { ColorText } from 'uiSrc/components/base/text'
+import { CommonProps, Theme } from 'uiBase/theme/types'
+import { CancelIcon } from 'uiBase/icons'
+import { RiColorText } from 'uiBase/text'
type RiToastProps = React.ComponentProps
export const RiToast = (props: RiToastProps) =>
@@ -36,9 +36,9 @@ export const riToast = (
color = 'subdued'
}
toastContent.message = (
-
+
{message}
-
+
)
} else {
toastContent.message = message
diff --git a/redisinsight/ui/src/components/base/display/tooltip/HoverContent.tsx b/redisinsight/ui/src/components/base/display/tooltip/HoverContent.tsx
new file mode 100644
index 0000000000..4a61c5c20e
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/tooltip/HoverContent.tsx
@@ -0,0 +1,16 @@
+import React from 'react'
+
+import { RiCol } from 'uiBase/layout'
+import { RiTitle } from 'uiBase/text'
+
+interface RiTooltipContentProps {
+ title?: React.ReactNode
+ content: React.ReactNode
+}
+
+export const HoverContent = ({ title, content }: RiTooltipContentProps) => (
+
+ {title && {title} }
+ {content}
+
+)
diff --git a/redisinsight/ui/src/components/base/display/tooltip/RITooltip.tsx b/redisinsight/ui/src/components/base/display/tooltip/RITooltip.tsx
new file mode 100644
index 0000000000..1cab839e0c
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/tooltip/RITooltip.tsx
@@ -0,0 +1,35 @@
+import React from 'react'
+
+import { TooltipProvider, Tooltip, TooltipProps } from '@redis-ui/components'
+import { HoverContent } from './HoverContent'
+
+export interface RiTooltipProps
+ extends Omit {
+ title?: React.ReactNode
+ position?: TooltipProps['placement']
+ delay?: TooltipProps['openDelayDuration']
+ anchorClassName?: string
+}
+
+export const RiTooltip = ({
+ children,
+ title,
+ content,
+ position,
+ delay,
+ anchorClassName,
+ ...props
+}: RiTooltipProps) => (
+
+
+ }
+ placement={position}
+ openDelayDuration={delay}
+ >
+ {children}
+
+
+)
diff --git a/redisinsight/ui/src/components/base/display/tooltip/RiTooltip.spec.tsx b/redisinsight/ui/src/components/base/display/tooltip/RiTooltip.spec.tsx
new file mode 100644
index 0000000000..75c4b9bc76
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/tooltip/RiTooltip.spec.tsx
@@ -0,0 +1,193 @@
+import React from 'react'
+import { fireEvent, screen, act } from '@testing-library/react'
+import { render, waitForRiTooltipVisible } from 'uiSrc/utils/test-utils'
+import { RiTooltip, RiTooltipProps } from './RITooltip'
+
+const TestButton = () => (
+
+ Hover me
+
+)
+
+const defaultProps: RiTooltipProps = {
+ children: ,
+ content: 'Test tooltip content',
+}
+
+describe('RiTooltip', () => {
+ it('should render', () => {
+ expect(render( )).toBeTruthy()
+ })
+
+ it('should render children', () => {
+ render( )
+
+ expect(screen.getByTestId('tooltip-trigger')).toBeInTheDocument()
+ })
+
+ it('should render tooltip content on focus', async () => {
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ expect(screen.getAllByText('Test tooltip content')[0]).toBeInTheDocument()
+ })
+
+ it('should render tooltip with title and content', async () => {
+ render(
+ ,
+ )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ expect(screen.getAllByText('Test Title')[0]).toBeInTheDocument()
+ expect(screen.getAllByText('Test content')[0]).toBeInTheDocument()
+ })
+
+ it('should render tooltip with only content when title is not provided', async () => {
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ expect(screen.getAllByText('Only content')[0]).toBeInTheDocument()
+ expect(screen.queryByRole('heading')).not.toBeInTheDocument()
+ })
+
+ it('should not render tooltip when content and title are not provided', async () => {
+ render(
+
+
+ ,
+ )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+
+ // Wait a bit to ensure tooltip doesn't appear
+ await new Promise((resolve) => setTimeout(resolve, 100))
+
+ expect(screen.queryByText('Test Title')).not.toBeInTheDocument()
+ })
+
+ it('should apply anchorClassName to the wrapper span', () => {
+ render(
+ ,
+ )
+
+ const wrapper = screen.getAllByTestId('tooltip-trigger')[0].parentElement
+ expect(wrapper).toHaveClass('custom-anchor-class')
+ })
+
+ it('should render with React node as title', async () => {
+ const titleNode = Custom Title Node
+
+ render(
+ ,
+ )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ expect(screen.getAllByTestId('custom-title')[0]).toBeInTheDocument()
+ expect(screen.getAllByText('Test content')[0]).toBeInTheDocument()
+ })
+
+ it('should render with React node as content', async () => {
+ const contentNode = (
+
+
Custom content with HTML
+
+
+ )
+
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ expect(
+ screen.getAllByTestId('tooltip-custom-content')[0],
+ ).toBeInTheDocument()
+ expect(
+ screen.getAllByText('Custom content with HTML')[0],
+ ).toBeInTheDocument()
+ expect(
+ screen.getAllByRole('button', { name: 'Hover me' })[0],
+ ).toBeInTheDocument()
+ })
+
+ it('should pass through additional props to underlying Tooltip component', async () => {
+ render(
+ ,
+ )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+ await waitForRiTooltipVisible()
+
+ // The tooltip should be rendered (testing that props are passed through)
+ expect(screen.getAllByText('Test tooltip content')[0]).toBeInTheDocument()
+ })
+
+ it('should handle empty string content', async () => {
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+
+ // Wait a bit to ensure tooltip doesn't appear
+ await new Promise((resolve) => setTimeout(resolve, 100))
+
+ // Should not render tooltip for empty content
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()
+ })
+
+ it('should handle null content', async () => {
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+
+ // Wait a bit to ensure tooltip doesn't appear
+ await new Promise((resolve) => setTimeout(resolve, 100))
+
+ // Should not render tooltip for null content
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()
+ })
+
+ it('should handle undefined content', async () => {
+ render( )
+
+ await act(async () => {
+ fireEvent.focus(screen.getByTestId('tooltip-trigger'))
+ })
+
+ // Wait a bit to ensure tooltip doesn't appear
+ await new Promise((resolve) => setTimeout(resolve, 100))
+
+ // Should not render tooltip for undefined content
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()
+ })
+})
diff --git a/redisinsight/ui/src/components/base/display/tooltip/index.tsx b/redisinsight/ui/src/components/base/display/tooltip/index.tsx
new file mode 100644
index 0000000000..9713650d2c
--- /dev/null
+++ b/redisinsight/ui/src/components/base/display/tooltip/index.tsx
@@ -0,0 +1 @@
+export * from './RITooltip'
diff --git a/redisinsight/ui/src/components/base/display/tour/TourStep.tsx b/redisinsight/ui/src/components/base/display/tour/RiTourStep.tsx
similarity index 89%
rename from redisinsight/ui/src/components/base/display/tour/TourStep.tsx
rename to redisinsight/ui/src/components/base/display/tour/RiTourStep.tsx
index 0edea1b780..5767bd116f 100644
--- a/redisinsight/ui/src/components/base/display/tour/TourStep.tsx
+++ b/redisinsight/ui/src/components/base/display/tour/RiTourStep.tsx
@@ -1,10 +1,8 @@
import React, { useEffect, useState } from 'react'
import { Popover } from '@redis-ui/components'
-import {
- PopoverPlacementMapType,
- TourStepProps,
-} from 'uiSrc/components/base/display/tour/types'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
+
+import { useGenerateId } from 'uiBase/utils'
+import { PopoverPlacementMapType, TourStepProps } from './types'
const popoverPlacementMap: PopoverPlacementMapType = {
upCenter: {
@@ -57,11 +55,10 @@ const popoverPlacementMap: PopoverPlacementMapType = {
},
}
-export const TourStep = ({
+export const RiTourStep = ({
open,
content,
title,
- onClose,
placement = 'rightUp',
className = '',
children,
diff --git a/redisinsight/ui/src/components/base/external-link/ExternalLink.tsx b/redisinsight/ui/src/components/base/external-link/ExternalLink.tsx
index 664407feef..7654db42cd 100644
--- a/redisinsight/ui/src/components/base/external-link/ExternalLink.tsx
+++ b/redisinsight/ui/src/components/base/external-link/ExternalLink.tsx
@@ -1,8 +1,7 @@
import React from 'react'
import { EuiLinkProps } from '@elastic/eui/src/components/link/link'
-import { IconProps } from 'uiSrc/components/base/icons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Link } from 'uiSrc/components/base/link/Link'
+import { IconProps, RiIcon } from 'uiBase/icons'
+import { RiLink } from 'uiBase/display'
export type Props = EuiLinkProps & {
href: string
@@ -18,11 +17,11 @@ const ExternalLink = (props: Props) => {
)
return (
-
+
{iconPosition === 'left' && }
{children}
{iconPosition === 'right' && }
-
+
)
}
diff --git a/redisinsight/ui/src/components/base/forms/RiFormField.tsx b/redisinsight/ui/src/components/base/forms/RiFormField.tsx
new file mode 100644
index 0000000000..52245effea
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/RiFormField.tsx
@@ -0,0 +1,21 @@
+import React, { ComponentProps } from 'react'
+import {
+ FormField as RedisFormField,
+ TooltipProvider,
+} from '@redis-ui/components'
+
+export type RedisFormFieldProps = ComponentProps & {
+ infoIconProps?: any
+}
+
+export function RiFormField(props: RedisFormFieldProps) {
+ // eslint-disable-next-line react/destructuring-assignment
+ if (props.infoIconProps) {
+ return (
+
+
+
+ )
+ }
+ return
+}
diff --git a/redisinsight/ui/src/components/base/forms/button-group/RiButtonGroup.tsx b/redisinsight/ui/src/components/base/forms/button-group/RiButtonGroup.tsx
new file mode 100644
index 0000000000..c2c76d0896
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/button-group/RiButtonGroup.tsx
@@ -0,0 +1,5 @@
+import { ButtonGroupProps } from '@redis-ui/components'
+
+export { ButtonGroup as RiButtonGroup } from '@redis-ui/components'
+
+export type { ButtonGroupProps }
diff --git a/redisinsight/ui/src/components/base/forms/buttons/Button.tsx b/redisinsight/ui/src/components/base/forms/buttons/Button.tsx
index 357104278f..44990ba010 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/Button.tsx
+++ b/redisinsight/ui/src/components/base/forms/buttons/Button.tsx
@@ -1,7 +1,7 @@
-import { Button } from '@redis-ui/components'
import React from 'react'
-import { LoaderLargeIcon } from 'uiSrc/components/base/icons'
-import { BaseButtonProps } from 'uiSrc/components/base/forms/buttons/button.styles'
+import { Button } from '@redis-ui/components'
+import { LoaderLargeIcon } from 'uiBase/icons'
+import { BaseButtonProps } from './button.styles'
type ButtonSize = 'small' | 'medium' | 'large'
type SizeKey = 'small' | 's' | 'medium' | 'm' | 'large' | 'l'
diff --git a/redisinsight/ui/src/components/base/forms/buttons/DestructiveButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/DestructiveButton.tsx
deleted file mode 100644
index 011181b531..0000000000
--- a/redisinsight/ui/src/components/base/forms/buttons/DestructiveButton.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import React from 'react'
-import { ButtonProps } from 'uiSrc/components/base/forms/buttons/button.styles'
-import { BaseButton } from 'uiSrc/components/base/forms/buttons/Button'
-
-export const DestructiveButton = (props: ButtonProps) => (
-
-)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/PrimaryButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/PrimaryButton.tsx
deleted file mode 100644
index 1caae3167d..0000000000
--- a/redisinsight/ui/src/components/base/forms/buttons/PrimaryButton.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import React from 'react'
-import { BaseButton } from 'uiSrc/components/base/forms/buttons/Button'
-import { ButtonProps } from 'uiSrc/components/base/forms/buttons/button.styles'
-
-export const PrimaryButton = (props: ButtonProps) => (
-
-)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/ActionIconButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiActionIconButton.tsx
similarity index 79%
rename from redisinsight/ui/src/components/base/forms/buttons/ActionIconButton.tsx
rename to redisinsight/ui/src/components/base/forms/buttons/RiActionIconButton.tsx
index 06329b8c7c..162f990042 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/ActionIconButton.tsx
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiActionIconButton.tsx
@@ -2,6 +2,7 @@ import React from 'react'
import { ActionIconButton as RedisUiActionIconButton } from '@redis-ui/components'
export type ButtonProps = React.ComponentProps
-export const ActionIconButton = (props: ButtonProps) => (
+
+export const RiActionIconButton = (props: ButtonProps) => (
)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/RiDestructiveButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiDestructiveButton.tsx
new file mode 100644
index 0000000000..44b66ab8ca
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiDestructiveButton.tsx
@@ -0,0 +1,7 @@
+import React from 'react'
+import { ButtonProps } from './button.styles'
+import { BaseButton } from './Button'
+
+export const RiDestructiveButton = (props: ButtonProps) => (
+
+)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/EmptyButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiEmptyButton.tsx
similarity index 76%
rename from redisinsight/ui/src/components/base/forms/buttons/EmptyButton.tsx
rename to redisinsight/ui/src/components/base/forms/buttons/RiEmptyButton.tsx
index 4f04342dd3..f8c994dcc1 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/EmptyButton.tsx
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiEmptyButton.tsx
@@ -1,8 +1,9 @@
import React from 'react'
import { TextButton } from '@redis-ui/components'
-import { ButtonIcon } from 'uiSrc/components/base/forms/buttons/Button'
-import { IconType } from 'uiSrc/components/base/icons'
-import { Row } from '../../layout/flex'
+import { IconType } from 'uiBase/icons'
+
+import { RiRow } from 'uiBase/layout'
+import { ButtonIcon } from './Button'
import { FlexProps } from '../../layout/flex/flex.styles'
export type ButtonProps = React.ComponentProps & {
@@ -12,7 +13,7 @@ export type ButtonProps = React.ComponentProps & {
size?: 'small' | 'large' | 'medium'
justify?: FlexProps['justify']
}
-export const EmptyButton = ({
+export const RiEmptyButton = ({
children,
icon,
iconSide = 'left',
@@ -22,9 +23,7 @@ export const EmptyButton = ({
...rest
}: ButtonProps) => (
-
+
-
+
)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/IconButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiIconButton.tsx
similarity index 71%
rename from redisinsight/ui/src/components/base/forms/buttons/IconButton.tsx
rename to redisinsight/ui/src/components/base/forms/buttons/RiIconButton.tsx
index babf62f395..0d3d04b739 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/IconButton.tsx
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiIconButton.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import { IconButton as RedisUiIconButton } from '@redis-ui/components'
-import * as Icons from 'uiSrc/components/base/icons/iconRegistry'
-import { AllIconsType } from 'uiSrc/components/base/icons'
+import * as Icons from 'uiBase/icons/iconRegistry'
+import { AllIconsType } from 'uiBase/icons'
export type ButtonProps = React.ComponentProps
@@ -9,7 +9,8 @@ export type IconType = ButtonProps['icon']
export type IconButtonProps = Omit & {
icon: IconType | string
}
-export const IconButton = ({ icon, size, ...props }: IconButtonProps) => {
+
+export const RiIconButton = ({ icon, size, ...props }: IconButtonProps) => {
let buttonIcon: IconType
if (typeof icon === 'string') {
buttonIcon = Icons[icon as AllIconsType]
diff --git a/redisinsight/ui/src/components/base/forms/buttons/RiPrimaryButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiPrimaryButton.tsx
new file mode 100644
index 0000000000..81108e906a
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiPrimaryButton.tsx
@@ -0,0 +1,7 @@
+import React from 'react'
+import { BaseButton } from './Button'
+import { ButtonProps } from './button.styles'
+
+export const RiPrimaryButton = (props: ButtonProps) => (
+
+)
diff --git a/redisinsight/ui/src/components/base/forms/buttons/SecondaryButton.tsx b/redisinsight/ui/src/components/base/forms/buttons/RiSecondaryButton.tsx
similarity index 61%
rename from redisinsight/ui/src/components/base/forms/buttons/SecondaryButton.tsx
rename to redisinsight/ui/src/components/base/forms/buttons/RiSecondaryButton.tsx
index 978dd46c9c..803e0ef0d2 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/SecondaryButton.tsx
+++ b/redisinsight/ui/src/components/base/forms/buttons/RiSecondaryButton.tsx
@@ -1,11 +1,8 @@
import React from 'react'
-import {
- BaseButtonProps,
- SecondaryButtonProps,
-} from 'uiSrc/components/base/forms/buttons/button.styles'
-import { BaseButton } from 'uiSrc/components/base/forms/buttons/Button'
+import { BaseButtonProps, SecondaryButtonProps } from './button.styles'
+import { BaseButton } from './Button'
-export const SecondaryButton = ({
+export const RiSecondaryButton = ({
filled = false,
inverted,
...props
diff --git a/redisinsight/ui/src/components/base/forms/buttons/button.styles.ts b/redisinsight/ui/src/components/base/forms/buttons/button.styles.ts
index 4890bbb51c..c2b10ecfcb 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/button.styles.ts
+++ b/redisinsight/ui/src/components/base/forms/buttons/button.styles.ts
@@ -1,7 +1,7 @@
import React from 'react'
import { Button } from '@redis-ui/components'
import { buttonSizes } from '@redis-ui/components/dist/Button/Button.types'
-import { IconType } from 'uiSrc/components/base/icons'
+import { IconType } from 'uiBase/icons'
export type BaseButtonProps = Omit<
React.ComponentProps,
diff --git a/redisinsight/ui/src/components/base/forms/buttons/index.ts b/redisinsight/ui/src/components/base/forms/buttons/index.ts
index 6500e979e0..844dfef41d 100644
--- a/redisinsight/ui/src/components/base/forms/buttons/index.ts
+++ b/redisinsight/ui/src/components/base/forms/buttons/index.ts
@@ -1,9 +1,9 @@
-export { ActionIconButton } from 'uiSrc/components/base/forms/buttons/ActionIconButton'
-export { BaseButton as Button } from 'uiSrc/components/base/forms/buttons/Button'
-export { DestructiveButton } from 'uiSrc/components/base/forms/buttons/DestructiveButton'
-export { EmptyButton } from 'uiSrc/components/base/forms/buttons/EmptyButton'
-export { IconButton } from 'uiSrc/components/base/forms/buttons/IconButton'
-export { PrimaryButton } from 'uiSrc/components/base/forms/buttons/PrimaryButton'
-export { SecondaryButton } from 'uiSrc/components/base/forms/buttons/SecondaryButton'
+export { RiActionIconButton } from './RiActionIconButton'
+export { BaseButton as Button } from './Button'
+export { RiDestructiveButton } from './RiDestructiveButton'
+export { RiEmptyButton } from './RiEmptyButton'
+export { RiIconButton } from './RiIconButton'
+export { RiPrimaryButton } from './RiPrimaryButton'
+export { RiSecondaryButton } from './RiSecondaryButton'
-export type { IconType } from 'uiSrc/components/base/forms/buttons/IconButton'
+export type { IconType } from './RiIconButton'
diff --git a/redisinsight/ui/src/components/base/forms/checkbox/Checkbox.test.tsx b/redisinsight/ui/src/components/base/forms/checkbox/Checkbox.test.tsx
index 7372f3e7c0..369b64cf94 100644
--- a/redisinsight/ui/src/components/base/forms/checkbox/Checkbox.test.tsx
+++ b/redisinsight/ui/src/components/base/forms/checkbox/Checkbox.test.tsx
@@ -1,36 +1,36 @@
import React from 'react'
import { fireEvent } from '@testing-library/react'
import { render, screen } from 'uiSrc/utils/test-utils'
-import { Checkbox } from './Checkbox'
+import { RiCheckbox } from './RiCheckbox'
describe('Checkbox', () => {
it('Should render checkbox', () => {
- render( )
+ render( )
expect(screen.getByText('Checkbox Label')).toBeInTheDocument()
})
describe('Checkbox states', () => {
it('Should render disabled checkbox when disabled prop is passed', () => {
- render( )
+ render( )
expect(screen.getByRole('checkbox')).toBeDisabled()
})
it('Should render un-checked checkbox when checked prop is passed as false', () => {
- render( )
+ render( )
const checkbox = screen.getByRole('checkbox')
expect(checkbox).toHaveAttribute('aria-checked', 'false')
})
it('Should render checked checkbox when checked prop is passed as true', () => {
- render( )
+ render( )
const checkbox = screen.getByRole('checkbox')
expect(checkbox).toHaveAttribute('aria-checked', 'true')
})
it('Should render indeterminate checkbox when checked prop is passed as indeterminate', () => {
render(
- ,
+ ,
)
const checkbox = screen.getByRole('checkbox')
@@ -44,7 +44,7 @@ describe('Checkbox', () => {
const onChange = jest.fn()
const onCheckedChange = jest.fn()
render(
- {
const onChange = jest.fn()
const onCheckedChange = jest.fn()
render(
- {
expect(onCheckedChange).toHaveBeenCalledWith(false)
})
it('Should change state when clicked', () => {
- render( )
+ render( )
const checkbox = screen.getByRole('checkbox')
expect(checkbox).toHaveAttribute('aria-checked', 'true')
fireEvent.click(checkbox)
diff --git a/redisinsight/ui/src/components/base/forms/checkbox/RiCheckbox.tsx b/redisinsight/ui/src/components/base/forms/checkbox/RiCheckbox.tsx
new file mode 100644
index 0000000000..fa60a42c51
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/checkbox/RiCheckbox.tsx
@@ -0,0 +1,82 @@
+import React, { ChangeEvent } from 'react'
+import {
+ Checkbox as RedisUiCheckbox,
+ CheckedType,
+ Typography,
+} from '@redis-ui/components'
+import { BodySizesType } from '@redis-ui/components/dist/Typography/components/Body/Body.types'
+
+type Size = BodySizesType
+
+export type CheckboxProps = Omit<
+ React.ComponentProps,
+ 'onChange'
+> & {
+ onCheckedChange?: (checked: CheckedType) => void
+ onChange?: (e: ChangeEvent) => void
+ name?: string
+ id?: string
+ labelSize?: Size
+}
+
+type CheckboxLabelProps = Omit<
+ React.ComponentProps,
+ 'children' | 'component'
+> & {
+ children: React.ReactNode
+}
+
+const CheckboxLabel = ({ children, ...rest }: CheckboxLabelProps) => {
+ if (typeof children !== 'string') {
+ return <>{children}>
+ }
+ return (
+
+ {children}
+
+ )
+}
+
+export const RiCheckbox = ({
+ onChange,
+ onCheckedChange,
+ id,
+ label,
+ labelSize = 'S',
+ ...rest
+}: CheckboxProps) => {
+ /**
+ * Handles the change event for a checkbox input and notifies the relevant handlers.
+ *
+ * This is added to provide compatibility with the `onChange` handler expected by the Formik library.
+ * Constructs a synthetic event object designed to mimic a React checkbox change event.
+ * Updates the `checked` status and passes the constructed event to the `onChange` handler
+ * if provided. Additionally, invokes the `onCheckedChange` handler with the new `checked` state
+ * if it is defined.
+ *
+ * @param {CheckedType} checked - The new checked state of the checkbox. It is expected to
+ * be a boolean-like value where `true` indicates checked and any other value
+ * indicates unchecked.
+ */
+ const handleCheckedChange = (checked: CheckedType) => {
+ const syntheticEvent = {
+ target: {
+ checked: checked === true,
+ type: 'checkbox',
+ name: rest.name,
+ id,
+ },
+ } as React.ChangeEvent
+ onChange?.(syntheticEvent)
+ onCheckedChange?.(checked)
+ }
+
+ return (
+ {label}}
+ />
+ )
+}
diff --git a/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.spec.tsx b/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.spec.tsx
index e05c0df3aa..cb12730cf4 100644
--- a/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.spec.tsx
+++ b/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.spec.tsx
@@ -1,7 +1,7 @@
-import { getTagFromValue } from 'uiSrc/components/base/forms/combo-box/AutoTag'
+import { getTagFromValue } from './RiAutoTag'
const defaultDelimiter = ' '
-describe('AutoTag', () => {
+describe('RiAutoTag', () => {
describe('getTagFromValue', () => {
it('should return null on empty string', () => {
const result = getTagFromValue('', defaultDelimiter)
diff --git a/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.tsx b/redisinsight/ui/src/components/base/forms/combo-box/RiAutoTag.tsx
similarity index 93%
rename from redisinsight/ui/src/components/base/forms/combo-box/AutoTag.tsx
rename to redisinsight/ui/src/components/base/forms/combo-box/RiAutoTag.tsx
index 7171552d9a..1ebcf8ac2c 100644
--- a/redisinsight/ui/src/components/base/forms/combo-box/AutoTag.tsx
+++ b/redisinsight/ui/src/components/base/forms/combo-box/RiAutoTag.tsx
@@ -2,10 +2,10 @@ import React, { useEffect, useState } from 'react'
import { Chip, FormField, Input } from '@redis-ui/components'
import cn from 'classnames'
import styled from 'styled-components'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { CommonProps } from 'uiSrc/components/base/theme/types'
-import { Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { CommonProps } from 'uiBase/theme/types'
+import { RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
export type AutoTagOption = {
label: string
@@ -62,7 +62,7 @@ const ClearButton = ({
return null
}
return (
-
- 0 || selection.length > 0)
}
/>
-
+
)
}
-const StyledWrapper = styled(Row)`
+const StyledWrapper = styled(RiRow)`
position: relative;
border: 1px solid ${({ theme }) => theme.semantic.color.border.neutral600};
border-radius: 0.4rem;
diff --git a/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.spec.tsx b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.spec.tsx
new file mode 100644
index 0000000000..9300573b92
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.spec.tsx
@@ -0,0 +1,199 @@
+/* eslint-disable jsx-a11y/label-has-associated-control */
+import React from 'react'
+import { render, screen } from 'uiSrc/utils/test-utils'
+import { RiFormFieldset, RiFormFieldsetProps } from './RiFormFieldset'
+
+const defaultProps: RiFormFieldsetProps = {
+ children: Test content
,
+}
+
+describe('RiFormFieldset', () => {
+ it('should render', () => {
+ expect(render( )).toBeTruthy()
+ })
+
+ it('should render children', () => {
+ render( )
+
+ expect(screen.getByTestId('fieldset-content')).toBeInTheDocument()
+ expect(screen.getByText('Test content')).toBeInTheDocument()
+ })
+
+ it('should render as fieldset element', () => {
+ render( )
+
+ const fieldset = screen.getByRole('group')
+ expect(fieldset.tagName).toBe('FIELDSET')
+ })
+
+ it('should render without legend when legend prop is not provided', () => {
+ render( )
+
+ expect(screen.queryByRole('legend')).not.toBeInTheDocument()
+ })
+
+ it('should render legend when legend prop is provided', () => {
+ render(
+ ,
+ )
+
+ expect(screen.getByText('Test Legend')).toBeInTheDocument()
+ })
+
+ it('should render legend with custom content', () => {
+ const legendContent = (
+ Custom Legend Content
+ )
+
+ render(
+ ,
+ )
+
+ expect(screen.getByTestId('custom-legend')).toBeInTheDocument()
+ expect(screen.getByText('Custom Legend Content')).toBeInTheDocument()
+ })
+
+ it('should not render legend when display is hidden', () => {
+ render(
+ ,
+ )
+
+ expect(screen.queryByText('Hidden Legend')).not.toBeInTheDocument()
+ })
+
+ it('should render legend when display is visible', () => {
+ render(
+ ,
+ )
+
+ expect(screen.getByText('Visible Legend')).toBeInTheDocument()
+ })
+
+ it('should render legend when display is not specified (defaults to visible)', () => {
+ render(
+ ,
+ )
+
+ expect(screen.getByText('Default Legend')).toBeInTheDocument()
+ })
+
+ it('should pass through HTML attributes to fieldset element', () => {
+ render(
+ ,
+ )
+
+ const fieldset = screen.getByTestId('custom-fieldset')
+ expect(fieldset).toHaveClass('custom-class')
+ expect(fieldset).toHaveAttribute('id', 'custom-id')
+ })
+
+ it('should pass through HTML attributes to legend element', () => {
+ render(
+ ,
+ )
+
+ const legend = screen.getByTestId('custom-legend')
+ expect(legend).toHaveClass('legend-class')
+ expect(legend).toHaveAttribute('id', 'legend-id')
+ })
+
+ it('should handle multiple children', () => {
+ render(
+
+ Child 1
+ Child 2
+
+ ,
+ )
+
+ expect(screen.getByTestId('child-1')).toBeInTheDocument()
+ expect(screen.getByTestId('child-2')).toBeInTheDocument()
+ expect(screen.getByTestId('input-field')).toBeInTheDocument()
+ })
+
+ it('should handle form elements as children', () => {
+ render(
+
+ Name:
+
+ Email:
+
+ ,
+ )
+
+ expect(screen.getByText('Form Fields')).toBeInTheDocument()
+ expect(screen.getByLabelText('Name:')).toBeInTheDocument()
+ expect(screen.getByLabelText('Email:')).toBeInTheDocument()
+ expect(screen.getByTestId('name-input')).toBeInTheDocument()
+ expect(screen.getByTestId('email-input')).toBeInTheDocument()
+ })
+
+ it('should handle empty children', () => {
+ render( )
+
+ const fieldset = screen.getByRole('group')
+ expect(fieldset).toBeInTheDocument()
+ expect(fieldset).toBeEmptyDOMElement()
+ })
+
+ it('should handle null children', () => {
+ render({null} )
+
+ const fieldset = screen.getByRole('group')
+ expect(fieldset).toBeInTheDocument()
+ })
+
+ it('should handle undefined children', () => {
+ render({undefined} )
+
+ const fieldset = screen.getByRole('group')
+ expect(fieldset).toBeInTheDocument()
+ })
+
+ it('should handle complex legend with multiple elements', () => {
+ const complexLegend = (
+
+ Important:
+ Please fill all required fields
+
+ )
+
+ render(
+ ,
+ )
+
+ expect(screen.getByText('Important:')).toBeInTheDocument()
+ expect(
+ screen.getByText('Please fill all required fields'),
+ ).toBeInTheDocument()
+ })
+})
diff --git a/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.styles.ts b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.styles.ts
new file mode 100644
index 0000000000..9ab25c13a7
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.styles.ts
@@ -0,0 +1,24 @@
+/* eslint-disable sonarjs/no-nested-template-literals */
+import { HTMLAttributes } from 'react'
+import styled, { css } from 'styled-components'
+import { Theme } from '@redis-ui/styles'
+
+export type StyledFieldsetProps = HTMLAttributes
+
+export const StyledFieldset = styled.fieldset`
+ border: none;
+ margin: 0;
+ padding: 0;
+ min-width: 0;
+`
+
+export interface StyledLegendProps extends HTMLAttributes {
+ display?: 'visible' | 'hidden'
+}
+
+export const StyledLegend = styled.legend`
+ ${({ theme }: { theme: Theme } & StyledLegendProps) => css`
+ margin-bottom: ${theme.core.space.space100};
+ `}
+ padding: 0;
+`
diff --git a/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.tsx b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.tsx
new file mode 100644
index 0000000000..71067668be
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/fieldset/RiFormFieldset.tsx
@@ -0,0 +1,23 @@
+import React from 'react'
+
+import {
+ StyledFieldset,
+ StyledFieldsetProps,
+ StyledLegend,
+ StyledLegendProps,
+} from './RiFormFieldset.styles'
+
+export interface RiFormFieldsetProps extends StyledFieldsetProps {
+ legend?: StyledLegendProps
+}
+
+export const RiFormFieldset = ({
+ legend,
+ children,
+ ...props
+}: RiFormFieldsetProps) => (
+
+ {legend && legend.display !== 'hidden' && }
+ {children}
+
+)
diff --git a/redisinsight/ui/src/components/base/forms/file-picker/RiFilePicker.tsx b/redisinsight/ui/src/components/base/forms/file-picker/RiFilePicker.tsx
index be06de5b17..557695f3d2 100644
--- a/redisinsight/ui/src/components/base/forms/file-picker/RiFilePicker.tsx
+++ b/redisinsight/ui/src/components/base/forms/file-picker/RiFilePicker.tsx
@@ -1,19 +1,18 @@
import React, { InputHTMLAttributes, ReactNode, useRef, useState } from 'react'
import cx from 'classnames'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
-import { Loader } from 'uiSrc/components/base/display'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons'
+import { useGenerateId } from 'uiBase/utils'
+import { RiProgressBarLoader, RiLoader } from 'uiBase/display'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { CommonProps } from 'uiBase/theme/types'
+import { RiColorText } from 'uiBase/text'
import {
FilePickerClearButton,
FilePickerInput,
FilePickerPrompt,
FilePickerPromptText,
FilePickerWrapper,
-} from 'uiSrc/components/base/forms/file-picker/styles'
-import { CommonProps } from 'uiSrc/components/base/theme/types'
-import ProgressBarLoader from 'uiSrc/components/base/display/progress-bar/ProgressBarLoader'
-import { ColorText } from 'uiSrc/components/base/text'
+} from './styles'
export type RiFilePickerProps = CommonProps &
Omit, 'onChange'> & {
@@ -118,7 +117,7 @@ export const RiFilePicker = ({
if (isLoading && normalFormControl) {
// Override clear button with loading spinner if it is in loading state
clearButton = (
-
@@ -126,7 +125,7 @@ export const RiFilePicker = ({
} else if (isOverridingInitialPrompt && !disabled) {
if (normalFormControl) {
clearButton = (
-
- Remove
+ Remove
)
}
@@ -150,7 +149,7 @@ export const RiFilePicker = ({
}
const loader = !normalFormControl && isLoading && (
-
+
)
return (
diff --git a/redisinsight/ui/src/components/base/forms/file-picker/styles.tsx b/redisinsight/ui/src/components/base/forms/file-picker/styles.tsx
index 6425ead651..6a22ef7994 100644
--- a/redisinsight/ui/src/components/base/forms/file-picker/styles.tsx
+++ b/redisinsight/ui/src/components/base/forms/file-picker/styles.tsx
@@ -1,13 +1,13 @@
/* eslint-disable sonarjs/no-nested-template-literals */
import styled, { css } from 'styled-components'
import React, { forwardRef, InputHTMLAttributes } from 'react'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
type FilePickerWrapperProps = InputHTMLAttributes & {
$large?: boolean
}
-export const FilePickerPromptText = styled(Text)``
+export const FilePickerPromptText = styled(RiText)``
const largeWrapper = css`
border-radius: 0;
@@ -81,6 +81,6 @@ export const FilePickerPrompt = styled.div`
${({ $large }) => ($large ? promptLarge : promptDefault)}
`
-export const FilePickerClearButton = styled(EmptyButton)`
+export const FilePickerClearButton = styled(RiEmptyButton)`
pointer-events: auto; /* Undo the pointer-events: none applied to the enclosing prompt */
`
diff --git a/redisinsight/ui/src/components/base/forms/index.ts b/redisinsight/ui/src/components/base/forms/index.ts
new file mode 100644
index 0000000000..d4ac1b1e1d
--- /dev/null
+++ b/redisinsight/ui/src/components/base/forms/index.ts
@@ -0,0 +1,13 @@
+export { RiFormField } from './RiFormField'
+export { RiButtonGroup } from './button-group/RiButtonGroup'
+export type { ButtonGroupProps } from './button-group/RiButtonGroup'
+export * from './buttons'
+export * from './radio-group/RadioGroup'
+export * from './select/RiSelect'
+
+export { RiCheckbox } from './checkbox/RiCheckbox'
+export { RiAutoTag } from './combo-box/RiAutoTag'
+export type { AutoTagOption } from './combo-box/RiAutoTag'
+export { RiFormFieldset } from './fieldset/RiFormFieldset'
+export type { RiFormFieldsetProps } from './fieldset/RiFormFieldset'
+export { RiFilePicker } from './file-picker/RiFilePicker'
diff --git a/redisinsight/ui/src/components/base/forms/select/RiSelect.tsx b/redisinsight/ui/src/components/base/forms/select/RiSelect.tsx
index 468d2723b3..7d6a298812 100644
--- a/redisinsight/ui/src/components/base/forms/select/RiSelect.tsx
+++ b/redisinsight/ui/src/components/base/forms/select/RiSelect.tsx
@@ -1,6 +1,6 @@
+import React from 'react'
// Import the original type but don't re-export it
import type { SelectOption, SelectValueRender } from '@redis-ui/components'
-import React from 'react'
export { Select as RiSelect } from '@redis-ui/components'
export type { SelectOption, SelectValueRender } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/icons/Icon.tsx b/redisinsight/ui/src/components/base/icons/Icon.tsx
index b5016359d4..07feb79750 100644
--- a/redisinsight/ui/src/components/base/icons/Icon.tsx
+++ b/redisinsight/ui/src/components/base/icons/Icon.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { useTheme } from '@redis-ui/styles'
import cx from 'classnames'
import { IconSizeType } from '@redis-ui/icons'
-import { MonochromeIconProps } from 'uiSrc/components/base/icons'
+import { MonochromeIconProps } from 'uiBase/icons'
type BaseIconProps = Omit & {
icon: React.ComponentType
diff --git a/redisinsight/ui/src/components/base/index.ts b/redisinsight/ui/src/components/base/index.ts
index 0fde7a919f..b34d233b58 100644
--- a/redisinsight/ui/src/components/base/index.ts
+++ b/redisinsight/ui/src/components/base/index.ts
@@ -1,9 +1,9 @@
import ExternalLink from './external-link'
-import { HorizontalRule, LoadingContent } from './layout'
-export { ExternalLink, HorizontalRule, LoadingContent }
+export { ExternalLink }
-export * from './tooltip'
-export * from './popover'
-
-export { RiFilePicker } from './forms/file-picker/RiFilePicker'
+export * from './layout'
+export * from './display'
+export * from './forms'
+export * from './text'
+export * from './shared/WindowControlGroup'
diff --git a/redisinsight/ui/src/components/base/inputs/RiNumericInput.ts b/redisinsight/ui/src/components/base/inputs/RiNumericInput.ts
new file mode 100644
index 0000000000..5c8e062571
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiNumericInput.ts
@@ -0,0 +1 @@
+export { NumericInput as RiNumericInput } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/inputs/RiPasswordInput.tsx b/redisinsight/ui/src/components/base/inputs/RiPasswordInput.tsx
new file mode 100644
index 0000000000..5863b8c915
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiPasswordInput.tsx
@@ -0,0 +1,9 @@
+import React, { ComponentProps } from 'react'
+
+import { PasswordInput as RedisPasswordInput } from '@redis-ui/components'
+
+export type RedisPasswordInputProps = ComponentProps
+
+export function RiPasswordInput(props: RedisPasswordInputProps) {
+ return
+}
diff --git a/redisinsight/ui/src/components/base/inputs/RiSearchInput.ts b/redisinsight/ui/src/components/base/inputs/RiSearchInput.ts
new file mode 100644
index 0000000000..f4911cec6f
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiSearchInput.ts
@@ -0,0 +1 @@
+export { SearchInput as RiSearchInput } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/inputs/RiSwitchInput.tsx b/redisinsight/ui/src/components/base/inputs/RiSwitchInput.tsx
new file mode 100644
index 0000000000..b7917fc10c
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiSwitchInput.tsx
@@ -0,0 +1,22 @@
+import React from 'react'
+
+import { Switch } from '@redis-ui/components'
+
+type SwitchInputProps = Omit, 'titleOn'>
+
+export const RiSwitchInput = ({
+ style,
+ title,
+ titleOff,
+ ...props
+}: SwitchInputProps) => (
+
+)
diff --git a/redisinsight/ui/src/components/base/inputs/RiTextArea.ts b/redisinsight/ui/src/components/base/inputs/RiTextArea.ts
new file mode 100644
index 0000000000..27a871dc50
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiTextArea.ts
@@ -0,0 +1 @@
+export { TextArea as RiTextArea } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/inputs/RiTextInput.tsx b/redisinsight/ui/src/components/base/inputs/RiTextInput.tsx
new file mode 100644
index 0000000000..b6b2f9a0d2
--- /dev/null
+++ b/redisinsight/ui/src/components/base/inputs/RiTextInput.tsx
@@ -0,0 +1,17 @@
+import React, { ComponentProps } from 'react'
+
+import { Input as RedisInput, TooltipProvider } from '@redis-ui/components'
+
+export type RedisInputProps = ComponentProps
+
+export function RiTextInput(props: RedisInputProps) {
+ // eslint-disable-next-line react/destructuring-assignment
+ if (props.error) {
+ return (
+
+
+
+ )
+ }
+ return
+}
diff --git a/redisinsight/ui/src/components/base/inputs/SwitchInput.spec.tsx b/redisinsight/ui/src/components/base/inputs/SwitchInput.spec.tsx
index b6102160e3..44cc4454f8 100644
--- a/redisinsight/ui/src/components/base/inputs/SwitchInput.spec.tsx
+++ b/redisinsight/ui/src/components/base/inputs/SwitchInput.spec.tsx
@@ -2,25 +2,25 @@ import React from 'react'
import userEvent from '@testing-library/user-event'
import { render } from '@testing-library/react'
-import SwitchInput from './SwitchInput'
+import { RiSwitchInput } from './RiSwitchInput'
describe('SwitchInput', () => {
it('should render with default props', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveTextContent('On')
})
it('should render with titleOff when provided', () => {
const { container } = render(
- ,
+ ,
)
expect(container.firstChild).toHaveTextContent('Off')
})
it('should fall back to title when titleOff is not provided', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveTextContent('On')
})
@@ -28,7 +28,7 @@ describe('SwitchInput', () => {
it('should call onCheckedChange when toggled', async () => {
const onCheckedChange = jest.fn()
const { getByRole, container } = render(
- ,
+ ,
)
expect(container.firstChild).toHaveTextContent('On')
@@ -42,7 +42,7 @@ describe('SwitchInput', () => {
it('should apply custom styles', () => {
const { container } = render(
- ,
+ ,
)
expect(container.firstChild).toHaveStyle('background-color: red')
})
diff --git a/redisinsight/ui/src/components/base/inputs/index.ts b/redisinsight/ui/src/components/base/inputs/index.ts
index 863828ae91..5e9c528bda 100644
--- a/redisinsight/ui/src/components/base/inputs/index.ts
+++ b/redisinsight/ui/src/components/base/inputs/index.ts
@@ -1,6 +1,6 @@
-export { default as PasswordInput } from './PasswordInput'
-export { default as SearchInput } from './SearchInput'
-export { default as NumericInput } from './NumericInput'
-export { default as SwitchInput } from './SwitchInput'
-export { default as TextArea } from './TextArea'
-export { default as TextInput } from './TextInput'
+export { RiPasswordInput } from './RiPasswordInput'
+export { RiSearchInput } from './RiSearchInput'
+export { RiNumericInput } from './RiNumericInput'
+export { RiSwitchInput } from './RiSwitchInput'
+export { RiTextArea } from './RiTextArea'
+export { RiTextInput } from './RiTextInput'
diff --git a/redisinsight/ui/src/components/base/layout/card/index.ts b/redisinsight/ui/src/components/base/layout/card/index.ts
new file mode 100644
index 0000000000..b6c0fe0006
--- /dev/null
+++ b/redisinsight/ui/src/components/base/layout/card/index.ts
@@ -0,0 +1 @@
+export { Card as RiCard } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/layout/drawer/index.ts b/redisinsight/ui/src/components/base/layout/drawer/index.ts
index d0636763b6..8189e8c8b4 100644
--- a/redisinsight/ui/src/components/base/layout/drawer/index.ts
+++ b/redisinsight/ui/src/components/base/layout/drawer/index.ts
@@ -1,7 +1,7 @@
-import { Drawer } from '@redis-ui/components'
+import { Drawer as RiDrawer } from '@redis-ui/components'
-const DrawerHeader = Drawer.Header
-const DrawerBody = Drawer.Body
-const DrawerFooter = Drawer.Footer
+const RiDrawerHeader = RiDrawer.Header
+const RiDrawerBody = RiDrawer.Body
+const RiDrawerFooter = RiDrawer.Footer
-export { Drawer, DrawerHeader, DrawerBody, DrawerFooter }
+export { RiDrawer, RiDrawerHeader, RiDrawerBody, RiDrawerFooter }
diff --git a/redisinsight/ui/src/components/base/layout/empty-prompt/RiEmptyPrompt.tsx b/redisinsight/ui/src/components/base/layout/empty-prompt/RiEmptyPrompt.tsx
index 26205acc6b..4d7d1521af 100644
--- a/redisinsight/ui/src/components/base/layout/empty-prompt/RiEmptyPrompt.tsx
+++ b/redisinsight/ui/src/components/base/layout/empty-prompt/RiEmptyPrompt.tsx
@@ -1,9 +1,10 @@
import React, { HTMLAttributes } from 'react'
import styled from 'styled-components'
import { useTheme } from '@redis-ui/styles'
-import { Spacer } from '../spacer'
+import { RiSpacer } from '../spacer'
-interface RiEmptyPromptProps extends Omit, 'title'> {
+interface RiEmptyPromptProps
+ extends Omit, 'title'> {
body?: React.ReactNode
title?: React.ReactNode
icon?: React.ReactNode
@@ -16,26 +17,32 @@ const StyledEmptyPrompt = styled.div`
margin: auto;
`
-const RiEmptyPrompt = ({ body, title, icon, ...rest }: RiEmptyPromptProps) => {
+export const RiEmptyPrompt = ({
+ body,
+ title,
+ icon,
+ ...rest
+}: RiEmptyPromptProps) => {
const theme = useTheme()
- return (
- {icon}
- {title && (
- <>
-
- {title}
- >
- )}
- {body && (
- <>
-
- {body}
- >
- )}
-
+ return (
+
+ {icon}
+ {title && (
+ <>
+
+ {title}
+ >
+ )}
+ {body && (
+ <>
+
+ {body}
+ >
+ )}
+
)
}
-
+
export default RiEmptyPrompt
diff --git a/redisinsight/ui/src/components/base/layout/flex/flex.spec.tsx b/redisinsight/ui/src/components/base/layout/flex/flex.spec.tsx
index 63b3f3a050..3d450e9cb7 100644
--- a/redisinsight/ui/src/components/base/layout/flex/flex.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/flex/flex.spec.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import { render } from 'uiSrc/utils/test-utils'
import { alignValues, dirValues, gapSizes, justifyValues } from './flex.styles'
-import { Col, FlexGroup as Flex, FlexItem, Grid, Row } from './flex'
+import { RiCol, RiFlexGroup as Flex, RiFlexItem, RiGrid, RiRow } from './flex'
const gapStyles = {
none: '',
@@ -14,7 +14,7 @@ const gapStyles = {
}
describe('Flex Components', () => {
it('should render', () => {
- expect(render( )).toBeTruthy()
+ expect(render( )).toBeTruthy()
expect(
render(
@@ -24,23 +24,23 @@ describe('Flex Components', () => {
).toBeTruthy()
expect(
render(
-
+
Child
-
,
+ ,
),
).toBeTruthy()
expect(
render(
-
+
Child
- ,
+ ,
),
).toBeTruthy()
expect(
render(
-
+
Child
- ,
+ ,
),
).toBeTruthy()
})
@@ -48,9 +48,9 @@ describe('Flex Components', () => {
describe('Flex', () => {
it('should render with default classes', () => {
const { container } = render(
-
+
Child
-
,
+ ,
)
expect(container).toBeTruthy()
expect(container.firstChild).toHaveClass('RI-flex-row', 'RI-flex-group')
@@ -60,9 +60,9 @@ describe('Flex Components', () => {
describe('Col', () => {
it('should render', () => {
const { container } = render(
-
+
Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass('RI-flex-col', 'RI-flex-group')
expect(container.firstChild).toHaveStyle('flex-direction: column')
@@ -177,9 +177,9 @@ describe('Flex Components', () => {
describe('inline', () => {
it('should render div as default', () => {
const { getByText, container } = render(
-
+
Child
- ,
+ ,
)
expect(container.firstChild?.nodeName).toEqual('DIV')
@@ -193,7 +193,7 @@ describe('Flex Components', () => {
VALUES.forEach((value) => {
it(`${value} should generate a flex-grow of 0`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveClass(
'RI-flex-item',
// value ? flex['flex-responsive'] : '',
@@ -208,7 +208,7 @@ describe('Flex Components', () => {
VALUES.forEach((value) => {
test(`${value} generates a flex-grow of 1`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveClass(
'RI-flex-item',
// value ? flex['flex-responsive'] : '',
@@ -223,7 +223,7 @@ describe('Flex Components', () => {
VALUES.forEach((value) => {
test(`${value} generates a flex-grow of ${value}`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveClass(
'RI-flex-item',
// value ? flex['flex-responsive'] : '',
@@ -239,9 +239,9 @@ describe('Flex Components', () => {
it('should render', () => {
expect(
render(
-
+
My Child
- ,
+ ,
),
).toBeTruthy()
})
@@ -250,9 +250,9 @@ describe('Flex Components', () => {
gapSizes.forEach((value) => {
it(`should render ${value} gap`, () => {
const { getByText, container } = render(
-
+
My Child
- ,
+ ,
)
const grid = container.firstChild
expect(grid).toHaveClass('RI-flex-grid')
@@ -270,9 +270,9 @@ describe('Flex Components', () => {
;([1, 2, 3, 4] as const).forEach((value) => {
it(`should render ${value} columns`, () => {
const { container } = render(
-
+
My Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass(
'RI-flex-grid',
@@ -285,18 +285,18 @@ describe('Flex Components', () => {
describe('responsive', () => {
it('should render when responsive is false', () => {
const { container } = render(
-
+
My Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass('RI-flex-grid')
// expect(container.firstChild).not.toHaveClass(flex.gridResponsive)
})
it('should have class grid-responsive when responsive is true', () => {
const { container } = render(
-
+
My Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass(
'RI-flex-grid',
@@ -308,18 +308,18 @@ describe('Flex Components', () => {
describe('centered', () => {
it('should render when centered is false', () => {
const { container } = render(
-
+
My Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass('RI-flex-grid')
// expect(container.firstChild).not.toHaveClass(flex.gridCentered)
})
it('should have class grid-centered when responsive is true', () => {
const { container } = render(
-
+
My Child
- ,
+ ,
)
expect(container.firstChild).toHaveClass(
'RI-flex-grid',
diff --git a/redisinsight/ui/src/components/base/layout/flex/flex.styles.ts b/redisinsight/ui/src/components/base/layout/flex/flex.styles.ts
index aa2c662454..59aa65539a 100644
--- a/redisinsight/ui/src/components/base/layout/flex/flex.styles.ts
+++ b/redisinsight/ui/src/components/base/layout/flex/flex.styles.ts
@@ -1,7 +1,7 @@
import React, { HTMLAttributes, PropsWithChildren, ReactNode } from 'react'
import styled, { css } from 'styled-components'
-import { CommonProps, Theme } from 'uiSrc/components/base/theme/types'
+import { CommonProps, Theme } from 'uiBase/theme/types'
export const gapSizes = ['none', 'xs', 's', 'm', 'l', 'xl', 'xxl'] as const
export type GapSizeType = (typeof gapSizes)[number]
diff --git a/redisinsight/ui/src/components/base/layout/flex/flex.tsx b/redisinsight/ui/src/components/base/layout/flex/flex.tsx
index 9083099a59..03edb25679 100644
--- a/redisinsight/ui/src/components/base/layout/flex/flex.tsx
+++ b/redisinsight/ui/src/components/base/layout/flex/flex.tsx
@@ -9,9 +9,9 @@ import {
StyledFlexItem,
StyledGrid,
VALID_PADDING_VALUES,
-} from 'uiSrc/components/base/layout/flex/flex.styles'
+} from './flex.styles'
-export const Grid = ({ children, className, ...rest }: GridProps) => {
+export const RiGrid = ({ children, className, ...rest }: GridProps) => {
const classes = classNames('RI-flex-grid', className)
return (
@@ -39,7 +39,7 @@ export const Grid = ({ children, className, ...rest }: GridProps) => {
*
*
*/
-export const FlexGroup = ({
+export const RiFlexGroup = ({
children,
className,
grow,
@@ -92,7 +92,7 @@ export const FlexGroup = ({
*
*
*/
-export const Col = ({
+export const RiCol = ({
className,
reverse,
contentCentered,
@@ -105,7 +105,7 @@ export const Col = ({
}) => {
const classes = classNames('RI-flex-col', className)
return (
- {
const classes = classNames('RI-flex-row', className)
return (
- Content
*
*/
-export const FlexItem = ({
+export const RiFlexItem = ({
children,
className,
grow = false,
diff --git a/redisinsight/ui/src/components/base/layout/flex/index.ts b/redisinsight/ui/src/components/base/layout/flex/index.ts
deleted file mode 100644
index 50b4f03106..0000000000
--- a/redisinsight/ui/src/components/base/layout/flex/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { FlexGroup, FlexGroup as Flex, FlexItem, Col, Row, Grid } from './flex'
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.spec.tsx b/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.spec.tsx
index c5738cdc4c..3a56b8dd96 100644
--- a/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.spec.tsx
@@ -1,16 +1,16 @@
import React from 'react'
import { render } from '@testing-library/react'
-import HorizontalRule from './HorizontalRule'
+import { RiHorizontalRule } from './RiHorizontalRule'
-describe('HorizontalRule', () => {
+describe('RiHorizontalRule', () => {
it('should render with default props', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container).toBeTruthy()
expect(container.firstChild).toHaveStyle('width: 100%')
})
it('should render with set size and margin', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container).toBeTruthy()
expect(container.firstChild).toHaveStyle('width: 50%')
expect(container.firstChild).toHaveStyle('margin-inline: auto')
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.tsx b/redisinsight/ui/src/components/base/layout/horizontal-rule/RiHorizontalRule.tsx
similarity index 88%
rename from redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.tsx
rename to redisinsight/ui/src/components/base/layout/horizontal-rule/RiHorizontalRule.tsx
index 69e72b775c..cecee6edd2 100644
--- a/redisinsight/ui/src/components/base/layout/horizontal-rule/HorizontalRule.tsx
+++ b/redisinsight/ui/src/components/base/layout/horizontal-rule/RiHorizontalRule.tsx
@@ -1,12 +1,12 @@
-import classNames from 'classnames'
import React from 'react'
+import classNames from 'classnames'
import {
HorizontalRuleProps,
StyledHorizontalRule,
} from './horizontal-rule.styles'
-const HorizontalRule = ({
+export const RiHorizontalRule = ({
className,
size = 'full',
margin = 'l',
@@ -23,5 +23,3 @@ const HorizontalRule = ({
/>
)
}
-
-export default HorizontalRule
\ No newline at end of file
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-spacer/HorizontalSpacer.spec.tsx b/redisinsight/ui/src/components/base/layout/horizontal-spacer/HorizontalSpacer.spec.tsx
index 813ac3a062..a2f45e99db 100644
--- a/redisinsight/ui/src/components/base/layout/horizontal-spacer/HorizontalSpacer.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/horizontal-spacer/HorizontalSpacer.spec.tsx
@@ -1,15 +1,17 @@
import React from 'react'
import { render } from 'uiSrc/utils/test-utils'
-import { HorizontalSpacer } from './horizontal-spacer'
+import { RiHorizontalSpacer } from './RiHorizontalSpacer'
describe('HorizontalSpacer', () => {
it('should render with different sizes correctly', () => {
const sizes = ['xs', 's', 'm', 'l', 'xl', 'xxl'] as const
-
- sizes.forEach(size => {
- const { container } = render( )
- const spacer = container.querySelector('.RI-horizontal-spacer') as HTMLElement
-
+
+ sizes.forEach((size) => {
+ const { container } = render( )
+ const spacer = container.querySelector(
+ '.RI-horizontal-spacer',
+ ) as HTMLElement
+
if (size === 'xl') {
expect(spacer).toHaveStyle('width: calc(var(--base) * 2.25)')
} else {
@@ -20,9 +22,9 @@ describe('HorizontalSpacer', () => {
it('should render children when provided', () => {
const { getByText } = render(
-
+
Test content
-
+ ,
)
const content = getByText('Test content')
expect(content).toBeInTheDocument()
@@ -30,20 +32,26 @@ describe('HorizontalSpacer', () => {
})
it('should apply custom className', () => {
- const { container } = render( )
- const spacer = container.querySelector('.RI-horizontal-spacer') as HTMLElement
-
+ const { container } = render(
+ ,
+ )
+ const spacer = container.querySelector(
+ '.RI-horizontal-spacer',
+ ) as HTMLElement
+
expect(spacer).toHaveClass('RI-horizontal-spacer')
expect(spacer).toHaveClass('custom-class')
})
it('should pass through custom props', () => {
const { container } = render(
-
+ ,
)
- const spacer = container.querySelector('.RI-horizontal-spacer') as HTMLElement
-
+ const spacer = container.querySelector(
+ '.RI-horizontal-spacer',
+ ) as HTMLElement
+
expect(spacer).toHaveAttribute('data-testid', 'my-spacer')
expect(spacer).toHaveAttribute('id', 'spacer-id')
})
-})
\ No newline at end of file
+})
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-spacer/RiHorizontalSpacer.tsx b/redisinsight/ui/src/components/base/layout/horizontal-spacer/RiHorizontalSpacer.tsx
new file mode 100644
index 0000000000..3c3bb9945b
--- /dev/null
+++ b/redisinsight/ui/src/components/base/layout/horizontal-spacer/RiHorizontalSpacer.tsx
@@ -0,0 +1,19 @@
+import React from 'react'
+import cx from 'classnames'
+import {
+ HorizontalSpacerProps,
+ StyledHorizontalSpacer,
+} from './horizontal-spacer.styles'
+
+export const RiHorizontalSpacer = ({
+ className,
+ children,
+ ...rest
+}: HorizontalSpacerProps) => (
+
+ {children}
+
+)
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-spacer/horizontal-spacer.styles.ts b/redisinsight/ui/src/components/base/layout/horizontal-spacer/horizontal-spacer.styles.ts
index 8d2e2bffa6..85995fdc2c 100644
--- a/redisinsight/ui/src/components/base/layout/horizontal-spacer/horizontal-spacer.styles.ts
+++ b/redisinsight/ui/src/components/base/layout/horizontal-spacer/horizontal-spacer.styles.ts
@@ -1,6 +1,6 @@
import { HTMLAttributes, ReactNode } from 'react'
import styled from 'styled-components'
-import { CommonProps } from 'uiSrc/components/base/theme/types'
+import { CommonProps } from 'uiBase/theme/types'
export const HorizontalSpacerSizes = ['xs', 's', 'm', 'l', 'xl', 'xxl'] as const
export type HorizontalSpacerSize = (typeof HorizontalSpacerSizes)[number]
@@ -23,4 +23,4 @@ export const StyledHorizontalSpacer = styled.div`
flex-shrink: 0;
width: ${({ size = 'l' }) => horizontalSpacerStyles[size]};
display: inline-block;
-`
\ No newline at end of file
+`
diff --git a/redisinsight/ui/src/components/base/layout/horizontal-spacer/index.ts b/redisinsight/ui/src/components/base/layout/horizontal-spacer/index.ts
index dd4048127b..b6af63a69c 100644
--- a/redisinsight/ui/src/components/base/layout/horizontal-spacer/index.ts
+++ b/redisinsight/ui/src/components/base/layout/horizontal-spacer/index.ts
@@ -1,2 +1,5 @@
-export { HorizontalSpacer } from './horizontal-spacer'
-export type { HorizontalSpacerSize, HorizontalSpacerProps } from './horizontal-spacer.styles'
\ No newline at end of file
+export { RiHorizontalSpacer } from './RiHorizontalSpacer'
+export type {
+ HorizontalSpacerSize,
+ HorizontalSpacerProps,
+} from './horizontal-spacer.styles'
diff --git a/redisinsight/ui/src/components/base/layout/index.ts b/redisinsight/ui/src/components/base/layout/index.ts
index 2d630f0614..86744b445c 100644
--- a/redisinsight/ui/src/components/base/layout/index.ts
+++ b/redisinsight/ui/src/components/base/layout/index.ts
@@ -1,18 +1,20 @@
-import HorizontalRule from './horizontal-rule/HorizontalRule'
-import LoadingContent from './loading-content/LoadingContent'
-import ResizableContainer from './resize/container/ResizableContainer'
-import ResizablePanel from './resize/panel/ResizablePanel'
-import ResizablePanelHandle from './resize/handle/ResizablePanelHandle'
-import RiEmptyPrompt from './empty-prompt/RiEmptyPrompt'
+export { RiLoadingContent } from './loading-content/RiLoadingContent'
-export * from './card'
+export { RiHorizontalRule } from './horizontal-rule/RiHorizontalRule'
+
+export { RiEmptyPrompt } from './empty-prompt/RiEmptyPrompt'
+
+export { RiCard } from './card'
export * from './horizontal-spacer'
export * from './spacer'
-export {
- HorizontalRule,
- LoadingContent,
- ResizablePanel,
- ResizableContainer,
- ResizablePanelHandle,
- RiEmptyPrompt,
-}
+export * from './drawer'
+export * from './list'
+export * from './menu'
+export * from './page'
+export * from './resize'
+export * from './sidebar'
+export * from './tabs'
+export * from './flex/flex'
+
+export { RiTable } from './table'
+export type { ColumnDefinition } from './table'
diff --git a/redisinsight/ui/src/components/base/layout/list/Group.tsx b/redisinsight/ui/src/components/base/layout/list/RiListGroup.tsx
similarity index 87%
rename from redisinsight/ui/src/components/base/layout/list/Group.tsx
rename to redisinsight/ui/src/components/base/layout/list/RiListGroup.tsx
index 25d7406d1f..e2feeda2ab 100644
--- a/redisinsight/ui/src/components/base/layout/list/Group.tsx
+++ b/redisinsight/ui/src/components/base/layout/list/RiListGroup.tsx
@@ -5,9 +5,9 @@ import {
ListGroupProps,
MAX_FORM_WIDTH,
StyledGroup,
-} from 'uiSrc/components/base/layout/list/list.styles'
+} from './list.styles'
-const Group = ({
+export const RiListGroup = ({
children,
className,
style,
@@ -37,5 +37,3 @@ const Group = ({
)
}
-
-export default Group
diff --git a/redisinsight/ui/src/components/base/layout/list/Item.tsx b/redisinsight/ui/src/components/base/layout/list/RiListItem.tsx
similarity index 94%
rename from redisinsight/ui/src/components/base/layout/list/Item.tsx
rename to redisinsight/ui/src/components/base/layout/list/RiListItem.tsx
index 5d8140101f..a0baa55a5e 100644
--- a/redisinsight/ui/src/components/base/layout/list/Item.tsx
+++ b/redisinsight/ui/src/components/base/layout/list/RiListItem.tsx
@@ -1,8 +1,8 @@
import React, { ButtonHTMLAttributes, ReactElement } from 'react'
import cx from 'classnames'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { useInnerText } from 'uiSrc/components/base/utils/hooks/inner-text'
+import { RiIcon } from 'uiBase/icons'
+import { useInnerText } from 'uiBase/utils'
import {
ListClassNames,
ListGroupItemProps,
@@ -12,7 +12,7 @@ import {
StyledLabel,
} from './list.styles'
-const Item = ({
+export const RiListItem = ({
size,
label,
isActive,
@@ -121,5 +121,3 @@ const Item = ({
)
}
-
-export default Item
diff --git a/redisinsight/ui/src/components/base/layout/list/index.ts b/redisinsight/ui/src/components/base/layout/list/index.ts
index 7335be4ca3..06b16c4362 100644
--- a/redisinsight/ui/src/components/base/layout/list/index.ts
+++ b/redisinsight/ui/src/components/base/layout/list/index.ts
@@ -1,4 +1,4 @@
-import Group from './Group'
-import Item from './Item'
+import { RiListGroup } from './RiListGroup'
+import { RiListItem } from './RiListItem'
-export { Group, Item }
+export { RiListGroup, RiListItem }
diff --git a/redisinsight/ui/src/components/base/layout/list/list.styles.ts b/redisinsight/ui/src/components/base/layout/list/list.styles.ts
index 92fd2fb069..d80b5fc915 100644
--- a/redisinsight/ui/src/components/base/layout/list/list.styles.ts
+++ b/redisinsight/ui/src/components/base/layout/list/list.styles.ts
@@ -10,8 +10,7 @@ import {
Ref,
} from 'react'
-import { AllIconsType } from 'uiSrc/components/base/icons/RiIcon'
-import { IconProps } from 'uiSrc/components/base/icons'
+import { AllIconsType, IconProps } from 'uiBase/icons'
export const ListClassNames = {
listItem: 'RI-list-group-item',
@@ -171,41 +170,41 @@ const listItemStyles = {
},
active: {
primary: css`
- background-color: var(--color-primary);
+ background-color: var(--color-text-primary);
`,
text: css`
- background-color: var(--color-subdued);
+ background-color: var(--color-text-subdued);
`,
subdued: css`
- background-color: var(--color-subdued);
+ background-color: var(--color-text-subdued);
`,
ghost: css`
- background-color: var(--color-ghost);
+ background-color: var(--color-text-ghost);
`,
},
clickable: {
primary: css`
&:hover,
&:focus-within {
- background-color: var(--color-subdued);
+ background-color: var(--color-text-subdued);
}
`,
text: css`
&:hover,
&:focus-within {
- background-color: var(--color-subdued);
+ background-color: var(--color-text-subdued);
}
`,
subdued: css`
&:hover,
&:focus-within {
- background-color: var(--color-subdued);
+ background-color: var(--color-text-subdued);
}
`,
ghost: css`
&:hover,
&:focus-within {
- background-color: var(--color-ghost);
+ background-color: var(--color-text-ghost);
}
`,
},
@@ -270,16 +269,16 @@ const listItemInnerStyles = {
colors: {
// Colors
primary: css`
- color: var(--color-primary-text);
+ color: var(--color-text-primary);
`,
text: css`
- color: var(--color-text-text);
+ color: var(--color-text-default);
`,
subdued: css`
- color: var(--euiTextSubduedColor);
+ color: var(--color-text-subdued);
`,
ghost: css`
- color: var(--color-ghost-text);
+ color: var(--color-text-ghost);
`,
},
variants: {
diff --git a/redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.spec.tsx b/redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.spec.tsx
similarity index 67%
rename from redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.spec.tsx
rename to redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.spec.tsx
index 4ef1dd4499..42860640a6 100644
--- a/redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.spec.tsx
@@ -1,27 +1,27 @@
import React from 'react'
import { render } from '@testing-library/react'
-import LoadingContent from './LoadingContent'
+import { RiLoadingContent } from 'uiSrc/components'
-describe('LoadingContent', () => {
+describe('RiLoadingContent', () => {
it('should render the component', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveClass('RI-loading-content')
})
it('should render the default number of lines (3)', () => {
- const { container } = render( )
+ const { container } = render( )
const lines = container.querySelectorAll('.RI-loading-content > span')
expect(lines.length).toBe(3)
})
it('should render the correct number of lines when "lines" prop is passed', () => {
- const { container } = render( )
+ const { container } = render( )
const lines = container.querySelectorAll('.RI-loading-content > span')
expect(lines.length).toBe(5)
})
it('should apply the custom className if provided', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveClass('custom-class')
})
})
diff --git a/redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.tsx b/redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.tsx
similarity index 91%
rename from redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.tsx
rename to redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.tsx
index c3572708db..21d42654e3 100644
--- a/redisinsight/ui/src/components/base/layout/loading-content/LoadingContent.tsx
+++ b/redisinsight/ui/src/components/base/layout/loading-content/RiLoadingContent.tsx
@@ -8,7 +8,7 @@ import {
SingleLineBackground,
} from './loading-content.styles'
-const LoadingContent = ({
+export const RiLoadingContent = ({
className,
lines = 3,
...rest
@@ -30,5 +30,3 @@ const LoadingContent = ({
)
}
-
-export default LoadingContent
diff --git a/redisinsight/ui/src/components/base/layout/menu/index.ts b/redisinsight/ui/src/components/base/layout/menu/index.ts
index d055c6eece..1a9d18c762 100644
--- a/redisinsight/ui/src/components/base/layout/menu/index.ts
+++ b/redisinsight/ui/src/components/base/layout/menu/index.ts
@@ -1,8 +1,14 @@
import { Menu } from '@redis-ui/components'
-const MenuContent = Menu.Content
-const MenuTrigger = Menu.Trigger
-const MenuItem = Menu.Content.Item
-const MenuDropdownArrow = Menu.Content.DropdownArrow
+const RiMenuContent = Menu.Content
+const RiMenuTrigger = Menu.Trigger
+const RiMenuItem = Menu.Content.Item
+const RiMenuDropdownArrow = Menu.Content.DropdownArrow
-export { Menu, MenuContent, MenuItem, MenuTrigger, MenuDropdownArrow }
+export {
+ Menu as RiMenu,
+ RiMenuContent,
+ RiMenuItem,
+ RiMenuTrigger,
+ RiMenuDropdownArrow,
+}
diff --git a/redisinsight/ui/src/components/base/layout/page/Page.tsx b/redisinsight/ui/src/components/base/layout/page/RiPage.tsx
similarity index 84%
rename from redisinsight/ui/src/components/base/layout/page/Page.tsx
rename to redisinsight/ui/src/components/base/layout/page/RiPage.tsx
index 25803964d8..1e701aced7 100644
--- a/redisinsight/ui/src/components/base/layout/page/Page.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/RiPage.tsx
@@ -5,9 +5,9 @@ import {
PageProps,
restrictWidthSize,
StyledPage,
-} from 'uiSrc/components/base/layout/page/page.styles'
+} from './page.styles'
-const Page = ({
+export const RiPage = ({
className,
restrictWidth = false,
paddingSize = 'm',
@@ -26,5 +26,3 @@ const Page = ({
style={restrictWidthSize(style, restrictWidth)}
/>
)
-
-export default Page
diff --git a/redisinsight/ui/src/components/base/layout/page/PageBody.tsx b/redisinsight/ui/src/components/base/layout/page/RiPageBody.tsx
similarity index 65%
rename from redisinsight/ui/src/components/base/layout/page/PageBody.tsx
rename to redisinsight/ui/src/components/base/layout/page/RiPageBody.tsx
index 2a56e65baa..d3f79d3968 100644
--- a/redisinsight/ui/src/components/base/layout/page/PageBody.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/RiPageBody.tsx
@@ -1,16 +1,13 @@
import React from 'react'
import cx from 'classnames'
-import {
- PageClassNames,
- restrictWidthSize,
-} from 'uiSrc/components/base/layout/page/page.styles'
+import { PageClassNames, restrictWidthSize } from './page.styles'
import {
ComponentTypes,
PageBodyProps,
StyledPageBody,
-} from 'uiSrc/components/base/layout/page/page-body.styles'
+} from './page-body.styles'
-const PageBody = ({
+export const RiPageBody = ({
component = 'div' as T,
className,
restrictWidth,
@@ -27,5 +24,3 @@ const PageBody = ({
className={cx(PageClassNames.body, className)}
/>
)
-
-export default PageBody
diff --git a/redisinsight/ui/src/components/base/layout/page/PageContentBody.tsx b/redisinsight/ui/src/components/base/layout/page/RiPageContentBody.tsx
similarity index 82%
rename from redisinsight/ui/src/components/base/layout/page/PageContentBody.tsx
rename to redisinsight/ui/src/components/base/layout/page/RiPageContentBody.tsx
index e29080aca8..3272f09bd8 100644
--- a/redisinsight/ui/src/components/base/layout/page/PageContentBody.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/RiPageContentBody.tsx
@@ -5,9 +5,9 @@ import {
PageContentBodyProps,
restrictWidthSize,
StyledPageContentBody,
-} from 'uiSrc/components/base/layout/page/page.styles'
+} from './page.styles'
-const PageContentBody = ({
+export const RiPageContentBody = ({
restrictWidth = false,
paddingSize = 'none',
style,
@@ -26,5 +26,3 @@ const PageContentBody = ({
/>
)
}
-
-export default PageContentBody
diff --git a/redisinsight/ui/src/components/base/layout/page/PageHeader.tsx b/redisinsight/ui/src/components/base/layout/page/RiPageHeader.tsx
similarity index 82%
rename from redisinsight/ui/src/components/base/layout/page/PageHeader.tsx
rename to redisinsight/ui/src/components/base/layout/page/RiPageHeader.tsx
index 509d8b1227..8242512f4c 100644
--- a/redisinsight/ui/src/components/base/layout/page/PageHeader.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/RiPageHeader.tsx
@@ -1,13 +1,13 @@
import React from 'react'
import cx from 'classnames'
-import { restrictWidthSize } from 'uiSrc/components/base/layout/page/page.styles'
+import { restrictWidthSize } from './page.styles'
import {
PageHeaderClassName,
PageHeaderProps,
StyledPageHeader,
} from './page-heading.styles'
-const PageHeader = ({
+export const RiPageHeader = ({
className,
style,
restrictWidth,
@@ -30,5 +30,3 @@ const PageHeader = ({
$bottomBorder={bottomBorder}
/>
)
-
-export default PageHeader
diff --git a/redisinsight/ui/src/components/base/layout/page/index.ts b/redisinsight/ui/src/components/base/layout/page/index.ts
index d9ae84716c..e58c5a6a16 100644
--- a/redisinsight/ui/src/components/base/layout/page/index.ts
+++ b/redisinsight/ui/src/components/base/layout/page/index.ts
@@ -1,6 +1,6 @@
-import Page from './Page'
-import PageBody from './PageBody'
-import PageHeader from './PageHeader'
-import PageContentBody from './PageContentBody'
+import { RiPage } from './RiPage'
+import { RiPageBody } from './RiPageBody'
+import { RiPageHeader } from './RiPageHeader'
+import { RiPageContentBody } from './RiPageContentBody'
-export { Page, PageBody, PageHeader, PageContentBody }
+export { RiPage, RiPageBody, RiPageHeader, RiPageContentBody }
diff --git a/redisinsight/ui/src/components/base/layout/page/page-body.spec.tsx b/redisinsight/ui/src/components/base/layout/page/page-body.spec.tsx
index 24319f61bf..cd6979ec38 100644
--- a/redisinsight/ui/src/components/base/layout/page/page-body.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/page-body.spec.tsx
@@ -2,11 +2,11 @@ import React from 'react'
import { render } from 'uiSrc/utils/test-utils'
import { PADDING_SIZES } from './page.styles'
-import PageBody from './PageBody'
+import { RiPageBody } from './RiPageBody'
describe('PageBody', () => {
test('is rendered', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toBeTruthy()
})
@@ -20,7 +20,7 @@ describe('PageBody', () => {
}
PADDING_SIZES.forEach((size) => {
it(`padding '${size}' is rendered`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle(`padding: ${sizes[size]}`)
})
})
@@ -28,20 +28,20 @@ describe('PageBody', () => {
describe('restrict width', () => {
test('can be set to a default', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('max-width: 1200px')
})
test('can be set to a custom number', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('max-width: 1024px')
})
test('can be set to a custom value and measurement', () => {
const { container } = render(
-
export type PageBodyProps =
diff --git a/redisinsight/ui/src/components/base/layout/page/page-heading.styles.ts b/redisinsight/ui/src/components/base/layout/page/page-heading.styles.ts
index c6d043149b..e9eabff686 100644
--- a/redisinsight/ui/src/components/base/layout/page/page-heading.styles.ts
+++ b/redisinsight/ui/src/components/base/layout/page/page-heading.styles.ts
@@ -1,6 +1,6 @@
import { HTMLAttributes } from 'react'
import styled, { css } from 'styled-components'
-import { PaddingSize } from 'uiSrc/components/base/layout/page/page.styles'
+import { PaddingSize } from './page.styles'
export const PageHeaderClassName = 'RI-page-header'
export const ALIGN_ITEMS = ['top', 'bottom', 'center', 'stretch'] as const
diff --git a/redisinsight/ui/src/components/base/layout/page/page.spec.tsx b/redisinsight/ui/src/components/base/layout/page/page.spec.tsx
index 48e92af27d..aeed626779 100644
--- a/redisinsight/ui/src/components/base/layout/page/page.spec.tsx
+++ b/redisinsight/ui/src/components/base/layout/page/page.spec.tsx
@@ -1,11 +1,11 @@
import React from 'react'
-import { PADDING_SIZES } from 'uiSrc/components/base/layout/page/page.styles'
-import Page from 'uiSrc/components/base/layout/page/Page'
import { render } from 'uiSrc/utils/test-utils'
+import { PADDING_SIZES } from './page.styles'
+import { RiPage } from './RiPage'
describe('RIPage', () => {
it('is rendered', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toBeTruthy()
})
@@ -19,7 +19,7 @@ describe('RIPage', () => {
}
PADDING_SIZES.forEach((size) => {
it(`padding '${size}' is rendered`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle(`padding: ${sizes[size]}`)
})
})
@@ -27,12 +27,12 @@ describe('RIPage', () => {
describe('grow', () => {
it(`grow 'true' gives flex-grow: 1`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('flex-grow: 1')
})
it(`grow 'false' does not render flex-grow`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).not.toHaveStyle('flex-grow: 1')
})
@@ -41,13 +41,13 @@ describe('RIPage', () => {
describe('direction', () => {
it(`can be row`, () => {
const { container } = render(
- ,
+ ,
)
expect(container.firstChild).toHaveStyle('flex-direction: column')
})
it(`can be column`, () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('flex-direction: column')
})
@@ -55,20 +55,20 @@ describe('RIPage', () => {
describe('restrict width', () => {
it('can be set to a default', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('max-width: 1200px')
})
it('can be set to a custom number', () => {
- const { container } = render( )
+ const { container } = render( )
expect(container.firstChild).toHaveStyle('max-width: 1024px')
})
it('can be set to a custom value and does not override custom style', () => {
const { container } = render(
- ((props, ref) => )
-
-export default ResizableContainer
diff --git a/redisinsight/ui/src/components/base/layout/resize/handle/ResizablePanelHandle.tsx b/redisinsight/ui/src/components/base/layout/resize/handle/RiResizablePanelHandle.tsx
similarity index 87%
rename from redisinsight/ui/src/components/base/layout/resize/handle/ResizablePanelHandle.tsx
rename to redisinsight/ui/src/components/base/layout/resize/handle/RiResizablePanelHandle.tsx
index 54c50f886e..88f3e7f820 100644
--- a/redisinsight/ui/src/components/base/layout/resize/handle/ResizablePanelHandle.tsx
+++ b/redisinsight/ui/src/components/base/layout/resize/handle/RiResizablePanelHandle.tsx
@@ -6,7 +6,7 @@ import {
StyledPanelResizeHandle,
} from './resizable-panel-handle.styles'
-const ResizablePanelHandle = ({
+export const RiResizablePanelHandle = ({
className,
direction = 'vertical',
...rest
@@ -22,5 +22,3 @@ const ResizablePanelHandle = ({
)
-
-export default ResizablePanelHandle
diff --git a/redisinsight/ui/src/components/base/layout/resize/index.ts b/redisinsight/ui/src/components/base/layout/resize/index.ts
index aca654afe9..4eba06bf4b 100644
--- a/redisinsight/ui/src/components/base/layout/resize/index.ts
+++ b/redisinsight/ui/src/components/base/layout/resize/index.ts
@@ -1 +1,4 @@
-export { ImperativePanelGroupHandle } from 'react-resizable-panels'
+export type { ImperativePanelGroupHandle } from 'react-resizable-panels'
+export { RiResizablePanel } from './panel/RiResizablePanel'
+export { RiResizablePanelHandle } from './handle/RiResizablePanelHandle'
+export { RiResizableContainer } from './container/RiResizableContainer'
diff --git a/redisinsight/ui/src/components/base/layout/resize/panel/ResizablePanel.tsx b/redisinsight/ui/src/components/base/layout/resize/panel/ResizablePanel.tsx
deleted file mode 100644
index 63e61f6413..0000000000
--- a/redisinsight/ui/src/components/base/layout/resize/panel/ResizablePanel.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import React from 'react'
-
-import { Panel, PanelProps } from 'react-resizable-panels'
-
-const ResizablePanel = (props: PanelProps) =>
-
-export default ResizablePanel
diff --git a/redisinsight/ui/src/components/base/layout/resize/panel/RiResizablePanel.tsx b/redisinsight/ui/src/components/base/layout/resize/panel/RiResizablePanel.tsx
new file mode 100644
index 0000000000..d8fdce79f2
--- /dev/null
+++ b/redisinsight/ui/src/components/base/layout/resize/panel/RiResizablePanel.tsx
@@ -0,0 +1,5 @@
+import React from 'react'
+
+import { Panel, PanelProps } from 'react-resizable-panels'
+
+export const RiResizablePanel = (props: PanelProps) =>
diff --git a/redisinsight/ui/src/components/base/layout/sidebar/index.ts b/redisinsight/ui/src/components/base/layout/sidebar/index.ts
index c6e6c31792..d2e75fa8df 100644
--- a/redisinsight/ui/src/components/base/layout/sidebar/index.ts
+++ b/redisinsight/ui/src/components/base/layout/sidebar/index.ts
@@ -1,18 +1,18 @@
import { SideBar } from '@redis-ui/components'
import { SideBarItemIcon } from './SideBarItemIcon'
-const SideBarHeader = SideBar.Header
-const SideBarContainer = SideBar.ItemsContainer
-const SideBarItem = SideBar.Item
-const SideBarDivider = SideBar.Divider
-const SideBarFooter = SideBar.Footer
+const RiSideBarHeader = SideBar.Header
+const RiSideBarContainer = SideBar.ItemsContainer
+const RiSideBarItem = SideBar.Item
+const RiSideBarDivider = SideBar.Divider
+const RiSideBarFooter = SideBar.Footer
export {
- SideBar,
- SideBarHeader,
- SideBarContainer,
- SideBarItem,
+ SideBar as RiSideBar,
+ RiSideBarHeader,
+ RiSideBarContainer,
+ RiSideBarItem,
SideBarItemIcon,
- SideBarDivider,
- SideBarFooter,
+ RiSideBarDivider,
+ RiSideBarFooter,
}
diff --git a/redisinsight/ui/src/components/base/layout/spacer/spacer.tsx b/redisinsight/ui/src/components/base/layout/spacer/RiSpacer.tsx
similarity index 70%
rename from redisinsight/ui/src/components/base/layout/spacer/spacer.tsx
rename to redisinsight/ui/src/components/base/layout/spacer/RiSpacer.tsx
index 0f820b3039..236962ef2a 100644
--- a/redisinsight/ui/src/components/base/layout/spacer/spacer.tsx
+++ b/redisinsight/ui/src/components/base/layout/spacer/RiSpacer.tsx
@@ -1,18 +1,15 @@
import React from 'react'
import cx from 'classnames'
import { useTheme } from '@redis-ui/styles'
-import {
- SpacerProps,
- StyledSpacer,
-} from 'uiSrc/components/base/layout/spacer/spacer.styles'
+import { SpacerProps, StyledSpacer } from './spacer.styles'
/**
* A simple spacer component that can be used to add vertical spacing between
* other components. The size of the spacer can be specified using the `size`
* prop, which can be one of the following values:
* - Legacy sizes: 'xs' = 4px, 's' = 8px, 'm' = 12px, 'l' = 16px, 'xl' = 24px, 'xxl' = 32px
- * - Theme spacing sizes: Any key from theme.semantic.core.space (e.g., 'space000', 'space010',
- * 'space025', 'space050', 'space100', 'space150', 'space200', 'space250', 'space300',
+ * - Theme spacing sizes: Any key from theme.semantic.core.space (e.g., 'space000', 'space010',
+ * 'space025', 'space050', 'space100', 'space150', 'space200', 'space250', 'space300',
* 'space400', 'space500', 'space550', 'space600', 'space800', etc.)
*
* The theme spacing tokens are dynamically extracted from the theme, ensuring consistency
@@ -20,11 +17,15 @@ import {
*
* The default value for `size` is 'l'.
*/
-export const Spacer = ({ className, children, ...rest }: SpacerProps) => {
+export const RiSpacer = ({ className, children, ...rest }: SpacerProps) => {
const theme = useTheme()
return (
-
- {children}
-
-)
-}
\ No newline at end of file
+
+ {children}
+
+ )
+}
diff --git a/redisinsight/ui/src/components/base/layout/spacer/index.ts b/redisinsight/ui/src/components/base/layout/spacer/index.ts
index 16adaabf1e..841f84a7ce 100644
--- a/redisinsight/ui/src/components/base/layout/spacer/index.ts
+++ b/redisinsight/ui/src/components/base/layout/spacer/index.ts
@@ -1,2 +1,2 @@
-export { Spacer } from './spacer'
+export { RiSpacer } from './RiSpacer'
export type { SpacerSize } from './spacer.styles'
diff --git a/redisinsight/ui/src/components/base/layout/spacer/spacer.styles.ts b/redisinsight/ui/src/components/base/layout/spacer/spacer.styles.ts
index a36a1dad61..0d304c6c5c 100644
--- a/redisinsight/ui/src/components/base/layout/spacer/spacer.styles.ts
+++ b/redisinsight/ui/src/components/base/layout/spacer/spacer.styles.ts
@@ -1,15 +1,14 @@
import { HTMLAttributes, ReactNode } from 'react'
import styled from 'styled-components'
-import { CommonProps } from 'uiSrc/components/base/theme/types'
-import { theme } from 'uiSrc/components/base/theme'
+import { CommonProps, Theme } from 'uiBase/theme/types'
export const SpacerSizes = ['xs', 's', 'm', 'l', 'xl', 'xxl'] as const
export type SpacerSize = (typeof SpacerSizes)[number]
// Extract only the spaceXXX keys from the theme
-export type ThemeSpacingKey = Extract
-// Allow direct theme spacing values
-export type ThemeSpacingValue = typeof theme.semantic.core.space[ThemeSpacingKey]
+export type ThemeSpacingKey = keyof Theme['core']['space'] // Allow direct theme spacing keys
+
+export type ThemeSpacingValue = Theme['core']['space'][ThemeSpacingKey]
export type SpacerProps = CommonProps &
HTMLAttributes & {
@@ -18,35 +17,37 @@ export type SpacerProps = CommonProps &
}
export const spacerStyles = {
- xs: 'var(--size-xs)',
- s: 'var(--size-s)',
- m: 'var(--size-m)',
- l: 'var(--size-l)',
- // @see redisinsight/ui/src/styles/base/_base.scss:124
- xl: 'calc(var(--base) * 2.25)',
- xxl: 'var(--size-xxl)',
+ xs: 'var(--size-xs)', // 5px
+ s: 'var(--size-s)', // 10px
+ m: 'var(--size-m)', // 15px
+ l: 'var(--size-l)', // 25px
+ xl: 'var(--size-xl)', // 30px
+ xxl: 'var(--size-xxl)', // 40px
}
const isThemeSpacingKey = (
- size: SpacerSize | ThemeSpacingKey | ThemeSpacingValue
-): size is ThemeSpacingKey => typeof size === 'string' && size in theme.semantic.core.space
+ size: SpacerSize | ThemeSpacingKey | ThemeSpacingValue,
+ theme: Theme,
+): size is ThemeSpacingKey => size in theme.core.space
const getSpacingValue = (
- size: SpacerSize | ThemeSpacingKey | ThemeSpacingValue,
+ size: SpacerSize | ThemeSpacingKey | ThemeSpacingValue,
+ theme: Theme,
): string => {
- const themeSpacingValues = Object.values(theme.semantic.core.space)
- if (typeof size === 'string' && themeSpacingValues.includes(size)) {
+ const themeSpacingValues = Object.values(theme.core.space)
+ if (themeSpacingValues.includes(size)) {
return size
}
-
- if (isThemeSpacingKey(size)) {
- return theme?.semantic?.core?.space?.[size] || '0'
+
+ if (isThemeSpacingKey(size, theme)) {
+ return theme?.core?.space?.[size] || '0'
}
return spacerStyles[size as SpacerSize]
}
+
export const StyledSpacer = styled.div`
flex-shrink: 0;
- height: ${({ size = 'l' }) => getSpacingValue(size)};
+ height: ${({ size = 'l', theme }) => getSpacingValue(size, theme)};
`
diff --git a/redisinsight/ui/src/components/base/layout/table/index.ts b/redisinsight/ui/src/components/base/layout/table/index.ts
index 8bb5e30087..d85b86d0e4 100644
--- a/redisinsight/ui/src/components/base/layout/table/index.ts
+++ b/redisinsight/ui/src/components/base/layout/table/index.ts
@@ -1 +1,2 @@
-export * from '@redis-ui/table'
+export { Table as RiTable } from '@redis-ui/table'
+export type { ColumnDefinition } from '@redis-ui/table'
diff --git a/redisinsight/ui/src/components/base/layout/tabs/index.ts b/redisinsight/ui/src/components/base/layout/tabs/index.ts
index 3ebdff5dbd..346882d932 100644
--- a/redisinsight/ui/src/components/base/layout/tabs/index.ts
+++ b/redisinsight/ui/src/components/base/layout/tabs/index.ts
@@ -1,4 +1,2 @@
-import { Tabs, TabInfo } from '@redis-ui/components'
-
-export default Tabs
-export type { TabInfo }
+export { Tabs as RiTabs } from '@redis-ui/components'
+export type { TabInfo } from '@redis-ui/components'
diff --git a/redisinsight/ui/src/components/base/link/Link.tsx b/redisinsight/ui/src/components/base/link/Link.tsx
deleted file mode 100644
index 7879ca2426..0000000000
--- a/redisinsight/ui/src/components/base/link/Link.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import React from 'react'
-import { LinkProps } from '@redis-ui/components'
-import { StyledLink } from 'uiSrc/components/base/link/link.styles'
-
-export const Link = ({ color, ...props }: LinkProps) => (
-
-)
diff --git a/redisinsight/ui/src/components/base/shared/WindowControlGroup.tsx b/redisinsight/ui/src/components/base/shared/WindowControlGroup.tsx
index a963281b97..e0b2adde19 100644
--- a/redisinsight/ui/src/components/base/shared/WindowControlGroup.tsx
+++ b/redisinsight/ui/src/components/base/shared/WindowControlGroup.tsx
@@ -1,7 +1,7 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon, MinusIcon } from 'uiSrc/components/base/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon, MinusIcon } from 'uiBase/icons'
import { RiTooltip } from 'uiSrc/components'
type Props = {
@@ -20,14 +20,14 @@ export const WindowControlGroup = ({
closeContent = 'Close',
hideContent = 'Minimize',
}: Props) => (
-
-
+
+
-
-
-
+
+
-
-
-
+
+
)
diff --git a/redisinsight/ui/src/components/base/text/ColorText.tsx b/redisinsight/ui/src/components/base/text/RiColorText.tsx
similarity index 71%
rename from redisinsight/ui/src/components/base/text/ColorText.tsx
rename to redisinsight/ui/src/components/base/text/RiColorText.tsx
index 6fb3b49584..f0a97fe17f 100644
--- a/redisinsight/ui/src/components/base/text/ColorText.tsx
+++ b/redisinsight/ui/src/components/base/text/RiColorText.tsx
@@ -1,11 +1,8 @@
import React from 'react'
import cn from 'classnames'
-import {
- ColorTextProps,
- StyledColorText,
-} from 'uiSrc/components/base/text/text.styles'
+import { ColorTextProps, StyledColorText } from './text.styles'
-export const ColorText = ({
+export const RiColorText = ({
color,
component = 'span',
className,
diff --git a/redisinsight/ui/src/components/base/text/HealthText.tsx b/redisinsight/ui/src/components/base/text/RiHealthText.tsx
similarity index 71%
rename from redisinsight/ui/src/components/base/text/HealthText.tsx
rename to redisinsight/ui/src/components/base/text/RiHealthText.tsx
index 60d56454cb..d9f74180c3 100644
--- a/redisinsight/ui/src/components/base/text/HealthText.tsx
+++ b/redisinsight/ui/src/components/base/text/RiHealthText.tsx
@@ -1,21 +1,21 @@
import React from 'react'
import { Typography } from '@redis-ui/components'
import cn from 'classnames'
-import { Row } from 'uiSrc/components/base/layout/flex'
-import { BodyProps, Indicator } from 'uiSrc/components/base/text/text.styles'
+import { RiRow } from 'uiBase/layout'
+import { BodyProps, Indicator } from './text.styles'
type ColorType = BodyProps['color'] | (string & {})
export type HealthProps = Omit & {
color?: ColorType
}
-export const HealthText = ({
+export const RiHealthText = ({
color,
size = 'S',
className,
...rest
}: HealthProps) => (
-
+
-
+
)
diff --git a/redisinsight/ui/src/components/base/text/Text.tsx b/redisinsight/ui/src/components/base/text/RiText.tsx
similarity index 85%
rename from redisinsight/ui/src/components/base/text/Text.tsx
rename to redisinsight/ui/src/components/base/text/RiText.tsx
index e69cd5d316..7f95c1df8b 100644
--- a/redisinsight/ui/src/components/base/text/Text.tsx
+++ b/redisinsight/ui/src/components/base/text/RiText.tsx
@@ -1,9 +1,9 @@
import React from 'react'
import cn from 'classnames'
import { BodySizesType } from '@redis-ui/components/dist/Typography/components/Body/Body.types'
-import { StyledText, TextProps } from 'uiSrc/components/base/text/text.styles'
+import { StyledText, TextProps } from './text.styles'
-export const Text = ({
+export const RiText = ({
className,
color,
size,
diff --git a/redisinsight/ui/src/components/base/text/Title.tsx b/redisinsight/ui/src/components/base/text/RiTitle.tsx
similarity index 71%
rename from redisinsight/ui/src/components/base/text/Title.tsx
rename to redisinsight/ui/src/components/base/text/RiTitle.tsx
index c579ac2725..adbef99f93 100644
--- a/redisinsight/ui/src/components/base/text/Title.tsx
+++ b/redisinsight/ui/src/components/base/text/RiTitle.tsx
@@ -3,4 +3,4 @@ import { Typography } from '@redis-ui/components'
export type TitleProps = React.ComponentProps & {}
export type TitleSize = TitleProps['size']
-export const Title = (props: TitleProps) =>
+export const RiTitle = (props: TitleProps) =>
diff --git a/redisinsight/ui/src/components/base/text/index.ts b/redisinsight/ui/src/components/base/text/index.ts
index 58adaf3725..574f79c596 100644
--- a/redisinsight/ui/src/components/base/text/index.ts
+++ b/redisinsight/ui/src/components/base/text/index.ts
@@ -1,4 +1,5 @@
-export { Text } from './Text'
-export { ColorText } from './ColorText'
-export { HealthText } from './HealthText'
-export { Title } from './Title'
+export { RiText } from './RiText'
+export { RiColorText } from './RiColorText'
+export { RiHealthText } from './RiHealthText'
+export { RiTitle } from './RiTitle'
+export type { TitleProps, TitleSize } from './RiTitle'
diff --git a/redisinsight/ui/src/components/base/text/text.styles.ts b/redisinsight/ui/src/components/base/text/text.styles.ts
index 8afc1c599f..d079884222 100644
--- a/redisinsight/ui/src/components/base/text/text.styles.ts
+++ b/redisinsight/ui/src/components/base/text/text.styles.ts
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react'
import { useTheme } from '@redis-ui/styles'
import { Typography } from '@redis-ui/components'
import styled, { css } from 'styled-components'
-import { CommonProps } from 'uiSrc/components/base/theme/types'
+import { CommonProps } from 'uiBase/theme/types'
export type BodyProps = React.ComponentProps
@@ -104,8 +104,8 @@ export const Indicator = styled.div<
$color: ColorType
} & CommonProps
>`
- width: 0.8rem;
- height: 0.8rem;
+ width: var(--size-s);
+ height: var(--size-s);
border-radius: 50%;
background-color: ${({ $color }) => $color || 'inherit'};
`
diff --git a/redisinsight/ui/src/components/base/theme/index.ts b/redisinsight/ui/src/components/base/theme/index.ts
index 952ab1e072..e2d2424f9d 100644
--- a/redisinsight/ui/src/components/base/theme/index.ts
+++ b/redisinsight/ui/src/components/base/theme/index.ts
@@ -1,37 +1,75 @@
-// import { theme } from '@redis-ui/styles'
-// todo: after integration with redis-ui, override the theme here
+import { createGlobalStyle } from 'styled-components'
+import { Theme } from 'uiBase/theme/types'
-export const theme = {
- light: 'light',
- dark: 'dark',
- semantic: {
- core: {
- space: {
- base: 'var(--base)', // 16px
- xxs: 'var(--size-xxs)',
- xs: 'var(--size-xs)',
- s: 'var(--size-s)',
- m: 'var(--size-m)',
- l: 'var(--size-l)',
- xl: 'var(--size-xl)',
- xxl: 'var(--size-xxl)',
- xxxl: 'var(--size-xxxl)',
- xxxxl: 'var(--size-xxxxl)',
- space000: '0',
- space010: '0.1rem',
- space025: '0.2rem',
- space050: '0.4rem',
- space100: '0.8rem',
- space150: '1.2rem',
- space200: '1.6rem',
- space250: '2rem',
- space300: '2.4rem',
- space400: '3.2rem',
- space500: '4rem',
- space550: '4.4rem',
- space600: '4.8rem',
- space800: '6.4rem',
- },
- },
- },
-}
+export const GlobalStyle = createGlobalStyle<{ theme: Theme }>`
+ :root {
+ // spacing
+ //2.5px/0.2rem
+ --size-xxs: ${({ theme }) => theme.core.space.space025};
+ //5px/0.4rem
+ --size-xs: ${({ theme }) => theme.core.space.space050};
+ //10px/0.8rem
+ --size-s: ${({ theme }) => theme.core.space.space100};
+ //15px/1.2rem
+ --size-m: ${({ theme }) => theme.core.space.space150};
+ //25px/2rem
+ --size-l: ${({ theme }) => theme.core.space.space250};
+ //30px/2.4rem
+ --size-xl: ${({ theme }) => theme.core.space.space300};
+ //40px/3.2rem
+ --size-xxl: ${({ theme }) => theme.core.space.space400};
+ //50px/4rem
+ --size-xxxl: ${({ theme }) => theme.core.space.space500};
+ //60px/4.8rem
+ --size-xxxxl: ${({ theme }) => theme.core.space.space600};
+ //15px
+ --size-base: var(--size-m);
+
+ --border-radius-small: var(--size-xs);
+ --border-radius-medium: var(--size-s);
+
+ --gap-s: var(--size-s);
+ --gap-m: var(--size-m);
+ // breakpoints
+ // to 574px
+ --bp-xs: 0;
+ // to 767px
+ --bp-s: 575px;
+ // to 991px
+ --bp-m: 768px;
+ // to 1199px
+ --bp-l: 992px;
+ // above 1200px
+ --bp-xl: 1200px;
+
+ // colors
+ --color-text-default: ${({ theme }) => theme.components.typography.colors.primary};
+ --color-text-primary: ${({ theme }) => theme.components.typography.colors.primary};
+ --color-text-secondary: ${({ theme }) => theme.components.typography.colors.secondary};
+ --color-text-subdued: ${({ theme }) => theme.semantic.color.text.informative400};
+ --color-text-informative: ${({ theme }) => theme.semantic.color.text.informative400};
+ --color-text-danger: ${({ theme }) => theme.semantic.color.text.danger600};
+ --color-text-ghost: ${({ theme }) => theme.semantic.color.text.neutral600};
+ --color-text-accent: ${({ theme }) => theme.semantic.color.text.notice600};
+ --color-text-warning: ${({ theme }) => theme.semantic.color.text.attention600};
+ --color-text-success: ${({ theme }) => theme.semantic.color.text.success600};
+
+ --color-link-primary: ${({ theme }) => theme.semantic.color.text.primary500};
+ --color-link-default: ${({ theme }) => theme.semantic.color.text.primary500};
+ --color-link-text: ${({ theme }) => theme.semantic.color.text.neutral700};
+
+ --color-bg-default: ${({ theme }) => theme.semantic.color.background.neutral100};
+ --color-bg-primary: ${({ theme }) => theme.semantic.color.background.neutral100};
+ --color-bg-secondary: ${({ theme }) => theme.semantic.color.background.primary100};
+ --color-bg-subdued: ${({ theme }) => theme.semantic.color.background.informative400};
+ --color-bg-informative: ${({ theme }) => theme.semantic.color.background.informative400};
+ --color-bg-danger: ${({ theme }) => theme.semantic.color.background.danger600};
+ --color-bg-ghost: ${({ theme }) => theme.semantic.color.background.neutral600};
+ --color-bg-accent: ${({ theme }) => theme.semantic.color.background.notice600};
+ --color-bg-warning: ${({ theme }) => theme.semantic.color.background.attention600};
+ --color-bg-success: ${({ theme }) => theme.semantic.color.background.success600};
+
+ --hrBackgroundColor: ${({ theme }) => theme.semantic.color.background.primary300};
+
+ }
+`
diff --git a/redisinsight/ui/src/components/base/theme/types.ts b/redisinsight/ui/src/components/base/theme/types.ts
index cd84089e3f..1e1089aa88 100644
--- a/redisinsight/ui/src/components/base/theme/types.ts
+++ b/redisinsight/ui/src/components/base/theme/types.ts
@@ -7,3 +7,11 @@ export type CommonProps = {
}
export type Theme = ReturnType
+
+const ASC = 'asc'
+const DESC = 'desc'
+export type Direction = typeof ASC | typeof DESC
+export interface PropertySort {
+ field: string
+ direction: Direction
+}
diff --git a/redisinsight/ui/src/components/base/tooltip/HoverContent.tsx b/redisinsight/ui/src/components/base/tooltip/HoverContent.tsx
index a722cd5833..4a61c5c20e 100644
--- a/redisinsight/ui/src/components/base/tooltip/HoverContent.tsx
+++ b/redisinsight/ui/src/components/base/tooltip/HoverContent.tsx
@@ -1,7 +1,7 @@
import React from 'react'
-import { Col } from 'uiSrc/components/base/layout/flex'
-import { Title } from 'uiSrc/components/base/text'
+import { RiCol } from 'uiBase/layout'
+import { RiTitle } from 'uiBase/text'
interface RiTooltipContentProps {
title?: React.ReactNode
@@ -9,8 +9,8 @@ interface RiTooltipContentProps {
}
export const HoverContent = ({ title, content }: RiTooltipContentProps) => (
-
- {title && {title} }
+
+ {title && {title} }
{content}
-
+
)
diff --git a/redisinsight/ui/src/components/base/utils/FocusTrap.tsx b/redisinsight/ui/src/components/base/utils/RiFocusTrap.tsx
similarity index 99%
rename from redisinsight/ui/src/components/base/utils/FocusTrap.tsx
rename to redisinsight/ui/src/components/base/utils/RiFocusTrap.tsx
index d9ccd4bd99..1ad35b38b0 100644
--- a/redisinsight/ui/src/components/base/utils/FocusTrap.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiFocusTrap.tsx
@@ -110,7 +110,7 @@ const defaultProps = {
gapMode: 'padding',
} as const
-export const FocusTrap = ({
+export const RiFocusTrap = ({
children,
clickOutsideDisables = defaultProps.clickOutsideDisables,
closeOnMouseup,
diff --git a/redisinsight/ui/src/components/base/utils/OutsideClickDetector.tsx b/redisinsight/ui/src/components/base/utils/RiOutsideClickDetector.tsx
similarity index 97%
rename from redisinsight/ui/src/components/base/utils/OutsideClickDetector.tsx
rename to redisinsight/ui/src/components/base/utils/RiOutsideClickDetector.tsx
index 56c23d6946..e6bdab2879 100644
--- a/redisinsight/ui/src/components/base/utils/OutsideClickDetector.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiOutsideClickDetector.tsx
@@ -8,7 +8,7 @@ import {
useEffect,
useRef,
} from 'react'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
+import { useGenerateId } from 'uiBase/utils'
export interface RIEvent extends Event {
riGeneratedBy: string[]
@@ -37,7 +37,7 @@ export interface OutsideClickDetectorProps {
// We need the actual event targets to make the correct decisions
// about user intention. So, consider the down/start and up/end
// items below as the deconstruction of a click event.
-export const OutsideClickDetector = ({
+export const RiOutsideClickDetector = ({
children,
onOutsideClick,
isDisabled,
diff --git a/redisinsight/ui/src/components/base/utils/ShowHide.spec.tsx b/redisinsight/ui/src/components/base/utils/RiShowHide.spec.tsx
similarity index 77%
rename from redisinsight/ui/src/components/base/utils/ShowHide.spec.tsx
rename to redisinsight/ui/src/components/base/utils/RiShowHide.spec.tsx
index a15367516a..ad2938b4f4 100644
--- a/redisinsight/ui/src/components/base/utils/ShowHide.spec.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiShowHide.spec.tsx
@@ -1,13 +1,9 @@
import React from 'react'
import { render, screen } from 'uiSrc/utils/test-utils'
-import {
- Breakpoints,
- HideFor,
- ShowFor,
-} from 'uiSrc/components/base/utils/ShowHide'
+import { Breakpoints, RiHideFor, RiShowFor } from './RiShowHide'
-describe('ShowHide', () => {
+describe('RiShowHide', () => {
beforeAll(() => {
// @ts-ignore innerWidth might be read only, but we can still override it for the sake of testing
window.innerWidth = 670
@@ -17,18 +13,18 @@ describe('ShowHide', () => {
it('should render', () => {
expect(
render(
-
+
Child
- ,
+ ,
),
).toBeTruthy()
})
it('hides for matching breakpoints', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).not.toBeInTheDocument()
@@ -37,9 +33,9 @@ describe('ShowHide', () => {
Breakpoints.forEach((size) => {
it(`${size} is rendered`, () => {
render(
-
+
Child
- ,
+ ,
)
const child = screen.queryByText('Child')
@@ -53,9 +49,9 @@ describe('ShowHide', () => {
it('renders for multiple breakpoints', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.getByText('Child')).toBeInTheDocument()
@@ -63,9 +59,9 @@ describe('ShowHide', () => {
it('renders for "none"', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).toBeInTheDocument()
@@ -73,9 +69,9 @@ describe('ShowHide', () => {
test('never renders for "all"', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).not.toBeInTheDocument()
@@ -86,18 +82,18 @@ describe('ShowHide', () => {
it('should render', () => {
expect(
render(
-
+
Child
- ,
+ ,
),
).toBeTruthy()
})
it('shows for matching breakpoints', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).toBeInTheDocument()
@@ -106,9 +102,9 @@ describe('ShowHide', () => {
Breakpoints.forEach((size) => {
it(`${size} is rendered`, () => {
render(
-
+
Child
- ,
+ ,
)
const child = screen.queryByText('Child')
@@ -122,9 +118,9 @@ describe('ShowHide', () => {
it('renders for multiple breakpoints', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.getByText('Child')).toBeInTheDocument()
@@ -132,9 +128,9 @@ describe('ShowHide', () => {
it('never renders for "none"', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).not.toBeInTheDocument()
@@ -142,9 +138,9 @@ describe('ShowHide', () => {
test('renders for "all"', () => {
render(
-
+
Child
- ,
+ ,
)
expect(screen.queryByText('Child')).toBeInTheDocument()
diff --git a/redisinsight/ui/src/components/base/utils/ShowHide.tsx b/redisinsight/ui/src/components/base/utils/RiShowHide.tsx
similarity index 94%
rename from redisinsight/ui/src/components/base/utils/ShowHide.tsx
rename to redisinsight/ui/src/components/base/utils/RiShowHide.tsx
index 038c347b5d..0fcc47a326 100644
--- a/redisinsight/ui/src/components/base/utils/ShowHide.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiShowHide.tsx
@@ -29,7 +29,7 @@ export interface ShowHideForProps {
sizes: BreakpointKey[] | 'all' | 'none'
}
-export const HideFor = ({ children, sizes }: ShowHideForProps) => {
+export const RiHideFor = ({ children, sizes }: ShowHideForProps) => {
const currentBreakpoint = useCurrentBreakpoint()
const isWithinBreakpointSizes =
currentBreakpoint && sizes.includes(currentBreakpoint)
@@ -40,7 +40,7 @@ export const HideFor = ({ children, sizes }: ShowHideForProps) => {
return <>{children}>
}
-export const ShowFor = ({ children, sizes }: ShowHideForProps) => {
+export const RiShowFor = ({ children, sizes }: ShowHideForProps) => {
const currentBreakpoint = useCurrentBreakpoint()
const isWithinBreakpointSizes =
currentBreakpoint && sizes.includes(currentBreakpoint)
diff --git a/redisinsight/ui/src/components/base/utils/WindowEvent.spec.tsx b/redisinsight/ui/src/components/base/utils/RiWindowEvent.spec.tsx
similarity index 78%
rename from redisinsight/ui/src/components/base/utils/WindowEvent.spec.tsx
rename to redisinsight/ui/src/components/base/utils/RiWindowEvent.spec.tsx
index 5edfc733c1..ca088bca4a 100644
--- a/redisinsight/ui/src/components/base/utils/WindowEvent.spec.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiWindowEvent.spec.tsx
@@ -1,8 +1,8 @@
import React from 'react'
import { render, fireEvent } from 'uiSrc/utils/test-utils'
-import { WindowEvent } from './WindowEvent'
+import { RiWindowEvent } from './RiWindowEvent'
-describe('WindowEvent', () => {
+describe('RiWindowEvent', () => {
let windowAddCount = 0
let windowRemoveCount = 0
let windowAddEventListener: typeof window.addEventListener
@@ -36,14 +36,16 @@ describe('WindowEvent', () => {
it('should attach handler to window event on mount', () => {
const handler = () => null
- render( )
+ render( )
expect(window.addEventListener).toHaveBeenCalledWith('click', handler)
expect(windowAddCount).toEqual(1)
})
it('should remove handler on unmount', () => {
const handler = () => null
- const { unmount } = render( )
+ const { unmount } = render(
+ ,
+ )
unmount()
expect(window.removeEventListener).toHaveBeenCalledWith('click', handler)
expect(windowRemoveCount).toEqual(1)
@@ -53,12 +55,12 @@ describe('WindowEvent', () => {
const handler1 = () => null
const handler2 = () => null
const { rerender } = render(
- ,
+ ,
)
expect(window.addEventListener).toHaveBeenCalledWith('click', handler1)
- rerender( )
+ rerender( )
expect(window.removeEventListener).toHaveBeenCalledWith('click', handler1)
expect(window.addEventListener).toHaveBeenCalledWith('keydown', handler2)
@@ -66,11 +68,17 @@ describe('WindowEvent', () => {
it('should not remove or re-attach handler if update is irrelevant', () => {
const handler = () => null
- const { rerender } = render( )
+ const { rerender } = render(
+ ,
+ )
expect(windowAddCount).toEqual(1)
rerender(
- ,
+ ,
)
expect(windowAddCount).toEqual(1)
expect(windowRemoveCount).toEqual(0)
@@ -80,7 +88,7 @@ describe('WindowEvent', () => {
window.addEventListener = windowAddEventListener
window.removeEventListener = windowRemoveEventListener
const handler = jest.fn()
- render( )
+ render( )
fireEvent.click(window)
expect(handler).toHaveBeenCalled()
expect(handler).toHaveBeenCalledTimes(1)
diff --git a/redisinsight/ui/src/components/base/utils/WindowEvent.tsx b/redisinsight/ui/src/components/base/utils/RiWindowEvent.tsx
similarity index 94%
rename from redisinsight/ui/src/components/base/utils/WindowEvent.tsx
rename to redisinsight/ui/src/components/base/utils/RiWindowEvent.tsx
index 7c9ce84ae4..35c93882a1 100644
--- a/redisinsight/ui/src/components/base/utils/WindowEvent.tsx
+++ b/redisinsight/ui/src/components/base/utils/RiWindowEvent.tsx
@@ -39,7 +39,7 @@ export function useWindowEvent(
*
* ```
*/
-export function WindowEvent({
+export function RiWindowEvent({
event,
handler,
}: WindowEventProps) {
diff --git a/redisinsight/ui/src/components/base/utils/index.ts b/redisinsight/ui/src/components/base/utils/index.ts
index 1fe378c81b..198f905cca 100644
--- a/redisinsight/ui/src/components/base/utils/index.ts
+++ b/redisinsight/ui/src/components/base/utils/index.ts
@@ -1,2 +1,7 @@
-export { OutsideClickDetector } from './OutsideClickDetector'
+export { RiOutsideClickDetector } from './RiOutsideClickDetector'
+export { RiFocusTrap } from './RiFocusTrap'
export { RIResizeObserver } from './resize-observer/ResizeObserver'
+export { useGenerateId } from './hooks/generate-id'
+export { useInnerText } from './hooks/inner-text'
+export * from './RiShowHide'
+export * from './RiWindowEvent'
diff --git a/redisinsight/ui/src/components/base/utils/outsideClickDetector.spec.tsx b/redisinsight/ui/src/components/base/utils/outsideClickDetector.spec.tsx
index 0e8afe65e5..727bd4edca 100644
--- a/redisinsight/ui/src/components/base/utils/outsideClickDetector.spec.tsx
+++ b/redisinsight/ui/src/components/base/utils/outsideClickDetector.spec.tsx
@@ -1,13 +1,13 @@
import React from 'react'
import { fireEvent, render } from 'uiSrc/utils/test-utils'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils/OutsideClickDetector'
+import { RiOutsideClickDetector } from './RiOutsideClickDetector'
-describe('OutsideClickDetector', () => {
+describe('RiOutsideClickDetector', () => {
it('is rendered', () => {
const { container } = render(
- {}}>
+ {}}>
- ,
+ ,
)
expect(container.firstChild).toBeTruthy()
})
@@ -21,18 +21,18 @@ describe('OutsideClickDetector', () => {
const { findByTestId } = render(
,
)
const target2 = await findByTestId('target2')
diff --git a/redisinsight/ui/src/components/bottom-group-components/components/bottom-group-minimized/BottomGroupMinimized.tsx b/redisinsight/ui/src/components/bottom-group-components/components/bottom-group-minimized/BottomGroupMinimized.tsx
index 6cd567692b..63350892e2 100644
--- a/redisinsight/ui/src/components/bottom-group-components/components/bottom-group-minimized/BottomGroupMinimized.tsx
+++ b/redisinsight/ui/src/components/bottom-group-components/components/bottom-group-minimized/BottomGroupMinimized.tsx
@@ -2,6 +2,10 @@ import React, { useEffect } from 'react'
import cx from 'classnames'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiHideFor, RiShowFor } from 'uiBase/utils'
+import { RiBadge } from 'uiBase/display'
+import { CliIcon, DocumentationIcon, ProfilerIcon, RiIcon } from 'uiBase/icons'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import {
@@ -21,15 +25,6 @@ import {
import FeatureFlagComponent from 'uiSrc/components/feature-flag-component'
import { FeatureFlags } from 'uiSrc/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { HideFor, ShowFor } from 'uiSrc/components/base/utils/ShowHide'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
-import {
- CliIcon,
- DocumentationIcon,
- ProfilerIcon,
-} from 'uiSrc/components/base/icons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from '../../styles.module.scss'
const BottomGroupMinimized = () => {
@@ -91,8 +86,8 @@ const BottomGroupMinimized = () => {
return (
diff --git a/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.spec.tsx b/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.spec.tsx
index 192e5d328e..eeca65f885 100644
--- a/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.spec.tsx
+++ b/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.spec.tsx
@@ -1,7 +1,7 @@
import { cloneDeep, last } from 'lodash'
import React from 'react'
-import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
import { instance, mock } from 'ts-mockito'
+import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
import {
cleanup,
fireEvent,
diff --git a/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.tsx b/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.tsx
index 8931594be4..a31849c5be 100644
--- a/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.tsx
+++ b/redisinsight/ui/src/components/cli/components/cli-body/CliBody/CliBody.tsx
@@ -1,6 +1,7 @@
import React, { Ref, useEffect, useRef, useState } from 'react'
-import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
import { Nullable, scrollIntoView } from 'uiSrc/utils'
import { isModifiedEvent } from 'uiSrc/services'
@@ -11,7 +12,6 @@ import CliInputWrapper from 'uiSrc/components/cli/components/cli-input'
import { clearOutput, updateCliHistoryStorage } from 'uiSrc/utils/cliHelper'
import { appRedisCommandsSelector } from 'uiSrc/slices/app/redis-commands'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import styles from './styles.module.scss'
export interface Props {
@@ -248,8 +248,8 @@ const CliBody = (props: Props) => {
role="textbox"
tabIndex={0}
>
-
-
+
+
{data}
{!error && !(loading || settingsLoading) ? (
{
!error && Executing command...
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/cli/components/cli-header/CliHeader.tsx b/redisinsight/ui/src/components/cli/components/cli-header/CliHeader.tsx
index 1042d96cc3..41af0aac7d 100644
--- a/redisinsight/ui/src/components/cli/components/cli-header/CliHeader.tsx
+++ b/redisinsight/ui/src/components/cli/components/cli-header/CliHeader.tsx
@@ -2,6 +2,10 @@ import React, { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { WindowControlGroup } from 'uiBase/index'
+import { RiIcon } from 'uiBase/icons'
import {
toggleCli,
resetCliSettings,
@@ -14,10 +18,6 @@ import { resetOutputLoading } from 'uiSrc/slices/cli/cli-output'
import { OnboardingTour } from 'uiSrc/components'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { WindowControlGroup } from 'uiSrc/components/base/shared/WindowControlGroup'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
const CliHeader = () => {
@@ -63,24 +63,24 @@ const CliHeader = () => {
return (
)
}
diff --git a/redisinsight/ui/src/components/code-block/CodeBlock.tsx b/redisinsight/ui/src/components/code-block/CodeBlock.tsx
index f5d4c6b9b1..b3abb21092 100644
--- a/redisinsight/ui/src/components/code-block/CodeBlock.tsx
+++ b/redisinsight/ui/src/components/code-block/CodeBlock.tsx
@@ -1,9 +1,9 @@
import React, { HTMLAttributes, useMemo } from 'react'
import cx from 'classnames'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
-import { useInnerText } from 'uiSrc/components/base/utils/hooks/inner-text'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon } from 'uiBase/icons'
+import { useInnerText } from 'uiBase/utils'
import styles from './styles.module.scss'
export interface Props extends HTMLAttributes {
@@ -31,7 +31,7 @@ const CodeBlock = (props: Props) => {
{children}
{isCopyable && (
- {
const readMore = (commandName = '') => {
const docUrl = getDocUrlForCommand(commandName)
return (
-
Read more
-
+
)
}
@@ -77,31 +77,31 @@ const CommandHelper = (props: Props) => {
onBackClick={handleBackClick}
/>
{summary && (
-
{summary} {' '}
{readMore(commandLine)}
-
+
)}
{!!argList.length && (
-
+
Arguments:
-
+
{argList}
)}
{since && (
-
+
Since:
-
+
{since}
)}
@@ -110,23 +110,23 @@ const CommandHelper = (props: Props) => {
className={styles.field}
data-testid="cli-helper-complexity"
>
-
+
Complexity:
-
+
{complexity}
)}
)}
{!commandLine && (
-
Enter any command in CLI or use search to see detailed
information.
-
+
)}
)}
diff --git a/redisinsight/ui/src/components/command-helper/CommandHelperHeader/CommandHelperHeader.tsx b/redisinsight/ui/src/components/command-helper/CommandHelperHeader/CommandHelperHeader.tsx
index 0e59b765c4..a3086d46cb 100644
--- a/redisinsight/ui/src/components/command-helper/CommandHelperHeader/CommandHelperHeader.tsx
+++ b/redisinsight/ui/src/components/command-helper/CommandHelperHeader/CommandHelperHeader.tsx
@@ -2,6 +2,10 @@ import React from 'react'
import { useDispatch } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { WindowControlGroup } from 'uiBase/index'
+import { RiIcon } from 'uiBase/icons'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
resetCliHelperSettings,
@@ -11,10 +15,6 @@ import {
import { OnboardingTour } from 'uiSrc/components'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { WindowControlGroup } from 'uiSrc/components/base/shared/WindowControlGroup'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
const CommandHelperHeader = () => {
@@ -44,25 +44,25 @@ const CommandHelperHeader = () => {
return (
-
-
+
+
- Command Helper
+ Command Helper
-
-
+
+
-
+
)
}
diff --git a/redisinsight/ui/src/components/command-helper/CommandHelperWrapper.tsx b/redisinsight/ui/src/components/command-helper/CommandHelperWrapper.tsx
index 033ea115b3..a0df013a51 100644
--- a/redisinsight/ui/src/components/command-helper/CommandHelperWrapper.tsx
+++ b/redisinsight/ui/src/components/command-helper/CommandHelperWrapper.tsx
@@ -3,6 +3,8 @@ import { useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cn from 'classnames'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiBadge } from 'uiBase/display'
import { CommandGroup, ICommand, ICommandArgGenerated } from 'uiSrc/constants'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { cliSettingsSelector } from 'uiSrc/slices/cli/cli-settings'
@@ -14,8 +16,6 @@ import {
removeDeprecatedModuleCommands,
checkDeprecatedModuleCommand,
} from 'uiSrc/utils'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
import CommandHelper from './CommandHelper'
import CommandHelperHeader from './CommandHelperHeader'
@@ -98,16 +98,16 @@ const CommandHelperWrapper = () => {
? 'Optional'
: 'Required'
return (
-
-
+
+
-
- {arg.generatedName}
-
+
+ {arg.generatedName}
+
)
}
diff --git a/redisinsight/ui/src/components/command-helper/components/command-helper-info/CHCommandInfo.tsx b/redisinsight/ui/src/components/command-helper/components/command-helper-info/CHCommandInfo.tsx
index 885fb66944..cc3797b767 100644
--- a/redisinsight/ui/src/components/command-helper/components/command-helper-info/CHCommandInfo.tsx
+++ b/redisinsight/ui/src/components/command-helper/components/command-helper-info/CHCommandInfo.tsx
@@ -1,14 +1,12 @@
import React from 'react'
-
-import { GroupBadge } from 'uiSrc/components'
+import { RiIconButton } from 'uiBase/forms'
+import { ArrowLeftIcon } from 'uiBase/icons'
+import { RiColorText } from 'uiBase/text'
+import { RiBadge } from 'uiBase/display'
+import { RiRow } from 'uiBase/layout'
import { CommandGroup } from 'uiSrc/constants'
-
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { ArrowLeftIcon } from 'uiSrc/components/base/icons'
-import { ColorText } from 'uiSrc/components/base/text'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
-import { Row } from 'uiSrc/components/base/layout/flex'
+import { GroupBadge } from 'uiSrc/components'
import styles from './styles.module.scss'
@@ -28,25 +26,25 @@ const CHCommandInfo = (props: Props) => {
} = props
return (
-
-
-
{args}
-
+
{complexity && (
{
data-testid="cli-helper-complexity-short"
/>
)}
-
+
)
}
diff --git a/redisinsight/ui/src/components/command-helper/components/command-helper-search-output/CHSearchOutput.tsx b/redisinsight/ui/src/components/command-helper/components/command-helper-search-output/CHSearchOutput.tsx
index f94a1f01dd..eabde7cb33 100644
--- a/redisinsight/ui/src/components/command-helper/components/command-helper-search-output/CHSearchOutput.tsx
+++ b/redisinsight/ui/src/components/command-helper/components/command-helper-search-output/CHSearchOutput.tsx
@@ -3,14 +3,14 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
import { generateArgsNames } from 'uiSrc/utils'
import { setSearchedCommand } from 'uiSrc/slices/cli/cli-settings'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { appRedisCommandsSelector } from 'uiSrc/slices/app/redis-commands'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
import styles from './styles.module.scss'
export interface Props {
@@ -45,25 +45,25 @@ const CHSearchOutput = ({ searchedCommands }: Props) => {
args,
).join(' ')
return (
-
{argString}
-
+
)
}
return (
-
{ALL_REDIS_COMMANDS[command].summary}
-
+
)
}
@@ -72,9 +72,9 @@ const CHSearchOutput = ({ searchedCommands }: Props) => {
{searchedCommands.length > 0 && (
{searchedCommands.map((command: string) => (
-
-
-
+
+ {
handleClickCommand(e, command)
}}
>
-
- {command}
-
-
-
-
+ {command}
+
+
+
{renderDescription(command)}
-
-
+
+
))}
)}
{searchedCommands.length === 0 && (
-
+
No results found.
-
+
)}
>
diff --git a/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchFilter/CHSearchFilter.tsx b/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchFilter/CHSearchFilter.tsx
index c6be824fe1..3e2104619a 100644
--- a/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchFilter/CHSearchFilter.tsx
+++ b/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchFilter/CHSearchFilter.tsx
@@ -2,13 +2,13 @@ import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import { useSelector } from 'react-redux'
+import { RiText } from 'uiBase/text'
+import { RiSelect } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
import { GROUP_TYPES_DISPLAY } from 'uiSrc/constants'
import { appRedisCommandsSelector } from 'uiSrc/slices/app/redis-commands'
import { cliSettingsSelector } from 'uiSrc/slices/cli/cli-settings'
-import { Text } from 'uiSrc/components/base/text'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -46,21 +46,21 @@ const CHSearchFilter = ({ submitFilter, isLoading }: Props) => {
label: text,
value,
inputDisplay: (
-
{text}
-
+
),
dropdownDisplay: (
-
{text}
-
+
),
}
})
diff --git a/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchInput/CHSearchInput.tsx b/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchInput/CHSearchInput.tsx
index 47f65c734f..3d10db0af4 100644
--- a/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchInput/CHSearchInput.tsx
+++ b/redisinsight/ui/src/components/command-helper/components/command-helper-search/CHSearchInput/CHSearchInput.tsx
@@ -1,9 +1,9 @@
import React, { useEffect, useState } from 'react'
import { useSelector } from 'react-redux'
+import { RiSearchInput } from 'uiBase/inputs'
import { cliSettingsSelector } from 'uiSrc/slices/cli/cli-settings'
-import { SearchInput } from 'uiSrc/components/base/inputs'
import styles from './styles.module.scss'
export interface Props {
@@ -38,7 +38,7 @@ const CHSearchInput = ({ submitSearch, isLoading = false }: Props) => {
return (
-
void
@@ -16,21 +15,23 @@ const ConnectivityError = ({
error,
onRetry,
}: ConnectivityErrorProps) => (
-
-
-
+
+
+
{isLoading && }
-
- {error}
+
+
+ {error}
+
{onRetry && (
-
- Retry
-
+
+ Retry
+
)}
-
-
-
-
+
+
+
+
)
export default ConnectivityError
diff --git a/redisinsight/ui/src/components/consents-settings/ConsentOption/ConsentOption.tsx b/redisinsight/ui/src/components/consents-settings/ConsentOption/ConsentOption.tsx
index d131bc3fa5..74843a0d33 100644
--- a/redisinsight/ui/src/components/consents-settings/ConsentOption/ConsentOption.tsx
+++ b/redisinsight/ui/src/components/consents-settings/ConsentOption/ConsentOption.tsx
@@ -1,11 +1,11 @@
import React from 'react'
import parse from 'html-react-parser'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
-import { Text } from 'uiSrc/components/base/text'
-import { SwitchInput } from 'uiSrc/components/base/inputs'
+import { RiText } from 'uiBase/text'
+import { RiSwitchInput } from 'uiBase/inputs'
import { ItemDescription } from './components'
import { IConsent } from '../ConsentsSettings'
@@ -30,23 +30,26 @@ const ConsentOption = (props: Props) => {
} = props
return (
-
+
{isSettingsPage && consent.description && (
<>
-
-
-
-
+
+
+
>
)}
-
-
-
+
+
onChangeAgreement(checked, consent.agreementName)
@@ -54,23 +57,26 @@ const ConsentOption = (props: Props) => {
data-testid={`switch-option-${consent.agreementName}`}
disabled={consent?.disabled}
/>
-
-
- {parse(consent.label)}
+
+
+ {parse(consent.label)}
{!isSettingsPage && consent.description && (
-
-
-
+
+
)}
-
-
- {!withoutSpacer && }
-
+
+
+ {!withoutSpacer && }
+
)
}
diff --git a/redisinsight/ui/src/components/consents-settings/ConsentsNotifications/ConsentsNotifications.tsx b/redisinsight/ui/src/components/consents-settings/ConsentsNotifications/ConsentsNotifications.tsx
index d336434b61..1ff2c1d821 100644
--- a/redisinsight/ui/src/components/consents-settings/ConsentsNotifications/ConsentsNotifications.tsx
+++ b/redisinsight/ui/src/components/consents-settings/ConsentsNotifications/ConsentsNotifications.tsx
@@ -3,13 +3,13 @@ import { useDispatch, useSelector } from 'react-redux'
import { useFormik } from 'formik'
import { has } from 'lodash'
+import { RiTitle } from 'uiBase/text'
import { compareConsents } from 'uiSrc/utils'
import {
updateUserConfigSettingsAction,
userSettingsSelector,
} from 'uiSrc/slices/user/user-settings'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { Title } from 'uiSrc/components/base/text/Title'
import ConsentOption from '../ConsentOption'
import { IConsent, ConsentCategories } from '../ConsentsSettings'
@@ -90,7 +90,7 @@ const ConsentsNotifications = () => {
return (
-
+
-
+
-
+
-
-
+
+
{isAnyChatAvailable && (
-
+
-
+
)}
-
+
-
+
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/components/instance-header/components/ShortInstanceInfo.tsx b/redisinsight/ui/src/components/instance-header/components/ShortInstanceInfo.tsx
index f60c7d28f7..57e55cdde3 100644
--- a/redisinsight/ui/src/components/instance-header/components/ShortInstanceInfo.tsx
+++ b/redisinsight/ui/src/components/instance-header/components/ShortInstanceInfo.tsx
@@ -2,6 +2,9 @@ import React, { useContext } from 'react'
import { capitalize } from 'lodash'
import cx from 'classnames'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { AllIconsType, RiIcon } from 'uiBase/icons'
import {
CONNECTION_TYPE_DISPLAY,
ConnectionType,
@@ -12,9 +15,6 @@ import { getModule, Nullable, truncateText } from 'uiSrc/utils'
import { DEFAULT_MODULES_INFO } from 'uiSrc/constants/modules'
import { Theme } from 'uiSrc/constants'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { AllIconsType, RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { AdditionalRedisModule } from 'apiSrc/modules/database/models/additional.redis.module'
import styles from './styles.module.scss'
@@ -58,41 +58,41 @@ const ShortInstanceInfo = ({ info, databases, modules }: Props) => {
{databases > 1 && (
-
-
+
+
-
-
- Logical Databases
-
+
+
+ Logical Databases
+
Select logical databases to work with in Browser, Workbench, and
Database Analysis.
-
-
-
+
+
+
)}
-
-
+
+
{connectionType
? CONNECTION_TYPE_DISPLAY[connectionType]
: capitalize(connectionType)}
-
-
+
+
{version}
-
-
+
+
{user || 'Default'}
-
-
+
+
{!!modules?.length && (
Database Modules
diff --git a/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/InstancesNavigationPopover.tsx b/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/InstancesNavigationPopover.tsx
index 14eb3f03eb..2ce36160f3 100644
--- a/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/InstancesNavigationPopover.tsx
+++ b/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/InstancesNavigationPopover.tsx
@@ -1,9 +1,14 @@
import React, { useEffect, useState, useMemo } from 'react'
import { useSelector } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiTabs, TabInfo } from 'uiBase/layout'
+import { RiPopover } from 'uiBase/index'
import { instancesSelector as rdiInstancesSelector } from 'uiSrc/slices/rdi/instances'
import { instancesSelector as dbInstancesSelector } from 'uiSrc/slices/instances/instances'
-import { TextInput } from 'uiSrc/components/base/inputs'
import Divider from 'uiSrc/components/divider/Divider'
import { BrowserStorageItem, DEFAULT_SORT, Pages } from 'uiSrc/constants'
import Search from 'uiSrc/assets/img/Search.svg'
@@ -11,11 +16,6 @@ import { Instance, RdiInstance } from 'uiSrc/slices/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { localStorageService } from 'uiSrc/services'
import { filterAndSort } from 'uiSrc/utils'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { RiPopover } from 'uiSrc/components/base'
import InstancesList from './components/instances-list'
import styles from './styles.module.scss'
@@ -117,7 +117,7 @@ const InstancesNavigationPopover = ({ name }: Props) => {
isOpen={isPopoverOpen}
closePopover={() => showPopover()}
button={
-
showPopover()}
data-testid="nav-instance-popover-btn"
@@ -126,12 +126,12 @@ const InstancesNavigationPopover = ({ name }: Props) => {
-
+
}
>
- {
- {
data-testid="instances-tabs-testId"
/>
-
+
{
onItemClick={showPopover}
/>
diff --git a/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/components/instances-list/InstancesList.tsx b/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/components/instances-list/InstancesList.tsx
index e7c602c5d5..5268a1ab67 100644
--- a/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/components/instances-list/InstancesList.tsx
+++ b/redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/components/instances-list/InstancesList.tsx
@@ -1,6 +1,9 @@
import React, { useState } from 'react'
import { useDispatch } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
+import { RiListGroup, RiListItem } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiLoader } from 'uiBase/display'
import { checkConnectToRdiInstanceAction } from 'uiSrc/slices/rdi/instances'
import {
checkConnectToInstanceAction,
@@ -15,12 +18,6 @@ import {
getRedisInfoSummary,
} from 'uiSrc/telemetry'
import { getDbIndex } from 'uiSrc/utils'
-import {
- Group as ListGroup,
- Item as ListGroupItem,
-} from 'uiSrc/components/base/layout/list'
-import { Text } from 'uiSrc/components/base/text'
-import { Loader } from 'uiSrc/components/base/display'
import { InstancesTabs } from '../../InstancesNavigationPopover'
import styles from '../../styles.module.scss'
@@ -130,24 +127,24 @@ const InstancesList = ({
return (
-
+
{instances?.map((instance) => (
-
{loading && instance?.id === selected && (
-
+
)}
{instance.name} {getDbIndex(instance.db)}
-
+
}
onClick={() => {
setSelected(instance.id)
@@ -156,7 +153,7 @@ const InstancesList = ({
data-testid={`instance-item-${instance.id}`}
/>
))}
-
+
)
}
diff --git a/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfile.tsx b/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfile.tsx
index 039f983f58..51d4e7efa5 100644
--- a/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfile.tsx
+++ b/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfile.tsx
@@ -1,10 +1,10 @@
import React from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexItem } from 'uiBase/layout'
import { FeatureFlags } from 'uiSrc/constants'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { OAuthUserProfile } from 'uiSrc/components'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
import { CloudUserProfile } from './CloudUserProfile'
const UserProfile = () => {
@@ -16,17 +16,17 @@ const UserProfile = () => {
if (!envDependentFeature?.flag) {
return (
-
+
-
+
)
}
if (cloudAds?.flag && cloudSso?.flag) {
return (
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfileBadge.tsx b/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfileBadge.tsx
index 535f32c380..fa0fb2f183 100644
--- a/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfileBadge.tsx
+++ b/redisinsight/ui/src/components/instance-header/components/user-profile/UserProfileBadge.tsx
@@ -2,6 +2,10 @@ import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { useHistory } from 'react-router-dom'
+import { RiPopover } from 'uiBase/index'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { UserProfileLink, RiLoader } from 'uiBase/display'
import { logoutUserAction } from 'uiSrc/slices/oauth/cloud'
import { buildRedisInsightUrl, getUtmExternalLink } from 'uiSrc/utils/links'
@@ -17,12 +21,7 @@ import {
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { FeatureFlags, Pages } from 'uiSrc/constants'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { RiPopover } from 'uiSrc/components/base'
import { getConfig } from 'uiSrc/config'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { UserProfileLink } from 'uiSrc/components/base/link/UserProfileLink'
-import { Loader } from 'uiSrc/components/base/display'
import { CloudUser } from 'apiSrc/modules/cloud/user/models'
import styles from './styles.module.scss'
@@ -135,17 +134,20 @@ const UserProfileBadge = (props: UserProfileBadgeProps) => {
Account
-
+
}
>
-
+
Redis Cloud account
-
+
{
onClick={() => handleClickSelectAccount?.(id)}
data-testid={`profile-account-${id}${id === currentAccountId ? '-selected' : ''}`}
>
-
+
{name} #{id}
-
+
{id === currentAccountId && (
{
/>
)}
{id === selectingAccountId && (
- {
href={riDesktopLink}
data-testid="open-ri-desktop-link"
>
- Open in Redis Insight Desktop version
+ Open in Redis Insight Desktop version
- Back to Redis Cloud Admin console
+ Back to Redis Cloud Admin console
{
onClick={handleClickImport}
data-testid="profile-import-cloud-databases"
>
- Import Cloud databases
+
+ Import Cloud databases
+
{isImportLoading ? (
-
+
) : (
)}
@@ -234,13 +238,13 @@ const UserProfileBadge = (props: UserProfileBadgeProps) => {
data-testid="cloud-console-link"
>
- Cloud Console
- Cloud Console
+
{name}
-
+
{
onClick={handleClickLogout}
data-testid="profile-logout"
>
- Logout
+ Logout
diff --git a/redisinsight/ui/src/components/item-list/components/action-bar/ActionBar.tsx b/redisinsight/ui/src/components/item-list/components/action-bar/ActionBar.tsx
index f6cf84f07e..41f6f3a983 100644
--- a/redisinsight/ui/src/components/item-list/components/action-bar/ActionBar.tsx
+++ b/redisinsight/ui/src/components/item-list/components/action-bar/ActionBar.tsx
@@ -1,8 +1,8 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
import styles from './styles.module.scss'
export interface Props {
@@ -19,7 +19,7 @@ const ActionBar = ({
onCloseActionBar,
}: Props) => (
-
-
+
{`You selected: ${selectionCount} items`}
-
+
{actions?.map((action, index) => (
-
+
{action}
-
+
))}
-
-
+ onCloseActionBar()}
data-testid="cancel-selecting"
/>
-
-
+
+
)
diff --git a/redisinsight/ui/src/components/item-list/components/delete-action/DeleteAction.tsx b/redisinsight/ui/src/components/item-list/components/delete-action/DeleteAction.tsx
index 3a9e7cdde8..0e3de8199c 100644
--- a/redisinsight/ui/src/components/item-list/components/delete-action/DeleteAction.tsx
+++ b/redisinsight/ui/src/components/item-list/components/delete-action/DeleteAction.tsx
@@ -1,15 +1,11 @@
import React, { useState } from 'react'
-import { formatLongName } from 'uiSrc/utils'
-import {
- DestructiveButton,
- PrimaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { RiDestructiveButton, RiPrimaryButton } from 'uiBase/forms'
+import { DeleteIcon, RiIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPopover } from 'uiBase/display'
+import { RiText } from 'uiBase/text'
+import { formatLongName } from 'uiSrc/utils'
import styles from '../styles.module.scss'
export interface Props
{
@@ -33,7 +29,7 @@ const DeleteAction = (
}
const deleteBtn = (
- (
data-testid="delete-btn"
>
Delete
-
+
)
return (
@@ -54,23 +50,23 @@ const DeleteAction = (
panelPaddingSize="l"
data-testid="delete-popover"
>
-
+
{subTitle}
-
+
{selection.map((select) => (
-
-
+
+
-
-
+
+
{formatLongName(select.name)}
-
-
+
+
))}
- {
@@ -81,7 +77,7 @@ const DeleteAction = (
data-testid="delete-selected-dbs"
>
Delete
-
+
)
diff --git a/redisinsight/ui/src/components/item-list/components/export-action/ExportAction.tsx b/redisinsight/ui/src/components/item-list/components/export-action/ExportAction.tsx
index daf1ebedc5..ec87a0c98d 100644
--- a/redisinsight/ui/src/components/item-list/components/export-action/ExportAction.tsx
+++ b/redisinsight/ui/src/components/item-list/components/export-action/ExportAction.tsx
@@ -1,16 +1,12 @@
import React, { useState } from 'react'
-import { formatLongName } from 'uiSrc/utils'
-
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { ExportIcon } from 'uiSrc/components/base/icons'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
+import { RiPrimaryButton, RiFormField, RiCheckbox } from 'uiBase/forms'
+import { ExportIcon, RiIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
-import { Text } from 'uiSrc/components/base/text'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiPopover } from 'uiSrc/components/base'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/index'
+import { formatLongName } from 'uiSrc/utils'
import styles from '../styles.module.scss'
export interface Props {
@@ -27,7 +23,7 @@ const ExportAction = (
const [withSecrets, setWithSecrets] = useState(true)
const exportBtn = (
- setIsPopoverOpen((prevState) => !prevState)}
size="small"
icon={ExportIcon}
@@ -35,7 +31,7 @@ const ExportAction = (
data-testid="export-btn"
>
Export
-
+
)
return (
@@ -48,23 +44,23 @@ const ExportAction = (
panelPaddingSize="l"
data-testid="export-popover"
>
-
+
{subTitle}
-
+
{selection.map((select) => (
-
-
+
+
-
-
+
+
{formatLongName(select.name)}
-
-
+
+
))}
-
-
+ (
onChange={(e) => setWithSecrets(e.target.checked)}
data-testid="export-passwords"
/>
-
+
-
{
@@ -84,7 +80,7 @@ const ExportAction = (
data-testid="export-selected-dbs"
>
Export
-
+
)
diff --git a/redisinsight/ui/src/components/keyboard-shortcut/KeyboardShortcut.tsx b/redisinsight/ui/src/components/keyboard-shortcut/KeyboardShortcut.tsx
index ae66691768..8929d43595 100644
--- a/redisinsight/ui/src/components/keyboard-shortcut/KeyboardShortcut.tsx
+++ b/redisinsight/ui/src/components/keyboard-shortcut/KeyboardShortcut.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { isString } from 'lodash'
import cx from 'classnames'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
+import { RiBadge } from 'uiBase/display'
import styles from './styles.module.scss'
diff --git a/redisinsight/ui/src/components/keys-summary/KeysSummary.tsx b/redisinsight/ui/src/components/keys-summary/KeysSummary.tsx
index 9eed112fa5..b09b4194c9 100644
--- a/redisinsight/ui/src/components/keys-summary/KeysSummary.tsx
+++ b/redisinsight/ui/src/components/keys-summary/KeysSummary.tsx
@@ -3,7 +3,7 @@ import cx from 'classnames'
import { isNull } from 'lodash'
import { useSelector } from 'react-redux'
-import { Text, ColorText } from 'uiSrc/components/base/text'
+import { RiText, RiColorText } from 'uiBase/text'
import { numberWithSpaces, nullableNumberWithSpaces } from 'uiSrc/utils/numbers'
import { KeyViewType } from 'uiSrc/slices/interfaces/keys'
@@ -54,10 +54,10 @@ const KeysSummary = (props: Props) => {
<>
{(!!totalItemsCount || isNull(totalItemsCount)) && (
-
+
{!!scanned && (
<>
-
+
{'Results: '}
@@ -65,7 +65,7 @@ const KeysSummary = (props: Props) => {
{'. '}
-
+
{'Scanned '}
{notAccurateScanned}
@@ -81,8 +81,8 @@ const KeysSummary = (props: Props) => {
{ [styles.loadingShow]: loading },
])}
/>
-
-
+
+
{showScanMore && (
{
)}
{!scanned && (
-
+
{'Total: '}
{nullableNumberWithSpaces(totalItemsCount)}
-
+
)}
-
+
{viewType === KeyViewType.Tree && (
)}
)}
{loading && !totalItemsCount && !isNull(totalItemsCount) && (
-
+
Scanning...
-
+
)}
>
)
diff --git a/redisinsight/ui/src/components/main-router/components/SuspenseLoader.tsx b/redisinsight/ui/src/components/main-router/components/SuspenseLoader.tsx
index f14f4886fe..b25d35ab84 100644
--- a/redisinsight/ui/src/components/main-router/components/SuspenseLoader.tsx
+++ b/redisinsight/ui/src/components/main-router/components/SuspenseLoader.tsx
@@ -1,10 +1,10 @@
import React from 'react'
-import { Loader } from 'uiSrc/components/base/display'
+import { RiLoader } from 'uiBase/display'
import styles from './loader.module.scss'
const SuspenseLoader = () => (
-
+
)
diff --git a/redisinsight/ui/src/components/markdown/CloudLink/CloudLink.tsx b/redisinsight/ui/src/components/markdown/CloudLink/CloudLink.tsx
index b4c9487eef..84946b249e 100644
--- a/redisinsight/ui/src/components/markdown/CloudLink/CloudLink.tsx
+++ b/redisinsight/ui/src/components/markdown/CloudLink/CloudLink.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiLink } from 'uiBase/display'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { OAuthSsoHandlerDialog } from 'uiSrc/components'
-import { Link } from 'uiSrc/components/base/link/Link'
export interface Props {
url: string
@@ -14,7 +14,7 @@ const CloudLink = (props: Props) => {
return (
{(ssoCloudHandlerClick) => (
- {
ssoCloudHandlerClick(e, {
@@ -27,7 +27,7 @@ const CloudLink = (props: Props) => {
data-testid="guide-free-database-link"
>
{text}
-
+
)}
)
diff --git a/redisinsight/ui/src/components/markdown/CodeButtonBlock/CodeButtonBlock.tsx b/redisinsight/ui/src/components/markdown/CodeButtonBlock/CodeButtonBlock.tsx
index e07bffa040..3c6a158949 100644
--- a/redisinsight/ui/src/components/markdown/CodeButtonBlock/CodeButtonBlock.tsx
+++ b/redisinsight/ui/src/components/markdown/CodeButtonBlock/CodeButtonBlock.tsx
@@ -4,6 +4,12 @@ import { monaco } from 'react-monaco-editor'
import parse from 'html-react-parser'
import { useParams } from 'react-router-dom'
import { find } from 'lodash'
+import { RiPopover, RiTooltip } from 'uiBase/display'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiEmptyButton } from 'uiBase/forms'
+import { PlayIcon, CheckBoldIcon, CopyIcon } from 'uiBase/icons'
+import { RiTitle } from 'uiBase/text'
import {
getCommandsForExecution,
getUnsupportedModulesFromQuery,
@@ -16,7 +22,6 @@ import {
} from 'uiSrc/constants'
import { CodeBlock } from 'uiSrc/components'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
import { getDBConfigStorageField } from 'uiSrc/services'
import { ConfigDBStorageItem } from 'uiSrc/constants/storage'
import {
@@ -25,11 +30,6 @@ import {
} from 'uiSrc/components/messages'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { ButtonLang } from 'uiSrc/utils/formatters/markdown/remarkCode'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { PlayIcon, CheckBoldIcon, CopyIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
import { AdditionalRedisModule } from 'apiSrc/modules/database/models/additional.redis.module'
import { RunConfirmationPopover } from './components'
@@ -157,20 +157,20 @@ const CodeButtonBlock = (props: Props) => {
return (
-
-
+
+
{!!label && (
-
{truncateText(label, 86)}
-
+
)}
-
-
-
+
+ {
data-testid={`copy-btn-${label}`}
>
Copy
-
+
{!isRunButtonHidden && (
{
}
data-testid="run-btn-open-workbench-tooltip"
>
- {
data-testid={`run-btn-${label}`}
>
Run
-
+
}
>
{getPopoverMessage()}
)}
-
-
+
+
{highlightedContent ? parse(highlightedContent) : content}
-
+
)
}
diff --git a/redisinsight/ui/src/components/markdown/CodeButtonBlock/components/RunConfirmationPopover.tsx b/redisinsight/ui/src/components/markdown/CodeButtonBlock/components/RunConfirmationPopover.tsx
index 0fae201177..0cecd04282 100644
--- a/redisinsight/ui/src/components/markdown/CodeButtonBlock/components/RunConfirmationPopover.tsx
+++ b/redisinsight/ui/src/components/markdown/CodeButtonBlock/components/RunConfirmationPopover.tsx
@@ -1,19 +1,14 @@
import React, { useState } from 'react'
import { useHistory, useParams } from 'react-router-dom'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton, RiCheckbox } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
import { FeatureFlags, Pages } from 'uiSrc/constants'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { setDBConfigStorageField } from 'uiSrc/services'
import { ConfigDBStorageItem } from 'uiSrc/constants/storage'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
import styles from '../styles.module.scss'
interface Props {
@@ -49,14 +44,14 @@ const RunConfirmationPopover = ({ onApply }: Props) => {
return (
<>
- Run commands
-
-
+ Run commands
+
+
This tutorial will change data in your database, are you sure you want
to run commands in this database?
-
-
-
+
+ {
-
Change Database
-
+
-
Run
-
+
>
diff --git a/redisinsight/ui/src/components/markdown/RedisInsightLink/RedisInsightLink.tsx b/redisinsight/ui/src/components/markdown/RedisInsightLink/RedisInsightLink.tsx
index 2d57728ad8..3a412e980e 100644
--- a/redisinsight/ui/src/components/markdown/RedisInsightLink/RedisInsightLink.tsx
+++ b/redisinsight/ui/src/components/markdown/RedisInsightLink/RedisInsightLink.tsx
@@ -2,11 +2,10 @@ import React, { useState } from 'react'
import { useHistory, useLocation, useParams } from 'react-router-dom'
import cx from 'classnames'
import { isNull } from 'lodash'
+import { RiLink, RiPopover } from 'uiBase/display'
import { getRedirectionPage } from 'uiSrc/utils/routing'
import DatabaseNotOpened from 'uiSrc/components/messages/database-not-opened'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiPopover } from 'uiSrc/components/base'
import styles from './styles.module.scss'
export interface Props {
@@ -46,7 +45,7 @@ const RedisInsightLink = (props: Props) => {
panelPaddingSize="m"
closePopover={() => setIsPopoverOpen(false)}
button={
- {
data-testid="redisinsight-link"
>
{text}
-
+
}
>
diff --git a/redisinsight/ui/src/components/markdown/RedisUploadButton/RedisUploadButton.tsx b/redisinsight/ui/src/components/markdown/RedisUploadButton/RedisUploadButton.tsx
index 912a2603e2..bcd7a53458 100644
--- a/redisinsight/ui/src/components/markdown/RedisUploadButton/RedisUploadButton.tsx
+++ b/redisinsight/ui/src/components/markdown/RedisUploadButton/RedisUploadButton.tsx
@@ -3,6 +3,11 @@ import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
import { AxiosError } from 'axios'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { PlayFilledIcon, ContractsIcon, RiIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiLink, RiPopover } from 'uiBase/display'
import { truncateText } from 'uiSrc/utils'
import {
sendEventTelemetry,
@@ -21,16 +26,6 @@ import {
getPathToResource,
} from 'uiSrc/services/resourcesService'
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { PlayFilledIcon, ContractsIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -118,7 +113,7 @@ const RedisUploadButton = ({ label, path }: Props) => {
anchorClassName={styles.popoverAnchor}
panelPaddingSize="none"
button={
- {
data-testid="upload-data-bulk-btn"
>
{truncateText(label, 86)}
-
+
}
>
{instanceId ? (
- {
Execute commands in bulk
-
+
All commands from the file in your tutorial will be automatically
executed against your database. Avoid executing them in production
databases.
-
+
-
Download file
-
-
+ {
data-testid="upload-data-bulk-apply-btn"
>
Execute
-
+
-
+
) : (
)}
diff --git a/redisinsight/ui/src/components/message-bar/MessageBar.tsx b/redisinsight/ui/src/components/message-bar/MessageBar.tsx
index 1f86cb1528..e5a104abfd 100644
--- a/redisinsight/ui/src/components/message-bar/MessageBar.tsx
+++ b/redisinsight/ui/src/components/message-bar/MessageBar.tsx
@@ -1,8 +1,8 @@
import React, { useEffect, useState } from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
import styles from './styles.module.scss'
export interface Props {
@@ -19,19 +19,19 @@ const MessageBar = ({ children, opened }: Props) => {
return isOpen ? (
-
-
+
+
{children}
-
-
-
+
+ setIsOpen(false)}
data-testid="close-button"
/>
-
-
+
+
) : null
diff --git a/redisinsight/ui/src/components/messages/cli-output/cliOutput.tsx b/redisinsight/ui/src/components/messages/cli-output/cliOutput.tsx
index 5d066fa374..a22b1ff09b 100644
--- a/redisinsight/ui/src/components/messages/cli-output/cliOutput.tsx
+++ b/redisinsight/ui/src/components/messages/cli-output/cliOutput.tsx
@@ -1,11 +1,11 @@
import React, { Fragment } from 'react'
+import { RiColorText } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
+import { RiEmptyButton } from 'uiBase/forms'
import { getRouterLinkProps } from 'uiSrc/services'
import { getDbIndex } from 'uiSrc/utils'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { ColorText } from 'uiSrc/components/base/text'
import { FeatureFlags } from 'uiSrc/constants/featureFlags'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
export const InitOutputText = (
host: string = '',
@@ -14,31 +14,31 @@ export const InitOutputText = (
emptyOutput: boolean,
onClick: () => void,
) => [
-
- {emptyOutput && (
-
- {'Try '}
-
- Workbench
-
- , our advanced CLI. Check out our Quick Guides to learn more about Redis
- capabilities.
-
- )}
- ,
- '\n\n',
- 'Connecting...',
- '\n\n',
- 'Pinging Redis server on ',
-
- {`${host}:${port}${getDbIndex(dbIndex)}`}
- ,
- ]
+
+ {emptyOutput && (
+
+ {'Try '}
+
+ Workbench
+
+ , our advanced CLI. Check out our Quick Guides to learn more about Redis
+ capabilities.
+
+ )}
+ ,
+ '\n\n',
+ 'Connecting...',
+ '\n\n',
+ 'Pinging Redis server on ',
+
+ {`${host}:${port}${getDbIndex(dbIndex)}`}
+ ,
+]
export const ConnectionSuccessOutputText = [
'\n',
@@ -71,17 +71,21 @@ export const cliTexts = {
),
USE_PSUBSCRIBE_COMMAND: (path: string = '') => (
-
+
{'Use '}
-
Pub/Sub
-
+
{' to see the messages published to all channels in your database.'}
-
+
),
PSUBSCRIBE_COMMAND: (path: string = '') => (
),
USE_PROFILER_TOOL: (onClick: () => void) => (
-
+
{'Use '}
-
Profiler
-
+
{' tool to see all the requests processed by the server.'}
-
+
),
MONITOR_COMMAND: (onClick: () => void) => (
),
USE_PUB_SUB_TOOL: (path: string = '') => (
-
+
{'Use '}
-
Pub/Sub
-
+
{' tool to subscribe to channels.'}
-
+
),
SUBSCRIBE_COMMAND_CLI: (path: string = '') => (
),
HELLO3_COMMAND: () => (
-
+
{'Redis Insight does not support '}
-
RESP3
-
+
{' at the moment, but we are working on it.'}
-
+
),
HELLO3_COMMAND_CLI: () => [cliTexts.HELLO3_COMMAND(), '\n'],
CLI_ERROR_MESSAGE: (message: string) => [
'\n',
-
+
{message}
- ,
+ ,
'\n\n',
],
}
diff --git a/redisinsight/ui/src/components/messages/database-not-opened/DatabaseNotOpened.tsx b/redisinsight/ui/src/components/messages/database-not-opened/DatabaseNotOpened.tsx
index 0297b7dfa6..6339b0be99 100644
--- a/redisinsight/ui/src/components/messages/database-not-opened/DatabaseNotOpened.tsx
+++ b/redisinsight/ui/src/components/messages/database-not-opened/DatabaseNotOpened.tsx
@@ -1,14 +1,13 @@
import React from 'react'
+import { RiSpacer } from 'uiBase/layout'
+import { RiTitle, RiText } from 'uiBase/text'
import { ExternalLink, OAuthSsoHandlerDialog } from 'uiSrc/components'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { EXTERNAL_LINKS, UTM_CAMPAINGS } from 'uiSrc/constants/links'
import TelescopeImg from 'uiSrc/assets/img/telescope-dark.svg'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
export interface Props {
@@ -22,15 +21,15 @@ const DatabaseNotOpened = (props: Props) => {
return (
-
+
Open a database
-
-
+
+
<>
-
+
Open your Redis database, or create a new database to get started.
-
-
+
+
{(ssoCloudHandlerClick) => (
{
)}
-
+
void }) => {
return (
-
Upgrade your Redis database to version 6 or above
-
-
Filtering by data type is supported in Redis 6 and above.
-
+
+
Filtering by data type is supported in Redis 6 and above.
+
{!!freeInstances.length && (
<>
-
+
Use your free trial all-in-one Redis Cloud database to start
exploring these capabilities.
-
-
+
+
void }) => {
)}
{!freeInstances.length && (
-
+
Create a free trial Redis Stack database that supports filtering and
extends the core capabilities of your Redis.
-
-
+
+
{(ssoCloudHandlerClick) => (
- {
ssoCloudHandlerClick(e, {
source: OAuthSocialSource.BrowserFiltering,
@@ -82,11 +81,11 @@ const FilterNotAvailable = ({ onClose }: { onClose?: () => void }) => {
size="s"
>
Get Started For Free
-
+
)}
-
-
+
void }) => {
data-testid="learn-more-link"
>
Learn More
-
+
)}
diff --git a/redisinsight/ui/src/components/messages/module-not-loaded-minimalized/ModuleNotLoadedMinimalized.tsx b/redisinsight/ui/src/components/messages/module-not-loaded-minimalized/ModuleNotLoadedMinimalized.tsx
index 1ba4368490..867044baf8 100644
--- a/redisinsight/ui/src/components/messages/module-not-loaded-minimalized/ModuleNotLoadedMinimalized.tsx
+++ b/redisinsight/ui/src/components/messages/module-not-loaded-minimalized/ModuleNotLoadedMinimalized.tsx
@@ -2,6 +2,9 @@ import React from 'react'
import { useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
import TelescopeImg from 'uiSrc/assets/img/telescope-dark.svg'
import {
OAuthSocialAction,
@@ -25,10 +28,6 @@ import {
import { useCapability } from 'uiSrc/services'
import { FeatureFlags, Pages } from 'uiSrc/constants'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import {
MODULE_CAPABILITY_TEXT_NOT_AVAILABLE,
MODULE_CAPABILITY_TEXT_NOT_AVAILABLE_ENTERPRISE,
@@ -60,19 +59,19 @@ const ModuleNotLoadedMinimalized = (props: Props) => {
return (
-
+
{moduleText?.title}
-
-
+
+
-
+
{moduleText?.text}
-
-
-
+
+ {
@@ -80,16 +79,16 @@ const ModuleNotLoadedMinimalized = (props: Props) => {
}}
>
Redis Databases page
-
+
>
}
>
{!freeDbWithModule ? (
<>
-
+
{moduleText?.text}
-
-
+
+
{(ssoCloudHandlerClick) => (
{
>
) : (
<>
-
+
Use your free trial all-in-one Redis Cloud database to start
exploring these capabilities.
-
-
+
+
(
-
+
{`${moduleName?.substring(0, 1).toUpperCase()}${moduleName?.substring(1)} ${[MODULE_TEXT_VIEW.redisgears, MODULE_TEXT_VIEW.bf].includes(moduleName) ? 'are' : 'is'} not available `}
{width > MAX_ELEMENT_WIDTH && }
for this database
-
+
)
const ListItem = ({ item }: { item: string }) => (
@@ -55,7 +54,7 @@ const ListItem = ({ item }: { item: string }) => (
- {item}
+ {item}
)
@@ -92,24 +91,24 @@ const ModuleNotLoaded = ({
(moduleName?: string) => {
if (!cloudAdsFeature?.flag) {
return (
-
+
Open a database with {moduleName}.
-
+
)
}
return !freeDbWithModule ? (
-
+
Create a free trial Redis Stack database with {moduleName} which
extends the core capabilities of your Redis.
-
+
) : (
-
Use your free trial all-in-one Redis Cloud database to start exploring
these capabilities.
-
+
)
},
[freeDbWithModule],
@@ -139,7 +138,7 @@ const ModuleNotLoaded = ({
data-testid="module-not-loaded-content"
>
{renderTitle(width, MODULE_TEXT_VIEW[moduleName])}
-
+
{CONTENT[moduleName]?.text.map((item: string) =>
width > MIN_ELEMENT_WIDTH ? (
<>
@@ -150,7 +149,7 @@ const ModuleNotLoaded = ({
item
),
)}
-
+
{!!CONTENT[moduleName]?.additionalText && (
-
+
)}
{renderText(MODULE_TEXT_VIEW[moduleName])}
diff --git a/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx b/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx
index 1a236e9504..38189b1dd2 100644
--- a/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx
+++ b/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx
@@ -2,6 +2,8 @@ import React from 'react'
import { useSelector } from 'react-redux'
import cx from 'classnames'
import { useHistory } from 'react-router-dom'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiLink } from 'uiBase/display'
import {
FeatureFlags,
MODULE_NOT_LOADED_CONTENT as CONTENT,
@@ -17,8 +19,6 @@ import {
OAuthSocialSource,
RedisDefaultModules,
} from 'uiSrc/slices/interfaces'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Link } from 'uiSrc/components/base/link/Link'
export interface IProps {
moduleName: RedisDefaultModules
@@ -49,7 +49,7 @@ const ModuleNotLoadedButton = ({
return (
<>
-
Learn More
-
+
-
+
Redis Databases page
-
-
+
+
}
>
{(ssoCloudHandlerClick) => (
-
-
+
Get Started For Free
-
-
+
+
)}
diff --git a/redisinsight/ui/src/components/monaco-editor/MonacoEditor.tsx b/redisinsight/ui/src/components/monaco-editor/MonacoEditor.tsx
index 84144ebbc6..3a1af0879c 100644
--- a/redisinsight/ui/src/components/monaco-editor/MonacoEditor.tsx
+++ b/redisinsight/ui/src/components/monaco-editor/MonacoEditor.tsx
@@ -3,6 +3,8 @@ import ReactMonacoEditor, { monaco as monacoEditor } from 'react-monaco-editor'
import cx from 'classnames'
import { merge } from 'lodash'
+import { EditIcon } from 'uiBase/icons'
+import { RiActionIconButton } from 'uiBase/forms'
import { MonacoThemes, darkTheme, lightTheme } from 'uiSrc/constants/monaco'
import { Nullable } from 'uiSrc/utils'
import {
@@ -12,8 +14,6 @@ import {
import { DSL, Theme } from 'uiSrc/constants'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import InlineItemEditor from 'uiSrc/components/inline-item-editor'
-import { EditIcon } from 'uiSrc/components/base/icons'
-import { ActionIconButton } from 'uiSrc/components/base/forms/buttons'
import DedicatedEditor from './components/dedicated-editor'
import styles from './styles.module.scss'
@@ -297,7 +297,7 @@ const MonacoEditor = (props: Props) => {
/>
)}
{isEditable && readOnly && !isEditing && (
-
setIsEditing(true)}
className={styles.editBtn}
diff --git a/redisinsight/ui/src/components/monaco-editor/components/dedicated-editor/DedicatedEditor.tsx b/redisinsight/ui/src/components/monaco-editor/components/dedicated-editor/DedicatedEditor.tsx
index ba644010db..7677b616f5 100644
--- a/redisinsight/ui/src/components/monaco-editor/components/dedicated-editor/DedicatedEditor.tsx
+++ b/redisinsight/ui/src/components/monaco-editor/components/dedicated-editor/DedicatedEditor.tsx
@@ -6,6 +6,8 @@ import ReactMonacoEditor, { monaco as monacoEditor } from 'react-monaco-editor'
import { Rnd } from 'react-rnd'
import cx from 'classnames'
+import { RiIconButton, RiSelect } from 'uiBase/forms'
+import { CancelSlimIcon, CheckThinIcon } from 'uiBase/icons'
import {
decoration,
getMonacoAction,
@@ -23,9 +25,6 @@ import {
import { IEditorMount } from 'uiSrc/pages/workbench/interfaces'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon, CheckThinIcon } from 'uiSrc/components/base/icons'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
import styles from './styles.module.scss'
const LangSelect = styled(RiSelect)`
@@ -313,14 +312,14 @@ const DedicatedEditor = (props: Props) => {
/>
)}
-
onCancel(selectedLang.id as DSL)}
data-testid="cancel-btn"
/>
- {
- handleRunMonitor(saveLogValue)}
@@ -55,8 +53,8 @@ const Monitor = (props: Props) => {
/>
Start Profiler
-
-
+
+
{
aria-label="alert icon"
style={{ paddingTop: 2 }}
/>
-
-
-
+
+ {
>
Running Profiler will decrease throughput, avoid running it in
production databases.
-
-
-
+
+
+
{
The temporary log file will be automatically rewritten when the Profiler is reset."
data-testid="save-log-tooltip"
>
- {
const MonitorError = () => (
-
-
+
+
-
-
-
+
+
{error}
-
-
-
+
+
+
)
diff --git a/redisinsight/ui/src/components/monitor/MonitorHeader/MonitorHeader.tsx b/redisinsight/ui/src/components/monitor/MonitorHeader/MonitorHeader.tsx
index 76b5ba292a..67defe4510 100644
--- a/redisinsight/ui/src/components/monitor/MonitorHeader/MonitorHeader.tsx
+++ b/redisinsight/ui/src/components/monitor/MonitorHeader/MonitorHeader.tsx
@@ -3,6 +3,20 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIconButton } from 'uiBase/forms'
+import {
+ PlayIcon,
+ PauseIcon,
+ DeleteIcon,
+ BannedIcon,
+ RiIcon,
+} from 'uiBase/icons'
+import { WindowControlGroup } from 'uiBase/index'
+import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
+import { OnboardingTour, RiTooltip } from 'uiSrc/components'
+import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
monitorSelector,
resetMonitorItems,
@@ -10,21 +24,6 @@ import {
toggleHideMonitor,
toggleMonitor,
} from 'uiSrc/slices/cli/monitor'
-import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { OnboardingTour, RiTooltip } from 'uiSrc/components'
-import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
-
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import {
- PlayIcon,
- PauseIcon,
- DeleteIcon,
- BannedIcon,
-} from 'uiSrc/components/base/icons'
-import { WindowControlGroup } from 'uiSrc/components/base/shared/WindowControlGroup'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -80,19 +79,19 @@ const MonitorHeader = ({ handleRunMonitor }: Props) => {
return (
-
-
+
+
- Profiler
+ Profiler
-
+
{isStarted && (
-
+
{
}
anchorClassName="inline-flex"
>
- {
transparent: !isStarted || !items.length,
})}
>
-
-
+
)}
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.tsx b/redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.tsx
index 5459313fce..1d10136c9c 100644
--- a/redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.tsx
+++ b/redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.tsx
@@ -3,6 +3,10 @@ import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import AutoSizer from 'react-virtualized-auto-sizer'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RefreshIcon, DownloadIcon, RiIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
import {
monitorSelector,
resetProfiler,
@@ -12,14 +16,6 @@ import { cutDurationText } from 'uiSrc/utils'
import { downloadFile } from 'uiSrc/utils/dom/downloadFile'
import { fetchMonitorLog } from 'uiSrc/slices/cli/cli-output'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RefreshIcon, DownloadIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
const PADDINGS_OUTSIDE = 12
@@ -79,7 +75,7 @@ const MonitorLog = () => {
}}
data-testid="download-log-panel"
>
- {
(
{duration}
{width > SMALL_SCREEN_RESOLUTION && ' Running time'})
-
-
-
+
+
+
{isSaveToFile && (
- {
>
{width > SMALL_SCREEN_RESOLUTION && ' Download '}
Log
-
+
)}
-
-
-
+
+ {
>
Reset
{width > SMALL_SCREEN_RESOLUTION && ' Profiler'}
-
-
-
+
+
+
)}
diff --git a/redisinsight/ui/src/components/monitor/MonitorOutputList/MonitorOutputList.tsx b/redisinsight/ui/src/components/monitor/MonitorOutputList/MonitorOutputList.tsx
index 90e2df1a48..5ed010a3b8 100644
--- a/redisinsight/ui/src/components/monitor/MonitorOutputList/MonitorOutputList.tsx
+++ b/redisinsight/ui/src/components/monitor/MonitorOutputList/MonitorOutputList.tsx
@@ -6,7 +6,7 @@ import {
VariableSizeList as List,
} from 'react-window'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
import { DEFAULT_ERROR_MESSAGE, getFormatTime } from 'uiSrc/utils'
import styles from 'uiSrc/components/monitor/Monitor/styles.module.scss'
@@ -136,9 +136,9 @@ const MonitorOutputList = (props: Props) => {
)}
{isError && (
-
+
{message ?? DEFAULT_ERROR_MESSAGE}
-
+
)}
)
diff --git a/redisinsight/ui/src/components/multi-search/MultiSearch.tsx b/redisinsight/ui/src/components/multi-search/MultiSearch.tsx
index d7b1955e8b..f0af88fb1e 100644
--- a/redisinsight/ui/src/components/multi-search/MultiSearch.tsx
+++ b/redisinsight/ui/src/components/multi-search/MultiSearch.tsx
@@ -1,23 +1,15 @@
import React, { useEffect, useRef, useState } from 'react'
import cx from 'classnames'
-import * as keys from 'uiSrc/constants/keys'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { GroupBadge, RiTooltip } from 'uiSrc/components'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { Nullable } from 'uiSrc/utils'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiOutsideClickDetector } from 'uiBase/utils'
-import {
- CancelSlimIcon,
- SearchIcon,
- SwitchIcon,
-} from 'uiSrc/components/base/icons'
-import {
- ActionIconButton,
- IconButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
+import { CancelSlimIcon, SearchIcon, SwitchIcon, RiIcon } from 'uiBase/icons'
+import { RiActionIconButton, RiIconButton } from 'uiBase/forms'
+import { RiProgressBarLoader } from 'uiBase/display'
+import { Nullable } from 'uiSrc/utils'
+import { GroupBadge, RiTooltip } from 'uiSrc/components'
+import * as keys from 'uiSrc/constants/keys'
import styles from './styles.module.scss'
interface MultiSearchSuggestion {
@@ -153,7 +145,7 @@ const MultiSearch = (props: Props) => {
}
const SubmitBtn = () => (
- {
)
return (
-
+
{
/>
))}
- setIsInputFocus(true)}
onBlur={() => setIsInputFocus(false)}
ref={inputRef}
@@ -205,7 +196,7 @@ const MultiSearch = (props: Props) => {
data-testid="suggestions"
>
{suggestions?.loading && (
-
@@ -236,7 +227,7 @@ const MultiSearch = (props: Props) => {
>
{value}
- {
)}
{(value || !!options.length) && (
- {
content={suggestions?.buttonTooltipTitle}
position="bottom"
>
- {
{!disableSubmit && SubmitBtn()}
-
+
)
}
diff --git a/redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx b/redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx
index bb65d3d227..c998ee33dd 100644
--- a/redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/NavigationMenu.tsx
@@ -1,22 +1,22 @@
/* eslint-disable react/no-this-in-sfc */
import React from 'react'
+import { RiBadge } from 'uiBase/display'
+import {
+ RiSideBar,
+ RiSideBarContainer,
+ RiSideBarDivider,
+ RiSideBarFooter,
+ RiSideBarItem,
+ SideBarItemIcon,
+} from 'uiBase/layout'
+import { GithubIcon } from 'uiBase/icons'
import { FeatureFlags } from 'uiSrc/constants'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import { renderOnboardingTourWithChild } from 'uiSrc/utils/onboarding'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
-import {
- SideBar,
- SideBarContainer,
- SideBarDivider,
- SideBarFooter,
- SideBarItem,
- SideBarItemIcon,
-} from 'uiSrc/components/base/layout/sidebar'
-import { GithubIcon } from 'uiSrc/components/base/icons'
import { INavigations } from './navigation.types'
import CreateCloud from './components/create-cloud'
import HelpMenu from './components/help-menu/HelpMenu'
@@ -50,7 +50,7 @@ const NavigationMenu = () => {
transformOnHover
>
-
{
aria-label={nav.ariaLabel}
data-testid={nav.dataTestId}
/>
-
+
{nav.isBeta && (
)}
@@ -94,7 +94,7 @@ const NavigationMenu = () => {
dotClassName={styles.highlightDot}
transformOnHover
>
-
{
aria-label={nav.ariaLabel}
data-testid={nav.dataTestId}
/>
-
+
)
@@ -123,19 +123,19 @@ const NavigationMenu = () => {
}
return (
-
-
+
{connectedRdiInstanceId &&
isRdiWorkspace &&
privateRdiRoutes.map(renderNavItem)}
-
-
+
+
@@ -147,13 +147,13 @@ const NavigationMenu = () => {
{publicRoutes.map(renderPublicNavItem)}
-
-
+
- {
aria-label="github-repo-icon"
data-testid="github-repo-icon"
/>
-
-
+
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.styles.ts b/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.styles.ts
index 9775fef1c8..bc3ec9ea03 100644
--- a/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.styles.ts
+++ b/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.styles.ts
@@ -1,6 +1,5 @@
import styled from 'styled-components'
-import { Row } from 'uiSrc/components/base/layout/flex'
-import Tabs from 'uiSrc/components/base/layout/tabs'
+import { RiRow, RiTabs } from 'uiBase/layout'
export const StyledAppNavigation = styled.div`
display: grid;
@@ -14,12 +13,13 @@ export const StyledAppNavigation = styled.div`
box-sizing: border-box;
align-items: center;
`
-type NavContainerProps = React.ComponentProps
& {
+type NavContainerProps = React.ComponentProps & {
$borderLess?: boolean
}
-export const StyledAppNavigationContainer = styled(Row)`
+export const StyledAppNavigationContainer = styled(RiRow)`
height: 100%;
width: auto;
+ max-width: 50%;
&:first-child {
padding-inline-start: ${({ theme }) => theme.components.appBar.group.gap};
}
@@ -33,6 +33,6 @@ export const StyledAppNavigationContainer = styled(Row)`
${({ theme }) => theme.components.tabs.variants.default.tabsLine.color};
`
-export const StyledAppNavTab = styled(Tabs.TabBar.Trigger.Tab)`
+export const StyledAppNavTab = styled(RiTabs.TabBar.Trigger.Tab)`
padding-bottom: ${({ theme }) => theme.core.space.space200} !important;
`
diff --git a/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.tsx b/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.tsx
index ee7e942ce1..d32ea5cdb6 100644
--- a/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/app-navigation/AppNavigation.tsx
@@ -1,6 +1,5 @@
import React, { ReactNode } from 'react'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { Row } from 'uiSrc/components/base/layout/flex'
+import { RiTabs, TabInfo, RiRow } from 'uiBase/layout'
import {
StyledAppNavigation,
StyledAppNavigationContainer,
@@ -12,7 +11,7 @@ type AppNavigationContainerProps = {
children?: ReactNode
borderLess?: boolean
} & Pick<
- React.ComponentProps,
+ React.ComponentProps,
'gap' | 'justify' | 'align' | 'grow' | 'style'
>
const AppNavigationContainer = ({
@@ -54,8 +53,13 @@ const AppNavigation = ({ actions, onChange }: AppNavigationProps) => {
return (
-
-
+ {
const tabNavItem = privateRoutes.find(
@@ -67,22 +71,22 @@ const AppNavigation = ({ actions, onChange }: AppNavigationProps) => {
}
}}
>
-
+
{navTabs.map(({ value, label, disabled }, index) => {
const key = `${value}-${index}`
return (
-
{label ?? value}
-
-
+
+
)
})}
-
-
+
+
{actions}
diff --git a/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.spec.tsx b/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.spec.tsx
index 4e8997d22b..40de81cd92 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.spec.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.spec.tsx
@@ -1,5 +1,6 @@
import React from 'react'
import { cloneDeep } from 'lodash'
+import { RiSideBar } from 'uiBase/layout'
import { cleanup, mockedStore, render, fireEvent } from 'uiSrc/utils/test-utils'
import { setSSOFlow } from 'uiSrc/slices/instances/cloud'
@@ -9,7 +10,6 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { sendEventTelemetry } from 'uiSrc/telemetry'
import { HELP_LINKS } from 'uiSrc/pages/home/constants'
import * as appFeaturesSlice from 'uiSrc/slices/app/features'
-import { SideBar } from 'uiSrc/components/base/layout/sidebar'
import CreateCloud from './CreateCloud'
jest.mock('uiSrc/telemetry', () => ({
@@ -38,7 +38,11 @@ beforeEach(() => {
store.clearActions()
})
-const sideBarWithCreateCloud =
+const sideBarWithCreateCloud = (
+
+
+
+)
describe('CreateCloud', () => {
it('should render', () => {
diff --git a/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.tsx b/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.tsx
index 0c0e6f55db..8019516e92 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/create-cloud/CreateCloud.tsx
@@ -1,5 +1,7 @@
import React from 'react'
+import { RiSideBarItem, SideBarItemIcon } from 'uiBase/layout'
+import { RiLink } from 'uiBase/display'
import { FeatureFlagComponent, OAuthSsoHandlerDialog } from 'uiSrc/components'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
@@ -9,9 +11,6 @@ import { getUtmExternalLink } from 'uiSrc/utils/links'
import { sendEventTelemetry } from 'uiSrc/telemetry'
import { HELP_LINKS } from 'uiSrc/pages/home/constants'
import { FeatureFlags } from 'uiSrc/constants'
-import { SideBarItem } from 'uiSrc/components/base/layout/sidebar'
-import { SideBarItemIcon } from 'uiSrc/components/base/layout/sidebar/SideBarItemIcon'
-import { Link } from 'uiSrc/components/base/link/Link'
const CreateCloud = () => {
const onCLickLink = (isSSOEnabled: boolean) => {
@@ -29,14 +28,14 @@ const CreateCloud = () => {
{(ssoCloudHandlerClick, isSSOEnabled) => (
-
- {
aria-label="cloud-db-icon"
data-testid="cloud-db-icon"
/>
-
-
+
+
)}
diff --git a/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.spec.tsx b/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.spec.tsx
index 8c854292ff..e09d68da46 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.spec.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.spec.tsx
@@ -1,5 +1,6 @@
import React from 'react'
import { cloneDeep, set } from 'lodash'
+import { RiSideBar } from 'uiBase/layout'
import {
render,
screen,
@@ -19,7 +20,6 @@ import {
} from 'uiSrc/slices/app/info'
import { FeatureFlags } from 'uiSrc/constants'
-import { SideBar } from 'uiSrc/components/base/layout/sidebar'
import HelpMenu from './HelpMenu'
jest.mock('uiSrc/telemetry', () => ({
@@ -41,7 +41,11 @@ beforeEach(() => {
store.clearActions()
})
-const sideBarWithHelpMenu =
+const sideBarWithHelpMenu = (
+
+
+
+)
describe('HelpMenu', () => {
it('should render', () => {
diff --git a/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.tsx b/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.tsx
index 6e1ea95498..9fe8d3a6eb 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.tsx
@@ -2,6 +2,13 @@ import cx from 'classnames'
import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiPopover } from 'uiBase/index'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiTitle, RiText } from 'uiBase/text'
+import { SupportIcon, RiIcon } from 'uiBase/icons'
+import { RiLink } from 'uiBase/display'
+import { RiSideBarItem, SideBarItemIcon } from 'uiBase/layout/sidebar'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import { ReleaseNotesSource } from 'uiSrc/constants/telemetry'
import {
@@ -16,18 +23,6 @@ import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { FeatureFlags } from 'uiSrc/constants'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { RiPopover } from 'uiSrc/components/base'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { SupportIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import {
- SideBarItem,
- SideBarItemIcon,
-} from 'uiSrc/components/base/layout/sidebar'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import navStyles from '../../styles.module.scss'
import styles from './styles.module.scss'
@@ -70,7 +65,7 @@ const HelpMenu = () => {
}
const HelpMenuButton = (
- {
aria-label="Help Menu"
data-testid="help-menu-button"
/>
-
+
)
return (
@@ -96,47 +91,47 @@ const HelpMenu = () => {
button={HelpMenuButton}
>
-
+
Help Center
-
-
-
+
+
-
-
+
-
-
+
Provide Feedback
-
-
-
+
+
+
-
+
- onKeyboardShortcutClick()}
data-testid="shortcuts-btn"
>
Keyboard Shortcuts
-
+
@@ -148,33 +143,33 @@ const HelpMenu = () => {
>
-
-
+
Release Notes
-
-
+
+
- onResetOnboardingClick()}
data-testid="reset-onboarding-btn"
>
Reset Onboarding
-
+
-
-
+
+
)
diff --git a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/Notification/Notification.tsx b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/Notification/Notification.tsx
index 06af7291da..f806cd368c 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/Notification/Notification.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/Notification/Notification.tsx
@@ -3,15 +3,13 @@ import cx from 'classnames'
import { format } from 'date-fns'
import parse from 'html-react-parser'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { TitleSize, RiTitle, RiText } from 'uiBase/text'
+import { RiBadge } from 'uiBase/display'
import { NOTIFICATION_DATE_FORMAT } from 'uiSrc/constants/notifications'
import { IGlobalNotification } from 'uiSrc/slices/interfaces'
import { truncateText } from 'uiSrc/utils'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { TitleSize, Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
-
import styles from '../styles.module.scss'
export interface Props {
@@ -24,31 +22,35 @@ const Notification = (props: Props) => {
return (
<>
-
{notification.title}
-
+
-
{parse(notification.body)}
-
+
-
-
-
+
+
+
{format(notification.timestamp * 1000, NOTIFICATION_DATE_FORMAT)}
-
-
+
+
{notification.category && (
-
+
{
data-testid="notification-category"
label={truncateText(notification.category, 32)}
/>
-
+
)}
-
+
>
)
}
diff --git a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationCenter.tsx b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationCenter.tsx
index 59148bcedf..3be14b4fa9 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationCenter.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationCenter.tsx
@@ -1,6 +1,8 @@
import cx from 'classnames'
import React, { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/display'
import {
fetchNotificationsAction,
notificationCenterSelector,
@@ -8,9 +10,6 @@ import {
unreadNotificationsAction,
} from 'uiSrc/slices/app/notifications'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
import Notification from './Notification'
import styles from './styles.module.scss'
@@ -55,14 +54,14 @@ const NotificationCenter = () => {
className={styles.popoverNotificationCenter}
data-testid="notification-center"
>
-
+
Notification Center
-
+
{!hasNotifications && (
-
+
No notifications to display.
-
+
)}
{hasNotifications && (
diff --git a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.spec.tsx b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.spec.tsx
index 36e094cfa3..f014880fc1 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.spec.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.spec.tsx
@@ -1,12 +1,12 @@
+import React from 'react'
import { fireEvent } from '@testing-library/react'
import { cloneDeep } from 'lodash'
-import React from 'react'
+import { RiSideBar } from 'uiBase/layout'
import {
notificationCenterSelector,
setIsCenterOpen,
} from 'uiSrc/slices/app/notifications'
import { cleanup, mockedStore, render, screen } from 'uiSrc/utils/test-utils'
-import { SideBar } from 'uiSrc/components/base/layout/sidebar'
import NotificationMenu from './NotificationMenu'
jest.mock('uiSrc/slices/app/notifications', () => ({
@@ -25,7 +25,11 @@ beforeEach(() => {
store.clearActions()
})
-const sideBarWithNotificationMenu =
+const sideBarWithNotificationMenu = (
+
+
+
+)
describe('NotificationMenu', () => {
it('should render', () => {
diff --git a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.tsx b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.tsx
index cc43489f58..6673ea435f 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/NotificationMenu.tsx
@@ -1,15 +1,12 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { NotificationsIcon } from 'uiBase/icons'
+import { RiSideBarItem, SideBarItemIcon } from 'uiBase/layout/sidebar'
import {
notificationCenterSelector,
setIsCenterOpen,
} from 'uiSrc/slices/app/notifications'
-import { NotificationsIcon } from 'uiSrc/components/base/icons'
-import {
- SideBarItem,
- SideBarItemIcon,
-} from 'uiSrc/components/base/layout/sidebar'
import NotificationCenter from './NotificationCenter'
import PopoverNotification from './PopoverNotification'
@@ -25,7 +22,7 @@ const NavButton = () => {
}
const Btn = (
- {
aria-label="Notification Menu"
data-testid="notification-menu-button"
/>
-
+
)
return (
diff --git a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/PopoverNotification/PopoverNotification.tsx b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/PopoverNotification/PopoverNotification.tsx
index 84203da6f8..f99b11e3fa 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/notifications-center/PopoverNotification/PopoverNotification.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/notifications-center/PopoverNotification/PopoverNotification.tsx
@@ -1,6 +1,9 @@
import cx from 'classnames'
import React, { useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiPopover } from 'uiBase/display'
import {
notificationCenterSelector,
setIsCenterOpen,
@@ -9,9 +12,6 @@ import {
} from 'uiSrc/slices/app/notifications'
import { IGlobalNotification } from 'uiSrc/slices/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { RiPopover } from 'uiSrc/components/base'
import Notification from '../Notification'
import styles from '../styles.module.scss'
@@ -106,7 +106,7 @@ const PopoverNotification = () => {
className={styles.popoverNotification}
data-testid="notification-popover"
>
- {
@@ -23,9 +23,14 @@ describe('RedisLogo', () => {
`app.features.featureFlags.features.${FeatureFlags.envDependent}`,
{ flag: true },
)
- render( , {
- store: mockStore(initialStoreState),
- })
+ render(
+
+
+ ,
+ {
+ store: mockStore(initialStoreState),
+ },
+ )
expect(screen.getByTestId('redis-logo-link')).toBeInTheDocument()
})
@@ -36,9 +41,14 @@ describe('RedisLogo', () => {
`app.features.featureFlags.features.${FeatureFlags.envDependent}`,
{ flag: false },
)
- render( , {
- store: mockStore(initialStoreState),
- })
+ render(
+
+
+ ,
+ {
+ store: mockStore(initialStoreState),
+ },
+ )
expect(screen.queryByTestId('redis-logo-link')).not.toBeInTheDocument()
})
diff --git a/redisinsight/ui/src/components/navigation-menu/components/redis-logo/RedisLogo.tsx b/redisinsight/ui/src/components/navigation-menu/components/redis-logo/RedisLogo.tsx
index 1d3164d5b8..562c82c3b8 100644
--- a/redisinsight/ui/src/components/navigation-menu/components/redis-logo/RedisLogo.tsx
+++ b/redisinsight/ui/src/components/navigation-menu/components/redis-logo/RedisLogo.tsx
@@ -2,16 +2,13 @@ import cx from 'classnames'
import React from 'react'
import { useSelector } from 'react-redux'
+import { RiSideBarItem, SideBarItemIcon } from 'uiBase/layout'
+import { RiLink } from 'uiBase/display'
import { BuildType } from 'uiSrc/constants/env'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
-import {
- SideBarItem,
- SideBarItemIcon,
-} from 'uiSrc/components/base/layout/sidebar'
import { getRouterLinkProps } from 'uiSrc/services'
import { Pages } from 'uiSrc/constants'
-import { Link } from 'uiSrc/components/base/link/Link'
import LogoSVG from 'uiSrc/assets/img/logo_small.svg?react'
import styles from '../../styles.module.scss'
@@ -32,12 +29,12 @@ export const RedisLogo = ({ isRdiWorkspace }: Props) => {
}
return (
-
- {
style={{ marginBlock: '2rem', marginInline: 'auto' }}
>
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/navigation-menu/hooks/useNavigation.ts b/redisinsight/ui/src/components/navigation-menu/hooks/useNavigation.ts
index 62e4968bf7..51b084dbed 100644
--- a/redisinsight/ui/src/components/navigation-menu/hooks/useNavigation.ts
+++ b/redisinsight/ui/src/components/navigation-menu/hooks/useNavigation.ts
@@ -3,6 +3,15 @@ import { last } from 'lodash'
import { useDispatch, useSelector } from 'react-redux'
import { useEffect, useState } from 'react'
+import {
+ BrowserIcon,
+ PipelineManagementIcon,
+ PipelineStatisticsIcon,
+ PubSubIcon,
+ SlowLogIcon,
+ WorkbenchIcon,
+ SettingsIcon,
+} from 'uiBase/icons'
import { Props as HighlightedFeatureProps } from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
import { ANALYTICS_ROUTES } from 'uiSrc/components/main-router/constants/sub-routes'
import {
@@ -18,15 +27,6 @@ import { Pages, FeatureFlags, PageNames } from 'uiSrc/constants'
import { appContextSelector } from 'uiSrc/slices/app/context'
import { AppWorkspace } from 'uiSrc/slices/interfaces'
-import {
- BrowserIcon,
- PipelineManagementIcon,
- PipelineStatisticsIcon,
- PubSubIcon,
- SlowLogIcon,
- WorkbenchIcon,
- SettingsIcon,
-} from 'uiSrc/components/base/icons'
import { INavigations } from '../navigation.types'
const pubSubPath = `/${PageNames.pubSub}`
diff --git a/redisinsight/ui/src/components/navigation-menu/navigation.types.ts b/redisinsight/ui/src/components/navigation-menu/navigation.types.ts
index b403d8f398..a975c53411 100644
--- a/redisinsight/ui/src/components/navigation-menu/navigation.types.ts
+++ b/redisinsight/ui/src/components/navigation-menu/navigation.types.ts
@@ -1,4 +1,4 @@
-import { IconType } from 'uiSrc/components/base/forms/buttons'
+import { IconType } from 'uiBase/forms'
import { FeatureFlags } from 'uiSrc/constants'
export interface INavigations {
diff --git a/redisinsight/ui/src/components/new-index/create-index-step/field-box/FieldBox.tsx b/redisinsight/ui/src/components/new-index/create-index-step/field-box/FieldBox.tsx
index 08c016229e..6ce4a3b458 100644
--- a/redisinsight/ui/src/components/new-index/create-index-step/field-box/FieldBox.tsx
+++ b/redisinsight/ui/src/components/new-index/create-index-step/field-box/FieldBox.tsx
@@ -1,14 +1,14 @@
import React from 'react'
+// TODO - 18.08.25 - Replace this with local implementations
import {
BoxSelectionGroup,
BoxSelectionGroupItemComposeProps,
Checkbox,
} from '@redis-ui/components'
-import { EditIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons/IconButton'
-import { Text } from 'uiSrc/components/base/text'
-
+import { RiIconButton } from 'uiBase/forms'
+import { EditIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
import {
BoxContent,
BoxHeader,
@@ -34,18 +34,18 @@ export const FieldBox = ({ box, ...rest }: FieldBoxProps) => {
-
+
-
+
{label}
-
+
{text && (
-
+
{text}
-
+
)}
diff --git a/redisinsight/ui/src/components/new-index/selection-box/SelectionBox.styles.tsx b/redisinsight/ui/src/components/new-index/selection-box/SelectionBox.styles.tsx
index f3fb32f8cb..bbb2bdbc61 100644
--- a/redisinsight/ui/src/components/new-index/selection-box/SelectionBox.styles.tsx
+++ b/redisinsight/ui/src/components/new-index/selection-box/SelectionBox.styles.tsx
@@ -1,17 +1,17 @@
import React from 'react'
import styled from 'styled-components'
-import { Text, Title } from 'uiSrc/components/base/text'
+import { RiText, RiTitle } from 'uiBase/text'
export const StyledBoxContent = styled.div`
padding: ${({ theme }) => theme.core.space.space200};
text-align: left;
`
-export const StyledTitle = styled(Title)`
+export const StyledTitle = styled(RiTitle)`
margin-top: ${({ theme }) => theme.core.space.space050};
`
-export const StyledText = styled(Text)`
+export const StyledText = styled(RiText)`
margin-top: ${({ theme }) => theme.core.space.space050};
white-space: normal;
overflow-wrap: break-word;
@@ -31,6 +31,6 @@ export const StyledDisabledBar = styled.div`
export const DisabledBar = () => (
- Coming soon
+ Coming soon
)
diff --git a/redisinsight/ui/src/components/notifications/Notifications.tsx b/redisinsight/ui/src/components/notifications/Notifications.tsx
index c097565f59..876fe36a0f 100644
--- a/redisinsight/ui/src/components/notifications/Notifications.tsx
+++ b/redisinsight/ui/src/components/notifications/Notifications.tsx
@@ -1,6 +1,9 @@
import React, { useEffect, useRef } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiColorText } from 'uiBase/text'
+import { InfoIcon } from 'uiBase/icons'
+import { riToast, RiToaster } from 'uiBase/display'
import {
errorsSelector,
infiniteNotificationsSelector,
@@ -15,9 +18,6 @@ import { DEFAULT_ERROR_MESSAGE } from 'uiSrc/utils'
import { showOAuthProgress } from 'uiSrc/slices/oauth/cloud'
import { CustomErrorCodes } from 'uiSrc/constants'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { ColorText } from 'uiSrc/components/base/text'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { riToast, RiToaster } from 'uiSrc/components/base/display/toast'
import errorMessages from './error-messages'
import { InfiniteMessagesIds } from './components'
@@ -51,7 +51,7 @@ const Notifications = () => {
}
const getSuccessText = (text: string | JSX.Element | JSX.Element[]) => (
- {text}
+ {text}
)
const showSuccessToasts = (data: IMessage[]) =>
diff --git a/redisinsight/ui/src/components/notifications/components/cloud-capi-unauthorized/CloudCapiUnAuthorizedErrorContent.tsx b/redisinsight/ui/src/components/notifications/components/cloud-capi-unauthorized/CloudCapiUnAuthorizedErrorContent.tsx
index cb3176a386..9e34d92257 100644
--- a/redisinsight/ui/src/components/notifications/components/cloud-capi-unauthorized/CloudCapiUnAuthorizedErrorContent.tsx
+++ b/redisinsight/ui/src/components/notifications/components/cloud-capi-unauthorized/CloudCapiUnAuthorizedErrorContent.tsx
@@ -1,17 +1,14 @@
import React from 'react'
import { useDispatch } from 'react-redux'
import { useHistory } from 'react-router-dom'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiDestructiveButton, RiEmptyButton } from 'uiBase/forms'
import { removeCapiKeyAction } from 'uiSrc/slices/oauth/cloud'
import { Pages } from 'uiSrc/constants'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- DestructiveButton,
- EmptyButton,
-} from 'uiSrc/components/base/forms/buttons'
export interface Props {
resourceId: string
@@ -48,12 +45,11 @@ const CloudCapiUnAuthorizedErrorContent = ({
return (
<>
-
- {text}
-
-
-
- {text}
+
+
+
+
Go to Settings
-
-
-
-
+
+
+
Remove API key
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/components/notifications/components/default-error-content/DefaultErrorContent.tsx b/redisinsight/ui/src/components/notifications/components/default-error-content/DefaultErrorContent.tsx
index 76ea835662..66949aa0fc 100644
--- a/redisinsight/ui/src/components/notifications/components/default-error-content/DefaultErrorContent.tsx
+++ b/redisinsight/ui/src/components/notifications/components/default-error-content/DefaultErrorContent.tsx
@@ -1,15 +1,13 @@
import React from 'react'
-import { ColorText } from 'uiSrc/components/base/text'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
+import { RiColorText } from 'uiBase/text'
export interface Props {
text: string | JSX.Element | JSX.Element[]
}
// TODO: use i18n file for texts
const DefaultErrorContent = ({ text }: Props) => (
- {text}
+ {text}
)
export default DefaultErrorContent
diff --git a/redisinsight/ui/src/components/notifications/components/encryption-error-content/EncryptionErrorContent.tsx b/redisinsight/ui/src/components/notifications/components/encryption-error-content/EncryptionErrorContent.tsx
index 599b242f10..f9cf33a85e 100644
--- a/redisinsight/ui/src/components/notifications/components/encryption-error-content/EncryptionErrorContent.tsx
+++ b/redisinsight/ui/src/components/notifications/components/encryption-error-content/EncryptionErrorContent.tsx
@@ -1,15 +1,12 @@
import React from 'react'
import { matchPath, useHistory, useLocation } from 'react-router-dom'
import { useDispatch } from 'react-redux'
-import { Pages } from 'uiSrc/constants'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiDestructiveButton, RiEmptyButton } from 'uiBase/forms'
import { updateUserConfigSettingsAction } from 'uiSrc/slices/user/user-settings'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- DestructiveButton,
- EmptyButton,
-} from 'uiSrc/components/base/forms/buttons'
+import { Pages } from 'uiSrc/constants'
export interface Props {
onClose?: () => void
@@ -44,39 +41,39 @@ const EncryptionErrorContent = (props: Props) => {
}
return (
<>
-
+
Check the system keychain or disable encryption to proceed.
-
-
-
+
+
+
Disabling encryption will result in storing sensitive information
locally in plain text. Re-enter database connection information to work
with databases.
-
-
-
-
+
+
+
+
-
Disable Encryption
-
+
-
-
-
+
+
Cancel
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx b/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx
index fd18257a64..5021024ac4 100644
--- a/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx
+++ b/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx
@@ -1,6 +1,12 @@
import React from 'react'
import { find } from 'lodash'
import cx from 'classnames'
+import { RiText, RiTitle } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiLink, RiLoader } from 'uiBase/display'
import { CloudJobName, CloudJobStep } from 'uiSrc/electron/constants'
import ExternalLink from 'uiSrc/components/base/external-link'
import Divider from 'uiSrc/components/divider/Divider'
@@ -10,22 +16,11 @@ import { CloudSuccessResult } from 'uiSrc/slices/interfaces'
import { Maybe } from 'uiSrc/utils'
import { getUtmExternalLink } from 'uiSrc/utils/links'
-import { Text } from 'uiSrc/components/base/text'
import {
EXTERNAL_LINKS,
UTM_CAMPAINGS,
UTM_MEDIUMS,
} from 'uiSrc/constants/links'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Loader } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
export enum InfiniteMessagesIds {
@@ -49,19 +44,19 @@ export const INFINITE_MESSAGES = {
id: InfiniteMessagesIds.oAuthProgress,
Inner: (
-
-
-
-
-
- Authenticating…
-
+
+
+
+
+
+
+ Authenticating…
+
+
This may take several seconds, but it is totally worth it!
-
-
-
+
+
+
),
}),
@@ -69,14 +64,12 @@ export const INFINITE_MESSAGES = {
id: InfiniteMessagesIds.oAuthProgress,
Inner: (
-
-
-
-
-
-
+
+
+
+
+
+
{(step === CloudJobStep.Credentials || !step) &&
'Processing Cloud API keys…'}
@@ -87,17 +80,17 @@ export const INFINITE_MESSAGES = {
{step === CloudJobStep.Import &&
'Importing a free trial Cloud database…'}
-
-
+
+
This may take several minutes, but it is totally worth it!
-
-
-
+
+
+
You can continue working in Redis Insight, and we will notify you
once done.
-
-
-
+
+
+
),
}),
@@ -128,70 +121,72 @@ export const INFINITE_MESSAGES = {
}}
data-testid="success-create-db-notification"
>
-
-
+
+
-
-
- Congratulations!
-
+
+
+
+ Congratulations!
+
+
{text}
-
+
Notice: the database will be deleted after 15 days of
inactivity.
-
+
{!!details && (
<>
-
+
-
-
-
- Plan
-
-
- Free
-
-
-
-
- Cloud Vendor
-
-
+
+
+ Plan
+
+
+ Free
+
+
+
+
+ Cloud Vendor
+
+
{!!vendor?.icon && }
- {vendor?.label}
-
-
-
-
- Region
-
-
- {details.region}
-
-
+ {vendor?.label}
+
+
+
+
+ Region
+
+
+ {details.region}
+
+
>
)}
-
-
-
+
+
+
Manage DB
-
-
-
+
+ onSuccess()}
data-testid="notification-connect-db"
>
Connect
-
-
-
-
-
+
+
+
+
+
),
}
@@ -209,34 +204,34 @@ export const INFINITE_MESSAGES = {
}}
data-testid="database-exists-notification"
>
-
+
You already have a free trial Redis Cloud subscription.
-
-
+
+
Do you want to import your existing database into Redis Insight?
-
-
-
-
-
+
+
+
+ onSuccess?.()}
data-testid="import-db-sso-btn"
>
Import
-
-
-
-
+
+
+ onClose?.()}
data-testid="cancel-import-db-sso-btn"
>
Cancel
-
-
-
+
+
+
),
}),
@@ -253,36 +248,36 @@ export const INFINITE_MESSAGES = {
}}
data-testid="database-import-forbidden-notification"
>
-
+
Unable to import Cloud database.
-
-
+
+
Adding your Redis Cloud database to Redis Insight is disabled due to a
setting restricting database connection management.
-
+
Log in to{' '}
-
Redis Cloud
- {' '}
+ {' '}
to check your database.
-
-
-
-
-
+
+
+
+ onClose?.()}
data-testid="database-import-forbidden-notification-ok-btn"
>
Ok
-
-
-
+
+
+
),
}),
@@ -299,35 +294,35 @@ export const INFINITE_MESSAGES = {
}}
data-testid="subscription-exists-notification"
>
-
+
Your subscription does not have a free trial Redis Cloud database.
-
-
+
+
Do you want to create a free trial database in your existing
subscription?
-
-
-
-
-
+
+
+
+ onSuccess?.()}
data-testid="create-subscription-sso-btn"
>
Create
-
-
-
-
+
+
+ onClose?.()}
data-testid="cancel-create-subscription-sso-btn"
>
Cancel
-
-
-
+
+
+
),
}),
@@ -335,21 +330,19 @@ export const INFINITE_MESSAGES = {
id: InfiniteMessagesIds.autoCreateDb,
Inner: (
-
-
-
-
-
-
+
+
+
+
+
+
Connecting to your database
-
-
+
+
This may take several minutes, but it is totally worth it!
-
-
-
+
+
+
),
}),
@@ -366,10 +359,10 @@ export const INFINITE_MESSAGES = {
}}
data-testid="app-update-available-notification"
>
-
+
New version is now available
-
-
+
+
<>
With Redis Insight
{` ${version} `}
@@ -377,15 +370,15 @@ export const INFINITE_MESSAGES = {
Restart Redis Insight to install updates.
>
-
+
- onSuccess?.()}
data-testid="app-restart-btn"
>
Restart
-
+
),
}),
@@ -403,32 +396,34 @@ export const INFINITE_MESSAGES = {
}}
data-testid="success-deploy-pipeline-notification"
>
-
-
+
+
-
-
- Congratulations!
-
+
+
+
+ Congratulations!
+
+
Deployment completed successfully!
Check out the pipeline statistics page.
-
-
+
+
{/* // TODO remove display none when statistics page will be available */}
-
-
-
+
+ { }}
+ onClick={() => {}}
data-testid="notification-connect-db"
>
Statistics
-
-
-
-
-
+
+
+
+
+
),
}),
diff --git a/redisinsight/ui/src/components/notifications/components/rdi-deploy-error-content/RdiDeployErrorContent.tsx b/redisinsight/ui/src/components/notifications/components/rdi-deploy-error-content/RdiDeployErrorContent.tsx
index ef14c85247..142f9d2259 100644
--- a/redisinsight/ui/src/components/notifications/components/rdi-deploy-error-content/RdiDeployErrorContent.tsx
+++ b/redisinsight/ui/src/components/notifications/components/rdi-deploy-error-content/RdiDeployErrorContent.tsx
@@ -1,9 +1,8 @@
import React, { useEffect, useMemo } from 'react'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { DestructiveButton } from 'uiSrc/components/base/forms/buttons'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiLink } from 'uiBase/display'
+import { RiSpacer, RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiDestructiveButton } from 'uiBase/forms'
+import { RiColorText } from 'uiBase/text'
export interface Props {
message: string
@@ -28,11 +27,11 @@ const RdiDeployErrorContent = (props: Props) => {
return (
<>
-
-
-
+
+
+
Review the error log for details.
- {
style={{ marginTop: '10px', paddingLeft: 0 }}
>
Download Error Log File
-
-
-
-
+
+
+
+
-
+
{/* // TODO remove display none when logs column will be available */}
-
-
-
+
+ {}}
className="toast-danger-btn"
data-testid="see-errors-btn"
>
Remove API key
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/components/notifications/error-messages.tsx b/redisinsight/ui/src/components/notifications/error-messages.tsx
index 4fc04f92cd..9debd56181 100644
--- a/redisinsight/ui/src/components/notifications/error-messages.tsx
+++ b/redisinsight/ui/src/components/notifications/error-messages.tsx
@@ -1,7 +1,7 @@
import React from 'react'
-import { riToast } from 'uiSrc/components/base/display/toast'
-import { InfoIcon, ToastDangerIcon } from 'uiSrc/components/base/icons'
+import { riToast } from 'uiBase/display'
+import { InfoIcon, ToastDangerIcon } from 'uiBase/icons'
import RdiDeployErrorContent from './components/rdi-deploy-error-content'
import { EncryptionErrorContent, DefaultErrorContent } from './components'
diff --git a/redisinsight/ui/src/components/notifications/success-messages.tsx b/redisinsight/ui/src/components/notifications/success-messages.tsx
index 0b86481c91..e490865b59 100644
--- a/redisinsight/ui/src/components/notifications/success-messages.tsx
+++ b/redisinsight/ui/src/components/notifications/success-messages.tsx
@@ -1,4 +1,6 @@
import React from 'react'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import {
IBulkActionOverview,
@@ -12,8 +14,6 @@ import {
millisecondsFormat,
} from 'uiSrc/utils'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
// TODO: use i18n file for texts
@@ -216,47 +216,47 @@ export default {
{fileName ? (
<>
- Commands executed from file:
- {formatLongName(fileName, 34, 5)}
+ Commands executed from file:
+ {formatLongName(fileName, 34, 5)}
>
) : null}
>
),
message: (
-
-
-
+
+
+
{numberWithSpaces(processed)}
-
-
+
+
Commands Processed
-
-
-
-
+
+
+
+
{numberWithSpaces(succeed)}
-
-
+
+
Success
-
-
-
-
+
+
+
+
{numberWithSpaces(failed)}
-
-
+
+
Errors
-
-
-
-
+
+
+
+
{millisecondsFormat(data?.duration || 0, 'H:mm:ss.SSS')}
-
-
+
+
Time Taken
-
-
-
+
+
+
),
className: 'dynamic',
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-connect-free-db/OAuthConnectFreeDb.tsx b/redisinsight/ui/src/components/oauth/oauth-connect-free-db/OAuthConnectFreeDb.tsx
index 66646b82af..fd8fc02973 100644
--- a/redisinsight/ui/src/components/oauth/oauth-connect-free-db/OAuthConnectFreeDb.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-connect-free-db/OAuthConnectFreeDb.tsx
@@ -3,6 +3,8 @@ import { useDispatch, useSelector } from 'react-redux'
import { useLocation } from 'react-router-dom'
import cx from 'classnames'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { ExportIcon } from 'uiBase/icons'
import {
TelemetryEvent,
getRedisModulesSummary,
@@ -20,8 +22,6 @@ import { openNewWindowDatabase } from 'uiSrc/utils'
import { Pages } from 'uiSrc/constants'
import { setCapability } from 'uiSrc/slices/app/context'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { ExportIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
interface Props {
@@ -85,7 +85,7 @@ const OAuthConnectFreeDb = ({
}
return (
-
Launch database
-
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.spec.tsx b/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.spec.tsx
index 07bfde00cc..85292f4443 100644
--- a/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.spec.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.spec.tsx
@@ -17,6 +17,7 @@ import {
} from 'uiSrc/slices/oauth/cloud'
import { apiService } from 'uiSrc/services'
import { loadSubscriptionsRedisCloud } from 'uiSrc/slices/instances/cloud'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import OAuthSelectAccountDialog from './OAuthSelectAccountDialog'
jest.mock('uiSrc/telemetry', () => ({
@@ -45,22 +46,10 @@ jest.mock('uiSrc/slices/instances/cloud', () => ({
}),
}))
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
let store: typeof mockedStore
diff --git a/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx b/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx
index 58382b435b..82498732f0 100644
--- a/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-select-account-dialog/OAuthSelectAccountDialog.tsx
@@ -3,6 +3,18 @@ import { useDispatch, useSelector } from 'react-redux'
import { useFormik } from 'formik'
import { useHistory } from 'react-router-dom'
+import {
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiRadioGroupItemIndicator,
+ RiRadioGroupItemLabel,
+ RiRadioGroupItemRoot,
+ RiRadioGroupRoot,
+} from 'uiBase/forms'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiModal } from 'uiBase/display'
+import { CancelIcon } from 'uiBase/icons'
import {
activateAccount,
createFreeDbJob,
@@ -31,20 +43,6 @@ import {
import { CloudJobName, CloudJobStep } from 'uiSrc/electron/constants'
import { OAuthSocialAction } from 'uiSrc/slices/interfaces'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import {
- RiRadioGroupItemIndicator,
- RiRadioGroupItemLabel,
- RiRadioGroupItemRoot,
- RiRadioGroupRoot,
-} from 'uiSrc/components/base/forms/radio-group/RadioGroup'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Modal } from 'uiSrc/components/base/display'
-import { CancelIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
interface FormValues {
@@ -173,35 +171,35 @@ const OAuthSelectAccountDialog = () => {
const radios = accounts.map(({ id, name = '' }) => ({
id: `${id}`,
label: (
-
+
{name}
-
+
{id}
-
-
+
+
),
}))
return (
-
-
+
-
-
+
Connect to Redis Cloud
-
-
+
+
-
+
Select an account to connect to:
-
-
+
+
handleChangeAccountIdFormat(id)}
@@ -215,15 +213,15 @@ const OAuthSelectAccountDialog = () => {
-
Cancel
-
-
+ {
aria-labelledby="submit oauth select account dialog"
>
Select account
-
+
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.spec.tsx b/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.spec.tsx
index efe3a9ac31..df35ebb2ff 100644
--- a/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.spec.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.spec.tsx
@@ -16,6 +16,7 @@ import {
MOCK_RS_PREVIEW_REGION,
MOCK_CUSTOM_REGIONS,
} from 'uiSrc/constants/mocks/mock-sso'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import OAuthSelectPlan from './OAuthSelectPlan'
jest.mock('uiSrc/telemetry', () => ({
@@ -62,22 +63,10 @@ jest.mock('uiSrc/slices/app/features', () => ({
}),
}))
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+ return mockModal(actual)
})
let store: typeof mockedStore
diff --git a/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx b/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx
index 353338af93..3289bdcf60 100644
--- a/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx
@@ -3,6 +3,15 @@ import { toNumber, filter, get, find, first } from 'lodash'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import {
+ RiEmptyButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiSelect,
+} from 'uiBase/forms'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiIcon, CancelIcon } from 'uiBase/icons'
+import { RiModal } from 'uiBase/display'
import {
createFreeDbJob,
oauthCloudPlanSelector,
@@ -17,16 +26,6 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { FeatureFlags } from 'uiSrc/constants'
import { Region } from 'uiSrc/slices/interfaces'
-import {
- EmptyButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { Modal } from 'uiSrc/components/base/display'
-import { CancelIcon } from 'uiSrc/components/base/icons'
import { CloudSubscriptionPlanResponse } from 'apiSrc/modules/cloud/subscription/dto'
import { OAuthProvider, OAuthProviders } from './constants'
import styles from './styles.module.scss'
@@ -119,23 +118,23 @@ const OAuthSelectPlan = () => {
find(rsRegions, { provider })?.regions || []
return (
-
{`${countryName} (${cityName})`}
- {region}
+ {region}
{rsProviderRegions?.includes(region) && (
-
(Redis 7.2)
-
+
)}
-
+
)
}
@@ -172,19 +171,26 @@ const OAuthSelectPlan = () => {
}
return (
-
-
-
-
+
+
+
+
Choose a cloud vendor
-
-
+
+
-
+
Select a cloud vendor and region to complete the final step
towards your free trial Redis database. No credit card is
required.
-
+
{OAuthProviders.map(({ icon, id, label }) => {
const Icon = () => (
@@ -197,7 +203,7 @@ const OAuthSelectPlan = () => {
)}
- setProviderSelected(id)}
@@ -205,13 +211,13 @@ const OAuthSelectPlan = () => {
[styles.activeProvider]: id === providerSelected,
})}
/>
- {label}
+ {label}
)
})}
- Region
+ Region
{
}}
/>
{!regionOptions.length && (
-
No regions available, try another vendor.
-
+
)}
-
Cancel
-
-
+ {
aria-labelledby="submit oauth select plan dialog"
>
Create database
-
+
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-select-plan/constants.ts b/redisinsight/ui/src/components/oauth/oauth-select-plan/constants.ts
index de842df16b..0c76fd77c3 100644
--- a/redisinsight/ui/src/components/oauth/oauth-select-plan/constants.ts
+++ b/redisinsight/ui/src/components/oauth/oauth-select-plan/constants.ts
@@ -1,4 +1,4 @@
-import { AllIconsType } from 'uiSrc/components/base/icons/RiIcon'
+import { AllIconsType } from 'uiBase/icons'
import styles from './styles.module.scss'
export enum OAuthProvider {
diff --git a/redisinsight/ui/src/components/oauth/oauth-sign-in-button/OAuthSignInButton.tsx b/redisinsight/ui/src/components/oauth/oauth-sign-in-button/OAuthSignInButton.tsx
index b978ec309e..5ee90fa5c1 100644
--- a/redisinsight/ui/src/components/oauth/oauth-sign-in-button/OAuthSignInButton.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-sign-in-button/OAuthSignInButton.tsx
@@ -1,12 +1,12 @@
import React from 'react'
import styled from 'styled-components'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiImage } from 'uiBase/display'
import { OAuthSsoHandlerDialog } from 'uiSrc/components'
import RedisLogo from 'uiSrc/assets/img/logo_small.svg'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiImage } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
const LogoWrapper = styled.div`
@@ -24,7 +24,7 @@ const OAuthSignInButton = (props: Props) => {
return (
{(socialCloudHandlerClick) => (
-
@@ -39,7 +39,7 @@ const OAuthSignInButton = (props: Props) => {
Cloud sign in
-
+
)}
)
diff --git a/redisinsight/ui/src/components/oauth/oauth-sso-dialog/OAuthSsoDialog.tsx b/redisinsight/ui/src/components/oauth/oauth-sso-dialog/OAuthSsoDialog.tsx
index 01800624ba..5889a1a154 100644
--- a/redisinsight/ui/src/components/oauth/oauth-sso-dialog/OAuthSsoDialog.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-sso-dialog/OAuthSsoDialog.tsx
@@ -3,6 +3,7 @@ import React, { useCallback } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiModal } from 'uiBase/display'
import {
oauthCloudSelector,
setSocialDialogState,
@@ -12,7 +13,6 @@ import { cloudSelector } from 'uiSrc/slices/instances/cloud'
import { OAuthCreateDb, OAuthSignIn } from 'uiSrc/components/oauth/oauth-sso'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { Modal } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
const OAuthSsoDialog = () => {
@@ -36,7 +36,7 @@ const OAuthSsoDialog = () => {
}
return (
- {
return (
-
+
Use{' '}
{currentAccountName?.name} #{currentAccountId}
{' '}
account to auto-discover subscriptions and add your databases.
-
-
+
Discover
-
+
)
}
@@ -113,7 +112,7 @@ const OAuthAutodiscovery = (props: Props) => {
{(ssoCloudHandlerClick) => (
- {
}}
>
Quick start
-
+
)}
@@ -143,20 +142,20 @@ const OAuthAutodiscovery = (props: Props) => {
>
{(form: React.ReactNode) => (
<>
-
+
Discover subscriptions and add your databases. A new Redis Cloud
account will be created for you if you don’t have one.
-
-
+
+
-
- Get started with
-
+
+ Get started with
+
Redis Cloud account
-
-
+
+
{form}
-
+
diff --git a/redisinsight/ui/src/components/oauth/oauth-sso/oauth-create-db/OAuthCreateDb.tsx b/redisinsight/ui/src/components/oauth/oauth-sso/oauth-create-db/OAuthCreateDb.tsx
index 7d4802ddb4..149acd6d6b 100644
--- a/redisinsight/ui/src/components/oauth/oauth-sso/oauth-create-db/OAuthCreateDb.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-sso/oauth-create-db/OAuthCreateDb.tsx
@@ -1,5 +1,9 @@
import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
import {
createFreeDbJob,
fetchPlans,
@@ -27,11 +31,6 @@ import {
} from 'uiSrc/slices/instances/cloud'
import { Nullable } from 'uiSrc/utils'
import OAuthForm from 'uiSrc/components/oauth/shared/oauth-form'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import {
OAuthAdvantages,
OAuthAgreement,
@@ -113,11 +112,11 @@ const OAuthCreateDb = (props: Props) => {
return (
-
-
+
+
-
-
+
+
{!data ? (
{
>
{(form: React.ReactNode) => (
<>
- Get started with
-
-
+ Get started with
+
Free trial Cloud database
-
+
{form}
{
) : (
<>
- Get your
-
-
+ Get your
+
Free trial Cloud database
-
-
-
+
+
+
The database will be created automatically and can be changed
from Redis Cloud.
-
-
+
+
-
-
+
Create
-
+
>
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-sso/oauth-sign-in/OAuthSignIn.tsx b/redisinsight/ui/src/components/oauth/oauth-sso/oauth-sign-in/OAuthSignIn.tsx
index 9576b3c3b7..0d92abf502 100644
--- a/redisinsight/ui/src/components/oauth/oauth-sso/oauth-sign-in/OAuthSignIn.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-sso/oauth-sign-in/OAuthSignIn.tsx
@@ -1,14 +1,13 @@
import React from 'react'
import { useDispatch } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiTitle, RiText } from 'uiBase/text'
import { OAuthAdvantages, OAuthAgreement } from 'uiSrc/components/oauth/shared'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { setSSOFlow } from 'uiSrc/slices/instances/cloud'
import { Nullable } from 'uiSrc/utils'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import OAuthForm from '../../shared/oauth-form/OAuthForm'
import styles from './styles.module.scss'
@@ -36,11 +35,11 @@ const OAuthSignIn = (props: Props) => {
return (
-
-
+
+
-
-
+
+
{
>
{(form: React.ReactNode) => (
<>
- Get started with
-
+ Get started with
+
Redis Cloud account
-
+
{form}
>
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/oauth-user-profile/OAuthUserProfile.tsx b/redisinsight/ui/src/components/oauth/oauth-user-profile/OAuthUserProfile.tsx
index 72e9fcc397..5cdca3b6a7 100644
--- a/redisinsight/ui/src/components/oauth/oauth-user-profile/OAuthUserProfile.tsx
+++ b/redisinsight/ui/src/components/oauth/oauth-user-profile/OAuthUserProfile.tsx
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiLoader } from 'uiBase/display'
import OAuthSignInButton from 'uiSrc/components/oauth/oauth-sign-in-button'
import {
activateAccount,
@@ -13,7 +14,6 @@ import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { PackageType } from 'uiSrc/constants/env'
import UserProfileBadge from 'uiSrc/components/instance-header/components/user-profile/UserProfileBadge'
-import { Loader } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
@@ -41,7 +41,7 @@ const OAuthUserProfile = (props: Props) => {
if (initialLoading) {
return (
-
(
-
-
+
+
Cloud
-
+
{OAUTH_ADVANTAGES_ITEMS.map(({ title }) => (
-
-
+
{title}
-
-
+
+
))}
diff --git a/redisinsight/ui/src/components/oauth/shared/oauth-agreement/OAuthAgreement.tsx b/redisinsight/ui/src/components/oauth/shared/oauth-agreement/OAuthAgreement.tsx
index 76d07c1cbd..ceb239763b 100644
--- a/redisinsight/ui/src/components/oauth/shared/oauth-agreement/OAuthAgreement.tsx
+++ b/redisinsight/ui/src/components/oauth/shared/oauth-agreement/OAuthAgreement.tsx
@@ -2,6 +2,8 @@ import React, { ChangeEvent } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiCheckbox } from 'uiBase/forms'
+import { RiLink } from 'uiBase/display'
import { localStorageService } from 'uiSrc/services'
import { BrowserStorageItem } from 'uiSrc/constants'
import {
@@ -10,8 +12,6 @@ import {
} from 'uiSrc/slices/oauth/cloud'
import { enableUserAnalyticsAction } from 'uiSrc/slices/user/user-settings'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { Link } from 'uiSrc/components/base/link/Link'
import styles from './styles.module.scss'
export interface Props {
@@ -34,7 +34,7 @@ const OAuthAgreement = (props: Props) => {
return (
-
{
{'to our '}
- {
data-testid="ouath-agreements-cloud-terms-of-service"
>
Cloud Terms of Service
-
+
{' and '}
- {
data-testid="oauth-agreement-privacy-policy"
>
Privacy Policy
-
+
that Redis Insight will generate Redis Cloud API account and user
diff --git a/redisinsight/ui/src/components/oauth/shared/oauth-form/components/oauth-sso-form/OAuthSsoForm.tsx b/redisinsight/ui/src/components/oauth/shared/oauth-form/components/oauth-sso-form/OAuthSsoForm.tsx
index 6f1cdbca97..09ed7a2f79 100644
--- a/redisinsight/ui/src/components/oauth/shared/oauth-form/components/oauth-sso-form/OAuthSsoForm.tsx
+++ b/redisinsight/ui/src/components/oauth/shared/oauth-form/components/oauth-sso-form/OAuthSsoForm.tsx
@@ -1,19 +1,15 @@
import { isEmpty } from 'lodash'
import React, { useState } from 'react'
import { FormikErrors, useFormik } from 'formik'
-import { validateEmail, validateField } from 'uiSrc/utils'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiTitle } from 'uiBase/text'
import { RiTooltip } from 'uiSrc/components'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
+import { validateEmail, validateField } from 'uiSrc/utils'
import styles from './styles.module.scss'
export interface Props {
@@ -72,7 +68,7 @@ const OAuthSsoForm = ({ onBack, onSubmit }: Props) => {
) : null
}
>
- {
data-testid="btn-submit"
>
{text}
-
+
)
return (
-
+
Single Sign-On
-
+
-
-
-
-
+
+
+ {
value={formik.values.email}
autoComplete="off"
onChange={(value) => {
- formik.setFieldValue(
- 'email',
- validateField(value.trim()),
- )
+ formik.setFieldValue('email', validateField(value.trim()))
}}
/>
-
-
-
-
-
-
-
+
+
+
+
+
+
Back
-
-
-
+
+
+
-
-
+
+
)
diff --git a/redisinsight/ui/src/components/oauth/shared/oauth-recommended-settings/OAuthRecommendedSettings.tsx b/redisinsight/ui/src/components/oauth/shared/oauth-recommended-settings/OAuthRecommendedSettings.tsx
index 422954a94b..1fec1e0e29 100644
--- a/redisinsight/ui/src/components/oauth/shared/oauth-recommended-settings/OAuthRecommendedSettings.tsx
+++ b/redisinsight/ui/src/components/oauth/shared/oauth-recommended-settings/OAuthRecommendedSettings.tsx
@@ -1,10 +1,9 @@
import React from 'react'
-import { FeatureFlagComponent, RiTooltip } from 'uiSrc/components'
+import { RiCheckbox } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { FeatureFlagComponent, RiSpacer, RiTooltip } from 'uiSrc/components'
import { FeatureFlags } from 'uiSrc/constants'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Spacer } from 'uiSrc/components/base/layout'
import styles from './styles.module.scss'
export interface Props {
@@ -18,7 +17,7 @@ const OAuthRecommendedSettings = (props: Props) => {
return (
- {
-
+
)
}
diff --git a/redisinsight/ui/src/components/oauth/shared/oauth-social-buttons/OAuthSocialButtons.tsx b/redisinsight/ui/src/components/oauth/shared/oauth-social-buttons/OAuthSocialButtons.tsx
index 9575cbb4d6..116366ba7e 100644
--- a/redisinsight/ui/src/components/oauth/shared/oauth-social-buttons/OAuthSocialButtons.tsx
+++ b/redisinsight/ui/src/components/oauth/shared/oauth-social-buttons/OAuthSocialButtons.tsx
@@ -1,14 +1,14 @@
import React from 'react'
import cx from 'classnames'
import { useSelector } from 'react-redux'
-import { oauthCloudPAgreementSelector } from 'uiSrc/slices/oauth/cloud'
-import { OAuthStrategy } from 'uiSrc/slices/interfaces'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiFlexItem } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { AllIconsType, RiIcon } from 'uiBase/icons'
import { RiTooltip } from 'uiSrc/components'
-import { AllIconsType, RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { OAuthStrategy } from 'uiSrc/slices/interfaces'
+import { oauthCloudPAgreementSelector } from 'uiSrc/slices/oauth/cloud'
import styles from './styles.module.scss'
export interface Props {
@@ -60,7 +60,7 @@ const OAuthSocialButtons = (props: Props) => {
content={agreement ? null : 'Acknowledge the agreement'}
data-testid={`${label}-tooltip`}
>
- {
data-testid={label}
aria-labelledby={label}
>
-
+
- {text}
-
-
+ {text}
+
+
))}
diff --git a/redisinsight/ui/src/components/onboarding-features/OnboardingFeatures.tsx b/redisinsight/ui/src/components/onboarding-features/OnboardingFeatures.tsx
index 3f71d5c4f0..7fe7dc50b6 100644
--- a/redisinsight/ui/src/components/onboarding-features/OnboardingFeatures.tsx
+++ b/redisinsight/ui/src/components/onboarding-features/OnboardingFeatures.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
import { isString, partialRight } from 'lodash'
+import { RiSpacer } from 'uiBase/layout/spacer'
import { keysDataSelector } from 'uiSrc/slices/browser/keys'
import {
openCli,
@@ -43,7 +44,6 @@ import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import { FeatureFlags } from 'uiSrc/constants'
import { isAnyFeatureEnabled } from 'uiSrc/utils/features'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
import styles from './styles.module.scss'
const sendTelemetry = (databaseId: string, step: string, action: string) =>
@@ -86,7 +86,7 @@ const ONBOARDING_FEATURES = {
This is Browser, where you can see the list of keys in the plain
List or Tree view, filter them, perform bulk operations, and view
the values.
-
+
Add a key to your database using a dedicated form.
>
),
@@ -245,7 +245,7 @@ const ONBOARDING_FEATURES = {
<>
Command Helper lets you search and learn more about Redis commands,
their syntax, and details.
-
+
Run PING in CLI to see how it works.
>
),
@@ -281,11 +281,11 @@ const ONBOARDING_FEATURES = {
<>
Use Profiler to track commands sent against the Redis server in
real-time.
-
+
Select Start Profiler to stream back every command processed
by the Redis server. Save the log to download and investigate
commands.
-
+
Tip: Remember to stop Profiler to avoid throughput decrease.
>
),
@@ -337,10 +337,10 @@ const ONBOARDING_FEATURES = {
content: (
<>
This is Workbench, our advanced CLI for Redis commands.
-
+
Take advantage of syntax highlighting, intelligent auto-complete,
and working with commands in editor mode.
-
+
Workbench visualizes complex{' '}
-
+
{firstIndex ? (
<>
Run this command to see information and statistics on your
index:
-
+
Run this command to see information and statistics about
client connections:
-
+
Share your Redis expertise with your team and the wider community by
building custom Redis Insight tutorials.
-
+
Use our{' '}
Use Database Analysis to get summary of your database and receive
tips to improve memory usage and performance.
-
+
Run a new report to get an overview of the database and receive tips
to optimize your database usage.
>
@@ -611,7 +611,7 @@ const ONBOARDING_FEATURES = {
content: (
<>
Check Slow Log to troubleshoot performance issues.
-
+
See the list of slow logs in chronological order to debug and trace
your Redis database. Customize parameters to capture logs.
>
@@ -656,7 +656,7 @@ const ONBOARDING_FEATURES = {
<>
Use Redis pub/sub to subscribe to channels and post messages to
channels.
-
+
Subscribe to receive messages from all channels or enter a message
to post to a specified channel.
>
@@ -717,7 +717,7 @@ const ONBOARDING_FEATURES = {
content: (
<>
You are done!
-
+
Take me back to Browser.
>
),
diff --git a/redisinsight/ui/src/components/onboarding-tour/OnboardingTour.tsx b/redisinsight/ui/src/components/onboarding-tour/OnboardingTour.tsx
index f2c5a99f89..9e03028d32 100644
--- a/redisinsight/ui/src/components/onboarding-tour/OnboardingTour.tsx
+++ b/redisinsight/ui/src/components/onboarding-tour/OnboardingTour.tsx
@@ -2,22 +2,21 @@ import React, { useEffect, useState } from 'react'
import { useDispatch } from 'react-redux'
import cx from 'classnames'
+import { CancelSlimIcon } from 'uiBase/icons'
+import {
+ RiEmptyButton,
+ RiIconButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+} from 'uiBase/forms'
+import { RiColorText, RiTitle } from 'uiBase/text'
+import { RiTourStep } from 'uiBase/display'
+import { RiCol, RiRow } from 'uiBase/layout'
import {
skipOnboarding,
setOnboardNextStep,
setOnboardPrevStep,
} from 'uiSrc/slices/app/features'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import {
- EmptyButton,
- IconButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { ColorText } from 'uiSrc/components/base/text'
-import { TourStep } from 'uiSrc/components/base/display/tour/TourStep'
-import { Col, Row } from 'uiSrc/components/base/layout/flex'
-import { Title } from 'uiSrc/components/base/text/Title'
import { Props as OnboardingWrapperProps } from './OnboardingTourWrapper'
import styles from './styles.module.scss'
@@ -80,18 +79,18 @@ const OnboardingTour = (props: Props) => {
}
const Header = (
-
+
{!isLastStep ? (
-
Skip tour
-
+
) : (
- {
data-testid="close-tour-btn"
/>
)}
-
+
{title}
-
-
+
+
)
const StepContent = (
-
+
{content}
-
-
+
+
{currentStep} of {totalSteps}
-
-
+
+
{currentStep > 1 && (
-
Back
-
+
)}
-
{!isLastStep ? 'Next' : 'Take me back'}
-
-
-
-
+
+
+
+
)
return (
@@ -145,7 +144,7 @@ const OnboardingTour = (props: Props) => {
})}
role="presentation"
>
- {
data-testid="onboarding-tour"
>
{children}
-
+
)
}
diff --git a/redisinsight/ui/src/components/page-header/PageHeader.tsx b/redisinsight/ui/src/components/page-header/PageHeader.tsx
index 1318432bee..d388741513 100644
--- a/redisinsight/ui/src/components/page-header/PageHeader.tsx
+++ b/redisinsight/ui/src/components/page-header/PageHeader.tsx
@@ -3,6 +3,10 @@ import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
import cx from 'classnames'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiTitle } from 'uiBase/text'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RedisLogoFullIcon } from 'uiBase/icons'
import { Pages, FeatureFlags } from 'uiSrc/constants'
import { resetDataRedisCloud } from 'uiSrc/slices/instances/cloud'
import { resetDataRedisCluster } from 'uiSrc/slices/instances/cluster'
@@ -13,10 +17,6 @@ import { FeatureFlagComponent, OAuthUserProfile } from 'uiSrc/components'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { isAnyFeatureEnabled } from 'uiSrc/utils/features'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { RedisLogoFullIcon } from 'uiSrc/components/base/icons'
import styles from './PageHeader.module.scss'
interface Props {
@@ -57,37 +57,37 @@ const PageHeader = (props: Props) => {
-
+
{title}
-
+
{subtitle ? {subtitle} : ''}
{children ? <>{children}> : ''}
{showInsights ? (
-
+
{isAnyChatAvailable && (
-
+
-
+
)}
-
+
-
+
-
-
+
-
+
) : (
-
{
style={{ ...linkStyles }}
>
-
+
{title}
-
-
+
+
{description}
-
+
)
}
diff --git a/redisinsight/ui/src/components/query/query-actions/QueryActions.tsx b/redisinsight/ui/src/components/query/query-actions/QueryActions.tsx
index 0667e76d67..53fe5e5e05 100644
--- a/redisinsight/ui/src/components/query/query-actions/QueryActions.tsx
+++ b/redisinsight/ui/src/components/query/query-actions/QueryActions.tsx
@@ -1,21 +1,16 @@
import React from 'react'
import cx from 'classnames'
+import { GroupModeIcon, PlayFilledIcon, RawModeIcon } from 'uiBase/icons'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import { ResultsMode, RunQueryMode } from 'uiSrc/slices/interfaces'
import { KEYBOARD_SHORTCUTS } from 'uiSrc/constants'
import { KeyboardShortcut, RiTooltip } from 'uiSrc/components'
import { isGroupMode } from 'uiSrc/utils'
-import {
- GroupModeIcon,
- PlayFilledIcon,
- RawModeIcon,
-} from 'uiSrc/components/base/icons'
-
import Divider from 'uiSrc/components/divider/Divider'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
export interface Props {
@@ -40,10 +35,10 @@ const QueryActions = (props: Props) => {
} = props
const KeyBoardTooltipContent = KEYBOARD_SHORTCUTS?.workbench?.runQuery && (
<>
-
+
{KEYBOARD_SHORTCUTS.workbench.runQuery?.label}:
-
-
+
+
{
content="Enables the raw output mode"
data-testid="change-mode-tooltip"
>
- onChangeMode()}
icon={RawModeIcon}
disabled={isLoading}
@@ -72,7 +67,7 @@ const QueryActions = (props: Props) => {
data-testid="btn-change-mode"
>
Raw mode
-
+
)}
{onChangeGroupMode && (
@@ -88,7 +83,7 @@ const QueryActions = (props: Props) => {
}
data-testid="group-results-tooltip"
>
- onChangeGroupMode()}
disabled={isLoading}
icon={GroupModeIcon}
@@ -98,7 +93,7 @@ const QueryActions = (props: Props) => {
data-testid="btn-change-group-mode"
>
Group results
-
+
)}
{
}
data-testid="run-query-tooltip"
>
- {
onSubmit()
}}
@@ -127,7 +122,7 @@ const QueryActions = (props: Props) => {
data-testid="btn-submit"
>
Run
-
+
)
diff --git a/redisinsight/ui/src/components/query/query-card/QueryCard.tsx b/redisinsight/ui/src/components/query/query-card/QueryCard.tsx
index 9d67427a26..c0d9f7b5b9 100644
--- a/redisinsight/ui/src/components/query/query-card/QueryCard.tsx
+++ b/redisinsight/ui/src/components/query/query-card/QueryCard.tsx
@@ -3,9 +3,9 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
import { isNull } from 'lodash'
+import { RiLoadingContent } from 'uiBase/layout'
import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
-import { LoadingContent } from 'uiSrc/components/base/layout'
import {
DEFAULT_TEXT_VIEW_TYPE,
ProfileQueryType,
@@ -276,7 +276,7 @@ const QueryCard = (props: Props) => {
/>
) : (
-
diff --git a/redisinsight/ui/src/components/query/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx b/redisinsight/ui/src/components/query/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx
index 649ea0ac95..1f893303bf 100644
--- a/redisinsight/ui/src/components/query/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx
+++ b/redisinsight/ui/src/components/query/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx
@@ -2,6 +2,9 @@ import React, { useContext, useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { v4 as uuidv4 } from 'uuid'
+import { RiLoadingContent, RiFlexItem } from 'uiBase/layout'
+import { RiColorText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { pluginApi } from 'uiSrc/services/PluginAPI'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import {
@@ -10,7 +13,6 @@ import {
formatToText,
replaceEmptyValue,
} from 'uiSrc/utils'
-import { LoadingContent } from 'uiSrc/components/base/layout'
import { Theme } from 'uiSrc/constants'
import {
CommandExecutionResult,
@@ -28,9 +30,6 @@ import {
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { appServerInfoSelector } from 'uiSrc/slices/app/info'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
-import { ColorText } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -350,7 +349,7 @@ const QueryCardCliPlugin = (props: Props) => {
/>
{!!error && (
-
+
{
style={{ display: 'inline', marginRight: 10 }}
/>
- {error}
+ {error}
-
+
)}
{!isPluginLoaded && (
-
+
)}
diff --git a/redisinsight/ui/src/components/query/query-card/QueryCardCliResultWrapper/QueryCardCliResultWrapper.tsx b/redisinsight/ui/src/components/query/query-card/QueryCardCliResultWrapper/QueryCardCliResultWrapper.tsx
index 28d3e89661..a04cf03ca7 100644
--- a/redisinsight/ui/src/components/query/query-card/QueryCardCliResultWrapper/QueryCardCliResultWrapper.tsx
+++ b/redisinsight/ui/src/components/query/query-card/QueryCardCliResultWrapper/QueryCardCliResultWrapper.tsx
@@ -2,7 +2,9 @@ import React from 'react'
import cx from 'classnames'
import { isArray } from 'lodash'
-import { LoadingContent } from 'uiSrc/components/base/layout'
+import { RiLoadingContent } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { CommandExecutionResult } from 'uiSrc/slices/interfaces'
import { ResultsMode } from 'uiSrc/slices/interfaces/workbench'
import {
@@ -14,8 +16,6 @@ import {
} from 'uiSrc/utils'
import { CommandExecutionStatus } from 'uiSrc/slices/interfaces/cli'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import QueryCardCliDefaultResult from '../QueryCardCliDefaultResult'
import QueryCardCliGroupResult from '../QueryCardCliGroupResult'
import styles from './styles.module.scss'
@@ -49,11 +49,11 @@ const QueryCardCliResultWrapper = (props: Props) => {
{!loading && (
{isNotStored && (
-
+
The result is too big to be saved. It will be deleted after the
application is closed.
-
+
)}
{isGroupResults(resultsMode) && isArray(result[0]?.response) ? (
{
)}
{loading && (
-
+
)}
diff --git a/redisinsight/ui/src/components/query/query-card/QueryCardCommonResult/QueryCardCommonResult.tsx b/redisinsight/ui/src/components/query/query-card/QueryCardCommonResult/QueryCardCommonResult.tsx
index 1e3d53e69e..4caeb66203 100644
--- a/redisinsight/ui/src/components/query/query-card/QueryCardCommonResult/QueryCardCommonResult.tsx
+++ b/redisinsight/ui/src/components/query/query-card/QueryCardCommonResult/QueryCardCommonResult.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import cx from 'classnames'
-import { LoadingContent } from 'uiSrc/components/base/layout'
+import { RiLoadingContent } from 'uiBase/layout'
import styles from './styles.module.scss'
export interface Props {
@@ -22,7 +22,7 @@ const QueryCardCommonResult = (props: Props) => {
)}
{loading && (
-
+
)}
diff --git a/redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.tsx b/redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.tsx
index 9931a7c80e..84be43556a 100644
--- a/redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.tsx
+++ b/redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.tsx
@@ -4,7 +4,7 @@ import cx from 'classnames'
import { useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import { findIndex, isNumber } from 'lodash'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
import {
ChevronDownIcon,
@@ -12,7 +12,10 @@ import {
CopyIcon,
DeleteIcon,
PlayIcon,
-} from 'uiSrc/components/base/icons'
+ RiIcon,
+} from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton, RiSelect } from 'uiBase/forms'
import { Theme } from 'uiSrc/constants'
import {
getCommandNameFromQuery,
@@ -46,10 +49,6 @@ import {
import { appRedisCommandsSelector } from 'uiSrc/slices/app/redis-commands'
import { FormatedDate, FullScreen, RiTooltip } from 'uiSrc/components'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
import QueryCardTooltip from '../QueryCardTooltip'
import styles from './styles.module.scss'
@@ -356,10 +355,10 @@ const QueryCardHeader = (props: Props) => {
data-testid="query-card-open"
role="button"
>
-
-
+
+
- {
db={db}
resultsMode={resultsMode}
/>
-
-
+ {
data-testid="copy-command"
/>
-
-
-
-
+
+
+
{!!createdAt && (
-
+
-
+
)}
-
-
+
+
{!!message && !isOpen && (
-
+
{truncateText(message, 13)}
-
+
)}
-
-
+
@@ -421,7 +420,7 @@ const QueryCardHeader = (props: Props) => {
data-testid="command-execution-time-icon"
className={styles.iconExecutingTime}
/>
- {
data-testid="command-execution-time-value"
>
{getTruncatedExecutionTimeString(executionTime)}
-
+
>
)}
-
+
{!hideFields?.includes(HIDE_FIELDS.profiler) && (
-
@@ -459,10 +458,10 @@ const QueryCardHeader = (props: Props) => {
)}
-
+
)}
{!hideFields?.includes(HIDE_FIELDS.viewType) && (
-
@@ -484,9 +483,9 @@ const QueryCardHeader = (props: Props) => {
)}
-
+
)}
-
@@ -496,24 +495,24 @@ const QueryCardHeader = (props: Props) => {
onToggleFullScreen={toggleFullScreen}
/>
)}
-
-
-
+
+
-
+
{!isFullScreen && (
-
+
- {
onClick={handleQueryReRun}
/>
-
+
)}
{!isFullScreen && (
-
+
{!isSilentModeWithoutError(resultsMode, summary?.fail) && (
-
)}
-
+
)}
-
+
{(isRawMode(mode) || isGroupResults(resultsMode)) && (
{
content={
<>
{isGroupMode(resultsMode) && (
-
-
+
)}
{isSilentMode(resultsMode) && (
-
-
+
)}
{isRawMode(mode) && (
-
-r
-
+
)}
>
}
@@ -576,10 +575,10 @@ const QueryCardHeader = (props: Props) => {
/>
)}
-
-
-
-
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/components/query/query-lite-actions/QueryLiteActions.tsx b/redisinsight/ui/src/components/query/query-lite-actions/QueryLiteActions.tsx
index 959c1fd914..425e2e07b4 100644
--- a/redisinsight/ui/src/components/query/query-lite-actions/QueryLiteActions.tsx
+++ b/redisinsight/ui/src/components/query/query-lite-actions/QueryLiteActions.tsx
@@ -1,13 +1,13 @@
import React from 'react'
import { KEYBOARD_SHORTCUTS } from 'uiSrc/constants'
-import { KeyboardShortcut, RiTooltip } from 'uiSrc/components'
+import { KeyboardShortcut } from 'uiSrc/components'
-import { PlayFilledIcon } from 'uiSrc/components/base/icons'
-
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Button, EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
+import { PlayFilledIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiSpacer } from 'uiBase/layout'
+import { RiTooltip } from 'uiBase/display'
+import { RiEmptyButton, Button } from 'uiBase/forms'
export interface Props {
onSubmit: () => void
@@ -19,8 +19,8 @@ const QueryLiteActions = (props: Props) => {
const { isLoading, onSubmit, onClear } = props
const KeyBoardTooltipContent = KEYBOARD_SHORTCUTS?.workbench?.runQuery && (
<>
- {KEYBOARD_SHORTCUTS.workbench.runQuery?.label}:
-
+ {KEYBOARD_SHORTCUTS.workbench.runQuery?.label}:
+
{
}
data-testid="clear-query-tooltip"
>
- {
data-testid="btn-clear"
>
Clear
-
+
{
return (
-
Tutorials:
+
Tutorials:
{tutorials.map(({ id, title }) => (
{
}
return (
-
-
+
+
- {
onKeyDown={goHome}
>
RDI instances
-
+
-
-
- >
-
-
+
+
+ >
+
+
-
-
+
+
-
+
{isAnyChatAvailable && (
-
+
-
+
)}
-
+
-
+
-
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/components/recommendation/badge-icon/BadgeIcon.tsx b/redisinsight/ui/src/components/recommendation/badge-icon/BadgeIcon.tsx
index 334a991a91..3a3d92ed80 100644
--- a/redisinsight/ui/src/components/recommendation/badge-icon/BadgeIcon.tsx
+++ b/redisinsight/ui/src/components/recommendation/badge-icon/BadgeIcon.tsx
@@ -1,7 +1,7 @@
import React from 'react'
-import { RiTooltip } from 'uiSrc/components'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
+import { RiFlexItem } from 'uiBase/layout'
+import { RiTooltip } from 'uiBase/display'
import styles from '../styles.module.scss'
export interface Props {
@@ -10,7 +10,7 @@ export interface Props {
name: string
}
const BadgeIcon = ({ id, icon, name }: Props) => (
- (
{icon}
-
+
)
export default BadgeIcon
diff --git a/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx b/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx
index 43b5cffc19..3b69ae16ba 100644
--- a/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx
+++ b/redisinsight/ui/src/components/recommendation/content-element/ContentElement.tsx
@@ -1,15 +1,15 @@
import React from 'react'
import { isArray, isString } from 'lodash'
import cx from 'classnames'
+import { RiSpacer, SpacerSize } from 'uiBase/layout/spacer'
+import { RiColorText } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
import { OAuthSsoHandlerDialog, OAuthConnectFreeDb } from 'uiSrc/components'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { replaceVariables } from 'uiSrc/utils/recommendation'
import { IRecommendationContent } from 'uiSrc/slices/interfaces/recommendations'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { UTM_MEDIUMS } from 'uiSrc/constants/links'
-import { Spacer, SpacerSize } from 'uiSrc/components/base/layout/spacer'
-import { ColorText } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
import InternalLink from '../internal-link'
import RecommendationBody from '../recommendation-body'
@@ -40,7 +40,7 @@ const ContentElement = (props: Props) => {
switch (type) {
case 'paragraph':
return (
- {
color="subdued"
>
{value}
-
+
)
case 'code':
return (
-
{value}
-
+
)
case 'span':
return (
- {
})}
>
{value}
-
+
)
case 'link':
return (
- {
onClick={() => onLinkClick?.()}
>
{value.name}
-
+
)
case 'link-sso':
return (
{(ssoCloudHandlerClick) => (
- {
})}
>
{value.name}
-
+
)}
)
@@ -117,7 +117,7 @@ const ContentElement = (props: Props) => {
return
case 'code-link':
return (
- {
campaign: telemetryName,
})}
>
-
{value.name}
-
-
+
+
)
case 'spacer':
return (
- {
onClick?.()
}
return (
-
{text}
-
+
)
}
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-badges-legend/RecommendationBadgesLegend.tsx b/redisinsight/ui/src/components/recommendation/recommendation-badges-legend/RecommendationBadgesLegend.tsx
index 5e2240c161..ac05af15f5 100644
--- a/redisinsight/ui/src/components/recommendation/recommendation-badges-legend/RecommendationBadgesLegend.tsx
+++ b/redisinsight/ui/src/components/recommendation/recommendation-badges-legend/RecommendationBadgesLegend.tsx
@@ -1,24 +1,24 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
import { badgesContent } from '../constants'
import styles from '../styles.module.scss'
const RecommendationBadgesLegend = () => (
-
{badgesContent.map(({ id, icon, name }) => (
-
+
{icon}
{name}
-
+
))}
-
+
)
export default RecommendationBadgesLegend
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-badges/RecommendationBadges.tsx b/redisinsight/ui/src/components/recommendation/recommendation-badges/RecommendationBadges.tsx
index 292b4bd61f..48e74e8c10 100644
--- a/redisinsight/ui/src/components/recommendation/recommendation-badges/RecommendationBadges.tsx
+++ b/redisinsight/ui/src/components/recommendation/recommendation-badges/RecommendationBadges.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import { Row } from 'uiSrc/components/base/layout/flex'
+import { RiRow } from 'uiBase/layout'
import BadgeIcon from '../badge-icon'
import { badgesContent } from '../constants'
@@ -9,14 +9,14 @@ export interface Props {
}
const RecommendationBadges = ({ badges = [] }: Props) => (
-
+
{badgesContent.map(
({ id, name, icon }) =>
badges.includes(id) && (
),
)}
-
+
)
export default RecommendationBadges
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx b/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx
index 808e23014c..5be88aa583 100644
--- a/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx
+++ b/redisinsight/ui/src/components/recommendation/recommendation-copy-component/RecommendationCopyComponent.tsx
@@ -2,12 +2,11 @@ import React from 'react'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
-import { bufferToString } from 'uiSrc/utils'
+import { RiText, RiColorText } from 'uiBase/text'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon } from 'uiBase/icons'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-
-import { Text, ColorText } from 'uiSrc/components/base/text'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
+import { bufferToString } from 'uiSrc/utils'
import styles from './styles.module.scss'
export interface IProps {
@@ -43,11 +42,11 @@ const RecommendationCopyComponent = ({
return (
-
+
Example of a key that may be relevant:
-
+
-
{formattedName}
-
-
+ ('')
return (
-
-
+
Is this useful?
-
+
{Object.values(Vote).map((option) => (
))}
-
+
)
}
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx
index cb3d5424a6..a975a35c7d 100644
--- a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx
+++ b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx
@@ -1,6 +1,11 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { CancelSlimIcon, RiIcon } from 'uiBase/icons'
+import { RiIconButton, RiPrimaryButton } from 'uiBase/forms'
+import { RiLink, RiPopover, RiTooltip } from 'uiBase/display'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import { Vote } from 'uiSrc/constants/recommendations'
import { putRecommendationVote } from 'uiSrc/slices/analytics/dbAnalysis'
@@ -12,20 +17,12 @@ import {
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { Nullable } from 'uiSrc/utils'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-
import { getVotedText, iconType, voteTooltip } from './utils'
import styles from './styles.module.scss'
import styled from 'styled-components'
-import { Theme } from 'uiSrc/components/base/theme/types'
+import { Theme } from 'uiBase/theme/types'
-const GitHubLink = styled(Link)`
+const GitHubLink = styled(RiLink)`
padding: 4px 8px 4px 4px;
margin-top: 10px;
@@ -130,7 +127,7 @@ const VoteOption = (props: Props) => {
position="bottom"
data-testid={`${voteOption}-vote-tooltip`}
>
- {
className={styles.popoverWrapper}
data-testid={`${name}-${voteOption}-popover`}
>
-
-
-
-
+
+
+
+
-
-
+
+
-
+
Thank you for the feedback.
-
-
+
+
{getVotedText(voteOption)}
-
+
-
-
-
+
+ {
className={styles.closeBtn}
onClick={() => setPopover('')}
/>
-
-
-
-
-
+
+
+
+
-
- To Github
-
-
-
+
+
+ To Github
+
+
+
+
)
diff --git a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/utils.ts b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/utils.ts
index f2d4db20b5..b21ff3bfb4 100644
--- a/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/utils.ts
+++ b/redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/utils.ts
@@ -1,6 +1,6 @@
+import { DislikeIcon, LikeIcon } from 'uiBase/icons'
import { Vote } from 'uiSrc/constants/recommendations'
import { Nullable } from 'uiSrc/utils'
-import { DislikeIcon, LikeIcon } from 'uiSrc/components/base/icons'
export const getVotedText = (vote: Nullable
) =>
vote === Vote.Like
diff --git a/redisinsight/ui/src/components/scan-more/ScanMore.tsx b/redisinsight/ui/src/components/scan-more/ScanMore.tsx
index 96c168f55e..455289b0c7 100644
--- a/redisinsight/ui/src/components/scan-more/ScanMore.tsx
+++ b/redisinsight/ui/src/components/scan-more/ScanMore.tsx
@@ -1,11 +1,10 @@
import React from 'react'
import { isNull } from 'lodash'
+import { Button } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiTooltip } from 'uiBase/display'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
-import { RiTooltip } from 'uiSrc/components'
-import { Button } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import styles from './styles.module.scss'
export interface Props {
withAlert?: boolean
@@ -49,11 +48,7 @@ const ScanMore = ({
data-testid="scan-more"
>
{withAlert && (
-
+
)}
diff --git a/redisinsight/ui/src/components/settings-item/SettingItem.tsx b/redisinsight/ui/src/components/settings-item/SettingItem.tsx
index c72aa1d42b..cef7f08b5d 100644
--- a/redisinsight/ui/src/components/settings-item/SettingItem.tsx
+++ b/redisinsight/ui/src/components/settings-item/SettingItem.tsx
@@ -1,14 +1,12 @@
import React, { useEffect, useState } from 'react'
import cx from 'classnames'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiNumericInput } from 'uiBase/inputs'
+import { EditIcon } from 'uiBase/icons'
import InlineItemEditor from 'uiSrc/components/inline-item-editor/InlineItemEditor'
-
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { NumericInput } from 'uiSrc/components/base/inputs'
-import { EditIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
export interface Props {
@@ -58,22 +56,22 @@ const SettingItem = (props: Props) => {
return (
<>
-
+
{title}
-
-
-
+
+
+
{summary}
-
-
-
-
-
+
+
+
+
+
{label}
-
-
+
+
- !isEditing && setHovering(true)}
onMouseLeave={() => !isEditing && setHovering(false)}
onClick={() => setEditing(true)}
@@ -92,7 +90,7 @@ const SettingItem = (props: Props) => {
[styles.inputHover]: isHovering,
})}
>
-
isEditing &&
@@ -112,13 +110,13 @@ const SettingItem = (props: Props) => {
) : (
-
+
{value}
-
+
)}
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.spec.tsx b/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.spec.tsx
index f7ab8610e9..2eb87f1c60 100644
--- a/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.spec.tsx
+++ b/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.spec.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { cloneDeep } from 'lodash'
import { cleanup, mockedStore, render } from 'uiSrc/utils/test-utils'
import ShortcutsFlyout from './ShortcutsFlyout'
-import { SHORTCUTS, ShortcutGroup } from './schema'
+import { ShortcutGroup, SHORTCUTS } from './schema'
let store: typeof mockedStore
beforeEach(() => {
@@ -11,10 +11,14 @@ beforeEach(() => {
store.clearActions()
})
-jest.mock('uiSrc/components/base/layout/drawer', () => ({
- ...jest.requireActual('uiSrc/components/base/layout/drawer'),
- DrawerHeader: jest.fn().mockReturnValue(null),
-}))
+jest.mock('uiBase/layout', () => {
+ const actual = jest.requireActual('uiBase/layout')
+
+ return {
+ ...actual,
+ RiDrawerHeader: jest.fn().mockReturnValue(null),
+ }
+})
const appInfoSlicesPath = 'uiSrc/slices/app/info'
diff --git a/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.tsx b/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.tsx
index 0918576b97..038ede3f39 100644
--- a/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.tsx
+++ b/redisinsight/ui/src/components/shortcuts-flyout/ShortcutsFlyout.tsx
@@ -1,16 +1,17 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiDrawer,
+ RiDrawerBody,
+ RiDrawerHeader,
+ RiTable,
+ ColumnDefinition,
+} from 'uiBase/layout'
+import { RiTitle } from 'uiBase/text'
import { appInfoSelector, setShortcutsFlyoutState } from 'uiSrc/slices/app/info'
import { KeyboardShortcut } from 'uiSrc/components'
import { BuildType } from 'uiSrc/constants/env'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- Drawer,
- DrawerHeader,
- DrawerBody,
-} from 'uiSrc/components/base/layout/drawer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
import { SHORTCUTS, ShortcutGroup, separator } from './schema'
@@ -41,30 +42,30 @@ const ShortcutsFlyout = () => {
const ShortcutsTable = ({ name, items }: ShortcutGroup) => (
-
+
{name}
-
-
-
-
+
+
+
+
)
return (
- dispatch(setShortcutsFlyoutState(isOpen))}
data-test-subj="shortcuts-flyout"
title="Shortcuts"
>
-
-
+
+
{SHORTCUTS.filter(
({ excludeFor }) =>
!excludeFor || !excludeFor.includes(server?.buildType as BuildType),
).map(ShortcutsTable)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/components/side-panels/components/header/Header.tsx b/redisinsight/ui/src/components/side-panels/components/header/Header.tsx
index 84ba942082..577ecd7981 100644
--- a/redisinsight/ui/src/components/side-panels/components/header/Header.tsx
+++ b/redisinsight/ui/src/components/side-panels/components/header/Header.tsx
@@ -1,9 +1,8 @@
import React from 'react'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
import { FullScreen } from 'uiSrc/components'
-
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
export interface Props {
@@ -30,7 +29,7 @@ const Header = (props: Props) => {
onToggleFullScreen={onToggleFullScreen}
btnTestId={`fullScreen-${panelName}-btn`}
/>
- {
-
{
{
return (
{chats.length > 1 && (
-
{
content={connectedInstanceName}
anchorClassName={styles.dbName}
>
-
+
{connectedInstanceName}
-
+
) : (
@@ -92,7 +92,7 @@ const ExpertChatHeader = (props: Props) => {
panelPaddingSize="m"
closePopover={() => setIsTutorialsPopoverOpen(false)}
button={
- setIsTutorialsPopoverOpen(true)}
@@ -102,24 +102,24 @@ const ExpertChatHeader = (props: Props) => {
}
>
<>
-
+
Open relevant tutorials to learn more about search and query.
-
-
-
+
+
Open tutorials
-
+
>
{
return (
- Hi!
-
+ Hi!
+
I am here to help you get started with data querying. I noticed that you
have no indexes created.
-
-
-
+
+
+
Would you like to load the sample data and indexes (from this{' '}
-
tutorial
-
+
) to see what Redis Copilot can help you do?
-
-
+
+
-
+
)
}
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-form/ChatForm.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-form/ChatForm.tsx
index 6550ec8602..e908b914c8 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-form/ChatForm.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-form/ChatForm.tsx
@@ -1,15 +1,14 @@
import React, { Ref, useRef, useState } from 'react'
import cx from 'classnames'
-import { isModifiedEvent } from 'uiSrc/services'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { SendIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { TextArea } from 'uiSrc/components/base/inputs'
+import { RiPopover, RiTooltip } from 'uiBase/index'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { SendIcon } from 'uiBase/icons'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiTextArea } from 'uiBase/inputs'
+import { isModifiedEvent } from 'uiSrc/services'
import * as keys from 'uiSrc/constants/keys'
import styles from './styles.module.scss'
@@ -99,12 +98,12 @@ const ChatForm = (props: Props) => {
{validation.title && (
<>
-
{validation.title}
-
+ {validation.title}
+
>
)}
{validation.content && (
- {validation.content}
+ {validation.content}
)}
{validation.icon}
@@ -121,7 +120,7 @@ const ChatForm = (props: Props) => {
onKeyDown={handleKeyDown}
role="presentation"
>
- {
panelClassName={cx('popoverLikeTooltip', styles.popover)}
anchorClassName={styles.popoverAnchor}
button={
- {
>
<>
{agreements}
-
-
+ {
data-testid="ai-accept-agreements"
>
I accept
-
+
>
-
+
Verify the accuracy of any information provided by Redis Copilot before
using it
-
+
)
}
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/ChatHistory.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/ChatHistory.tsx
index bb6bd2a852..b811114217 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/ChatHistory.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/ChatHistory.tsx
@@ -8,13 +8,13 @@ import React, {
import cx from 'classnames'
import { throttle } from 'lodash'
+import { RiIcon } from 'uiBase/icons'
+import { RiLoader } from 'uiBase/display'
import {
AiChatMessage,
AiChatMessageType,
} from 'uiSrc/slices/interfaces/aiAssistant'
import { Nullable, scrollIntoView } from 'uiSrc/utils'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Loader } from 'uiSrc/components/base/display'
import { AdditionalRedisModule } from 'apiSrc/modules/database/models/additional.redis.module'
import LoadingMessage from '../loading-message'
@@ -156,7 +156,7 @@ const ChatHistory = (props: Props) => {
if (isLoading) {
return (
-
+
)
}
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/texts.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/texts.tsx
index 5b659eb2c8..a1e62abc08 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/texts.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/chat-history/texts.tsx
@@ -1,24 +1,24 @@
import React from 'react'
-import { Text } from 'uiSrc/components/base/text'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
+import { RiText } from 'uiBase/text'
+import { RiSpacer } from 'uiBase/layout/spacer'
export const AssistanceChatInitialMessage = (
<>
- Hi!
-
+ Hi!
+
Feel free to engage in a general conversation with me about Redis.
-
-
+
+
Or switch to My Data tab to get assistance in the context of your
data.
-
-
+
+
Type /help for more info.
-
-
-
+
+
+
With ♥ , your Redis Copilot!
-
+
>
)
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/error-message/ErrorMessage.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/error-message/ErrorMessage.tsx
index e6ee7a682b..deb98ac27b 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/error-message/ErrorMessage.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/error-message/ErrorMessage.tsx
@@ -1,12 +1,12 @@
import React from 'react'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { DeleteIcon } from 'uiBase/icons'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import { CustomErrorCodes } from 'uiSrc/constants'
import { AI_CHAT_ERRORS } from 'uiSrc/constants/apiErrors'
import ApiStatusCode from 'uiSrc/constants/apiStatusCode'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
import RestartChat from '../restart-chat'
import styles from './styles.module.scss'
@@ -91,14 +91,14 @@ const ErrorMessage = (props: Props) => {
Restart session
-
+
}
onConfirm={onRestart}
/>
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/markdown-message/components/chat-external-link/ChatExternalLink.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/markdown-message/components/chat-external-link/ChatExternalLink.tsx
index 628fc43a8d..89b917327f 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/markdown-message/components/chat-external-link/ChatExternalLink.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/markdown-message/components/chat-external-link/ChatExternalLink.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-import { Props as ExternalLinkProps } from 'uiSrc/components/base/external-link/ExternalLink'
+import { Props as ExternalLinkProps } from 'uiBase/external-link/ExternalLink'
import { ExternalLink } from 'uiSrc/components'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/restart-chat/RestartChat.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/restart-chat/RestartChat.tsx
index 650ba61b5a..39297d1b68 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/restart-chat/RestartChat.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/shared/restart-chat/RestartChat.tsx
@@ -1,11 +1,10 @@
import React, { useState } from 'react'
import cx from 'classnames'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/display'
import styles from './styles.module.scss'
export interface Props {
@@ -41,21 +40,21 @@ const RestartChat = (props: Props) => {
button={extendedButton}
>
<>
- Restart session
-
-
+ Restart session
+
+
This will delete the current message history and initiate a new
session.
-
-
-
+
+
Restart
-
+
>
)
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/texts.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/texts.tsx
index bdd3e64811..c7fa837b82 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/texts.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/texts.tsx
@@ -1,90 +1,91 @@
-import { EuiLink } from '@elastic/eui'
import React from 'react'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Text } from 'uiSrc/components/base/text'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiLink } from 'uiBase/display'
+import { RiText } from 'uiBase/text'
export const ASSISTANCE_CHAT_AGREEMENTS = (
<>
-
+
Redis Copilot is powered by OpenAI API and is designed for general
information only.
-
-
-
+
+
+
Please do not input any personal data or confidential information.
-
-
-
+
+
+
By accessing and/or using Redis Copilot, you acknowledge that you agree to
the{' '}
-
REDIS COPILOT TERMS
- {' '}
+ {' '}
and{' '}
-
Privacy Policy
-
+
.
-
+
>
)
export const EXPERT_CHAT_AGREEMENTS = (
<>
- Redis Copilot is powered by OpenAI API.
-
-
+ Redis Copilot is powered by OpenAI API.
+
+
Please do not include any personal data (except as expressly required for
the use of Redis Copilot) or confidential information.
-
-
+
+
Redis Copilot needs access to the information in your database to provide
you context-aware assistance.
-
-
-
+
+
+
By accepting these terms, you consent to the processing of any information
included in your database, and you agree to the{' '}
-
REDIS COPILOT TERMS
- {' '}
+ {' '}
and{' '}
-
Privacy Policy
-
+
.
-
+
>
)
export const EXPERT_CHAT_INITIAL_MESSAGE = (
<>
- Hi!
- I am here to help you get started with data querying.
-
+ Hi!
+
+ I am here to help you get started with data querying.
+
+
Type /help to get more info on what questions I can answer.
-
-
-
+
+
+
With ♥ , your Redis Copilot!
-
+
>
)
diff --git a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/welcome-ai-assistant/WelcomeAiAssistant.tsx b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/welcome-ai-assistant/WelcomeAiAssistant.tsx
index 823d32c4e0..d19689e5ac 100644
--- a/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/welcome-ai-assistant/WelcomeAiAssistant.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/ai-assistant/components/welcome-ai-assistant/WelcomeAiAssistant.tsx
@@ -1,5 +1,7 @@
import React from 'react'
import { useDispatch } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiTitle, RiText } from 'uiBase/text'
import { OAuthAgreement } from 'uiSrc/components/oauth/shared'
import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
@@ -7,9 +9,6 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { setSSOFlow } from 'uiSrc/slices/instances/cloud'
import { setOAuthCloudSource } from 'uiSrc/slices/oauth/cloud'
import OAuthForm from 'uiSrc/components/oauth/shared/oauth-form'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
const WelcomeAiAssistant = () => {
@@ -35,24 +34,24 @@ const WelcomeAiAssistant = () => {
{(form: React.ReactNode) => (
<>
-
+
Welcome to Redis Copilot.
-
-
-
+
+
+
Learn about Redis and explore your data, in a conversational
manner.
-
-
-
+
+
+
Build faster with Redis Copilot.
-
-
- Sign in to get started.
+
+
+ Sign in to get started.
-
+
{form}
-
+
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/EnablementArea.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/EnablementArea.tsx
index 956b290875..fdbb1ee15a 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/EnablementArea.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/EnablementArea.tsx
@@ -2,12 +2,12 @@ import React, { useEffect, useRef, useState } from 'react'
import { useHistory, useLocation } from 'react-router-dom'
import { useSelector, useDispatch } from 'react-redux'
import cx from 'classnames'
+import { RiLoadingContent } from 'uiBase/layout'
import { IEnablementAreaItem } from 'uiSrc/slices/interfaces'
import {
EnablementAreaProvider,
IInternalPage,
} from 'uiSrc/pages/workbench/contexts/enablementAreaContext'
-import { LoadingContent } from 'uiSrc/components/base/layout'
import {
ApiEndpoints,
EAManifestFirstKey,
@@ -198,7 +198,7 @@ const EnablementArea = (props: Props) => {
data-testid="enablementArea-loader"
className={cx(styles.innerContainer, styles.innerContainerLoader)}
>
-
+
) : (
{
data-testid={`delete-tutorial-popover-${id}`}
>
-
+
{formatLongName(label)}
- will be deleted.
-
+
will be deleted.
+
- {
data-testid={`delete-tutorial-${id}`}
>
Delete
-
+
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/EmptyPrompt/EmptyPrompt.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/EmptyPrompt/EmptyPrompt.tsx
index 73e8b82fdd..8cdf6eabc2 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/EmptyPrompt/EmptyPrompt.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/EmptyPrompt/EmptyPrompt.tsx
@@ -1,9 +1,9 @@
import React from 'react'
+import { RiIcon } from 'uiBase/icons'
+import { RiLink } from 'uiBase/display'
+import { RiEmptyPrompt } from 'uiBase/layout'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiEmptyPrompt } from 'uiSrc/components/base/layout'
import styles from './styles.module.scss'
const EmptyPrompt = () => (
@@ -18,7 +18,7 @@ const EmptyPrompt = () => (
If the problem persists, please{' '}
- (
data-testid="contact-us"
>
contact us
-
+
.
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Group/Group.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Group/Group.tsx
index c43475b684..e3d13bf38a 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Group/Group.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Group/Group.tsx
@@ -3,6 +3,10 @@ import { useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
+import { RiTooltip, RiAccordion } from 'uiBase/display'
+import { RiCol } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import {
sendEventTelemetry,
TELEMETRY_EMPTY_VALUE,
@@ -12,11 +16,7 @@ import { workbenchCustomTutorialsSelector } from 'uiSrc/slices/workbench/wb-cust
import { EAItemActions } from 'uiSrc/constants'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
-import { RiAccordion } from 'uiSrc/components/base/display/accordion/RiAccordion'
-import { Col } from 'uiSrc/components/base/layout/flex'
-import { RiTooltip, OnboardingTour } from 'uiSrc/components'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { OnboardingTour } from 'uiSrc/components'
import DeleteTutorialButton from '../DeleteTutorialButton'
@@ -125,7 +125,7 @@ const Group = (props: Props) => {
defaultOpen={initialIsOpen}
open={forceState === 'open' || isGroupOpen}
label={
-
+
{isShowFolder && (
{
/>
)}
{label}
-
+
}
onOpenChange={handleOpen}
style={{
@@ -143,7 +143,7 @@ const Group = (props: Props) => {
className={cx({ withBorder })}
actions={isShowActions ? actionsContent : null}
>
- {children}
+ {children}
)
}
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/InternalLink/InternalLink.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/InternalLink/InternalLink.tsx
index 45b56a0c2d..278f239eb3 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/InternalLink/InternalLink.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/InternalLink/InternalLink.tsx
@@ -1,12 +1,12 @@
import React, { useContext } from 'react'
import cx from 'classnames'
+import { RiListItem } from 'uiBase/layout'
import { truncateText } from 'uiSrc/utils'
import EnablementAreaContext from 'uiSrc/pages/workbench/contexts/enablementAreaContext'
-import { Item as ListItem } from 'uiSrc/components/base/layout/list'
-import { RiTooltip } from 'uiSrc/components'
import styles from './styles.module.scss'
import './styles.scss'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
testId: string
@@ -55,7 +55,7 @@ const InternalLink = (props: Props) => {
)
return (
- {
closePopover={() => setShowCapabilityPopover(false)}
button={
-
{backTitle}
-
+
}
>
- Explore Redis
-
+ Explore Redis
+
{'You expressed interest in learning about the '}
{tutorialCapability?.name} . Try this tutorial to get
started.
-
+
-
+
-
+
{title?.toUpperCase()}
-
+
{
data-testid="enablement-area__page"
>
{isLoading && (
-
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation/Navigation.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation/Navigation.tsx
index cb13d3717d..0d2d524684 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation/Navigation.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Navigation/Navigation.tsx
@@ -3,7 +3,7 @@ import cx from 'classnames'
import { isArray } from 'lodash'
import { useParams } from 'react-router-dom'
import { useDispatch, useSelector } from 'react-redux'
-import { Group as ListGroup } from 'uiSrc/components/base/layout/list'
+import { RiListGroup } from 'uiBase/layout'
import {
EnablementAreaComponent,
IEnablementAreaItem,
@@ -239,7 +239,7 @@ const Navigation = (props: Props) => {
))
return (
-
{
getManifestItems(customTutorials),
PATHS.customTutorials,
)}
-
+
)
}
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Pagination/Pagination.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Pagination/Pagination.tsx
index 1424938363..4500306ed6 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Pagination/Pagination.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/Pagination/Pagination.tsx
@@ -1,20 +1,20 @@
import React, { useContext, useEffect, useState } from 'react'
import cx from 'classnames'
import { isNil } from 'lodash'
-import { ChevronLeftIcon, ChevronRightIcon } from 'uiSrc/components/base/icons'
+import { ChevronLeftIcon, ChevronRightIcon } from 'uiBase/icons'
+import { RiPrimaryButton } from 'uiBase/forms'
+import {
+ RiMenu,
+ RiMenuContent,
+ RiMenuDropdownArrow,
+ RiMenuItem,
+ RiMenuTrigger,
+} from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { IEnablementAreaItem } from 'uiSrc/slices/interfaces'
import EnablementAreaContext from 'uiSrc/pages/workbench/contexts/enablementAreaContext'
import { Nullable } from 'uiSrc/utils'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import {
- Menu,
- MenuContent,
- MenuDropdownArrow,
- MenuItem,
- MenuTrigger,
-} from 'uiSrc/components/base/layout/menu'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
export interface Props {
@@ -64,27 +64,25 @@ const Pagination = ({
}
const PagesControl = () => (
-
-
+
+
-
- {`${activePage + 1} of ${items.length}`}
-
+
+ {`${activePage + 1} of ${items.length}`}
+
-
-
+ setMenuOpen(false)}
>
{items.map((item, index) => (
- handleOpenPage(index)}
@@ -92,9 +90,9 @@ const Pagination = ({
className={cx({ [styles.activeMenuItem]: activePage === index })}
/>
))}
-
-
-
+
+
+
)
const size = compressed ? 'small' : 'medium'
@@ -106,7 +104,7 @@ const Pagination = ({
>
{activePage > 0 && (
-
Back
-
+
)}
@@ -126,7 +124,7 @@ const Pagination = ({
{activePage < items.length - 1 && (
-
Next
-
+
)}
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/PlainText/PlainText.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/PlainText/PlainText.tsx
index 0c1bf8ff98..6e64782540 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/PlainText/PlainText.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/PlainText/PlainText.tsx
@@ -1,18 +1,18 @@
import React from 'react'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
export interface Props {
children: React.ReactElement | string
style?: any
}
const PlainText = ({ children, ...rest }: Props) => (
-
{children}
-
+
)
export default PlainText
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/UploadTutorialForm/UploadTutorialForm.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/UploadTutorialForm/UploadTutorialForm.tsx
index 39f43cab3a..be6484cd59 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/UploadTutorialForm/UploadTutorialForm.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/UploadTutorialForm/UploadTutorialForm.tsx
@@ -3,18 +3,15 @@ import { useFormik } from 'formik'
import { FormikErrors } from 'formik/dist/types'
import { isEmpty } from 'lodash'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { Nullable } from 'uiSrc/utils'
-import validationErrors from 'uiSrc/constants/validationErrors'
-import { RiFilePicker, RiTooltip } from 'uiSrc/components'
+import { RiTextInput } from 'uiBase/inputs'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiFilePicker, RiTooltip } from 'uiSrc/components'
+import validationErrors from 'uiSrc/constants/validationErrors'
+import { Nullable } from 'uiSrc/utils'
import CreateTutorialLink from '../CreateTutorialLink'
import styles from './styles.module.scss'
@@ -77,8 +74,8 @@ const UploadTutorialForm = (props: Props) => {
return (
-
Add new Tutorial
-
+
Add new Tutorial
+
{
/>
OR
-
formik.setFieldValue('link', value)}
className={styles.input}
data-testid="tutorial-link-field"
/>
-
+
-
onCancel?.()}
data-testid="cancel-upload-tutorial-btn"
>
Cancel
-
+
{
}
content={getSubmitButtonContent(isSubmitDisabled)}
>
- formik.handleSubmit()}
@@ -132,7 +129,7 @@ const UploadTutorialForm = (props: Props) => {
data-testid="submit-upload-tutorial-btn"
>
Submit
-
+
diff --git a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/WelcomeMyTutorials/WelcomeMyTutorials.tsx b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/WelcomeMyTutorials/WelcomeMyTutorials.tsx
index 538368ac8b..36710090a5 100644
--- a/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/WelcomeMyTutorials/WelcomeMyTutorials.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/WelcomeMyTutorials/WelcomeMyTutorials.tsx
@@ -1,7 +1,7 @@
import React from 'react'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Card } from 'uiSrc/components/base/layout'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiCard } from 'uiBase/layout'
import CreateTutorialLink from '../CreateTutorialLink'
import styles from './styles.module.scss'
@@ -12,19 +12,19 @@ export interface Props {
const WelcomeMyTutorials = ({ handleOpenUpload }: Props) => (
-
+
- handleOpenUpload()}
data-testid="upload-tutorial-btn"
>
+ Upload tutorial
-
-
+
+
)
diff --git a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx
index 83a85ca94a..8852f827dc 100644
--- a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx
@@ -1,9 +1,13 @@
import React, { useEffect, useState } from 'react'
+import styled from 'styled-components'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
import { remove } from 'lodash'
-import styled from 'styled-components'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiCheckbox } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiLink, RiTooltip } from 'uiBase/display'
import { FeatureFlags, DEFAULT_DELIMITER, Pages } from 'uiSrc/constants'
import {
ANALYZE_CLUSTER_TOOLTIP_MESSAGE,
@@ -29,19 +33,14 @@ import { comboBoxToArray } from 'uiSrc/utils'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
import {
FeatureFlagComponent,
- LoadingContent,
- RiTooltip,
+ RiLoadingContent,
+ RiRow,
+ RiSpacer,
} from 'uiSrc/components'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import Recommendation from './components/recommendation'
import WelcomeScreen from './components/welcome-screen'
import PopoverRunAnalyze from './components/popover-run-analyze'
import styles from './styles.module.scss'
-import { Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout'
const FooterLink = styled.button<{
onClick?: () => void;
@@ -155,22 +154,21 @@ const LiveTimeRecommendations = () => {
const renderHeader = () => (
-
-
- Our Tips
-
+
+ Our Tips
Tips will help you improve your database.
-
+
New tips appear while you work with your database, including how
to improve performance and optimize memory usage.
<>
-
+
Eager for more tips? Run Database Analysis to get started.
>
@@ -185,7 +183,7 @@ const LiveTimeRecommendations = () => {
/>
- {
size="s"
data-testid="github-repo-icon"
/>
-
+
-
+
{isShowHiddenDisplayed && (
-
{
{loading ? (
-
+
) : (
renderBody()
)}
@@ -236,7 +234,7 @@ const LiveTimeRecommendations = () => {
size="m"
type="MessageInfoIcon"
/>
-
+
{'Run '}
{
{' to get more tips'}
-
+
)}
diff --git a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/popover-run-analyze/PopoverRunAnalyze.tsx b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/popover-run-analyze/PopoverRunAnalyze.tsx
index cba7ff09b3..c148606913 100644
--- a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/popover-run-analyze/PopoverRunAnalyze.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/popover-run-analyze/PopoverRunAnalyze.tsx
@@ -1,9 +1,9 @@
import React from 'react'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/index'
import styles from './styles.module.scss'
export interface Props {
@@ -38,13 +38,13 @@ const PopoverRunAnalyze = (props: Props) => {
className={styles.popover}
data-testid="insights-db-analysis-popover"
>
- Run database analysis
-
-
+ Run database analysis
+
+
{popoverContent}
-
-
-
+
+ {
className={styles.popoverApproveBtn}
>
Analyze
-
+
)
diff --git a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx
index beaee71789..7b0137f2c6 100644
--- a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx
@@ -1,9 +1,14 @@
import React, { useContext } from 'react'
+import styled from "styled-components"
import { useDispatch } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
-import styled from 'styled-components'
import { isUndefined } from 'lodash'
+import { HideIcon, ShowIcon, SnoozeIcon, StarsIcon, RiIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow, RiCard, RiCol } from 'uiBase/layout'
+import { RiIconButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiAccordion, RiLink } from 'uiBase/display'
import { findTutorialPath, Maybe, Nullable } from 'uiSrc/utils'
import { FeatureFlags, Pages, Theme } from 'uiSrc/constants'
import {
@@ -26,23 +31,7 @@ import {
IRecommendationsStatic,
} from 'uiSrc/slices/interfaces/recommendations'
-import {
- HideIcon,
- ShowIcon,
- SnoozeIcon,
- StarsIcon,
-} from 'uiSrc/components/base/icons'
-
import { openTutorialByPath } from 'uiSrc/slices/panels/sidePanels'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Card } from 'uiSrc/components/base/layout'
-import {
- IconButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiAccordion } from 'uiSrc/components/base/display/accordion/RiAccordion'
-import { Link } from 'uiSrc/components/base/link/Link'
import styles from './styles.module.scss'
@@ -58,10 +47,9 @@ export interface IProps {
recommendationsContent: IRecommendationsStatic
}
-const RecommendationContent = styled(Card)`
+const RecommendationContent = styled(RiCard)`
padding: var(--size-m);
`
-
const RecommendationTitle = ({
redisStack,
title,
@@ -73,7 +61,7 @@ const RecommendationTitle = ({
}) => {
const { theme } = useContext(ThemeContext)
return (
-
{redisStack && (
-
-
+
-
-
+
+
)}
-
- {title}
-
-
+
{title}
+
)
}
@@ -204,9 +190,9 @@ const Recommendation = ({
}
const recommendationContent = () => (
-
+
{!isUndefined(tutorialId) && (
-
{tutorialId ? 'Start Tutorial' : 'Workbench'}
-
+
)}
-
+
)
const renderButtonContent = (
-
-
+
+
-
-
-
+
+
-
-
-
+
+
)
if (!(name in recommendationsContent)) {
diff --git a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx
index 0d962fdc4b..ff4c3c543e 100644
--- a/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx
+++ b/redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx
@@ -3,6 +3,8 @@ import { useDispatch, useSelector } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
import cx from 'classnames'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import { DEFAULT_DELIMITER, FeatureFlags, Pages } from 'uiSrc/constants'
import { recommendationsSelector } from 'uiSrc/slices/recommendations/recommendations'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
@@ -17,8 +19,6 @@ import {
ANALYZE_TOOLTIP_MESSAGE,
} from 'uiSrc/constants/recommendations'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
import PopoverRunAnalyze from '../popover-run-analyze'
import styles from './styles.module.scss'
@@ -53,24 +53,24 @@ const NoRecommendationsScreen = () => {
return (
-
Welcome to
-
Tips!
-
+ Welcome to
+ Tips!
+
Where we help improve your database.
-
-
+
+
New tips appear while you work with your database, including how to
improve performance and optimize memory usage.
-
+
{instanceId ? (
-
Eager for more tips? Run Database Analysis to get started.
-
+
{
: ANALYZE_TOOLTIP_MESSAGE
}
>
- setIsShowInfo(true)}
data-testid="insights-db-analysis-link"
>
Analyze Database
-
+
) : (
-
Eager for tips? Connect to a database to get started.
-
+
)}
)
diff --git a/redisinsight/ui/src/components/table-column-search-trigger/TableColumnSearchTrigger.tsx b/redisinsight/ui/src/components/table-column-search-trigger/TableColumnSearchTrigger.tsx
index 6cbe55c0f3..2c71d887a2 100644
--- a/redisinsight/ui/src/components/table-column-search-trigger/TableColumnSearchTrigger.tsx
+++ b/redisinsight/ui/src/components/table-column-search-trigger/TableColumnSearchTrigger.tsx
@@ -1,11 +1,11 @@
import React, { useState, useEffect } from 'react'
import cx from 'classnames'
-import * as keys from 'uiSrc/constants/keys'
-import { SearchInput } from 'uiSrc/components/base/inputs'
+import { RiSearchInput } from 'uiBase/inputs'
+import { SearchIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
import { Maybe, Nullable } from 'uiSrc/utils'
-import { SearchIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
+import * as keys from 'uiSrc/constants/keys'
import styles from './styles.module.scss'
export interface Props {
@@ -60,7 +60,7 @@ const TableColumnSearchTrigger = (props: Props) => {
return (
-
{
className={cx(styles.search)}
style={{ display: isOpen ? 'flex' : 'none' }}
>
- {
return (
- {
- const themeContext = useContext(ThemeContext)
+ const { changeTheme } = useContext(ThemeContext)
useEffect(() => {
- const handler = (event) => {
- let theme = localStorageService.get(BrowserStorageItem.theme)
+ const handler = (_event: unknown) => {
+ const theme = localStorageService.get(BrowserStorageItem.theme)
if (theme === Theme.System) {
- themeContext.changeTheme(theme)
+ changeTheme(theme)
}
}
@@ -28,7 +29,7 @@ const ThemeComponent = () => {
}
}, [])
- return <>>
+ return
}
export default ThemeComponent
diff --git a/redisinsight/ui/src/components/triggers/copilot-trigger/CopilotTrigger.tsx b/redisinsight/ui/src/components/triggers/copilot-trigger/CopilotTrigger.tsx
index 566bee3bd0..cb8c22ff40 100644
--- a/redisinsight/ui/src/components/triggers/copilot-trigger/CopilotTrigger.tsx
+++ b/redisinsight/ui/src/components/triggers/copilot-trigger/CopilotTrigger.tsx
@@ -2,15 +2,15 @@ import React from 'react'
import cx from 'classnames'
import { useDispatch, useSelector } from 'react-redux'
+import { CopilotIcon } from 'uiBase/icons'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiTooltip } from 'uiBase/display'
import {
sidePanelsSelector,
toggleSidePanel,
} from 'uiSrc/slices/panels/sidePanels'
-import { RiTooltip } from 'uiSrc/components'
-import { CopilotIcon } from 'uiSrc/components/base/icons'
import { SidePanels } from 'uiSrc/slices/interfaces/insights'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
import styles from './styles.module.scss'
const CopilotTrigger = () => {
@@ -29,7 +29,7 @@ const CopilotTrigger = () => {
})}
>
- {
: 'Open interactive tutorials to learn more about Redis or Redis Stack capabilities, or use tips to improve your database.'
}
>
- {
{isHighlighted && instanceId && (
)}
-
+
)
diff --git a/redisinsight/ui/src/components/upload-file/UploadFile.tsx b/redisinsight/ui/src/components/upload-file/UploadFile.tsx
index 854f7b1316..0c60ccd369 100644
--- a/redisinsight/ui/src/components/upload-file/UploadFile.tsx
+++ b/redisinsight/ui/src/components/upload-file/UploadFile.tsx
@@ -1,8 +1,8 @@
import React from 'react'
-import { Text } from 'uiSrc/components/base/text'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { RiText } from 'uiBase/text'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
import styles from './styles.module.scss'
export interface Props {
@@ -28,7 +28,7 @@ const UploadFile = (props: Props) => {
}
return (
-
+
{
>
{/* todo: 'folderOpen', replace with redis-ui once available */}
- Upload
+ Upload
{
aria-label="Select file"
/>
-
+
)
}
diff --git a/redisinsight/ui/src/components/upload-warning/UploadWarning.tsx b/redisinsight/ui/src/components/upload-warning/UploadWarning.tsx
index 028daa2eb0..7c8bfa9aec 100644
--- a/redisinsight/ui/src/components/upload-warning/UploadWarning.tsx
+++ b/redisinsight/ui/src/components/upload-warning/UploadWarning.tsx
@@ -1,25 +1,25 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { CallOut } from 'uiSrc/components/base/display/call-out/CallOut'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiCallOut } from 'uiBase/display'
import styles from './styles.module.scss'
const UploadWarning = () => (
-
-
-
+
+
+
-
-
-
+
+
+
Use files only from trusted authors to avoid automatic execution of
malicious code.
-
-
-
-
+
+
+
+
)
export default UploadWarning
diff --git a/redisinsight/ui/src/components/virtual-grid/VirtualGrid.tsx b/redisinsight/ui/src/components/virtual-grid/VirtualGrid.tsx
index df1e17266a..6ee6958683 100644
--- a/redisinsight/ui/src/components/virtual-grid/VirtualGrid.tsx
+++ b/redisinsight/ui/src/components/virtual-grid/VirtualGrid.tsx
@@ -5,12 +5,12 @@ import { isObject, xor } from 'lodash'
import InfiniteLoader from 'react-window-infinite-loader'
import { VariableSizeGrid as Grid, GridChildComponentProps } from 'react-window'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiProgressBarLoader } from 'uiBase/display'
import { Maybe, Nullable } from 'uiSrc/utils'
import { SortOrder } from 'uiSrc/constants'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import { IProps } from './interfaces'
import { getColumnWidth, useInnerElementType } from './utils'
@@ -309,7 +309,7 @@ const VirtualGrid = (props: IProps) => {
data-testid="virtual-grid-container"
>
{loading && !hideProgress && (
- {
)}
{items.length === 1 && (
-
+
{loading ? loadingMsg : noItemsMessage}
-
+
)}
)
diff --git a/redisinsight/ui/src/components/virtual-table/VirtualTable.tsx b/redisinsight/ui/src/components/virtual-table/VirtualTable.tsx
index 179506249c..ad2b75a7bc 100644
--- a/redisinsight/ui/src/components/virtual-table/VirtualTable.tsx
+++ b/redisinsight/ui/src/components/virtual-table/VirtualTable.tsx
@@ -8,9 +8,13 @@ import {
IndexRange,
InfiniteLoader,
RowMouseEventHandlerParams,
- Table,
+ Table as ReactVirtualizedTable,
TableCellProps,
} from 'react-virtualized'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RIResizeObserver } from 'uiBase/utils'
+import { RiProgressBarLoader } from 'uiBase/display'
import TableColumnSearchTrigger from 'uiSrc/components/table-column-search-trigger/TableColumnSearchTrigger'
import TableColumnSearch from 'uiSrc/components/table-column-search/TableColumnSearch'
import { SortOrder } from 'uiSrc/constants'
@@ -18,10 +22,6 @@ import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { isEqualBuffers, Maybe, Nullable } from 'uiSrc/utils'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RIResizeObserver } from 'uiSrc/components/base/utils'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import {
ColumnWidthSizes,
IColumnSearchState,
@@ -383,14 +383,14 @@ const VirtualTable = (props: IProps) => {
className={styles.tableRowCell}
style={{ justifyContent: column.alignment, whiteSpace: 'normal' }}
>
-
+
{cellData}
-
+
)
@@ -436,9 +436,9 @@ const VirtualTable = (props: IProps) => {
data-testid="score-button"
style={{ justifyContent: column.alignment }}
>
-
+
{column.label}
-
+
)}
@@ -454,9 +454,9 @@ const VirtualTable = (props: IProps) => {
flex: '1',
}}
>
-
+
{column.label}
-
+
{column.isSearchable && searchRenderer(column)}
@@ -499,9 +499,9 @@ const VirtualTable = (props: IProps) => {
<>
{noItemsMessage && (
-
+
{loading ? 'loading...' : noItemsMessage}
-
+
)}
>
@@ -601,7 +601,7 @@ const VirtualTable = (props: IProps) => {
data-testid="virtual-table-container"
>
{loading && !hideProgress && (
-
@@ -614,7 +614,7 @@ const VirtualTable = (props: IProps) => {
rowCount={totalItemsCount || undefined}
>
{({ onRowsRendered, registerChild }) => (
- clearSelectTimeout()}
estimatedRowSize={rowHeight}
@@ -687,7 +687,7 @@ const VirtualTable = (props: IProps) => {
key={column.id}
/>
))}
-
+
)}
{!hideFooter && (
diff --git a/redisinsight/ui/src/constants/help-texts.tsx b/redisinsight/ui/src/constants/help-texts.tsx
index d569e61ec2..dcd70398db 100644
--- a/redisinsight/ui/src/constants/help-texts.tsx
+++ b/redisinsight/ui/src/constants/help-texts.tsx
@@ -1,4 +1,6 @@
import React from 'react'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { FeatureFlagComponent } from 'uiSrc/components'
import {
EXTERNAL_LINKS,
@@ -10,8 +12,6 @@ import styles from 'uiSrc/pages/browser/components/popover-delete/styles.module.
import { CloudLink } from 'uiSrc/components/markdown'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { FeatureFlags } from './featureFlags'
export default {
@@ -49,9 +49,9 @@ export default {
type="ToastDangerIcon"
style={{ marginRight: '1rem', marginTop: '4px' }}
/>
-
+
If you remove the single {fieldType}, the whole Key will be deleted.
-
+
),
REMOVING_MULTIPLE_ELEMENTS_NOT_SUPPORT: (
diff --git a/redisinsight/ui/src/constants/modules.ts b/redisinsight/ui/src/constants/modules.ts
index eb613eccfb..bc498e2cbf 100644
--- a/redisinsight/ui/src/constants/modules.ts
+++ b/redisinsight/ui/src/constants/modules.ts
@@ -1,8 +1,8 @@
+import { AllIconsType } from 'uiBase/icons'
import {
DATABASE_LIST_MODULES_TEXT,
RedisDefaultModules,
} from 'uiSrc/slices/interfaces'
-import { AllIconsType } from 'uiSrc/components/base/icons/RiIcon'
// Define the type for each module info entry
export interface ModuleInfo {
diff --git a/redisinsight/ui/src/constants/texts.tsx b/redisinsight/ui/src/constants/texts.tsx
index fe8e7bec84..b2937f325c 100644
--- a/redisinsight/ui/src/constants/texts.tsx
+++ b/redisinsight/ui/src/constants/texts.tsx
@@ -1,50 +1,50 @@
import React from 'react'
-import { Text } from 'uiSrc/components/base/text'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
+import { RiText } from 'uiBase/text'
+import { RiSpacer } from 'uiBase/layout'
export const NoResultsFoundText = (
-
+
No results found.
-
+
)
export const LoadingText = (
-
+
loading...
-
+
)
export const NoSelectedIndexText = (
-
+
Select an index and enter a query to search per values of keys.
-
+
)
export const FullScanNoResultsFoundText = (
<>
-
+
No results found.
-
-
-
+
+
+
Check the spelling.
Check upper and lower cases.
Use an asterisk (*) in your request for more generic results.
-
+
>
)
export const ScanNoResultsFoundText = (
<>
-
+
No results found.
-
+
-
+
Use "Scan more" button to proceed or filter per exact Key Name
to scan more efficiently.
-
+
>
)
@@ -52,7 +52,7 @@ export const lastDeliveredIDTooltipText = (
<>
Specify the ID of the last delivered entry in the stream from the new
group's perspective.
-
+
Otherwise, $ represents the ID of the last entry in the stream,
0 fetches the entire stream from the beginning.
>
diff --git a/redisinsight/ui/src/constants/themes.tsx b/redisinsight/ui/src/constants/themes.tsx
index c2f73b60b3..fcb3f772f9 100644
--- a/redisinsight/ui/src/constants/themes.tsx
+++ b/redisinsight/ui/src/constants/themes.tsx
@@ -1,5 +1,5 @@
+import { RiSelectOption } from 'uiBase/forms'
import { getConfig } from 'uiSrc/config'
-import { RiSelectOption } from 'uiSrc/components/base/forms/select/RiSelect'
const riConfig = getConfig()
diff --git a/redisinsight/ui/src/mocks/components/modal.ts b/redisinsight/ui/src/mocks/components/modal.ts
new file mode 100644
index 0000000000..b5366ea92e
--- /dev/null
+++ b/redisinsight/ui/src/mocks/components/modal.ts
@@ -0,0 +1,13 @@
+export const mockModal = (actual: any) => ({
+ ...actual,
+ RiModal: {
+ ...actual.RiModal,
+ Content: {
+ ...actual.RiModal.Content,
+ Header: {
+ ...actual.RiModal.Content.Header,
+ Title: jest.fn().mockReturnValue(null),
+ },
+ },
+ },
+})
diff --git a/redisinsight/ui/src/packages/clients-list/src/components/table-view/TableView.tsx b/redisinsight/ui/src/packages/clients-list/src/components/table-view/TableView.tsx
index 7055826bc9..16b3737fce 100644
--- a/redisinsight/ui/src/packages/clients-list/src/components/table-view/TableView.tsx
+++ b/redisinsight/ui/src/packages/clients-list/src/components/table-view/TableView.tsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'
import cx from 'classnames'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
export interface Props {
query: string
@@ -29,7 +29,7 @@ const TableView = React.memo(({ result, query }: Props) => {
return (
-
+
{!result?.length &&
{noResultMessage} }
)
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/arrow_down.jsx b/redisinsight/ui/src/packages/clients-list/src/icons/arrow_down.jsx
index a99709a6ac..fd2bdf22d0 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/arrow_down.jsx
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/arrow_down.jsx
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,31 +46,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconArrowDown = function EuiIconArrowDown(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconArrowDown = function EuiIconArrowDown(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. Hammerhead cannot create svg throw createElementNS
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
title
- ? /*#__PURE__*/ React.createElement(
+ ? /* #__PURE__ */ React.createElement(
'title',
{
id: titleId,
@@ -76,7 +74,7 @@ var EuiIconArrowDown = function EuiIconArrowDown(_ref) {
title,
)
: null,
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
fillRule: 'non-zero',
d: 'M13.069 5.157L8.384 9.768a.546.546 0 01-.768 0L2.93 5.158a.552.552 0 00-.771 0 .53.53 0 000 .759l4.684 4.61c.641.631 1.672.63 2.312 0l4.684-4.61a.53.53 0 000-.76.552.552 0 00-.771 0z',
}),
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/arrow_left.jsx b/redisinsight/ui/src/packages/clients-list/src/icons/arrow_left.jsx
index 2ca6f90d3c..020b9dd3ab 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/arrow_left.jsx
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/arrow_left.jsx
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,31 +46,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconArrowLeft = function EuiIconArrowLeft(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconArrowLeft = function EuiIconArrowLeft(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. Hammerhead cannot create svg throw createElementNS
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
title
- ? /*#__PURE__*/ React.createElement(
+ ? /* #__PURE__ */ React.createElement(
'title',
{
id: titleId,
@@ -76,7 +74,7 @@ var EuiIconArrowLeft = function EuiIconArrowLeft(_ref) {
title,
)
: null,
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
fillRule: 'nonzero',
d: 'M10.843 13.069L6.232 8.384a.546.546 0 010-.768l4.61-4.685a.552.552 0 000-.771.53.53 0 00-.759 0l-4.61 4.684a1.65 1.65 0 000 2.312l4.61 4.684a.53.53 0 00.76 0 .552.552 0 000-.771z',
}),
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/check.js b/redisinsight/ui/src/packages/clients-list/src/icons/check.js
index 74e2010a92..6674185fb1 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/check.js
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/check.js
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,31 +46,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconCheck = function EuiIconCheck(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconCheck = function EuiIconCheck(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. TestCafe is failing for default icons
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
title
- ? /*#__PURE__*/ React.createElement(
+ ? /* #__PURE__ */ React.createElement(
'title',
{
id: titleId,
@@ -76,7 +74,7 @@ var EuiIconCheck = function EuiIconCheck(_ref) {
title,
)
: null,
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
fillRule: 'evenodd',
d: 'M6.5 12a.502.502 0 01-.354-.146l-4-4a.502.502 0 01.708-.708L6.5 10.793l6.646-6.647a.502.502 0 01.708.708l-7 7A.502.502 0 016.5 12',
}),
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/copy.js b/redisinsight/ui/src/packages/clients-list/src/icons/copy.js
index 285d76bd65..7a10555855 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/copy.js
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/copy.js
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,31 +46,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconCopy = function EuiIconCopy(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconCopy = function EuiIconCopy(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. Hammerhead cannot create svg throw createElementNS
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
title
- ? /*#__PURE__*/ React.createElement(
+ ? /* #__PURE__ */ React.createElement(
'title',
{
id: titleId,
@@ -76,10 +74,10 @@ var EuiIconCopy = function EuiIconCopy(_ref) {
title,
)
: null,
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
d: 'M11.4 0c.235 0 .46.099.622.273l2.743 3c.151.162.235.378.235.602v9.25a.867.867 0 01-.857.875H3.857A.867.867 0 013 13.125V.875C3 .392 3.384 0 3.857 0H11.4zM14 4h-2.6a.4.4 0 01-.4-.4V1H4v12h10V4z',
}),
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
d: 'M3 1H2a1 1 0 00-1 1v13a1 1 0 001 1h10a1 1 0 001-1v-1h-1v1H2V2h1V1z',
}),
);
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/cross.js b/redisinsight/ui/src/packages/clients-list/src/icons/cross.js
index ad1f25d2a0..d8aed7254b 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/cross.js
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/cross.js
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,31 +46,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconCross = function EuiIconCross(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconCross = function EuiIconCross(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. Hammerhead cannot create svg throw createElementNS
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
title
- ? /*#__PURE__*/ React.createElement(
+ ? /* #__PURE__ */ React.createElement(
'title',
{
id: titleId,
@@ -76,7 +74,7 @@ var EuiIconCross = function EuiIconCross(_ref) {
title,
)
: null,
- /*#__PURE__*/ React.createElement('path', {
+ /* #__PURE__ */ React.createElement('path', {
d: 'M7.293 8L3.146 3.854a.5.5 0 11.708-.708L8 7.293l4.146-4.147a.5.5 0 01.708.708L8.707 8l4.147 4.146a.5.5 0 01-.708.708L8 8.707l-4.146 4.147a.5.5 0 01-.708-.708L7.293 8z',
}),
);
diff --git a/redisinsight/ui/src/packages/clients-list/src/icons/empty.js b/redisinsight/ui/src/packages/clients-list/src/icons/empty.js
index d9203bd951..3a50d3ddff 100644
--- a/redisinsight/ui/src/packages/clients-list/src/icons/empty.js
+++ b/redisinsight/ui/src/packages/clients-list/src/icons/empty.js
@@ -1,10 +1,12 @@
+import * as React from 'react';
+
function _extends() {
_extends =
Object.assign ||
function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
+ for (let i = 1; i < arguments.length; i++) {
+ const source = arguments[i];
+ for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
@@ -17,10 +19,10 @@ function _extends() {
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
- var target = _objectWithoutPropertiesLoose(source, excluded);
- var key, i;
+ const target = _objectWithoutPropertiesLoose(source, excluded);
+ let key; let i;
if (Object.getOwnPropertySymbols) {
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ const sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -33,9 +35,9 @@ function _objectWithoutProperties(source, excluded) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
+ const target = {};
+ const sourceKeys = Object.keys(source);
+ let key; let i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
@@ -44,29 +46,25 @@ function _objectWithoutPropertiesLoose(source, excluded) {
return target;
}
-import * as React from 'react';
-
-var EuiIconEmpty = function EuiIconEmpty(_ref) {
- var title = _ref.title,
- titleId = _ref.titleId,
- props = _objectWithoutProperties(_ref, ['title', 'titleId']);
+const EuiIconEmpty = function EuiIconEmpty(_ref) {
+ const {title} = _ref;
+ const {titleId} = _ref;
+ const props = _objectWithoutProperties(_ref, ['title', 'titleId']);
// For e2e tests. TestCafe is failing for default icons
try {
document.createElementNS('http://www.w3.org/2000/svg', 'svg');
- return /*#__PURE__*/ React.createElement(
+ return /* #__PURE__ */ React.createElement(
'svg',
- _extends(
- {
- width: 16,
+ {
+ width: 16,
height: 16,
viewBox: '0 0 16 16',
xmlns: 'http://www.w3.org/2000/svg',
'aria-labelledby': titleId,
- },
- props,
- ),
+ ...props,
+ },
);
} catch (e) {
return '' ;
diff --git a/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx b/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
index 1f21833968..886a573de4 100644
--- a/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
+++ b/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
@@ -2,11 +2,10 @@
import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import { toUpper, flatten, isArray, isEmpty, map, uniq } from 'lodash'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+import { RiTable, ColumnDefinition, RiLoadingContent } from 'uiBase/layout'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ColorText, Text } from '../../../../../components/base/text'
-import { LoadingContent } from '../../../../../components/base/layout'
+import { RiIcon } from 'uiBase/icons'
+import { RiColorText, RiText } from 'uiBase/text'
import GroupBadge from '../GroupBadge'
import { InfoAttributesBoolean } from '../../constants'
@@ -59,7 +58,7 @@ const TableInfoResult = React.memo((props: Props) => {
)
}
- return {initValue}
+ return {initValue}
},
}),
)
@@ -68,7 +67,7 @@ const TableInfoResult = React.memo((props: Props) => {
{result ? (
<>
-
+
Indexing
{
{result?.index_definition?.prefixes
?.map((prefix: any) => `"${prefix}"`)
.join(',')}
-
-
+
+
Options:{' '}
{result?.index_options?.length ? (
-
+
{result?.index_options?.join(', ')}
-
+
) : (
{noOptionsMessage}
)}
-
+
>
) : (
-
+
)}
)
const Footer = () => (
{result ? (
-
+
{`Number of docs: ${result?.num_docs || '0'} (max ${result?.max_doc_id || '0'}) | `}
{`Number of records: ${result?.num_records || '0'} | `}
{`Number of terms: ${result?.num_terms || '0'}`}
-
+
) : (
-
+
)}
)
@@ -118,7 +117,7 @@ const TableInfoResult = React.memo((props: Props) => {
{isDataArr && (
{Header()}
-
+
{Footer()}
)}
diff --git a/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx b/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
index dc44ef1bf5..91a97ac835 100644
--- a/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
+++ b/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
@@ -2,12 +2,13 @@ import React, { useEffect, useState } from 'react'
import parse from 'html-react-parser'
import cx from 'classnames'
import { flatten, isArray, isEmpty, map, uniq } from 'lodash'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
-import { ColorText } from '../../../../../components/base/text/ColorText'
-import { IconButton } from '../../../../../components/base/forms/buttons'
-import { CopyIcon } from '../../../../../components/base/icons'
-import { RiTooltip } from '../../../../../components'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
+import { RiColorText } from 'uiBase/text'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon } from 'uiBase/icons'
+import { RiTooltip } from 'uiSrc/components'
+
import { CommandArgument, Command } from '../../constants'
import { formatLongName, replaceSpaces } from '../../utils'
@@ -83,10 +84,10 @@ const TableResult = React.memo((props: Props) => {
content={formatLongName(value.toString())}
>
-
+
{cellContent}
-
-
+ {
{isDataArr && (
)}
{isDataEl && {result}
}
diff --git a/redisinsight/ui/src/packages/redisgraph/src/App.tsx b/redisinsight/ui/src/packages/redisgraph/src/App.tsx
index e42fa330ef..dc32dc3473 100644
--- a/redisinsight/ui/src/packages/redisgraph/src/App.tsx
+++ b/redisinsight/ui/src/packages/redisgraph/src/App.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { JSONTree } from 'react-json-tree'
-import { Table } from 'uiSrc/components/base/layout/table'
+import { RiTable } from 'uiBase/layout'
import { ResultsParser } from './parser'
import Graph from './Graph'
@@ -38,7 +38,7 @@ export function TableApp(props: { command?: string; data: any }) {
return (
-
({
id: h,
diff --git a/redisinsight/ui/src/packages/redisgraph/src/Graph.tsx b/redisinsight/ui/src/packages/redisgraph/src/Graph.tsx
index 591e834808..bca488699d 100644
--- a/redisinsight/ui/src/packages/redisgraph/src/Graph.tsx
+++ b/redisinsight/ui/src/packages/redisgraph/src/Graph.tsx
@@ -1,6 +1,11 @@
import React, { useEffect, useRef, useState, useMemo } from 'react'
import * as d3 from 'd3'
import { executeRedisCommand, formatRedisReply } from 'redisinsight-plugin-sdk'
+import { RiTooltip } from 'uiBase/display'
+import { RiSwitchInput } from 'uiBase/inputs'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { TOOLTIP_DELAY_LONG } from 'uiSrc/constants'
import Graphd3, { IGraphD3 } from './graphd3'
import { responseParser } from './parser'
import {
@@ -19,11 +24,6 @@ import {
NODE_COLORS,
NODE_COLORS_DARK,
} from './constants'
-import { IconButton } from '../../../components/base/forms/buttons'
-import { CancelSlimIcon } from '../../../components/base/icons'
-import { SwitchInput } from 'uiSrc/components/base/inputs'
-import { RiTooltip } from 'uiSrc/components'
-import { TOOLTIP_DELAY_LONG } from 'uiSrc/constants'
enum EntityType {
Node = 'Node',
@@ -413,7 +413,7 @@ export default function Graph(props: {
delay={TOOLTIP_DELAY_LONG}
content="Toggle visibility of automatically fetched relationships"
>
- {
@@ -482,7 +482,7 @@ export default function Graph(props: {
{selectedEntity.property}
)}
- setSelectedEntity(null)}
icon={CancelSlimIcon}
aria-label="Close"
@@ -534,7 +534,7 @@ export default function Graph(props: {
},
].map((item) => (
- onChange('mode', v)}
/>
- onChange('staircase', checked)}
/>
- onChange('fill', checked)}
@@ -81,30 +77,29 @@ export default function ChartConfigForm(props: ChartConfigFormProps) {
content={
-
-
+ onChange('title', value)}
aria-label="Title"
maxLength={parseInt(TITLE_MAX_LENGTH)}
-
/>
-
-
-
+
+ onChange('xlabel', value)}
aria-label="X Label"
maxLength={parseInt(X_LABEL_MAX_LENGTH)}
/>
-
+
-
onChange('yAxis2', checked)}
@@ -115,9 +110,9 @@ export default function ChartConfigForm(props: ChartConfigFormProps) {
{Object.keys(value.keyToY2Axis).map((key) => (
{key}
-
+
{yAxisButtonGroupItems.map((item) => (
-
onChange('keyToY2Axis', {
@@ -127,9 +122,9 @@ export default function ChartConfigForm(props: ChartConfigFormProps) {
}
>
{item.label}
-
+
))}
-
+
))}
@@ -140,7 +135,7 @@ export default function ChartConfigForm(props: ChartConfigFormProps) {
onChange('yAxisConfig', v)}
- isLeftYAxis={true}
+ isLeftYAxis
value={value.yAxisConfig}
/>
{value.yAxis2 && (
@@ -161,16 +156,16 @@ export default function ChartConfigForm(props: ChartConfigFormProps) {
const YAxisConfigForm = ({ value, onChange, label }: any) => (
-
-
+ onChange({ ...value, label: value })}
aria-label="label"
maxLength={parseInt(Y_LABEL_MAX_LENGTH)}
/>
-
-
+
+
@@ -179,7 +174,7 @@ const YAxisConfigForm = ({ value, onChange, label }: any) => (
value={value.scale}
enumType={AxisScale}
/>
-
+
)
@@ -195,9 +190,9 @@ const EnumSelect = ({
inputLabel,
...props
}: EnumSelectProps & ButtonGroupProps) => (
-
+
{Object.values(enumType).map((v) => (
-
@@ -205,7 +200,7 @@ const EnumSelect = ({
}
>
{capitalize(String(v))}
-
+
))}
-
+
)
diff --git a/redisinsight/ui/src/packages/ri-explain/src/Explain.tsx b/redisinsight/ui/src/packages/ri-explain/src/Explain.tsx
index 8c430e5e65..b97597ee7b 100644
--- a/redisinsight/ui/src/packages/ri-explain/src/Explain.tsx
+++ b/redisinsight/ui/src/packages/ri-explain/src/Explain.tsx
@@ -5,8 +5,9 @@ import { register } from '@antv/x6-react-shape'
import Hierarchy from '@antv/hierarchy'
import { formatRedisReply } from 'redisinsight-plugin-sdk'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
+import { RiIcon } from 'uiBase/icons'
+import { RiTooltip } from 'uiBase/display'
+import { RiIconButton } from 'uiBase/forms'
import {
EDGE_COLOR_BODY_DARK,
@@ -28,7 +29,6 @@ import {
findFlatProfile,
} from './parser'
import { ExplainNode, ProfileNode } from './Node'
-import { IconButton } from '../../../components/base/forms/buttons'
interface IExplain {
command: string
@@ -539,7 +539,7 @@ function ExplainDraw({
},
].map((item) => (
- {
}
const SummaryText = () => (
-
+
Summary:
{countSuccessAdded ? (
@@ -75,35 +75,35 @@ const RedisCloudDatabaseListResult = ({ columns, onBack, onView }: Props) => {
{countFailAdded ? (
Failed to add {countFailAdded} database(s).
) : null}
-
+
)
return (
-
+
Redis Enterprise Databases Added
-
+
-
+
-
-
-
-
+
+
+
-
-
+
+
-
{
},
]}
/>
- {!items.length && {message} }
+ {!items.length && {message} }
-
-
-
+
+
Back to adding databases
-
-
+
+
View Databases
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases-result/RedisCloudDatabasesResultPage.spec.tsx b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases-result/RedisCloudDatabasesResultPage.spec.tsx
index fce380d23b..c74fd9fcce 100644
--- a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases-result/RedisCloudDatabasesResultPage.spec.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases-result/RedisCloudDatabasesResultPage.spec.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiTable } from 'uiBase/layout'
import { render, fireEvent, screen } from 'uiSrc/utils/test-utils'
-import { Table } from 'uiSrc/components/base/layout/table'
import RedisCloudDatabasesResultPage from './RedisCloudDatabasesResultPage'
import RedisCloudDatabasesResult, {
@@ -25,7 +25,7 @@ const mockRedisCloudDatabasesResult = (
onBack
-
{
anchorClassName="truncateText"
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
@@ -117,7 +115,7 @@ const RedisCloudDatabasesResultPage = () => {
anchorClassName="truncateText"
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
@@ -153,9 +151,13 @@ const RedisCloudDatabasesResultPage = () => {
const text = publicEndpoint
return (
-
{text}
-
- {text}
+
+ {
return (
<>
{statusAdded === AddRedisDatabaseStatus.Success ? (
- {messageAdded}
+ {messageAdded}
) : (
-
-
-
+
+
+
-
+
-
-
+
Error
-
-
-
+
+
+
)}
>
diff --git a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabases/RedisCloudDatabases.tsx b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabases/RedisCloudDatabases.tsx
index e734a37afa..508b1851ab 100644
--- a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabases/RedisCloudDatabases.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabases/RedisCloudDatabases.tsx
@@ -3,25 +3,22 @@ import { map, pick } from 'lodash'
import { useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
-import { cloudSelector } from 'uiSrc/slices/instances/cloud'
-import { InstanceRedisCloud } from 'uiSrc/slices/interfaces'
-import validationErrors from 'uiSrc/constants/validationErrors'
-import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
-
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { InfoIcon } from 'uiSrc/components/base/icons'
+import { RiFlexItem, RiRow, RiTable, ColumnDefinition } from 'uiBase/layout'
+import { InfoIcon } from 'uiBase/icons'
import {
- DestructiveButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
+ RiDestructiveButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+} from 'uiBase/forms'
+import { RiPopover, RiTooltip } from 'uiBase/index'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiSearchInput } from 'uiBase/inputs'
import { Pages } from 'uiSrc/constants'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { SearchInput } from 'uiSrc/components/base/inputs'
-import { Text } from 'uiSrc/components/base/text'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
+import validationErrors from 'uiSrc/constants/validationErrors'
+import { InstanceRedisCloud } from 'uiSrc/slices/interfaces'
+import { cloudSelector } from 'uiSrc/slices/instances/cloud'
import styles from '../styles.module.scss'
export interface Props {
@@ -137,28 +134,28 @@ const RedisCloudDatabasesPage = ({
panelClassName={styles.panelCancelBtn}
panelPaddingSize="l"
button={
-
Cancel
-
+
}
>
-
+
Your changes have not been saved.
Do you want to proceed to
the list of databases?
-
+
-
Proceed
-
+
)
@@ -171,14 +168,10 @@ const RedisCloudDatabasesPage = ({
isDisabled ? validationErrors.SELECT_AT_LEAST_ONE('database') : null
}
content={
- isDisabled ? (
-
- {validationErrors.NO_DBS_SELECTED}
-
- ) : null
+ isDisabled ? {validationErrors.NO_DBS_SELECTED} : null
}
>
-
Add selected Databases
-
+
)
return (
-
+
Redis Cloud Databases
-
-
-
-
-
+
+
+
+
+
These are {items.length > 1 ? 'databases ' : 'database '}
in your Redis Cloud. Select the
{items.length > 1 ? ' databases ' : ' database '} that you want to
add.
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
- {!items.length &&
{message} }
+ {!items.length &&
{message} }
-
-
-
+
+
Back to adding databases
-
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabasesPage.spec.tsx b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabasesPage.spec.tsx
index b15d8862c8..70412b70e8 100644
--- a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabasesPage.spec.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-databases/RedisCloudDatabasesPage.spec.tsx
@@ -1,6 +1,6 @@
import React from 'react'
+import { RiTable } from 'uiBase/layout'
import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
-import { Table } from 'uiSrc/components/base/layout/table'
import RedisCloudDatabasesPage from './RedisCloudDatabasesPage'
import RedisCloudDatabases from './RedisCloudDatabases'
@@ -32,7 +32,7 @@ const mockRedisCloudDatabases = (props: RedisCloudDatabasesProps) => (
onSubmit
-
{
anchorClassName="truncateText"
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
@@ -182,7 +182,7 @@ const RedisCloudDatabasesPage = () => {
anchorClassName="truncateText"
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
@@ -218,9 +218,13 @@ const RedisCloudDatabasesPage = () => {
const text = publicEndpoint
return (
-
{text}
-
- {text}
+
+
Cancel
-
+
}
>
-
+
Your changes have not been saved.
Do you want to proceed to
the list of databases?
-
+
-
Proceed
-
+
)
@@ -183,13 +186,11 @@ const RedisCloudSubscriptions = ({
}
content={
isDisabled ? (
-
- {validationErrors.NO_SUBSCRIPTIONS_CLOUD}
-
+ {validationErrors.NO_SUBSCRIPTIONS_CLOUD}
) : null
}
>
-
Show databases
-
+
)
const SummaryText = () => (
-
+
Summary:
{countStatusActive ? (
@@ -221,7 +222,7 @@ const RedisCloudSubscriptions = ({
{countStatusFailed > 1 ? 'subscriptions.' : ' subscription.'}
) : null}
-
+
)
const Account = () => (
@@ -229,25 +230,25 @@ const RedisCloudSubscriptions = ({
Account ID:
- {account?.accountId ?? }
+ {account?.accountId ?? }
Name:
- {account?.accountName ?? }
+ {account?.accountName ?? }
Owner Name:
- {account?.ownerName ?? }
+ {account?.ownerName ?? }
Owner Email:
- {account?.ownerEmail ?? }
+ {account?.ownerEmail ?? }
>
@@ -256,28 +257,28 @@ const RedisCloudSubscriptions = ({
return (
-
+
Redis Cloud Subscriptions
-
+
-
-
+
+
0}>
-
-
-
-
+
+
+
-
-
-
+
+
+
-
{!items.length && (
-
{message}
+
{message}
)}
-
-
-
+
+
Back to adding databases
-
-
+
+
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-subscriptions/RedisCloudSubscriptionsPage.tsx b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-subscriptions/RedisCloudSubscriptionsPage.tsx
index 74a12cb5c0..a6733409ea 100644
--- a/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-subscriptions/RedisCloudSubscriptionsPage.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-cloud/redis-cloud-subscriptions/RedisCloudSubscriptionsPage.tsx
@@ -3,6 +3,11 @@ import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
import { isNumber } from 'lodash'
+import { RiIconButton } from 'uiBase/forms'
+import { ToastDangerIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { ColumnDefinition } from 'uiBase/layout'
+import { RiTooltip } from 'uiBase/display'
import { Pages } from 'uiSrc/constants'
import {
InstanceRedisCloud,
@@ -13,7 +18,6 @@ import {
RedisCloudSubscriptionStatusText,
RedisCloudSubscriptionTypeText,
} from 'uiSrc/slices/interfaces'
-import { RiTooltip } from 'uiSrc/components'
import {
cloudSelector,
fetchInstancesRedisCloud,
@@ -24,10 +28,6 @@ import {
import { formatLongName, Maybe, replaceSpaces, setTitle } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { oauthCloudUserSelector } from 'uiSrc/slices/oauth/cloud'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { ToastDangerIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { ColumnDefinition } from 'uiSrc/components/base/layout/table'
import RedisCloudSubscriptions from './RedisCloudSubscriptions/RedisCloudSubscriptions'
import styles from './styles.module.scss'
@@ -148,7 +148,7 @@ const RedisCloudSubscriptionsPage = () => {
position="right"
className={styles.tooltipStatus}
>
-
@@ -186,7 +186,7 @@ const RedisCloudSubscriptionsPage = () => {
className={styles.tooltipColumnName}
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/SentinelDatabasesResultPage.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/SentinelDatabasesResultPage.tsx
index bc85ef0cb0..d2fd56fa15 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/SentinelDatabasesResultPage.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/SentinelDatabasesResultPage.tsx
@@ -3,6 +3,11 @@ import { useHistory } from 'react-router-dom'
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiIconButton, RiPrimaryButton } from 'uiBase/forms'
+import { InfoIcon, CopyIcon, RiIcon } from 'uiBase/icons'
+import { RiColorText, RiText } from 'uiBase/text'
+import { ColumnDefinition } from 'uiBase/layout'
+import { RiLoader, RiTooltip } from 'uiBase/display'
import {
LoadedSentinel,
AddRedisDatabaseStatus,
@@ -18,16 +23,10 @@ import {
import { removeEmpty, setTitle } from 'uiSrc/utils'
import { ApiStatusCode, Pages } from 'uiSrc/constants'
import { ApiEncryptionErrors } from 'uiSrc/constants/apiErrors'
-import { InputFieldSentinel, RiTooltip } from 'uiSrc/components'
+import { InputFieldSentinel } from 'uiSrc/components'
import validationErrors from 'uiSrc/constants/validationErrors'
import { SentinelInputFieldType } from 'uiSrc/components/input-field-sentinel/InputFieldSentinel'
-import { IconButton, PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon, CopyIcon } from 'uiSrc/components/base/icons'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ColumnDefinition } from 'uiSrc/components/base/layout/table'
-import { Loader } from 'uiSrc/components/base/display'
import SentinelDatabasesResult from './components'
import styles from '../styles.module.scss'
@@ -120,16 +119,16 @@ const SentinelDatabasesResultPage = () => {
},
}) => (
- {loading && }
+ {loading && }
{!loading && status === AddRedisDatabaseStatus.Success && (
- {message}
+ {message}
)}
{!loading && status !== AddRedisDatabaseStatus.Success && (
-
+
Error
-
+
)}
@@ -189,13 +188,13 @@ const SentinelDatabasesResultPage = () => {
const text = `${host}:${port}`
return (
-
{text}
+
{text}
- {
title={isDisabled ? validationErrors.REQUIRED_TITLE(1) : null}
content={isDisabled ? Database Alias : null}
>
- {
icon={isDisabled ? InfoIcon : undefined}
>
Add Primary Group
-
+
)
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.spec.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.spec.tsx
index 1f5d5c32ac..72079a2e9e 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.spec.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.spec.tsx
@@ -1,8 +1,8 @@
import React from 'react'
import { instance, mock } from 'ts-mockito'
+import { ColumnDefinition } from 'uiBase/layout'
import { ModifiedSentinelMaster } from 'uiSrc/slices/interfaces'
import { cleanup, render, screen, fireEvent } from 'uiSrc/utils/test-utils'
-import { ColumnDefinition } from 'uiSrc/components/base/layout/table'
import SentinelDatabasesResult, { Props } from './SentinelDatabasesResult'
const mockedProps = mock()
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.tsx
index 4397123607..bc0e084a7b 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases-result/components/SentinelDatabasesResult/SentinelDatabasesResult.tsx
@@ -1,21 +1,15 @@
import React, { useState, useEffect } from 'react'
import { useSelector } from 'react-redux'
-import { SearchInput } from 'uiSrc/components/base/inputs'
+import { RiSearchInput } from 'uiBase/inputs'
+import { RiFlexItem, RiRow, RiTable, ColumnDefinition } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
import { sentinelSelector } from 'uiSrc/slices/instances/sentinel'
import { ModifiedSentinelMaster } from 'uiSrc/slices/interfaces'
import MessageBar from 'uiSrc/components/message-bar/MessageBar'
import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
import styles from './styles.module.scss'
export interface Props {
@@ -73,7 +67,7 @@ const SentinelDatabasesResult = ({
}
const SummaryText = () => (
-
+
Summary:
{countSuccessAdded ? (
@@ -88,39 +82,39 @@ const SentinelDatabasesResult = ({
{' primary group(s)'}
) : null}
-
+
)
return (
-
+
Auto-Discover Redis Sentinel Primary Groups
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
-
-
+
+
{!items.length || loading ? (
-
{message}
+
{message}
) : (
-
-
-
-
+
+
Back to adding databases
-
-
+
View Databases
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.spec.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.spec.tsx
index 1b612ad41c..7678a0e2c6 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.spec.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.spec.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiTable } from 'uiBase/layout'
import { render, screen, fireEvent } from 'uiSrc/utils/test-utils'
-import { Table } from 'uiSrc/components/base/layout/table'
import SentinelDatabasesPage from './SentinelDatabasesPage'
import SentinelDatabases from './components'
import { Props as SentinelDatabasesProps } from './components/SentinelDatabases/SentinelDatabases'
@@ -50,7 +50,7 @@ const mockSentinelDatabases = (props: SentinelDatabasesProps) => (
>
onSubmit
-
+
)
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.tsx
index 91934772c6..d080ea2320 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/SentinelDatabasesPage.tsx
@@ -3,6 +3,11 @@ import { map, pick } from 'lodash'
import { useHistory } from 'react-router-dom'
import { useDispatch, useSelector } from 'react-redux'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon, RiIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { ColumnDefinition } from 'uiBase/layout'
+import { RiTooltip } from 'uiBase/display'
import { Pages } from 'uiSrc/constants'
import { setTitle } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -14,13 +19,8 @@ import {
updateMastersSentinel,
} from 'uiSrc/slices/instances/sentinel'
import { LoadedSentinel, ModifiedSentinelMaster } from 'uiSrc/slices/interfaces'
-import { InputFieldSentinel, RiTooltip } from 'uiSrc/components'
+import { InputFieldSentinel } from 'uiSrc/components'
import { SentinelInputFieldType } from 'uiSrc/components/input-field-sentinel/InputFieldSentinel'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ColumnDefinition } from 'uiSrc/components/base/layout/table'
import { CreateSentinelDatabaseDto } from 'apiSrc/modules/redis-sentinel/dto/create.sentinel.database.dto'
import SentinelDatabases from './components'
@@ -156,13 +156,13 @@ const SentinelDatabasesPage = () => {
const text = `${host}:${port}`
return (
-
{text}
+
{text}
- ()
diff --git a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/components/SentinelDatabases/SentinelDatabases.tsx b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/components/SentinelDatabases/SentinelDatabases.tsx
index 7b76d94768..43f2907c37 100644
--- a/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/components/SentinelDatabases/SentinelDatabases.tsx
+++ b/redisinsight/ui/src/pages/autodiscover-sentinel/sentinel-databases/components/SentinelDatabases/SentinelDatabases.tsx
@@ -2,24 +2,21 @@ import React, { useState, useEffect } from 'react'
import cx from 'classnames'
import { useSelector } from 'react-redux'
-import { sentinelSelector } from 'uiSrc/slices/instances/sentinel'
-import { ModifiedSentinelMaster } from 'uiSrc/slices/interfaces'
-import validationErrors from 'uiSrc/constants/validationErrors'
-import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
-
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
+import { RiFlexItem, RiRow, RiTable, ColumnDefinition } from 'uiBase/layout'
import {
- DestructiveButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { SearchInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+ RiDestructiveButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+} from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
+import { RiSearchInput } from 'uiBase/inputs'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiPopover, RiTooltip } from 'uiBase/index'
+import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
+import validationErrors from 'uiSrc/constants/validationErrors'
+import { ModifiedSentinelMaster } from 'uiSrc/slices/interfaces'
+import { sentinelSelector } from 'uiSrc/slices/instances/sentinel'
import styles from '../../../styles.module.scss'
export interface Props {
@@ -127,29 +124,29 @@ const SentinelDatabases = ({
panelClassName={styles.panelCancelBtn}
panelPaddingSize="l"
button={
-
Cancel
-
+
}
>
-
+
Your changes have not been saved.
Do you want to proceed to
the list of databases?
-
+
-
Proceed
-
+
)
@@ -174,13 +171,9 @@ const SentinelDatabases = ({
position="top"
anchorClassName="euiToolTip__btn-disabled"
title={title}
- content={
- isSubmitDisabled() ? (
- {content}
- ) : null
- }
+ content={isSubmitDisabled() ? {content} : null}
>
-
Add Primary Group
-
+
)
}
@@ -197,33 +190,37 @@ const SentinelDatabases = ({
return (
-
+
Auto-Discover Redis Sentinel Primary Groups
-
+
-
-
-
+
+
+
Redis Sentinel instance found.
Here is a list of primary groups your Sentinel instance is
managing. Select the primary group(s) you want to add:
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
- {!items.length &&
{message} }
+ {!items.length &&
{message} }
{!masters.length && (
-
+
{notMastersMsg}
-
+
)}
-
-
+
-
Back to adding databases
-
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/BrowserPage.tsx b/redisinsight/ui/src/pages/browser/BrowserPage.tsx
index 3ebe245132..5092efa62e 100644
--- a/redisinsight/ui/src/pages/browser/BrowserPage.tsx
+++ b/redisinsight/ui/src/pages/browser/BrowserPage.tsx
@@ -5,6 +5,13 @@ import cx from 'classnames'
import { isNumber } from 'lodash'
import { useTheme } from '@redis-ui/styles'
+import { RiEmptyButton } from 'uiBase/forms'
+import { ArrowLeftIcon } from 'uiBase/icons'
+import {
+ RiResizableContainer,
+ RiResizablePanel,
+ RiResizablePanelHandle,
+} from 'uiBase/layout'
import {
formatLongName,
getDbIndex,
@@ -44,20 +51,13 @@ import OnboardingStartPopover from 'uiSrc/pages/browser/components/onboarding-st
import { sidePanelsSelector } from 'uiSrc/slices/panels/sidePanels'
import { useStateWithContext } from 'uiSrc/services/hooks'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { ArrowLeftIcon } from 'uiSrc/components/base/icons'
-import {
- ResizableContainer,
- ResizablePanel,
- ResizablePanelHandle,
-} from 'uiSrc/components/base/layout'
-
import { useAppNavigationActions } from 'uiSrc/contexts/AppNavigationActionsProvider'
import Actions from 'uiSrc/pages/browser/components/actions/Actions'
import BrowserSearchPanel from './components/browser-search-panel'
import BrowserLeftPanel from './components/browser-left-panel'
import BrowserRightPanel from './components/browser-right-panel'
+import UploadModal from '../rdi/pipeline-management/components/upload-modal/UploadModal'
import styles from './styles.module.scss'
const widthResponsiveSize = 1280
@@ -298,7 +298,7 @@ const BrowserPage = () => {
return (
{arePanelsCollapsed && isRightPanelOpen && !isBrowserFullScreen && (
-
{
data-testid="back-right-panel-btn"
>
Back
-
+
)}
{
-
- {
borderRadius: `8px`,
}}
>
+
+ test
+
-
+
{!arePanelsCollapsed && !isBrowserFullScreen && (
-
+
)}
- {
handleBulkActionsPanel={handleBulkActionsPanel}
closeRightPanels={closeRightPanels}
/>
-
-
+
+
diff --git a/redisinsight/ui/src/pages/browser/components/action-footer/ActionFooter.tsx b/redisinsight/ui/src/pages/browser/components/action-footer/ActionFooter.tsx
index 3576c13d5f..ecb25c2962 100644
--- a/redisinsight/ui/src/pages/browser/components/action-footer/ActionFooter.tsx
+++ b/redisinsight/ui/src/pages/browser/components/action-footer/ActionFooter.tsx
@@ -1,8 +1,7 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { PrimaryButton, SecondaryButton } from 'uiSrc/components/base/forms/buttons'
+import { RiFlexItem, RiRow, SpacerSize } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
import AddKeyFooter from 'uiSrc/pages/browser/components/add-key/AddKeyFooter/AddKeyFooter'
-import { SpacerSize } from 'uiSrc/components/base/layout/spacer/spacer.styles'
export interface ActionFooterProps {
cancelText?: string
@@ -27,7 +26,7 @@ export const ActionFooter = ({
onAction,
disabled = false,
loading = false,
- gap = "m",
+ gap = 'm',
actionTestId,
cancelTestId,
cancelClassName = 'btn-cancel btn-back',
@@ -36,18 +35,18 @@ export const ActionFooter = ({
enableFormSubmit = true,
}: ActionFooterProps) => {
const content = (
-
-
-
+
+
{cancelText}
-
-
-
-
+
+
+
{actionText}
-
-
-
+
+
+
)
if (enableFormSubmit) {
return (
<>
-
+
Submit
-
+
{usePortal ?
{content} : content}
>
)
@@ -77,4 +76,4 @@ export const ActionFooter = ({
}
return content
-}
\ No newline at end of file
+}
diff --git a/redisinsight/ui/src/pages/browser/components/actions/Actions.tsx b/redisinsight/ui/src/pages/browser/components/actions/Actions.tsx
index d14d8d5f1b..6da5c11e18 100644
--- a/redisinsight/ui/src/pages/browser/components/actions/Actions.tsx
+++ b/redisinsight/ui/src/pages/browser/components/actions/Actions.tsx
@@ -1,22 +1,19 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { BulkActionsIcon } from 'uiBase/icons'
+import { RiRow } from 'uiBase/layout'
import {
getBasedOnViewTypeEvent,
sendEventTelemetry,
TelemetryEvent,
} from 'uiSrc/telemetry'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
import styles from 'uiSrc/pages/browser/components/browser-search-panel/styles.module.scss'
import { setBulkActionType } from 'uiSrc/slices/browser/bulkActions'
import { BulkActionsType, FeatureFlags } from 'uiSrc/constants'
-import { BulkActionsIcon } from 'uiSrc/components/base/icons'
import { FeatureFlagComponent } from 'uiSrc/components'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { keysSelector } from 'uiSrc/slices/browser/keys'
-import { Row } from 'uiSrc/components/base/layout/flex'
export interface Props {
handleAddKeyPanel: (value: boolean) => void
@@ -41,20 +38,20 @@ const Actions = ({ handleAddKeyPanel, handleBulkActionsPanel }: Props) => {
}
const AddKeyBtn = (
-
+ Key
-
+
)
const openBulkActions = () => {
dispatch(setBulkActionType(BulkActionsType.Delete))
handleBulkActionsPanel(true)
}
const BulkActionsBtn = (
-
{
aria-label="bulk actions"
>
Bulk Actions
-
+
)
return (
-
{
{BulkActionsBtn}
{AddKeyBtn}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/add-items-actions/AddItemsActions.tsx b/redisinsight/ui/src/pages/browser/components/add-items-actions/AddItemsActions.tsx
index 9aab4f8085..70b342ccc6 100644
--- a/redisinsight/ui/src/pages/browser/components/add-items-actions/AddItemsActions.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-items-actions/AddItemsActions.tsx
@@ -1,8 +1,8 @@
import React from 'react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { PlusInCircleIcon, DeleteIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { PlusInCircleIcon, DeleteIcon } from 'uiBase/icons'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
id: number
@@ -42,8 +42,8 @@ const AddItemsActions = (props: Props) => {
}
return (
-
-
+
+
{
position="left"
anchorClassName={anchorClassName}
>
- {
position="left"
anchorClassName={anchorClassName}
>
- {
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKey.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKey.tsx
index 3eccb9fbfc..d813391bba 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKey.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKey.tsx
@@ -1,6 +1,11 @@
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiHealthText, RiTitle } from 'uiBase/text'
+import { RiTooltip } from 'uiBase/display'
import Divider from 'uiSrc/components/divider/Divider'
import { KeyTypes } from 'uiSrc/constants'
import HelpTexts from 'uiSrc/constants/help-texts'
@@ -19,13 +24,6 @@ import {
import { isContainJSONModule, Maybe, stringToBuffer } from 'uiSrc/utils'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { HealthText } from 'uiSrc/components/base/text/HealthText'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { RiTooltip } from 'uiSrc/components'
import { ADD_KEY_TYPE_OPTIONS } from './constants/key-type-options'
import AddKeyHash from './AddKeyHash'
import AddKeyZset from './AddKeyZset'
@@ -67,14 +65,14 @@ const AddKey = (props: Props) => {
return {
value,
inputDisplay: (
-
{text}
-
+
),
}
})
@@ -124,21 +122,21 @@ const AddKey = (props: Props) => {
return (
-
-
-
- New Key
+
+
+ New Key
{!arePanelsCollapsed && (
- {
/>
)}
-
+
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyCommonFields/AddKeyCommonFields.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyCommonFields/AddKeyCommonFields.tsx
index 62850f8638..e59ee0d7ce 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyCommonFields/AddKeyCommonFields.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyCommonFields/AddKeyCommonFields.tsx
@@ -1,13 +1,10 @@
import React from 'react'
import { toNumber } from 'lodash'
-import { MAX_TTL_NUMBER, Maybe, validateTTLNumberForAddKey } from 'uiSrc/utils'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { FormFieldset } from 'uiSrc/components/base/forms/fieldset'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { TextInput } from 'uiSrc/components/base/inputs'
+import { RiSpacer, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField, RiFormFieldset, RiSelect } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
+import { MAX_TTL_NUMBER, Maybe, validateTTLNumberForAddKey } from 'uiSrc/utils'
import { AddCommonFieldsFormConfig as config } from '../constants/fields-config'
import styles from './styles.module.scss'
@@ -46,12 +43,12 @@ const AddKeyCommonFields = (props: Props) => {
return (
-
-
-
+
+
-
+
@@ -62,12 +59,12 @@ const AddKeyCommonFields = (props: Props) => {
disabled={loading}
data-testid="select-key-type"
/>
-
-
-
-
-
-
+
+
+
+
+ {
autoComplete="off"
data-testid="ttl"
/>
-
-
-
-
-
-
+
+
+
+
+ {
autoComplete="off"
data-testid="key"
/>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyHash/AddKeyHash.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyHash/AddKeyHash.tsx
index e072015448..b890641a7f 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyHash/AddKeyHash.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyHash/AddKeyHash.tsx
@@ -1,11 +1,9 @@
-import React, {
- FormEvent,
- useEffect,
- useRef,
- useState,
-} from 'react'
+import React, { FormEvent, useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { toNumber } from 'lodash'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import {
isVersionHigherOrEquals,
Maybe,
@@ -19,10 +17,7 @@ import { CommandsVersions } from 'uiSrc/constants/commandsVersions'
import { connectedInstanceOverviewSelector } from 'uiSrc/slices/instances/instances'
import { FeatureFlags } from 'uiSrc/constants'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
-import { TextInput } from 'uiSrc/components/base/inputs'
import {
CreateHashWithExpireDto,
HashFieldDto,
@@ -166,10 +161,10 @@ const AddKeyHash = (props: Props) => {
onClickAdd={addField}
>
{(item, index) => (
-
-
-
-
+
+
+ {
onChange={(value) =>
handleFieldChange('fieldName', item.id, value)
}
- ref={
- index === fields.length - 1 ? lastAddedFieldName : null
- }
+ ref={index === fields.length - 1 ? lastAddedFieldName : null}
data-testid="field-name"
/>
-
-
-
-
-
+
+
+
+ {
}
data-testid="field-value"
/>
-
-
+
+
{isTTLAvailable && (
-
-
-
+
+ {
}
data-testid="hash-ttl"
/>
-
-
+
+
)}
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyList/AddKeyList.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyList/AddKeyList.tsx
index ad5fb9d252..6d9eaf3729 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyList/AddKeyList.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyList/AddKeyList.tsx
@@ -1,6 +1,8 @@
import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSelect } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addListKey } from 'uiSrc/slices/browser/keys'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
@@ -8,8 +10,6 @@ import {
optionsDestinations,
TAIL_DESTINATION,
} from 'uiSrc/pages/browser/modules/key-details/components/list-details/add-list-elements/AddListElements'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { TextInput } from 'uiSrc/components/base/inputs'
import {
CreateListWithExpireDto,
ListElementDestination,
@@ -95,15 +95,13 @@ const AddKeyList = (props: Props) => {
isClearDisabled={isClearDisabled}
>
{(item, index) => (
-
- handleElementChange(value, index)
- }
+ onChange={(value) => handleElementChange(value, index)}
data-testid={`element-${index}`}
/>
)}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyReJSON/AddKeyReJSON.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyReJSON/AddKeyReJSON.tsx
index 4ce2353c43..c1e55e25ff 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyReJSON/AddKeyReJSON.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyReJSON/AddKeyReJSON.tsx
@@ -2,20 +2,19 @@ import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addReJSONKey } from 'uiSrc/slices/browser/keys'
import { MonacoJson } from 'uiSrc/components/monaco-editor'
import UploadFile from 'uiSrc/components/upload-file'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
import { CreateRejsonRlWithExpireDto } from 'apiSrc/modules/browser/rejson-rl/dto'
import { AddJSONFormConfig as config } from '../constants/fields-config'
-
export interface Props {
keyName: string
keyTTL: Maybe
@@ -74,7 +73,7 @@ const AddKeyReJSON = (props: Props) => {
return (
-
+
<>
{
disabled={loading}
data-testid="json-value"
/>
-
-
+
+
-
-
+
+
>
-
+
onCancel(true)}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeySet/AddKeySet.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeySet/AddKeySet.tsx
index e01fbd2aed..d0918f7ece 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeySet/AddKeySet.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeySet/AddKeySet.tsx
@@ -1,18 +1,13 @@
-import React, {
- FormEvent,
- useEffect,
- useRef,
- useState,
-} from 'react'
+import React, { FormEvent, useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addSetKey } from 'uiSrc/slices/browser/keys'
import AddMultipleFields from 'uiSrc/pages/browser/components/add-multiple-fields'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { CreateSetWithExpireDto } from 'apiSrc/modules/browser/set/dto'
import { INITIAL_SET_MEMBER_STATE, ISetMemberState } from './interfaces'
@@ -131,10 +126,10 @@ const AddKeySet = (props: Props) => {
onClickAdd={addMember}
>
{(item, index) => (
-
-
-
-
+
+
+ {
disabled={loading}
data-testid="member-name"
/>
-
-
-
+
+
+
)}
()
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyString/AddKeyString.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyString/AddKeyString.tsx
index 5938b163b0..d12b46b16c 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyString/AddKeyString.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyString/AddKeyString.tsx
@@ -1,13 +1,13 @@
import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFormField } from 'uiBase/forms'
+import { RiTextArea } from 'uiBase/inputs'
import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addStringKey } from 'uiSrc/slices/browser/keys'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextArea } from 'uiSrc/components/base/inputs'
import { SetStringWithExpireDto } from 'apiSrc/modules/browser/string/dto'
import { AddStringFormConfig as config } from '../constants/fields-config'
@@ -49,8 +49,8 @@ const AddKeyString = (props: Props) => {
return (
-
-
+ {
disabled={loading}
data-testid="string-value"
/>
-
+
onCancel(true)}
onAction={submitData}
diff --git a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyZset/AddKeyZset.tsx b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyZset/AddKeyZset.tsx
index 1aad88ecc9..80b9b3a877 100644
--- a/redisinsight/ui/src/pages/browser/components/add-key/AddKeyZset/AddKeyZset.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-key/AddKeyZset/AddKeyZset.tsx
@@ -1,11 +1,9 @@
-import React, {
- FormEvent,
- useEffect,
- useRef,
- useState,
-} from 'react'
+import React, { FormEvent, useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { toNumber } from 'lodash'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import { Maybe, stringToBuffer, validateScoreNumber } from 'uiSrc/utils'
import { isNaNConvertedString } from 'uiSrc/utils/numbers'
import { addKeyStateSelector, addZsetKey } from 'uiSrc/slices/browser/keys'
@@ -17,9 +15,6 @@ import {
IZsetMemberState,
} from 'uiSrc/pages/browser/components/add-key/AddKeyZset/interfaces'
import { ActionFooter } from 'uiSrc/pages/browser/components/action-footer'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { CreateZSetWithExpireDto } from 'apiSrc/modules/browser/z-set/dto'
import { AddZsetFormConfig as config } from '../constants/fields-config'
@@ -185,10 +180,10 @@ const AddKeyZset = (props: Props) => {
onClickAdd={addMember}
>
{(item, index) => (
-
-
-
-
+
+
+ {
disabled={loading}
data-testid="member-name"
/>
-
-
-
-
-
+
+
+
+ {
disabled={loading}
data-testid="member-score"
/>
-
-
-
+
+
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/add-multiple-fields/AddMultipleFields.tsx b/redisinsight/ui/src/pages/browser/components/add-multiple-fields/AddMultipleFields.tsx
index daf6f86c0f..80a9b774ff 100644
--- a/redisinsight/ui/src/pages/browser/components/add-multiple-fields/AddMultipleFields.tsx
+++ b/redisinsight/ui/src/pages/browser/components/add-multiple-fields/AddMultipleFields.tsx
@@ -1,13 +1,9 @@
import React from 'react'
import cx from 'classnames'
-import { DeleteIcon, PlusIcon } from 'uiSrc/components/base/icons'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- ActionIconButton,
- IconButton,
-} from 'uiSrc/components/base/forms/buttons'
+import { DeleteIcon, PlusIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow, RiSpacer } from 'uiBase/layout'
+import { RiActionIconButton, RiIconButton } from 'uiBase/forms'
import { RiTooltip } from 'uiSrc/components'
import styles from './styles.module.scss'
@@ -23,16 +19,16 @@ const AddMultipleFields = (props: Props) => {
const { items, children, isClearDisabled, onClickRemove, onClickAdd } = props
const renderItem = (child: React.ReactNode, item: T, index?: number) => (
-
-
- {child}
-
+
+ {child}
+
- (props: Props) => {
data-testid="remove-item"
/>
-
-
-
+
+
+
)
return (
@@ -50,11 +46,11 @@ const AddMultipleFields = (props: Props) => {
{items.map((item, index) =>
renderItem(children(item, index), item, index),
)}
-
-
-
+
+
+
- (props: Props) => {
data-testid="add-item"
/>
-
-
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/browser-search-panel/BrowserSearchPanel.tsx b/redisinsight/ui/src/pages/browser/components/browser-search-panel/BrowserSearchPanel.tsx
index 2a120e3984..4f2c9a2e84 100644
--- a/redisinsight/ui/src/pages/browser/components/browser-search-panel/BrowserSearchPanel.tsx
+++ b/redisinsight/ui/src/pages/browser/components/browser-search-panel/BrowserSearchPanel.tsx
@@ -4,12 +4,10 @@ import React, { useCallback, useState } from 'react'
import cx from 'classnames'
import { useDispatch, useSelector } from 'react-redux'
-import {
- FilterTableIcon,
- IconType,
- QuerySearchIcon,
-} from 'uiSrc/components/base/icons'
-import { ModuleNotLoaded, OnboardingTour, RiTooltip } from 'uiSrc/components'
+import { FilterTableIcon, IconType, QuerySearchIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { RiModal, RiTooltip} from 'uiBase/display'
+import { ModuleNotLoaded, OnboardingTour } from 'uiSrc/components'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
import { KeyViewType, SearchMode } from 'uiSrc/slices/interfaces/keys'
import FilterKeyType from 'uiSrc/pages/browser/components/filter-key-type'
@@ -25,8 +23,6 @@ import { BrowserStorageItem } from 'uiSrc/constants'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { RedisDefaultModules } from 'uiSrc/slices/interfaces'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { Modal } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
interface ISwitchType {
@@ -140,7 +136,7 @@ const BrowserSearchPanel = (props: Props) => {
}, [])
const SwitchModeBtn = (item: ISwitchType) => (
- {
return (
-
(
-
+
{numberWithSpaces(processed)}
{type === BulkActionsType.Delete ? 'Keys' : 'Commands'} Processed
-
-
+
+
{numberWithSpaces(succeed)}
Success
-
-
+
+
{numberWithSpaces(failed)}
Errors
-
-
+
+
{millisecondsFormat(duration, 'H:mm:ss.SSS')}
Time Taken
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.tsx
index e859844b74..0dc9dd8362 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.tsx
@@ -3,6 +3,10 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
+import { RiCol, RiFlexItem } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiTitle } from 'uiBase/text'
import {
selectedBulkActionsSelector,
setBulkActionsInitialState,
@@ -16,16 +20,13 @@ import {
TelemetryEvent,
} from 'uiSrc/telemetry'
import { DEFAULT_SEARCH_MATCH } from 'uiSrc/constants/api'
-import { FullScreen, RiTooltip } from 'uiSrc/components'
+import { FullScreen } from 'uiSrc/components'
-import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
import BulkUpload from './BulkUpload'
import BulkDelete from './BulkDelete'
import BulkActionsTabs from './BulkActionsTabs'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/tooltip'
export interface Props {
isFullScreen: boolean
@@ -99,11 +100,11 @@ const BulkActions = (props: Props) => {
return (
-
-
-
+
+
+
Bulk Actions
-
+
{!arePanelsCollapsed && (
{
position="left"
anchorClassName={styles.anchorTooltip}
>
- {
/>
)}
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsInfo/BulkActionsInfo.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsInfo/BulkActionsInfo.tsx
index bb8ae064f9..9701ae0fbd 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsInfo/BulkActionsInfo.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsInfo/BulkActionsInfo.tsx
@@ -2,12 +2,12 @@ import React from 'react'
import { isUndefined } from 'lodash'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
import { getApproximatePercentage, Maybe, Nullable } from 'uiSrc/utils'
import Divider from 'uiSrc/components/divider/Divider'
import { BulkActionsStatus, KeyTypes } from 'uiSrc/constants'
import GroupBadge from 'uiSrc/components/group-badge/GroupBadge'
import { isProcessedBulkAction } from 'uiSrc/pages/browser/components/bulk-actions/utils'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
export interface Props {
@@ -40,10 +40,10 @@ const BulkActionsInfo = (props: Props) => {
return (
-
+
{title}
-
-
+
+
{subTitle}
{filter && (
{
{` ${search}`}
)}
-
+
{!isUndefined(status) && !isProcessedBulkAction(status) && (
-
In progress:
{` ${getApproximatePercentage(total, scanned)}`}
-
+
)}
{status === BulkActionsStatus.Aborted && (
-
Stopped: {getApproximatePercentage(total, scanned)}
-
+
)}
{status === BulkActionsStatus.Completed && (
-
Action completed
-
+
)}
{status === BulkActionsStatus.Disconnected && (
-
Connection Lost: {getApproximatePercentage(total, scanned)}
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsTabs/BulkActionsTabs.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsTabs/BulkActionsTabs.tsx
index 14bbcd8052..56597fe166 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsTabs/BulkActionsTabs.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActionsTabs/BulkActionsTabs.tsx
@@ -1,10 +1,10 @@
import React, { useMemo } from 'react'
-import { EuiIcon } from '@elastic/eui'
import { useSelector } from 'react-redux'
+import { RiTabs, TabInfo } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { BulkActionsType } from 'uiSrc/constants'
import { selectedBulkActionsSelector } from 'uiSrc/slices/browser/bulkActions'
-import BulkUpload from 'uiSrc/assets/img/icons/bulk-upload.svg?react'
import {
getMatchType,
@@ -14,10 +14,9 @@ import {
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { DEFAULT_SEARCH_MATCH } from 'uiSrc/constants/api'
import { keysSelector } from 'uiSrc/slices/browser/keys'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
+import { RiIcon } from 'uiBase/icons'
export interface Props {
onChangeType: (id: BulkActionsType) => void
@@ -58,8 +57,8 @@ const BulkActionsTabs = (props: Props) => {
value: BulkActionsType.Delete,
label: (
<>
-
-
Delete Keys
+
+
Delete Keys
>
),
content: null,
@@ -68,8 +67,8 @@ const BulkActionsTabs = (props: Props) => {
value: BulkActionsType.Upload,
label: (
<>
-
-
Upload Data
+
+
Upload Data
>
),
content: null,
@@ -79,7 +78,7 @@ const BulkActionsTabs = (props: Props) => {
)
return (
-
{
className={styles.placeholder}
data-testid="bulk-actions-placeholder"
>
-
+
No pattern or key type set
-
-
+
+
To perform a bulk action, set the pattern or select the key type
-
+
)}
>
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.tsx
index 411ad51771..8370537596 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.tsx
@@ -3,8 +3,8 @@ import { ListChildComponentProps, VariableSizeList as List } from 'react-window'
import AutoSizer from 'react-virtualized-auto-sizer'
import { useSelector } from 'react-redux'
+import { RiText } from 'uiBase/text'
import { MAX_BULK_ACTION_ERRORS_LENGTH } from 'uiSrc/constants'
-import { Text } from 'uiSrc/components/base/text'
import { bulkActionsDeleteSummarySelector } from 'uiSrc/slices/browser/bulkActions'
import styles from './styles.module.scss'
@@ -56,11 +56,11 @@ const BulkDeleteContent = () => {
return (
- Error list
+ Error list
{errors.length >= MAX_BULK_ACTION_ERRORS_LENGTH && (
-
+
last {MAX_BULK_ACTION_ERRORS_LENGTH} errors are shown
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteFooter/BulkDeleteFooter.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteFooter/BulkDeleteFooter.tsx
index 5a2f630f8a..5888eb11c0 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteFooter/BulkDeleteFooter.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteFooter/BulkDeleteFooter.tsx
@@ -3,6 +3,14 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
+import {
+ RiDestructiveButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+} from 'uiBase/forms'
+import { RefreshIcon, RiIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/display'
import {
bulkActionsDeleteOverviewSelector,
setBulkDeleteStartAgain,
@@ -19,15 +27,6 @@ import { BulkActionsType } from 'uiSrc/constants'
import { getRangeForNumber, BULK_THRESHOLD_BREAKPOINTS } from 'uiSrc/utils'
import { DEFAULT_SEARCH_MATCH } from 'uiSrc/constants/api'
-import {
- DestructiveButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RefreshIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import BulkDeleteContent from '../BulkDeleteContent'
import { isProcessedBulkAction } from '../../utils'
@@ -98,22 +97,22 @@ const BulkDeleteFooter = (props: Props) => {
{status &&
}
{!loading && (
-
{isProcessedBulkAction(status) ? 'Close' : 'Cancel'}
-
+
)}
{loading && (
-
Stop
-
+
)}
{!isProcessedBulkAction(status) && (
@@ -125,17 +124,17 @@ const BulkDeleteFooter = (props: Props) => {
panelClassName={styles.panelPopover}
panelPaddingSize="none"
button={
-
Delete
-
+
}
>
-
{
{`All keys with ${filter ? filter?.toUpperCase() : 'all'} key type and selected pattern will be deleted.`}
-
Delete
-
-
+
+
)}
{isProcessedBulkAction(status) && (
-
Start New
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.tsx
index 035eafc4e4..b7b5398701 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.tsx
@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react'
import { useSelector } from 'react-redux'
import { isUndefined } from 'lodash'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { numberWithSpaces, nullableNumberWithSpaces } from 'uiSrc/utils/numbers'
import { keysDataSelector } from 'uiSrc/slices/browser/keys'
import { getApproximatePercentage } from 'uiSrc/utils/validations'
@@ -10,11 +12,9 @@ import {
bulkActionsDeleteSummarySelector,
} from 'uiSrc/slices/browser/bulkActions'
import BulkActionSummary from 'uiSrc/pages/browser/components/bulk-actions/BulkActionSummary'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const BulkDeleteSummary = () => {
const [title, setTitle] = useState
('')
@@ -41,7 +41,7 @@ const BulkDeleteSummary = () => {
{isUndefined(status) && (
<>
-
+
{title}
{
data-testid="bulk-delete-tooltip"
/>
-
-
+ {
{`Scanned ${getApproximatePercentage(total, scanned)} `}
{`(${numberWithSpaces(scanned)}/${nullableNumberWithSpaces(total)}) `}
{`and found ${numberWithSpaces(keys.length)} keys`}
-
+
>
)}
{!isUndefined(status) && (
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummaryButton/BulkDeleteSummaryButton.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummaryButton/BulkDeleteSummaryButton.tsx
index 12f2385e1c..80f5bf4bc5 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummaryButton/BulkDeleteSummaryButton.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummaryButton/BulkDeleteSummaryButton.tsx
@@ -1,8 +1,8 @@
import React, { useEffect, useMemo } from 'react'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { DownloadIcon } from 'uiBase/icons'
+import { RiLink } from 'uiBase/display'
import { Maybe } from 'uiSrc/utils'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { DownloadIcon } from 'uiSrc/components/base/icons'
-import { Link } from 'uiSrc/components/base/link/Link'
import { RedisString } from 'apiSrc/common/constants'
export interface BulkDeleteSummaryButtonProps {
@@ -40,17 +40,17 @@ const BulkDeleteSummaryButton = ({
)
return (
-
-
+
{children}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkUpload/BulkUpload.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkUpload/BulkUpload.tsx
index 94dd91d786..9107c111d7 100644
--- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkUpload/BulkUpload.tsx
+++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkUpload/BulkUpload.tsx
@@ -2,6 +2,11 @@ import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiFilePicker, RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RefreshIcon, RiIcon } from 'uiBase/icons'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiCol, RiRow } from 'uiBase/layout'
+import { RiTooltip, RiPopover } from 'uiBase/display'
import { Nullable } from 'uiSrc/utils'
import { BulkActionsStatus, BulkActionsType } from 'uiSrc/constants'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
@@ -20,19 +25,8 @@ import BulkActionSummary from 'uiSrc/pages/browser/components/bulk-actions/BulkA
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { isProcessedBulkAction } from 'uiSrc/pages/browser/components/bulk-actions/utils'
import {
- RiFilePicker,
UploadWarning,
- RiPopover,
- RiTooltip,
} from 'uiSrc/components'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RefreshIcon } from 'uiSrc/components/base/icons'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Col, Row } from 'uiSrc/components/base/layout/flex'
import styles from './styles.module.scss'
export interface Props {
@@ -108,18 +102,18 @@ const BulkUpload = (props: Props) => {
return (
{!isCompleted ? (
-
-
-
+
+
+
Upload the text file with the list of Redis commands
-
+
- SET Key0 Value0
- SET Key1 Value1
- ...
- SET KeyN ValueN
+ SET Key0 Value0
+ SET Key1 Value1
+ ...
+ SET KeyN ValueN
>
}
data-testid="bulk-upload-tooltip-example"
@@ -132,7 +126,7 @@ const BulkUpload = (props: Props) => {
}}
/>
-
+
{
aria-label="Select or drag and drop file"
/>
{isInvalid && (
-
File should not exceed {MAX_MB_FILE} MB
-
+
)}
-
+
) : (
{
)}
-
{isProcessedBulkAction(status) ? 'Close' : 'Cancel'}
-
+
{!isCompleted ? (
{
panelClassName={styles.panelPopover}
panelPaddingSize="none"
button={
-
Upload
-
+
}
>
- {
All commands from the file will be executed against your
database.
-
Upload
-
-
+
+
) : (
-
Start New
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndex.tsx b/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndex.tsx
index 34128ae707..4be7ced655 100644
--- a/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndex.tsx
+++ b/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndex.tsx
@@ -3,6 +3,20 @@ import cx from 'classnames'
import React, { useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import {
+ RiIconButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ RiAutoTag,
+ RiFormFieldset,
+ RiSelect,
+} from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
+import { RiHealthText, RiText } from 'uiBase/text'
+import { RiPopover, RiLink } from 'uiBase/display'
+import { RiTextInput } from 'uiBase/inputs'
import Divider from 'uiSrc/components/divider/Divider'
import {
createIndexStateSelector,
@@ -15,21 +29,6 @@ import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { getFieldTypeOptions } from 'uiSrc/utils/redisearch'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import AddMultipleFields from 'uiSrc/pages/browser/components/add-multiple-fields'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- IconButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { AutoTag } from 'uiSrc/components/base/forms/combo-box/AutoTag'
-import { FormFieldset } from 'uiSrc/components/base/forms/fieldset'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { HealthText, Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { RiPopover } from 'uiSrc/components/base'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { CreateRedisearchIndexDto } from 'apiSrc/modules/browser/redisearch/dto'
import { KEY_TYPE_OPTIONS, RedisearchIndexKeyType } from './constants'
@@ -46,13 +45,13 @@ const keyTypeOptions = KEY_TYPE_OPTIONS.map((item) => {
return {
value,
inputDisplay: (
-
{text}
-
+
),
}
})
@@ -173,7 +172,7 @@ const CreateRedisearchIndex = ({ onClosePanel, onCreateIndex }: Props) => {
panelClassName={cx('popoverLikeTooltip')}
closePopover={() => setIsInfoPopoverOpen(false)}
button={
- {
}
>
<>
- {
target="_blank"
>
Declares
-
+
{' fields to index. '}
{keyTypeSelected === RedisearchIndexKeyType.HASH
? 'Enter a hash field name.'
@@ -210,10 +209,10 @@ const CreateRedisearchIndex = ({ onClosePanel, onCreateIndex }: Props) => {
-
-
-
-
+
+
+ {
autoComplete="off"
data-testid="index-name"
/>
-
-
-
-
+
+
+
-
+
@@ -240,13 +239,13 @@ const CreateRedisearchIndex = ({ onClosePanel, onCreateIndex }: Props) => {
}
data-testid="key-type"
/>
-
-
-
-
-
-
-
+
+
+
+
+
+ {
className={styles.combobox}
data-testid="prefix-combobox"
/>
-
-
+
+
-
+
Identifier
{IdentifierInfo()}
-
+
{
onClickAdd={addField}
>
{(item, index) => (
-
-
-
-
+
+
+
- handleFieldChange(
- 'identifier',
- item.id,
- value,
- )
+ onChange={(value) =>
+ handleFieldChange('identifier', item.id, value)
}
ref={
index === fields.length - 1
@@ -298,10 +293,10 @@ const CreateRedisearchIndex = ({ onClosePanel, onCreateIndex }: Props) => {
autoComplete="off"
data-testid={`identifier-${item.id}`}
/>
-
-
-
-
+
+
+
+
{
}
data-testid={`field-type-${item.id}`}
/>
-
-
-
+
+
+
)}
<>
-
-
-
+
+ onClosePanel?.()}
className="btn-cancel btn-back"
data-testid="create-index-cancel-btn"
>
Cancel
-
-
-
-
+
+
+ {
data-testid="create-index-btn"
>
Create Index
-
-
-
+
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndexWrapper.tsx b/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndexWrapper.tsx
index 3d1bcc9b2f..7e779fbe23 100644
--- a/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndexWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndexWrapper.tsx
@@ -1,12 +1,11 @@
import React from 'react'
import cx from 'classnames'
+import { RiCol, RiFlexItem } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
import { getUtmExternalLink } from 'uiSrc/utils/links'
-import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
import { RiTooltip } from 'uiSrc/components'
import CreateRedisearchIndex from './CreateRedisearchIndex'
@@ -24,19 +23,19 @@ const CreateRedisearchIndexWrapper = ({
onCreateIndex,
}: Props) => (
-
+
-
-
+
+
New Index
-
+
{!arePanelsCollapsed && (
-
)}
-
-
-
+
+
+
Use CLI or Workbench to create more advanced indexes. See more
details in the{' '}
-
documentation.
-
-
-
+
+
+
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/components/delete-key-popover/DeleteKeyPopover.tsx b/redisinsight/ui/src/pages/browser/components/delete-key-popover/DeleteKeyPopover.tsx
index e095c057c7..affdb8cea3 100644
--- a/redisinsight/ui/src/pages/browser/components/delete-key-popover/DeleteKeyPopover.tsx
+++ b/redisinsight/ui/src/pages/browser/components/delete-key-popover/DeleteKeyPopover.tsx
@@ -1,17 +1,14 @@
import React from 'react'
import cx from 'classnames'
-import { KeyTypes, ModulesKeyTypes } from 'uiSrc/constants'
-import { formatLongName } from 'uiSrc/utils'
+import { RiSpacer } from 'uiBase/layout'
+import { RiDestructiveButton, RiIconButton } from 'uiBase/forms'
+import { DeleteIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/display'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- DestructiveButton,
- IconButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
+import { formatLongName } from 'uiSrc/utils'
+import { KeyTypes, ModulesKeyTypes } from 'uiSrc/constants'
export interface DeleteProps {
nameString: string
@@ -41,7 +38,7 @@ export const DeleteKeyPopover = ({
closePopover={() => onOpenPopover(-1, type)}
panelPaddingSize="l"
button={
- onOpenPopover(rowId, type)}
aria-label="Delete Key"
@@ -51,14 +48,14 @@ export const DeleteKeyPopover = ({
onClick={(e) => e.stopPropagation()}
>
<>
-
+
{formatLongName(nameString)}
- will be deleted.
-
-
- will be deleted.
+
+
+
Delete
-
+
>
)
diff --git a/redisinsight/ui/src/pages/browser/components/filter-key-type/FilterKeyType.tsx b/redisinsight/ui/src/pages/browser/components/filter-key-type/FilterKeyType.tsx
index 944ffcc344..c4ae006578 100644
--- a/redisinsight/ui/src/pages/browser/components/filter-key-type/FilterKeyType.tsx
+++ b/redisinsight/ui/src/pages/browser/components/filter-key-type/FilterKeyType.tsx
@@ -1,7 +1,13 @@
-import cx from 'classnames'
import React, { useEffect, useState } from 'react'
+import styled from 'styled-components'
+import cx from 'classnames'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+
+import { RiOutsideClickDetector } from 'uiBase/utils'
+import { RiHealthText } from 'uiBase/text'
+import { RiSelect, defaultValueRender } from 'uiBase/forms'
+import { RiModal } from 'uiBase/display'
import {
SCAN_COUNT_DEFAULT,
SCAN_TREE_COUNT_DEFAULT,
@@ -21,17 +27,9 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { resetBrowserTree } from 'uiSrc/slices/app/context'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { AdditionalRedisModule } from 'uiSrc/slices/interfaces'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { HealthText } from 'uiSrc/components/base/text/HealthText'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
-import { Modal } from 'uiSrc/components/base/display'
import { FILTER_KEY_TYPE_OPTIONS } from './constants'
import styles from './styles.module.scss'
-import styled from 'styled-components'
const ALL_KEY_TYPES_VALUE = 'all'
@@ -87,20 +85,20 @@ const FilterKeyType = ({ modules }: Props) => {
return {
value,
inputDisplay: (
-
{text}
-
+
),
dropdownDisplay: (
-
{text}
-
+
),
'data-test-subj': `filter-option-type-${value}`,
}
@@ -152,7 +150,7 @@ const FilterKeyType = ({ modules }: Props) => {
}
return (
- isVersionSupported && setIsSelectOpen(false)}
>
{
!isVersionSupported && styles.unsupported,
)}
>
- setIsInfoPopoverOpen(false)}
className={styles.unsupportedInfoModal}
@@ -189,7 +187,7 @@ const FilterKeyType = ({ modules }: Props) => {
data-testid="select-filter-key-type"
/>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/key-row-name/KeyRowName.tsx b/redisinsight/ui/src/pages/browser/components/key-row-name/KeyRowName.tsx
index a54c4bb03a..6a997ae602 100644
--- a/redisinsight/ui/src/pages/browser/components/key-row-name/KeyRowName.tsx
+++ b/redisinsight/ui/src/pages/browser/components/key-row-name/KeyRowName.tsx
@@ -1,8 +1,8 @@
import React from 'react'
import { isUndefined } from 'lodash'
-import { LoadingContent } from 'uiSrc/components/base/layout'
-import { Text } from 'uiSrc/components/base/text'
+import { RiLoadingContent } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { RiTooltip } from 'uiSrc/components'
import { Maybe, formatLongName, replaceSpaces } from 'uiSrc/utils'
import styles from './styles.module.scss'
@@ -17,7 +17,7 @@ const KeyRowName = (props: Props) => {
if (isUndefined(shortName)) {
return (
- {
return (
- {
<>{nameContent}>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/key-row-size/KeyRowSize.tsx b/redisinsight/ui/src/pages/browser/components/key-row-size/KeyRowSize.tsx
index 1b2990ace1..e6416e2060 100644
--- a/redisinsight/ui/src/pages/browser/components/key-row-size/KeyRowSize.tsx
+++ b/redisinsight/ui/src/pages/browser/components/key-row-size/KeyRowSize.tsx
@@ -2,10 +2,10 @@ import React from 'react'
import cx from 'classnames'
import { isUndefined } from 'lodash'
-import { LoadingContent } from 'uiSrc/components/base/layout'
-import { Text } from 'uiSrc/components/base/text'
+import { RiLoadingContent } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { Maybe, formatBytes } from 'uiSrc/utils'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
export interface Props {
@@ -20,7 +20,7 @@ const KeyRowSize = (props: Props) => {
if (isUndefined(size)) {
return (
- {
if (!size) {
return (
-
-
-
+
)
}
return (
<>
- {
<>{formatBytes(size, 0)}>
-
+
>
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/key-row-ttl/KeyRowTTL.tsx b/redisinsight/ui/src/pages/browser/components/key-row-ttl/KeyRowTTL.tsx
index d89c44080c..4f0ec47e0d 100644
--- a/redisinsight/ui/src/pages/browser/components/key-row-ttl/KeyRowTTL.tsx
+++ b/redisinsight/ui/src/pages/browser/components/key-row-ttl/KeyRowTTL.tsx
@@ -2,9 +2,9 @@ import React from 'react'
import cx from 'classnames'
import { isUndefined } from 'lodash'
+import { RiLoadingContent } from 'uiBase/layout'
+import { RiColorText, RiText } from 'uiBase/text'
import { RiTooltip } from 'uiSrc/components'
-import { LoadingContent } from 'uiSrc/components/base/layout'
-import { ColorText, Text } from 'uiSrc/components/base/text'
import {
Maybe,
truncateNumberToDuration,
@@ -25,7 +25,7 @@ const KeyRowTTL = (props: Props) => {
if (isUndefined(ttl)) {
return (
- {
}
if (ttl === -1) {
return (
- {
data-testid={`ttl-${nameString}`}
>
No limit
-
+
)
}
return (
- {
<>{truncateNumberToFirstUnit(ttl)}>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/key-row-type/KeyRowType.tsx b/redisinsight/ui/src/pages/browser/components/key-row-type/KeyRowType.tsx
index 1687d3d10f..40c693fea2 100644
--- a/redisinsight/ui/src/pages/browser/components/key-row-type/KeyRowType.tsx
+++ b/redisinsight/ui/src/pages/browser/components/key-row-type/KeyRowType.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import cx from 'classnames'
import { KeyTypes, ModulesKeyTypes } from 'uiSrc/constants'
-import { GroupBadge, LoadingContent } from 'uiSrc/components'
+import { GroupBadge, RiLoadingContent } from 'uiSrc/components'
import styles from './styles.module.scss'
export interface Props {
@@ -16,7 +16,7 @@ const KeyRowType = (props: Props) => {
return (
<>
{!type && (
- {
}, [treeViewSort, treeViewDelimiter])
const button = (
- {
closePopover={closePopover}
button={button}
>
-
-
-
-
+
+
+ {
className={styles.combobox}
data-testid="delimiter-combobox"
/>
-
-
+
+
Sort by
@@ -177,26 +174,26 @@ const KeyTreeSettings = ({ loading }: Props) => {
onChange={(value: SortOrder) => onChangeSort(value)}
data-testid="tree-view-sorting-select"
/>
-
-
+
+
-
-
+
+
)
diff --git a/redisinsight/ui/src/pages/browser/components/keys-header/KeysHeader.tsx b/redisinsight/ui/src/pages/browser/components/keys-header/KeysHeader.tsx
index 2d1f7edf78..8028dee3f8 100644
--- a/redisinsight/ui/src/pages/browser/components/keys-header/KeysHeader.tsx
+++ b/redisinsight/ui/src/pages/browser/components/keys-header/KeysHeader.tsx
@@ -9,7 +9,11 @@ import {
ColumnsIcon,
EqualIcon,
FoldersIcon,
-} from 'uiSrc/components/base/icons'
+ RiIcon,
+} from 'uiBase/icons'
+import { RiPopover, RiTooltip } from 'uiBase/display'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton, RiSecondaryButton, RiCheckbox } from 'uiBase/forms'
import KeysSummary from 'uiSrc/components/keys-summary'
import {
SCAN_COUNT_DEFAULT,
@@ -46,18 +50,10 @@ import {
import { OnboardingStepName, OnboardingSteps } from 'uiSrc/constants/onboarding'
import { incrementOnboardStepAction } from 'uiSrc/slices/app/features'
import { AutoRefresh, OnboardingTour } from 'uiSrc/components'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
import { BrowserColumns, KeyValueFormat } from 'uiSrc/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import { setConnectivityError } from 'uiSrc/slices/app/connectivity'
-import {
- IconButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
const HIDE_REFRESH_LABEL_WIDTH = 640
@@ -298,7 +294,7 @@ const KeysHeader = (props: Props) => {
position="top"
key={view.tooltipText}
>
- {
panelClassName={styles.popoverWrapper}
closePopover={() => setColumnsConfigShown(false)}
button={
- {
Columns
-
+
}
>
-
-
-
+
+ {
data-testid="show-key-size"
className={styles.checkbox}
/>
-
-
+
+
{
data-testid="key-size-info-icon"
/>
-
-
-
+
+ {
panelPaddingSize="none"
anchorClassName={cx(styles.buttonWrapper, anchorClassName)}
button={
- setIsConfirmationOpen(true)}
className={styles.loadDataBtn}
loading={loading}
@@ -63,24 +61,24 @@ const LoadSampleData = (props: Props) => {
data-testid="load-sample-data-btn"
>
Load sample data
-
+
}
>
-
-
+
+
-
-
- Execute commands in bulk
-
-
+
+
+ Execute commands in bulk
+
+
All commands from the file will be automatically executed against
your database. Avoid executing them in production databases.
-
-
-
-
-
+
+
+
+ {
data-testid="load-sample-data-btn-confirm"
>
Execute
-
-
-
-
-
+
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/components/no-keys-found/NoKeysFound.tsx b/redisinsight/ui/src/pages/browser/components/no-keys-found/NoKeysFound.tsx
index 4ff78f9b4e..eabfbfd3f8 100644
--- a/redisinsight/ui/src/pages/browser/components/no-keys-found/NoKeysFound.tsx
+++ b/redisinsight/ui/src/pages/browser/components/no-keys-found/NoKeysFound.tsx
@@ -1,6 +1,10 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiTitle } from 'uiBase/text'
+import { RiImage } from 'uiBase/display'
import TelescopeImg from 'uiSrc/assets/img/telescope-dark.svg'
import { findTutorialPath } from 'uiSrc/utils'
@@ -18,10 +22,6 @@ import {
import { SCAN_TREE_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { TutorialsIds } from 'uiSrc/constants'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { RiImage } from 'uiSrc/components/base/display'
import LoadSampleData from '../load-sample-data'
import styles from './styles.module.scss'
@@ -61,25 +61,21 @@ const NoKeysFound = (props: Props) => {
return (
-
-
-
+
+
+
Let's start working
-
-
+
+
- onAddKeyPanel(true)}
className={styles.addKey}
data-testid="add-key-msg-btn"
>
+ Add key manually
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/components/onboarding-start-popover/OnboardingStartPopover.tsx b/redisinsight/ui/src/pages/browser/components/onboarding-start-popover/OnboardingStartPopover.tsx
index e71a9e629d..3632c19079 100644
--- a/redisinsight/ui/src/pages/browser/components/onboarding-start-popover/OnboardingStartPopover.tsx
+++ b/redisinsight/ui/src/pages/browser/components/onboarding-start-popover/OnboardingStartPopover.tsx
@@ -1,5 +1,9 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiEmptyButton, RiPrimaryButton } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/index'
import {
appFeatureOnboardingSelector,
setOnboardNextStep,
@@ -9,11 +13,6 @@ import {
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { OnboardingStepName, OnboardingSteps } from 'uiSrc/constants/onboarding'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { EmptyButton, PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
import styles from './styles.module.scss'
const OnboardingStartPopover = () => {
@@ -54,31 +53,31 @@ const OnboardingStartPopover = () => {
data-testid="onboarding-start-popover"
style={{ display: 'none' }}
>
- Take a quick tour of Redis Insight?
-
-
+ Take a quick tour of Redis Insight?
+
+
Hi! Redis Insight has many tools that can help you to optimize the
development process.
Would you like us to show them to you?
-
+
-
Skip tour
-
-
+
Show me around
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/components/popover-delete/PopoverDelete.tsx b/redisinsight/ui/src/pages/browser/components/popover-delete/PopoverDelete.tsx
index a773b85ff4..affa690ef8 100644
--- a/redisinsight/ui/src/pages/browser/components/popover-delete/PopoverDelete.tsx
+++ b/redisinsight/ui/src/pages/browser/components/popover-delete/PopoverDelete.tsx
@@ -1,16 +1,12 @@
import React from 'react'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
+import { RiPopover, RiTooltip } from 'uiBase/index'
+import { DeleteIcon } from 'uiBase/icons'
+import { RiDestructiveButton, RiEmptyButton, RiIconButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import { RedisString } from 'uiSrc/slices/interfaces'
import { isTruncatedString } from 'uiSrc/utils'
import { TEXT_DISABLED_ACTION_WITH_TRUNCATED_DATA } from 'uiSrc/constants'
-import {
- DestructiveButton,
- EmptyButton,
- IconButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
import styles from './styles.module.scss'
export interface Props {
@@ -63,7 +59,7 @@ const PopoverDelete = (props: Props) => {
}
const deleteButton = buttonLabel ? (
- {
data-testid={testid ? `${testid}-icon` : 'remove-icon'}
>
{buttonLabel}
-
+
) : (
- {
onClick={(e) => e.stopPropagation()}
>
-
+
{!!header && (
{header}
)}
- {text}
+ {text}
{appendInfo}
-
+
- handleDeleteItem(itemRaw || item)}
data-testid={testid || 'remove'}
>
Remove
-
+
diff --git a/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx b/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
index 8e85f03f50..6b85077931 100644
--- a/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
+++ b/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
@@ -1,9 +1,13 @@
-import cx from 'classnames'
import React, { useEffect, useState } from 'react'
+import cx from 'classnames'
import { isString } from 'lodash'
import { useDispatch, useSelector } from 'react-redux'
import styled from 'styled-components'
+import { RiOutsideClickDetector } from 'uiBase/utils'
+import { RiEmptyButton, RiIconButton, RiSelect } from 'uiBase/forms'
+import { RefreshIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
import {
setSelectedIndex,
redisearchSelector,
@@ -32,12 +36,7 @@ import {
import { localStorageService } from 'uiSrc/services'
import { BrowserStorageItem } from 'uiSrc/constants'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { EmptyButton, IconButton } from 'uiSrc/components/base/forms/buttons'
-import { RefreshIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { Text } from 'uiSrc/components/base/text'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
export const CREATE = 'create'
@@ -98,14 +97,14 @@ const RediSearchIndexesList = (props: Props) => {
return {
value: JSON.stringify(index),
inputDisplay: (
-
+
{value}
-
+
),
dropdownDisplay: (
-
+
{value}
-
+
),
}
})
@@ -114,13 +113,13 @@ const RediSearchIndexesList = (props: Props) => {
value: JSON.stringify(CREATE),
inputDisplay: CREATE ,
dropdownDisplay: (
-
Create Index
-
+
),
})
@@ -173,7 +172,7 @@ const RediSearchIndexesList = (props: Props) => {
}
return (
- setIsSelectOpen(false)}>
+ setIsSelectOpen(false)}>
-
+
)
}
-const Button = styled(EmptyButton)`
+const Button = styled(RiEmptyButton)`
justify-content: flex-start;
max-width: 200px;
padding-left: 1.275rem;
diff --git a/redisinsight/ui/src/pages/browser/components/search-key-list/SearchKeyList.tsx b/redisinsight/ui/src/pages/browser/components/search-key-list/SearchKeyList.tsx
index 9a20b6b7ee..10dc367c21 100644
--- a/redisinsight/ui/src/pages/browser/components/search-key-list/SearchKeyList.tsx
+++ b/redisinsight/ui/src/pages/browser/components/search-key-list/SearchKeyList.tsx
@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
import * as keys from 'uiSrc/constants/keys'
import MultiSearch from 'uiSrc/components/multi-search/MultiSearch'
import {
@@ -38,8 +40,6 @@ import { SidePanels } from 'uiSrc/slices/interfaces/insights'
import { FeatureFlags } from 'uiSrc/constants'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
const placeholders = {
@@ -186,14 +186,14 @@ const SearchKeyList = () => {
appendRight={
searchMode === SearchMode.Redisearch ? (
-
-
+
) : undefined
}
diff --git a/redisinsight/ui/src/pages/browser/components/virtual-tree/VirtualTree.tsx b/redisinsight/ui/src/pages/browser/components/virtual-tree/VirtualTree.tsx
index 9a5a026c43..c42277d80c 100644
--- a/redisinsight/ui/src/pages/browser/components/virtual-tree/VirtualTree.tsx
+++ b/redisinsight/ui/src/pages/browser/components/virtual-tree/VirtualTree.tsx
@@ -1,14 +1,11 @@
-import React, {
- useCallback,
- useEffect,
- useRef,
- useState,
-} from 'react'
+import React, { useCallback, useEffect, useRef, useState } from 'react'
import AutoSizer from 'react-virtualized-auto-sizer'
import { debounce, get, set } from 'lodash'
import { TreeWalker, TreeWalkerValue, FixedSizeTree as Tree } from 'react-vtree'
import { useDispatch } from 'react-redux'
+import { RiLoader, RiProgressBarLoader, RiImage } from 'uiBase/display'
+import { RiIcon } from 'uiBase/icons'
import { bufferToString, Maybe, Nullable } from 'uiSrc/utils'
import { useDisposableWebworker } from 'uiSrc/services'
import { IKeyPropTypes } from 'uiSrc/constants/prop-types/keys'
@@ -20,8 +17,6 @@ import {
} from 'uiSrc/constants'
import { RedisResponseBuffer, RedisString } from 'uiSrc/slices/interfaces'
import { fetchKeysMetadataTree } from 'uiSrc/slices/browser/keys'
-import { Loader, ProgressBarLoader, RiImage } from 'uiSrc/components/base/display'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { GetKeyInfoResponse } from 'apiSrc/modules/browser/keys/dto'
import { Node } from './components/Node'
@@ -276,7 +271,7 @@ const VirtualTree = (props: Props) => {
{nodes.current.length > 0 && (
<>
{loading && (
- {
data-testid="virtual-tree-spinner"
>
-
+
{loadingIcon ? (
{loading ? (
-
+
) : (
{({ width = 0 }) => (
-
-
+
+
-
+
-
+
{!arePanelsCollapsed && (
-
+
-
+
)}
-
+
{(!arePanelsCollapsed || isFullScreen) && (
-
)}
-
-
-
+
+
+
-
+
-
-
+
+
)}
)}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-delete/KeyDetailsHeaderDelete.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-delete/KeyDetailsHeaderDelete.tsx
index 688547db62..4fc5e49ce1 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-delete/KeyDetailsHeaderDelete.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-delete/KeyDetailsHeaderDelete.tsx
@@ -1,6 +1,10 @@
import React, { useState } from 'react'
import { useSelector } from 'react-redux'
+import { DeleteIcon } from 'uiBase/icons'
+import { RiDestructiveButton, RiIconButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/display'
import {
initialKeyInfo,
keysSelector,
@@ -15,13 +19,6 @@ import {
} from 'uiSrc/telemetry'
import { formatLongName } from 'uiSrc/utils'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import {
- DestructiveButton,
- IconButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
import styles from './styles.module.scss'
export interface Props {
@@ -70,7 +67,7 @@ const KeyDetailsHeaderDelete = ({ onDelete }: Props) => {
closePopover={closePopoverDelete}
panelPaddingSize="l"
button={
- {
}
>
-
+
{tooltipContent}
- will be deleted.
-
+
will be deleted.
+
- onDelete(keyBuffer!)}
@@ -95,7 +92,7 @@ const KeyDetailsHeaderDelete = ({ onDelete }: Props) => {
data-testid="delete-key-confirm-btn"
>
Delete
-
+
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.styles.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.styles.tsx
index 83e445e107..f1b2f1ec26 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.styles.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.styles.tsx
@@ -1,8 +1,8 @@
import styled from 'styled-components'
import { ComponentProps } from 'react'
-import { ColorText } from 'uiSrc/components/base/text'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { RiColorText } from 'uiBase/text'
+import { RiSelect } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
type KeyDetailsSelectProps = ComponentProps & {
$fullWidth?: boolean
@@ -28,7 +28,7 @@ const KeyDetailsSelect = styled(RiSelect)`
}
`
-const OptionText = styled(ColorText)`
+const OptionText = styled(RiColorText)`
padding-left: 6px;
padding-right: 4px;
font-size: 13px;
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.tsx
index bda14ca628..a05f94be35 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-formatter/KeyDetailsHeaderFormatter.tsx
@@ -2,6 +2,7 @@ import React, { useContext, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiText } from 'uiBase/text'
import {
KeyTypes,
KeyValueFormat,
@@ -23,8 +24,7 @@ import {
} from 'uiSrc/telemetry'
import { stringDataSelector } from 'uiSrc/slices/browser/string'
import { isFullStringLoaded } from 'uiSrc/utils'
-import { RiTooltip } from 'uiSrc/components'
-import { Text } from 'uiSrc/components/base/text'
+import { RiTooltip } from 'uiBase/display'
import {
Container,
ControlsIcon,
@@ -90,13 +90,13 @@ const KeyDetailsHeaderFormatter = (props: Props) => {
),
dropdownDisplay: (
-
{text}
-
+
),
}),
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-name/KeyDetailsHeaderName.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-name/KeyDetailsHeaderName.tsx
index 23cdb3553c..03533bad7a 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-name/KeyDetailsHeaderName.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-name/KeyDetailsHeaderName.tsx
@@ -3,6 +3,11 @@ import { isNull } from 'lodash'
import React, { useEffect, useRef, useState } from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexItem, RiGrid } from 'uiBase/layout'
+import { RiIconButton, RiFormField } from 'uiBase/forms'
+import { CopyIcon, RiIcon } from 'uiBase/icons'
+import { RiText } from 'uiBase/text'
+import { RiTextInput } from 'uiBase/inputs'
import InlineItemEditor from 'uiSrc/components/inline-item-editor/InlineItemEditor'
import { TEXT_UNPRINTABLE_CHARACTERS } from 'uiSrc/constants'
import { AddCommonFieldsFormConfig } from 'uiSrc/pages/browser/components/add-key/constants/fields-config'
@@ -26,14 +31,7 @@ import {
stringToBuffer,
} from 'uiSrc/utils'
-import { FlexItem, Grid } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiTooltip } from 'uiSrc/components'
-import { TextInput } from 'uiSrc/components/base/inputs'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
export interface Props {
@@ -145,7 +143,7 @@ const KeyDetailsHeaderName = ({ onEditKey }: Props) => {
!keyIsEditing ? : ''
return (
- {
data-testid="edit-key-btn"
>
{(keyIsEditing || keyIsHovering) && (
-
-
+
{
isLoading={loading}
declineOnUnmount={false}
>
-
-
+ {
autoComplete="off"
data-testid="edit-key-input"
/>
-
+
{key}
>
@@ -209,7 +205,7 @@ const KeyDetailsHeaderName = ({ onEditKey }: Props) => {
content="Copy"
anchorClassName={styles.copyKey}
>
- {
/>
)}
-
-
+
+
)}
- {
{replaceSpaces(keyProp?.substring(0, 200))}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-size-length/KeyDetailsHeaderSizeLength.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-size-length/KeyDetailsHeaderSizeLength.tsx
index dcb7d8d690..83509eba94 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-size-length/KeyDetailsHeaderSizeLength.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-size-length/KeyDetailsHeaderSizeLength.tsx
@@ -1,6 +1,9 @@
import React from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexItem } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import {
LENGTH_NAMING_BY_TYPE,
MIDDLE_SCREEN_RESOLUTION,
@@ -11,10 +14,7 @@ import {
} from 'uiSrc/slices/browser/keys'
import { formatBytes } from 'uiSrc/utils'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
export interface Props {
@@ -30,8 +30,8 @@ const KeyDetailsHeaderSizeLength = ({ width }: Props) => {
return (
<>
{size && (
-
-
+ {
)}
>
-
-
+
+
)}
-
-
+ {
{LENGTH_NAMING_BY_TYPE[type] ?? 'Length'}
{': '}
{length ?? '-'}
-
-
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-ttl/KeyDetailsHeaderTTL.tsx b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-ttl/KeyDetailsHeaderTTL.tsx
index 11d052fb2b..0d3ef4fde3 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-ttl/KeyDetailsHeaderTTL.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details-header/components/key-details-header-ttl/KeyDetailsHeaderTTL.tsx
@@ -2,6 +2,10 @@ import cx from 'classnames'
import React, { useEffect, useState } from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexItem, RiGrid } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiTextInput } from 'uiBase/inputs'
import InlineItemEditor from 'uiSrc/components/inline-item-editor/InlineItemEditor'
import {
initialKeyInfo,
@@ -11,10 +15,6 @@ import {
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
import { MAX_TTL_NUMBER, validateTTLNumber } from 'uiSrc/utils'
-import { FlexItem, Grid } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { TextInput } from 'uiSrc/components/base/inputs'
import styles from './styles.module.scss'
export interface Props {
@@ -84,7 +84,7 @@ const KeyDetailsHeaderTTL = ({ onEditTTL }: Props) => {
)
return (
- {
>
<>
{(ttlIsEditing || ttlIsHovering) && (
-
-
-
+
+
TTL:
-
-
-
+
+
+
applyEditTTL()}
onDecline={(event) => cancelEditTTl(event)}
@@ -113,7 +113,7 @@ const KeyDetailsHeaderTTL = ({ onEditTTL }: Props) => {
isLoading={loading}
declineOnUnmount={false}
>
- {
data-testid="edit-ttl-input"
/>
-
-
+
+
)}
- {
{ttl === '-1' ? 'No limit' : ttl}
-
+
>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/ChangeEditorTypeButton.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/ChangeEditorTypeButton.tsx
index 14d0a6a3e1..99e707b96c 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/ChangeEditorTypeButton.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/ChangeEditorTypeButton.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiIconButton } from 'uiBase/forms'
+import { EditIcon } from 'uiBase/icons'
import { RiTooltip } from 'uiSrc/components'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { EditIcon } from 'uiSrc/components/base/icons'
import { useChangeEditorType } from './useChangeEditorType'
const ChangeEditorTypeButton = () => {
@@ -14,7 +14,7 @@ const ChangeEditorTypeButton = () => {
return (
- ({
useDispatch: jest.fn(),
@@ -66,13 +67,16 @@ describe('useChangeEditorType', () => {
})
it('should fetch json when type switched', async () => {
- mockedUseSelector.mockReturnValue({
- editorType: EditorType.Default,
- }).mockReturnValue({
- [FeatureFlags.envDependent]: { flag: false },
- }).mockReturnValue({
- name: mockKeyName,
- })
+ mockedUseSelector
+ .mockReturnValue({
+ editorType: EditorType.Default,
+ })
+ .mockReturnValue({
+ [FeatureFlags.envDependent]: { flag: false },
+ })
+ .mockReturnValue({
+ name: mockKeyName,
+ })
const { result } = renderHook(() => useChangeEditorType())
@@ -91,11 +95,13 @@ describe('useChangeEditorType', () => {
})
it('should not fetch json when there is no selected key', () => {
- mockedUseSelector.mockReturnValue({
- editorType: EditorType.Default,
- }).mockReturnValue({
- [FeatureFlags.envDependent]: { flag: false },
- })
+ mockedUseSelector
+ .mockReturnValue({
+ editorType: EditorType.Default,
+ })
+ .mockReturnValue({
+ [FeatureFlags.envDependent]: { flag: false },
+ })
const { result } = renderHook(() => useChangeEditorType())
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/HashDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/HashDetails.tsx
index 92707d0a30..04b34a2ff6 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/HashDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/HashDetails.tsx
@@ -3,6 +3,7 @@ import { useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
+import { RiCheckbox } from 'uiBase/forms'
import { selectedKeySelector } from 'uiSrc/slices/browser/keys'
import { FeatureFlags, KeyTypes } from 'uiSrc/constants'
@@ -16,7 +17,6 @@ import { connectedInstanceOverviewSelector } from 'uiSrc/slices/instances/instan
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
import Divider from 'uiSrc/components/divider/Divider'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
import AddHashFields from './add-hash-fields/AddHashFields'
import { HashDetailsTable } from './hash-details-table'
import { KeyDetailsSubheader } from '../key-details-subheader/KeyDetailsSubheader'
@@ -73,7 +73,7 @@ const HashDetails = (props: Props) => {
<>
{isExpireFieldsAvailable && (
<>
- {
onClickAdd={addField}
>
{(item, index) => (
-
-
-
-
+
+
+
+ onChange={(value) =>
handleFieldChange('fieldName', item.id, value)
}
ref={
@@ -190,33 +186,33 @@ const AddHashFields = (props: Props) => {
}
data-testid="hash-field"
/>
-
-
-
-
-
+
+
+
+
+ onChange={(value) =>
handleFieldChange('fieldValue', item.id, value)
}
data-testid="hash-value"
/>
-
-
+
+
{isExpireFieldsAvailable && (
-
-
-
+
+
+ onChange={(value) =>
handleFieldChange(
'fieldTTL',
item.id,
@@ -225,38 +221,38 @@ const AddHashFields = (props: Props) => {
}
data-testid="hash-ttl"
/>
-
-
+
+
)}
-
+
)}
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-fields-btn"
>
Cancel
-
+
-
-
+
+
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx
index 34e76671fa..82438daa63 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx
@@ -4,7 +4,7 @@ import { useDispatch, useSelector } from 'react-redux'
import { CellMeasurerCache } from 'react-virtualized'
import { isNumber, toNumber } from 'lodash'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
import { getColumnWidth } from 'uiSrc/components/virtual-grid'
import { StopPropagation } from 'uiSrc/components/virtual-table'
import {
@@ -80,7 +80,7 @@ import {
EditableTextArea,
FormattedValue,
} from 'uiSrc/pages/browser/modules/key-details/shared'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
import {
AddFieldsToHashDto,
GetHashFieldsResponse,
@@ -382,7 +382,7 @@ const HashDetailsTable = (props: Props) => {
)
return (
- {
tooltipContent={tooltipContent}
/>
-
+
)
},
},
@@ -575,7 +575,7 @@ const HashDetailsTable = (props: Props) => {
validation={validateTTLNumber}
isEditDisabled={isTruncatedFieldName}
editToolTipContent={editTooltipContent}
-
+
>
{expire === -1 ? (
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/key-details-actions/add-items-action/AddItemsAction.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/key-details-actions/add-items-action/AddItemsAction.tsx
index 12ace2a8dc..6988a22911 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/key-details-actions/add-items-action/AddItemsAction.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/key-details-actions/add-items-action/AddItemsAction.tsx
@@ -1,13 +1,10 @@
import React from 'react'
import cx from 'classnames'
+import { PlusInCircleIcon } from 'uiBase/icons'
+import { RiIconButton, RiSecondaryButton } from 'uiBase/forms'
import { MIDDLE_SCREEN_RESOLUTION } from 'uiSrc/constants'
import { RiTooltip } from 'uiSrc/components'
-import { PlusInCircleIcon } from 'uiSrc/components/base/icons'
-import {
- IconButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
import styles from '../styles.module.scss'
export interface Props {
@@ -30,7 +27,7 @@ const AddItemsAction = ({ width, title, openAddItemPanel }: Props) => (
})}
>
{width > MIDDLE_SCREEN_RESOLUTION ? (
-
(
data-testid="add-key-value-items-btn"
>
{title}
-
+
) : (
-
(
- (
- (
})}
>
{width > MIDDLE_SCREEN_RESOLUTION ? (
- (
data-testid="add-key-value-items-btn"
>
{title}
-
+
) : (
- (
-
+
{({ width = 0 }) => (
-
+
{Object.values(KeyTypes).includes(keyType as KeyTypes) && (
<>
-
+
-
+
(
>
)}
{!isUndefined(Actions) && }
-
+
)}
-
+
)
export default KeyDetailsSubheader
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/add-list-elements/AddListElements.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/add-list-elements/AddListElements.tsx
index 2e7883eb91..efe2ed4f4a 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/add-list-elements/AddListElements.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/add-list-elements/AddListElements.tsx
@@ -1,6 +1,9 @@
import React, { useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiSelect } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import {
selectedKeyDataSelector,
keysSelector,
@@ -16,13 +19,6 @@ import {
import { KeyTypes } from 'uiSrc/constants'
import { stringToBuffer } from 'uiSrc/utils'
import { AddListFormConfig as config } from 'uiSrc/pages/browser/components/add-key/constants/fields-config'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { PushElementToListDto } from 'apiSrc/modules/browser/list/dto'
import styles from '../styles.module.scss'
@@ -137,42 +133,40 @@ const AddListElements = (props: Props) => {
isClearDisabled={isClearDisabled}
>
{(item, index) => (
-
- handleElementChange(value, index)
- }
+ onChange={(value) => handleElementChange(value, index)}
data-testid={`element-${index}`}
/>
)}
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-members-btn"
>
Cancel
-
+
-
-
+
+
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx
index be4fdfb974..ecb1778c79 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx
@@ -3,11 +3,13 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { isNull, isNumber } from 'lodash'
import { CellMeasurerCache } from 'react-virtualized'
+
+import { RiText } from 'uiBase/text'
+import { RiTooltip } from 'uiBase/display'
import {
appContextBrowserKeyDetails,
updateKeyDetailsSizes,
} from 'uiSrc/slices/app/context'
-import { RiTooltip } from 'uiSrc/components'
import {
listSelector,
@@ -71,7 +73,6 @@ import {
EditableTextArea,
FormattedValue,
} from 'uiSrc/pages/browser/modules/key-details/shared'
-import { Text } from 'uiSrc/components/base/text'
import {
SetListElementDto,
SetListElementResponse,
@@ -262,7 +263,7 @@ const ListDetailsTable = () => {
const cellContent = index?.toString().substring(0, 200)
const tooltipContent = formatLongName(index?.toString())
return (
-
+
{
<>{cellContent}>
-
+
)
},
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/remove-list-elements/RemoveListElements.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/remove-list-elements/RemoveListElements.tsx
index f28aa364ec..17c50b0681 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/remove-list-elements/RemoveListElements.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/remove-list-elements/RemoveListElements.tsx
@@ -3,7 +3,19 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { toNumber } from 'lodash'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiDestructiveButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ RiSelect,
+} from 'uiBase/forms'
+import { DeleteIcon, RiIcon } from 'uiBase/icons'
+import { RiPopover } from 'uiBase/display'
+import { RiTextInput } from 'uiBase/inputs'
import { KeyTypes } from 'uiSrc/constants'
import {
bufferToString,
@@ -30,19 +42,6 @@ import {
} from 'uiSrc/slices/instances/instances'
import { AddListFormConfig as config } from 'uiSrc/pages/browser/components/add-key/constants/fields-config'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- DestructiveButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { RiPopover } from 'uiSrc/components/base'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { DeleteListElementsDto } from 'apiSrc/modules/browser/list/dto'
import {
@@ -174,38 +173,38 @@ const RemoveListElements = (props: Props) => {
panelClassName={styles.panelCancelBtn}
panelPaddingSize="l"
button={
-
Remove
-
+
}
>
-
+
{count} Element(s)
-
+
will be removed from the {destination.toLowerCase()} of{' '}
{formatNameShort(bufferToString(selectedKey))}
-
+
{(!length || length <= +count) && (
-
+
If you remove all Elements, the whole Key will be deleted.
-
+
)}
-
-
-
+
+ {
data-testid="remove-submit"
>
Remove
-
+
)
@@ -245,10 +244,10 @@ const RemoveListElements = (props: Props) => {
return (
<>
-
-
-
-
+
+
+
+
{
}
data-testid="destination-select"
/>
-
-
-
-
+
+
+ >}
>
- {
ref={countInput}
disabled={!canRemoveMultiple}
/>
-
-
-
-
+
+
+
+
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-elements-btn"
>
Cancel
-
+
-
-
+
+
{RemoveButton()}
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/modules-type-details/ModulesTypeDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/modules-type-details/ModulesTypeDetails.tsx
index 778499997f..eb204c728d 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/modules-type-details/ModulesTypeDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/modules-type-details/ModulesTypeDetails.tsx
@@ -2,10 +2,9 @@ import React from 'react'
import { useHistory } from 'react-router-dom'
import { useSelector } from 'react-redux'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText, RiTitle } from 'uiBase/text'
import { Pages } from 'uiSrc/constants'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
-import { Title } from 'uiSrc/components/base/text/Title'
import TextDetailsWrapper from '../text-details-wrapper/TextDetailsWrapper'
import styles from './styles.module.scss'
@@ -30,8 +29,8 @@ const ModulesTypeDetails = ({
return (
- {`This is a ${moduleName} key.`}
-
+ {`This is a ${moduleName} key.`}
+
{'Use Redis commands in the '}
{' tool to view the value.'}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/no-key-selected/NoKeySelected.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/no-key-selected/NoKeySelected.tsx
index 871e15bb28..0564f17d33 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/no-key-selected/NoKeySelected.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/no-key-selected/NoKeySelected.tsx
@@ -1,14 +1,14 @@
import React from 'react'
import { useDispatch } from 'react-redux'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import ExploreGuides from 'uiSrc/components/explore-guides'
import { Nullable } from 'uiSrc/utils'
import { toggleBrowserFullScreen } from 'uiSrc/slices/browser/keys'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
export interface Props {
@@ -49,7 +49,7 @@ export const NoKeySelected = (props: Props) => {
position="left"
anchorClassName={styles.closeRightPanel}
>
- {
-
+
{error ? (
{error}
) : (
!!keysLastRefreshTime &&
)}
-
+
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.tsx
index da330ec7d2..c3e986ff42 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import { useSelector } from 'react-redux'
import { isUndefined } from 'lodash'
+import { RiProgressBarLoader } from 'uiBase/display'
import {
rejsonDataSelector,
rejsonSelector,
@@ -24,7 +25,6 @@ import {
import { stringToBuffer } from 'uiSrc/utils'
import { IJSONData } from 'uiSrc/pages/browser/modules/key-details/components/rejson-details/interfaces'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import RejsonDetails from './rejson-details'
import MonacoEditor from './monaco-editor'
import { parseJsonData } from './utils'
@@ -119,7 +119,7 @@ const RejsonDetailsWrapper = (props: Props) => {
{loading && (
-
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item-field-action/AddItemFieldAction.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item-field-action/AddItemFieldAction.tsx
index 97b99f0011..4fe3a7499b 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item-field-action/AddItemFieldAction.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item-field-action/AddItemFieldAction.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { PlusIcon } from 'uiSrc/components/base/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { PlusIcon } from 'uiBase/icons'
import { getBrackets } from '../../utils'
import styles from '../../styles.module.scss'
@@ -13,7 +13,7 @@ export interface Props {
const AddItemFieldAction = ({ leftPadding, type, onClickSetKVPair }: Props) => (
{getBrackets(type, 'end')}
-
{
paddingLeft: `${leftPadding}em`,
}}
>
- {}}>
+ {}}>
- handleOnEsc(e)} />
-
+ handleOnEsc(e)} />
+
handleFormSubmit(e)}
@@ -103,37 +105,34 @@ const AddItem = (props: Props) => {
noValidate
>
{isPair && (
-
-
+
-
+
)}
-
-
+
- setValue(value)
- }
+ onChange={(value) => setValue(value)}
data-testid="json-value"
/>
-
+
setIsConfirmationVisible(false)}
onConfirm={confirmApply}
>
- {
onClick={() => onCancel?.()}
/>
- {
)}
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/ConfirmOverwrite.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/ConfirmOverwrite.tsx
index 4c64944ceb..7202ec85a7 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/ConfirmOverwrite.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/ConfirmOverwrite.tsx
@@ -1,12 +1,9 @@
import React from 'react'
import cx from 'classnames'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiPopover } from 'uiSrc/components/base'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiPopover } from 'uiBase/index'
import styles from '../../styles.module.scss'
interface ConfirmOverwriteProps {
@@ -30,32 +27,32 @@ const ConfirmOverwrite = ({
panelClassName={cx('popoverLikeTooltip')}
button={children}
>
-
+
Duplicate JSON key detected
-
-
+
+
You already have the same JSON key. If you proceed, a value of the
existing JSON key will be overwritten.
-
+
-
Cancel
-
+
-
Overwrite
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-entire-item-action/EditEntireItemAction.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-entire-item-action/EditEntireItemAction.tsx
index a00c02b974..c9fcf1e50d 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-entire-item-action/EditEntireItemAction.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-entire-item-action/EditEntireItemAction.tsx
@@ -2,16 +2,18 @@ import React, { useState } from 'react'
import cx from 'classnames'
import jsonValidator from 'json-dup-key-validator'
-import * as keys from 'uiSrc/constants/keys'
-import { CancelSlimIcon, CheckThinIcon } from 'uiSrc/components/base/icons'
-import FieldMessage from 'uiSrc/components/field-message/FieldMessage'
+import { CancelSlimIcon, CheckThinIcon } from 'uiBase/icons'
+import { RiFlexItem } from 'uiBase/layout'
+import {
+ RiWindowEvent,
+ RiFocusTrap,
+ RiOutsideClickDetector,
+} from 'uiBase/utils'
+import { RiIconButton } from 'uiBase/forms'
+import { RiTextArea } from 'uiBase/inputs'
import { Nullable } from 'uiSrc/utils'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
-import { WindowEvent } from 'uiSrc/components/base/utils/WindowEvent'
-import { FocusTrap } from 'uiSrc/components/base/utils/FocusTrap'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { TextArea } from 'uiSrc/components/base/inputs'
+import FieldMessage from 'uiSrc/components/field-message/FieldMessage'
+import * as keys from 'uiSrc/constants/keys'
import { isValidJSON } from '../../utils'
import { JSONErrors } from '../../constants'
@@ -63,18 +65,18 @@ const EditEntireItemAction = (props: Props) => {
return (
-
onCancel?.()}>
+ onCancel?.()}>
-
handleOnEsc(e)} />
-
+ handleOnEsc(e)} />
+
-
-
+ {
onChange={setValue}
data-testid="json-value"
/>
-
+
setIsConfirmationVisible(false)}
onConfirm={confirmApply}
>
-
- {
)}
-
+
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-item-field-action/EditItemFieldAction.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-item-field-action/EditItemFieldAction.tsx
index c70c82de35..3d6e4d6cb0 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-item-field-action/EditItemFieldAction.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-item-field-action/EditItemFieldAction.tsx
@@ -1,5 +1,6 @@
import React, { useState } from 'react'
-import { EditIcon } from 'uiSrc/components/base/icons'
+import { EditIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
import {
bufferToString,
@@ -7,7 +8,6 @@ import {
createDeleteFieldMessage,
} from 'uiSrc/utils'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
import styles from '../../styles.module.scss'
export interface Props {
@@ -31,7 +31,7 @@ const EditItemFieldAction = ({
return (
-
{
onEditorDidMount={onEditorDidMount}
/>
-
-
+
Close
-
+
-
Overwrite Data
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/rejson-details/RejsonDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/rejson-details/RejsonDetails.tsx
index 2f710b03de..25485c8a17 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/rejson-details/RejsonDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/rejson-details/RejsonDetails.tsx
@@ -3,7 +3,8 @@ import React, { useState } from 'react'
import { useDispatch } from 'react-redux'
import cx from 'classnames'
-import { PlusIcon } from 'uiSrc/components/base/icons'
+import { PlusIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
import {
appendReJSONArrayItemAction,
fetchVisualisationResults,
@@ -12,7 +13,6 @@ import {
} from 'uiSrc/slices/browser/rejson'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
import { getBrackets, isRealArray, isRealObject, wrapPath } from '../utils'
import { BaseProps, ObjectTypes } from '../interfaces'
import RejsonDynamicTypes from '../rejson-dynamic-types'
@@ -131,7 +131,7 @@ const RejsonDetails = (props: BaseProps) => {
)}
{!addRootKVPair && (
-
{
style={{ justifyContent: 'flex-end' }}
>
-
+
)}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/add-set-members/AddSetMembers.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/add-set-members/AddSetMembers.tsx
index 00fb829d44..028db2635e 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/add-set-members/AddSetMembers.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/add-set-members/AddSetMembers.tsx
@@ -1,7 +1,10 @@
-import React, { ChangeEvent, useEffect, useRef, useState } from 'react'
+import React, { useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiTextInput } from 'uiBase/inputs'
import {
selectedKeyDataSelector,
keysSelector,
@@ -23,13 +26,6 @@ import {
} from 'uiSrc/pages/browser/components/add-key/AddKeySet/interfaces'
import AddMultipleFields from 'uiSrc/pages/browser/components/add-multiple-fields'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
import styles from './styles.module.scss'
export interface Props {
@@ -143,10 +139,10 @@ const AddSetMembers = (props: Props) => {
onClickAdd={addMember}
>
{(item, index) => (
-
-
-
-
+
+
+ {
disabled={loading}
data-testid="member-name"
/>
-
-
-
+
+
+
)}
<>
-
-
-
+
+ closePanel(true)}
data-testid="cancel-members-btn"
>
- Cancel
-
-
-
- Cancel
+
+
+
+
Save
-
-
-
+
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx
index d49de6c409..924f25a2c9 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx
@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
import { CellMeasurerCache } from 'react-virtualized'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
import { RedisResponseBuffer, RedisString } from 'uiSrc/slices/interfaces'
import {
@@ -241,7 +241,7 @@ const SetDetailsTable = (props: Props) => {
const cellContent = value?.substring?.(0, 200) ?? value
return (
- {
position="left"
/>
-
+
)
},
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/AddStreamEntries.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/AddStreamEntries.tsx
index 35eee734fc..220960d7f6 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/AddStreamEntries.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/AddStreamEntries.tsx
@@ -1,6 +1,8 @@
import { toNumber } from 'lodash'
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
import { entryIdRegex, stringToBuffer } from 'uiSrc/utils'
import {
keysSelector,
@@ -19,11 +21,6 @@ import {
sendEventTelemetry,
TelemetryEvent,
} from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
import { AddStreamEntriesDto } from 'apiSrc/modules/browser/stream/dto'
import StreamEntryFields from './StreamEntryFields/StreamEntryFields'
@@ -142,20 +139,20 @@ const AddStreamEntries = (props: Props) => {
/>
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-members-btn"
>
Cancel
-
+
-
-
+
+
-
{
data-testid="save-elements-btn"
>
Save
-
+
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/StreamEntryFields/StreamEntryFields.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/StreamEntryFields/StreamEntryFields.tsx
index fe8b277182..631f82867c 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/StreamEntryFields/StreamEntryFields.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-entity/StreamEntryFields/StreamEntryFields.tsx
@@ -1,16 +1,16 @@
import React, { useEffect, useRef } from 'react'
import cx from 'classnames'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiFormField } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiTooltip } from 'uiBase/display'
import { validateEntryId } from 'uiSrc/utils'
import { INITIAL_STREAM_FIELD_STATE } from 'uiSrc/pages/browser/components/add-key/AddKeyStream/AddKeyStream'
import { AddStreamFormConfig as config } from 'uiSrc/pages/browser/components/add-key/constants/fields-config'
import AddMultipleFields from 'uiSrc/pages/browser/components/add-multiple-fields'
-import { RiTooltip } from 'uiSrc/components'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { TextInput } from 'uiSrc/components/base/inputs'
import styles from '../styles.module.scss'
export interface Props {
@@ -110,29 +110,29 @@ const StreamEntryFields = (props: Props) => {
return (
-
- ID must be a timestamp and sequence number greater than the
- last ID.
-
- Otherwise, type * to auto-generate ID based on the database
- current time.
- >
- }
- >
-
-
+ anchorClassName="inputAppendIcon"
+ className={styles.entryIdTooltip}
+ position="left"
+ title="Enter Valid ID or *"
+ content={
+ <>
+ ID must be a timestamp and sequence number greater than the
+ last ID.
+
+ Otherwise, type * to auto-generate ID based on the database
+ current time.
+ >
+ }
+ >
+
+
}
>
- {
autoComplete="off"
data-testid={config.entryId.id}
/>
-
+
{!showEntryError && (
Timestamp - Sequence Number or *
@@ -167,15 +167,15 @@ const StreamEntryFields = (props: Props) => {
onClickAdd={addField}
>
{(item, index) => (
-
-
-
-
+
+
+
+ onChange={(value) =>
handleFieldChange('name', item.id, value)
}
ref={
@@ -184,25 +184,25 @@ const StreamEntryFields = (props: Props) => {
autoComplete="off"
data-testid="field-name"
/>
-
-
-
-
-
+
+
+
+
+ onChange={(value) =>
handleFieldChange('value', item.id, value)
}
autoComplete="off"
data-testid="field-value"
/>
-
-
-
+
+
+
)}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.spec.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.spec.tsx
index 0ffdc08b74..0b335750cb 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.spec.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.spec.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
import { instance, mock } from 'ts-mockito'
+import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
import AddStreamGroup, { Props } from './AddStreamGroup'
const GROUP_NAME_FIELD = 'group-name-field'
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.tsx
index 184bab3fb2..b3130a3b8e 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/add-stream-group/AddStreamGroup.tsx
@@ -3,6 +3,11 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiTooltip } from 'uiBase/display'
import { lastDeliveredIDTooltipText } from 'uiSrc/constants/texts'
import { selectedKeyDataSelector } from 'uiSrc/slices/browser/keys'
import { addNewGroupAction } from 'uiSrc/slices/browser/stream'
@@ -12,15 +17,6 @@ import {
validateConsumerGroupId,
} from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { CreateConsumerGroupsDto } from 'apiSrc/modules/browser/stream/dto'
import styles from './styles.module.scss'
@@ -91,30 +87,28 @@ const AddStreamGroup = (props: Props) => {
className={styles.content}
data-test-subj="add-stream-groups-field-panel"
>
-
-
-
-
-
-
-
+
+
+
+
+
- setGroupName(value)
- }
+ onChange={(value) => setGroupName(value)}
autoComplete="off"
data-testid="group-name-field"
/>
-
-
-
-
+
+
+ {
}
>
-
+ onChange={(value) =>
setId(validateConsumerGroupId(value))
}
onBlur={() => setIsIdFocused(false)}
@@ -144,7 +138,7 @@ const AddStreamGroup = (props: Props) => {
autoComplete="off"
data-testid="id-field"
/>
-
+
{!showIdError && (
Timestamp - Sequence Number or $
@@ -155,36 +149,36 @@ const AddStreamGroup = (props: Props) => {
{idError}
)}
-
-
-
-
-
+
+
+
+
+
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-stream-groups-btn"
>
Cancel
-
+
-
-
+
+
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/consumers-view/ConsumersViewWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/consumers-view/ConsumersViewWrapper.tsx
index 109f03b8d8..aed3183352 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/consumers-view/ConsumersViewWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/consumers-view/ConsumersViewWrapper.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiText } from 'uiBase/text'
import {
setStreamViewType,
selectedGroupSelector,
@@ -25,12 +26,11 @@ import {
import { formatLongName, isTruncatedString } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
import { ConsumerDto } from 'apiSrc/modules/browser/stream/dto'
import ConsumersView from './ConsumersView'
import styles from './ConsumersView/styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const suffix = '_stream_consumer'
const actionsWidth = 50
@@ -127,7 +127,7 @@ const ConsumersViewWrapper = (props: Props) => {
const cellContent = viewName.substring(0, 200)
const tooltipContent = formatLongName(viewName)
return (
-
+
{
<>{cellContent}>
-
+
)
},
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/groups-view/GroupsViewWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/groups-view/GroupsViewWrapper.tsx
index d4f622b91b..70a2021c70 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/groups-view/GroupsViewWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/groups-view/GroupsViewWrapper.tsx
@@ -2,6 +2,10 @@ import React, { useCallback, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
+import { RiFormField } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiTextInput } from 'uiBase/inputs'
import { lastDeliveredIDTooltipText } from 'uiSrc/constants/texts'
import {
selectedKeyDataSelector,
@@ -33,11 +37,7 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
import EditablePopover from 'uiSrc/pages/browser/modules/key-details/shared/editable-popover'
-import { FormatedDate, RiTooltip } from 'uiSrc/components'
-import { Text } from 'uiSrc/components/base/text'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { TextInput } from 'uiSrc/components/base/inputs'
+import { FormatedDate } from 'uiSrc/components'
import {
ConsumerDto,
ConsumerGroupDto,
@@ -47,6 +47,7 @@ import {
import GroupsView from './GroupsView'
import styles from './GroupsView/styles.module.scss'
+import { RiTooltip } from 'uiBase/tooltip'
export interface IConsumerGroup extends ConsumerGroupDto {
editing: boolean
@@ -221,7 +222,7 @@ const GroupsViewWrapper = (props: Props) => {
const cellContent = viewName.substring(0, 200)
const tooltipContent = formatLongName(viewName)
return (
-
+
{
<>{cellContent}>
-
+
)
},
},
@@ -278,7 +279,7 @@ const GroupsViewWrapper = (props: Props) => {
)
return (
-
+
{
)}
{!pending && pending}
-
+
)
},
},
@@ -323,7 +324,7 @@ const GroupsViewWrapper = (props: Props) => {
- {
>
-
-
+
+
{id}
-
+
}
field={id}
@@ -363,24 +364,24 @@ const GroupsViewWrapper = (props: Props) => {
delay={500}
editBtnClassName={styles.editBtn}
>
-
-
-
+ anchorClassName="inputAppendIcon"
+ position="left"
+ title="Enter Valid ID, 0 or $"
+ content={lastDeliveredIDTooltipText}
+ >
+
+
}
>
-
+ onChange={(value) =>
setEditValue(validateConsumerGroupId(value))
}
onBlur={() => setIsIdFocused(false)}
@@ -399,7 +400,7 @@ const GroupsViewWrapper = (props: Props) => {
{idError}
)}
-
+
)
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageAckPopover/MessageAckPopover.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageAckPopover/MessageAckPopover.tsx
index 7eca509828..a42633b0e4 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageAckPopover/MessageAckPopover.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageAckPopover/MessageAckPopover.tsx
@@ -1,12 +1,10 @@
import React from 'react'
-import { Text } from 'uiSrc/components/base/text'
-import {
- DestructiveButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiPopover } from 'uiSrc/components/base'
-import { HorizontalSpacer } from 'uiSrc/components/base/layout'
+import { RiText } from 'uiBase/text'
+import { RiDestructiveButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiPopover } from 'uiBase/display'
+import { RiHorizontalSpacer } from 'uiBase/layout'
+
import styles from './styles.module.scss'
export interface Props {
@@ -37,7 +35,7 @@ const AckPopover = (props: Props) => {
panelClassName={styles.popoverWrapper}
button={
<>
- {
data-testid="acknowledge-btn"
>
ACK
-
-
+
+
>
}
>
-
+
{id}
will be acknowledged and removed from the pending messages list
-
+
- acknowledge(id)}
data-testid="acknowledge-submit"
>
Acknowledge
-
+
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageClaimPopover/MessageClaimPopover.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageClaimPopover/MessageClaimPopover.tsx
index 097c62d0ef..e36770a605 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageClaimPopover/MessageClaimPopover.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessageClaimPopover/MessageClaimPopover.tsx
@@ -4,29 +4,29 @@ import { useParams } from 'react-router-dom'
import { useFormik } from 'formik'
import { orderBy, filter } from 'lodash'
-import { isTruncatedString, isEqualBuffers } from 'uiSrc/utils'
-import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
+import { RiText } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
import {
- selectedGroupSelector,
- selectedConsumerSelector,
-} from 'uiSrc/slices/browser/stream'
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ RiCheckbox,
+ RiSelect,
+} from 'uiBase/forms'
+import { RiNumericInput, RiSwitchInput } from 'uiBase/inputs'
+import { RiPopover, RiTooltip } from 'uiBase/display'
import {
prepareDataForClaimRequest,
getDefaultConsumer,
ClaimTimeOptions,
} from 'uiSrc/utils/streamUtils'
-import { Text } from 'uiSrc/components/base/text'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { NumericInput, SwitchInput } from 'uiSrc/components/base/inputs'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
+ selectedGroupSelector,
+ selectedConsumerSelector,
+} from 'uiSrc/slices/browser/stream'
+import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
+import { isTruncatedString, isEqualBuffers } from 'uiSrc/utils'
import {
ClaimPendingEntryDto,
ClaimPendingEntriesResponse,
@@ -39,21 +39,23 @@ const getConsumersOptions = (consumers: ConsumerDto[]) =>
consumers.map((consumer) => ({
value: consumer.name?.viewValue,
inputDisplay: (
-
- {consumer.name?.viewValue}
-
+ {consumer.name?.viewValue}
+
+
{`pending: ${consumer.pending}`}
-
-
+
+
),
}))
@@ -170,7 +172,7 @@ const MessageClaimPopover = (props: Props) => {
}, [consumers, currentConsumerName])
const button = (
- {
disabled={consumerOptions.length < 1}
>
CLAIM
-
+
)
const buttonTooltip = (
@@ -207,9 +209,9 @@ const MessageClaimPopover = (props: Props) => {
button={consumerOptions.length < 1 ? buttonTooltip : button}
>
-
-
-
+
+
+
{
}
data-testid="destination-select"
/>
-
-
-
-
+
+
+
+
-
-
-
+
+
+
{isOptionalShow && (
<>
-
-
+
-
-
+
+
-
-
-
-
+
+
+
+
{
onChange={handleChangeTimeFormat}
data-testid="time-option-select"
/>
-
-
-
-
-
+
+
+
+ {
formik.setFieldValue('retryCount', value)
}
/>
-
-
-
-
-
+
+
+
+ {
}}
data-testid="force-claim-checkbox"
/>
-
-
-
+
+
+
>
)}
-
-
-
+
-
+
-
Cancel
-
-
+ formik.handleSubmit()}
data-testid="btn-submit"
>
Claim
-
+
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessagesViewWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessagesViewWrapper.tsx
index 33d69daf8b..d9cf0933ea 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessagesViewWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessagesViewWrapper.tsx
@@ -4,6 +4,8 @@ import { useParams } from 'react-router-dom'
import { last, toNumber } from 'lodash'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
+import { RiFlexItem } from 'uiBase/layout'
import {
fetchMoreConsumerMessages,
selectedConsumerSelector,
@@ -21,8 +23,6 @@ import { SortOrder, TEXT_CONSUMER_NAME_TOO_LONG } from 'uiSrc/constants'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { isTruncatedString } from 'uiSrc/utils'
-import { Text } from 'uiSrc/components/base/text'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
import {
AckPendingEntriesResponse,
PendingEntryDto,
@@ -124,8 +124,8 @@ const MessagesViewWrapper = (props: Props) => {
render: function Id(_name: string, { id }: PendingEntryDto) {
const timestamp = id?.split('-')?.[0]
return (
-
-
+ {
data-testid={`stream-message-${id}-date`}
>
{getFormatTime(timestamp)}
-
-
+
{id}
-
-
+
+
)
},
},
@@ -157,7 +157,7 @@ const MessagesViewWrapper = (props: Props) => {
render: function Idle(_name: string, { id, idle }: PendingEntryDto) {
const timestamp = id?.split('-')?.[0]
return (
- {
style={{ maxWidth: '100%' }}
>
{getFormatTime(`${toNumber(timestamp) + idle}`)}
-
+
)
},
},
@@ -186,7 +186,7 @@ const MessagesViewWrapper = (props: Props) => {
absoluteWidth: actionsWidth,
render: function Actions(_act: any, { id }: PendingEntryDto) {
return (
-
+
{
claimMessage={handleClaimingId}
handleCancelClaim={handleCancelClaim}
/>
-
+
)
},
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx
index 35ab26d55a..c941d25dcc 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx
@@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { last, mergeWith, toNumber } from 'lodash'
+import { RiText } from 'uiBase/text'
import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
import {
@@ -37,7 +38,6 @@ import { decompressingBuffer } from 'uiSrc/utils/decompressors'
import { FormattedValue } from 'uiSrc/pages/browser/modules/key-details/shared'
import { FormatedDate } from 'uiSrc/components'
-import { Text } from 'uiSrc/components/base/text'
import { StreamEntryDto } from 'apiSrc/modules/browser/stream/dto'
import StreamDataView from './StreamDataView'
import styles from './StreamDataView/styles.module.scss'
@@ -280,7 +280,7 @@ const StreamDataViewWrapper = (props: Props) => {
)
return (
- {
anchorClassName="streamItem line-clamp-2"
/>
-
+
)
},
})
@@ -323,7 +323,7 @@ const StreamDataViewWrapper = (props: Props) => {
return (
{id.length < MAX_VISIBLE_LENGTH_STREAM_TIMESTAMP && (
- {
)}
-
+
)}
-
+
{
>
{id}
-
+
)
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-details-body/StreamDetailsBody.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-details-body/StreamDetailsBody.tsx
index 3a8ec4c7d6..fd51e1c8bf 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-details-body/StreamDetailsBody.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-details-body/StreamDetailsBody.tsx
@@ -3,6 +3,7 @@ import { useDispatch, useSelector } from 'react-redux'
import { isNull, last, toString } from 'lodash'
import cx from 'classnames'
+import { RiProgressBarLoader } from 'uiBase/display'
import {
streamSelector,
streamGroupsSelector,
@@ -22,7 +23,6 @@ import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { selectedKeyDataSelector } from 'uiSrc/slices/browser/keys'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import RangeFilter from 'uiSrc/components/range-filter'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import { GetStreamEntriesResponse } from 'apiSrc/modules/browser/stream/dto'
import ConsumersViewWrapper from '../consumers-view'
@@ -199,7 +199,7 @@ const StreamDetailsBody = (props: Props) => {
return (
{(loading || loadingGroups) && (
-
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-tabs/StreamTabs.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-tabs/StreamTabs.tsx
index 617aa15158..018e16c531 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-tabs/StreamTabs.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-tabs/StreamTabs.tsx
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiTabs, TabInfo } from 'uiBase/layout'
import {
streamSelector,
setStreamViewType,
@@ -15,7 +16,6 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { SortOrder } from 'uiSrc/constants'
import { selectedKeyDataSelector } from 'uiSrc/slices/browser/keys'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
import { ConsumerGroupDto } from 'apiSrc/modules/browser/stream/dto'
const StreamTabs = () => {
@@ -90,7 +90,7 @@ const StreamTabs = () => {
}, [viewType, selectedGroupName, selectedConsumerName])
return (
-
onSelectedTabChanged(id as StreamViewType)}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-value/StringDetailsValue.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-value/StringDetailsValue.tsx
index 2802be5559..98851aa0bd 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-value/StringDetailsValue.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-value/StringDetailsValue.tsx
@@ -8,6 +8,12 @@ import React, {
} from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { DownloadIcon } from 'uiBase/icons'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiTextArea } from 'uiBase/inputs'
+import { RiProgressBarLoader,RiTooltip } from 'uiBase/display'
import {
bufferToSerializedFormat,
bufferToString,
@@ -53,13 +59,6 @@ import { downloadFile } from 'uiSrc/utils/dom/downloadFile'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { IFetchKeyArgs } from 'uiSrc/constants/prop-types/keys'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { DownloadIcon } from 'uiSrc/components/base/icons'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { TextArea } from 'uiSrc/components/base/inputs'
-import { RiTooltip } from 'uiSrc/components'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
const MIN_ROWS = 8
@@ -232,7 +231,7 @@ const StringDetailsValue = (props: Props) => {
const renderValue = (value: string) => {
const textEl = (
- isEditable && setIsEdit(true)}
style={{ whiteSpace: 'break-spaces' }}
@@ -241,7 +240,7 @@ const StringDetailsValue = (props: Props) => {
{areaValue !== ''
? value
: !isLoading && Empty }
-
+
)
return (
@@ -265,7 +264,7 @@ const StringDetailsValue = (props: Props) => {
data-testid="string-details"
>
{isLoading && (
-
@@ -291,7 +290,7 @@ const StringDetailsValue = (props: Props) => {
)?.isValid
}
>
- {
{length > MAX_LENGTH && (
-
-
+
+
{!isFullStringLoaded(initialValue?.data?.length, length) && (
- handleLoadAll(key, keyType)}
>
Load all
-
+
)}
-
+
{!isTruncatedValue && (
-
-
+ {
disabled={isTruncatedValue}
>
Download
-
-
+
+
)}
-
+
)}
>
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.spec.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.spec.tsx
index 9a10ba63c7..ebf00223c7 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.spec.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.spec.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import TextDetailsWrapper from './TextDetailsWrapper'
import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
+import TextDetailsWrapper from './TextDetailsWrapper'
describe('TextDetailsWrapper', () => {
it('should render children correctly', () => {
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.tsx
index c10ab762d8..6a7dd72b28 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/text-details-wrapper/TextDetailsWrapper.tsx
@@ -1,9 +1,9 @@
import React, { ReactNode } from 'react'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
import { RiTooltip } from 'uiSrc/components'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
const TextDetailsWrapper = ({
@@ -25,7 +25,7 @@ const TextDetailsWrapper = ({
position="left"
anchorClassName={styles.closeRightPanel}
>
-
-
-
+
+
{children}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/too-long-key-name-details/TooLongKeyNameDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/too-long-key-name-details/TooLongKeyNameDetails.tsx
index f3b6901e05..54a259fee0 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/too-long-key-name-details/TooLongKeyNameDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/too-long-key-name-details/TooLongKeyNameDetails.tsx
@@ -1,13 +1,12 @@
import React from 'react'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
+import { RiTitle, RiText } from 'uiBase/text'
import TextDetailsWrapper from '../text-details-wrapper/TextDetailsWrapper'
const TooLongKeyNameDetails = ({ onClose }: { onClose: () => void }) => (
- The key name is too long
- Details cannot be displayed.
+ The key name is too long
+ Details cannot be displayed.
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/unsupported-type-details/UnsupportedTypeDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/unsupported-type-details/UnsupportedTypeDetails.tsx
index 9f63c34b80..d5a67e2b8a 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/unsupported-type-details/UnsupportedTypeDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/unsupported-type-details/UnsupportedTypeDetails.tsx
@@ -1,16 +1,15 @@
import React from 'react'
+import { RiTitle, RiText } from 'uiBase/text'
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
import TextDetailsWrapper from '../text-details-wrapper/TextDetailsWrapper'
import styles from './styles.module.scss'
const UnsupportedTypeDetails = ({ onClose }: { onClose: () => void }) => (
- This key type is not currently supported.
-
+ This key type is not currently supported.
+
See{' '}
void }) => (
our repository
{' '}
for the list of supported key types.
-
+
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/ZSetDetails.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/ZSetDetails.tsx
index 53c5cf9a94..c2b3b3e792 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/ZSetDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/ZSetDetails.tsx
@@ -2,6 +2,7 @@ import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiCol, RiFlexItem } from 'uiBase/layout'
import { selectedKeySelector } from 'uiSrc/slices/browser/keys'
import { KeyTypes } from 'uiSrc/constants'
@@ -9,7 +10,6 @@ import {
KeyDetailsHeader,
KeyDetailsHeaderProps,
} from 'uiSrc/pages/browser/modules'
-import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
import { ZSetDetailsTable } from './zset-details-table'
import AddZsetMembers from './add-zset-members/AddZsetMembers'
import { AddItemsAction } from '../key-details-actions'
@@ -51,27 +51,27 @@ const ZSetDetails = (props: Props) => {
)
return (
-
+
-
{!loading && (
-
+
-
+
)}
{isAddItemPanelOpen && (
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/add-zset-members/AddZsetMembers.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/add-zset-members/AddZsetMembers.tsx
index 86614e3805..09d3cd0d52 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/add-zset-members/AddZsetMembers.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/add-zset-members/AddZsetMembers.tsx
@@ -2,6 +2,9 @@ import React, { useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { toNumber } from 'lodash'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import { stringToBuffer, validateScoreNumber } from 'uiSrc/utils'
import { isNaNConvertedString } from 'uiSrc/utils/numbers'
import { selectedKeyDataSelector } from 'uiSrc/slices/browser/keys'
@@ -19,13 +22,6 @@ import {
import AddMultipleFields from 'uiSrc/pages/browser/components/add-multiple-fields'
import { ISetMemberState } from 'uiSrc/pages/browser/components/add-key/AddKeySet/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextInput } from 'uiSrc/components/base/inputs'
import styles from './styles.module.scss'
export interface Props {
@@ -184,15 +180,15 @@ const AddZsetMembers = (props: Props) => {
onClickAdd={addMember}
>
{(item, index) => (
-
-
-
-
+
+
+
+ onChange={(value) =>
handleMemberChange('name', item.id, value)
}
ref={
@@ -201,17 +197,17 @@ const AddZsetMembers = (props: Props) => {
disabled={loading}
data-testid="member-name"
/>
-
-
-
-
-
+
+
+
+
+ onChange={(value) =>
handleMemberChange('score', item.id, value)
}
onBlur={() => {
@@ -220,37 +216,37 @@ const AddZsetMembers = (props: Props) => {
disabled={loading}
data-testid="member-score"
/>
-
-
-
+
+
+
)}
<>
-
-
+
+
- closePanel(true)}
data-testid="cancel-members-btn"
>
Cancel
-
+
-
-
+
+
-
-
+
+
>
>
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/zset-details-table/ZSetDetailsTable.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/zset-details-table/ZSetDetailsTable.tsx
index 207fecb6d8..0db84d6814 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/zset-details-table/ZSetDetailsTable.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/zset-details/zset-details-table/ZSetDetailsTable.tsx
@@ -3,6 +3,7 @@ import { useDispatch, useSelector } from 'react-redux'
import { toNumber, isNumber } from 'lodash'
import cx from 'classnames'
import { CellMeasurerCache } from 'react-virtualized'
+import { RiText } from 'uiBase/text'
import {
appContextBrowserKeyDetails,
updateKeyDetailsSizes,
@@ -70,14 +71,13 @@ import {
FormattedValue,
} from 'uiSrc/pages/browser/modules/key-details/shared'
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
import {
AddMembersToZSetDto,
SearchZSetMembersResponse,
} from 'apiSrc/modules/browser/z-set/dto'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const suffix = '_zset'
const headerHeight = 60
@@ -336,7 +336,7 @@ const ZSetDetailsTable = (props: Props) => {
)
return (
- {
tooltipContent={tooltipContent}
/>
-
+
)
},
},
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-input/EditableInput.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-input/EditableInput.tsx
index d505a660d2..dcd0c8e079 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-input/EditableInput.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-input/EditableInput.tsx
@@ -1,13 +1,13 @@
import React, { useState } from 'react'
import cx from 'classnames'
-import { RiTooltip } from 'uiSrc/components'
+import { RiText } from 'uiBase/text'
+import { EditIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { RiTooltip } from 'uiBase/display'
import { StopPropagation } from 'uiSrc/components/virtual-table'
import InlineItemEditor from 'uiSrc/components/inline-item-editor'
-import { Text } from 'uiSrc/components/base/text'
-import { EditIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
import styles from './styles.module.scss'
export interface Props {
@@ -51,20 +51,20 @@ const EditableInput = (props: Props) => {
onMouseLeave={() => setIsHovering(false)}
data-testid={`${testIdPrefix}_content-value-${field}`}
>
-
{children}
-
+
{isHovering && (
- {
const isDisabledApply = (): boolean => !!(isLoading || isDisabled)
const button = (
- {
>
{content}
{isDelayed && (
-
+
)}
{!isPopoverOpen && isHovering && !isDelayed && button}
@@ -145,29 +143,29 @@ const EditablePopover = (props: Props) => {
>
{children}
-
-
-
-
+
+
+ handleDecline()}
data-testid="cancel-btn"
>
Cancel
-
-
+
+
-
-
+
Save
-
-
-
+
+
+
)
diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-textarea/EditableTextArea.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-textarea/EditableTextArea.tsx
index c57dc7e788..8b504915c4 100644
--- a/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-textarea/EditableTextArea.tsx
+++ b/redisinsight/ui/src/pages/browser/modules/key-details/shared/editable-textarea/EditableTextArea.tsx
@@ -2,13 +2,13 @@ import React, { ChangeEvent, Ref, useEffect, useRef, useState } from 'react'
import AutoSizer from 'react-virtualized-auto-sizer'
import cx from 'classnames'
-import { StopPropagation } from 'uiSrc/components/virtual-table'
+import { RiText } from 'uiBase/text'
+import { EditIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { RiTextArea } from 'uiBase/inputs'
+import { RiTooltip } from 'uiBase/display'
import InlineItemEditor from 'uiSrc/components/inline-item-editor'
-import { RiTooltip } from 'uiSrc/components'
-import { Text } from 'uiSrc/components/base/text'
-import { EditIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { TextArea } from 'uiSrc/components/base/inputs'
+import { StopPropagation } from 'uiSrc/components/virtual-table'
import styles from './styles.module.scss'
export interface Props {
@@ -93,20 +93,20 @@ const EditableTextArea = (props: Props) => {
onMouseLeave={() => setIsHovering(false)}
data-testid={`${testIdPrefix}_content-value-${field}`}
>
-
{children}
-
+
{isHovering && (
- {
approveText={approveText}
approveByValidation={() => approveByValidation?.(value)}
>
-
-
+
)}
{nodes && (
-
-
Memory
+ Memory
@@ -135,7 +134,7 @@ const ClusterDetailsGraphics = ({
-
Keys
+ Keys
diff --git a/redisinsight/ui/src/pages/cluster-details/components/cluster-details-header/ClusterDetailsHeader.tsx b/redisinsight/ui/src/pages/cluster-details/components/cluster-details-header/ClusterDetailsHeader.tsx
index b2ce41ab18..27a6c66de6 100644
--- a/redisinsight/ui/src/pages/cluster-details/components/cluster-details-header/ClusterDetailsHeader.tsx
+++ b/redisinsight/ui/src/pages/cluster-details/components/cluster-details-header/ClusterDetailsHeader.tsx
@@ -3,7 +3,8 @@ import { useSelector } from 'react-redux'
import cx from 'classnames'
import { capitalize } from 'lodash'
-import { LoadingContent } from 'uiSrc/components/base/layout'
+import { RiLoadingContent } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import {
truncateNumberToFirstUnit,
formatLongName,
@@ -17,8 +18,7 @@ import {
} from 'uiSrc/slices/interfaces'
import AnalyticsTabs from 'uiSrc/components/analytics-tabs'
import { clusterDetailsSelector } from 'uiSrc/slices/analytics/clusterDetails'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
import styles from './styles.module.scss'
@@ -95,7 +95,7 @@ const ClusterDetailsHeader = () => {
{loading && !data && (
-
+
)}
{data && (
@@ -109,10 +109,10 @@ const ClusterDetailsHeader = () => {
key={label}
data-testid={`cluster-details-item-${label}`}
>
-
+
{value}
-
-
{label}
+
+
{label}
))}
diff --git a/redisinsight/ui/src/pages/database-analysis/components/analysis-ttl-view/ExpirationGroupsView.tsx b/redisinsight/ui/src/pages/database-analysis/components/analysis-ttl-view/ExpirationGroupsView.tsx
index 81337887b1..4f51717799 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/analysis-ttl-view/ExpirationGroupsView.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/analysis-ttl-view/ExpirationGroupsView.tsx
@@ -3,6 +3,8 @@ import React, { useEffect, useState } from 'react'
import cx from 'classnames'
import AutoSizer from 'react-virtualized-auto-sizer'
+import { RiSwitchInput } from 'uiBase/inputs'
+import { RiTitle } from 'uiBase/text'
import {
DEFAULT_EXTRAPOLATION,
SectionName,
@@ -25,8 +27,6 @@ import {
dbAnalysisReportsSelector,
setShowNoExpiryGroup,
} from 'uiSrc/slices/analytics/dbAnalysis'
-import { SwitchInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
import { DatabaseAnalysis } from 'apiSrc/modules/database-analysis/models'
import styles from './styles.module.scss'
@@ -110,11 +110,11 @@ const ExpirationGroupsView = (props: Props) => {
-
+
MEMORY LIKELY TO BE FREED OVER TIME
-
+
{extrapolation !== DEFAULT_EXTRAPOLATION && (
- {
/>
)}
-
& {
+export const TableTextBtn = styled(RiEmptyButton)<
+ React.ComponentProps & {
$expanded?: boolean
}
>`
diff --git a/redisinsight/ui/src/pages/database-analysis/components/base/TextBtn.tsx b/redisinsight/ui/src/pages/database-analysis/components/base/TextBtn.tsx
index 09fdf8c39d..c8c7ba494d 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/base/TextBtn.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/base/TextBtn.tsx
@@ -1,13 +1,13 @@
import styled from 'styled-components'
import React from 'react'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
+import { RiEmptyButton } from 'uiBase/forms'
/**
* Text button component
*
* This is how we can implement custom styles
*/
-export const TextBtn = styled(EmptyButton)<
- React.ComponentProps & {
+export const TextBtn = styled(RiEmptyButton)<
+ React.ComponentProps & {
$active?: boolean
}
>`
diff --git a/redisinsight/ui/src/pages/database-analysis/components/data-nav-tabs/DatabaseAnalysisTabs.tsx b/redisinsight/ui/src/pages/database-analysis/components/data-nav-tabs/DatabaseAnalysisTabs.tsx
index df0fcb62ac..c6592da606 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/data-nav-tabs/DatabaseAnalysisTabs.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/data-nav-tabs/DatabaseAnalysisTabs.tsx
@@ -1,6 +1,8 @@
import React, { useMemo } from 'react'
import { isNull } from 'lodash'
import { useDispatch, useSelector } from 'react-redux'
+import { RiTabs, TabInfo } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
import { EmptyMessage } from 'uiSrc/pages/database-analysis/constants'
import { EmptyAnalysisMessage } from 'uiSrc/pages/database-analysis/components'
import {
@@ -13,8 +15,6 @@ import { Nullable } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { renderOnboardingTourWithChild } from 'uiSrc/utils/onboarding'
import { recommendationsSelector } from 'uiSrc/slices/recommendations/recommendations'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { Text } from 'uiSrc/components/base/text'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
import {
ShortDatabaseAnalysis,
@@ -47,18 +47,18 @@ const DatabaseAnalysisTabs = (props: Props) => {
const tabs: TabInfo[] = useMemo(
() => [
{
- label: Data Summary ,
+ label: Data Summary ,
value: DatabaseAnalysisViewTab.DataSummary,
content: ,
},
{
label: renderOnboardingTourWithChild(
-
+
Tips{' '}
{data?.recommendations?.length
? `(${data.recommendations.length})`
: ''}
- ,
+ ,
{
options: { ...ONBOARDING_FEATURES.ANALYTICS_RECOMMENDATIONS },
anchorPosition: 'downLeft',
@@ -122,7 +122,7 @@ const DatabaseAnalysisTabs = (props: Props) => {
}
return (
- (
<>
-
Use Workbench Guides and Tutorials
-
+
{' to quickly load the data.'}
>
),
@@ -50,10 +49,10 @@ const EmptyAnalysisMessage = (props: Props) => {
return (
- {title}
-
+ {title}
+
{text(Pages.workbench(instanceId))}
-
+
)
diff --git a/redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx b/redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx
index 6699ecb31e..ad792ecd25 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx
@@ -4,7 +4,11 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import styled from 'styled-components'
-import { CaretRightIcon } from 'uiSrc/components/base/icons'
+import { CaretRightIcon, RiIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiHideFor } from 'uiBase/utils'
+import { RiPrimaryButton, RiSelect } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import { createNewAnalysis } from 'uiSrc/slices/analytics/dbAnalysis'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
import { getApproximatePercentage } from 'uiSrc/utils/validations'
@@ -18,18 +22,13 @@ import {
ANALYZE_CLUSTER_TOOLTIP_MESSAGE,
ANALYZE_TOOLTIP_MESSAGE,
} from 'uiSrc/constants/recommendations'
-import { FormatedDate, RiTooltip } from 'uiSrc/components'
+import { FormatedDate } from 'uiSrc/components'
import { DEFAULT_DELIMITER } from 'uiSrc/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { HideFor } from 'uiSrc/components/base/utils/ShowHide'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { ShortDatabaseAnalysis } from 'apiSrc/modules/database-analysis/models'
import { AnalysisProgress } from 'apiSrc/modules/database-analysis/models/analysis-progress'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/tooltip'
const HeaderSelect = styled(RiSelect)`
border: 0 none;
@@ -88,22 +87,22 @@ const Header = (props: Props) => {
return (
-
{!!items.length && (
-
-
-
-
-
+
+
+
+
+
Report generated on:
-
-
-
-
+
+
+
+
@@ -113,10 +112,10 @@ const Header = (props: Props) => {
onChange={(value: string) => onChangeSelectedAnalysis(value)}
data-testid="select-report"
/>
-
+
{!!progress && (
-
-
+ {
size="s"
data-testid="bulk-delete-summary"
>
- {
progress.total,
progress.processed,
)}
-
+
{` (${numberWithSpaces(progress.processed)}`}/
{numberWithSpaces(progress.total)}
{' keys) '}
-
-
+
+
)}
-
-
+
+
)}
-
-
-
-
+
+
+ {
onClick={handleClick}
>
New Report
-
-
-
+
+
+
{
data-testid="db-new-reports-icon"
/>
-
-
-
-
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/Recommendations.tsx b/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/Recommendations.tsx
index 264c0566b0..b2088dbeee 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/Recommendations.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/recommendations-view/Recommendations.tsx
@@ -4,6 +4,11 @@ import { useHistory, useParams } from 'react-router-dom'
import { isNull } from 'lodash'
import cx from 'classnames'
+import { RiFlexItem, RiRow, RiCard } from 'uiBase/layout'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiAccordion, RiLink } from 'uiBase/display'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import {
FeatureFlagComponent,
@@ -25,14 +30,6 @@ import { recommendationsSelector } from 'uiSrc/slices/recommendations/recommenda
import { sortRecommendations } from 'uiSrc/utils/recommendation'
import { openTutorialByPath } from 'uiSrc/slices/panels/sidePanels'
import { findTutorialPath } from 'uiSrc/utils'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-
-import { RiAccordion } from 'uiSrc/components/base/display/accordion/RiAccordion'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Card } from 'uiSrc/components/base/layout'
import styles from './styles.module.scss'
@@ -80,42 +77,49 @@ const Recommendations = () => {
) => event.stopPropagation()
const renderButtonContent = (badges: string[], id: string) => (
-
+
-
+
)
const renderLabel = (redisStack: boolean, title: string, id: string) => (
-
-
+
{redisStack && (
-
+
-
-
-
-
- )}
-
- {title}
-
+
+
+
+ )}
+
+ {title}
+
)
if (loading) {
@@ -142,10 +146,10 @@ const Recommendations = () => {
className={styles.noRecommendationsIcon}
data-testid="no=recommendations-icon"
/>
- AMAZING JOB!
- No Tips at the moment,
+ AMAZING JOB!
+ No Tips at the moment,
- keep up the good work!
+ keep up the good work!
)
}
@@ -186,7 +190,7 @@ const Recommendations = () => {
onOpenChange={(isOpen) => handleToggle(isOpen, id)}
data-testid={`${id}-accordion`}
>
-
+
{
}
/>
)}
-
+
{tutorialId && (
-
goToTutorial(tutorialId, id)}
data-testid={`${id}-to-tutorial-btn`}
>
Tutorial
-
+
)}
diff --git a/redisinsight/ui/src/pages/database-analysis/components/summary-per-data/SummaryPerData.tsx b/redisinsight/ui/src/pages/database-analysis/components/summary-per-data/SummaryPerData.tsx
index 8f5ef62d85..468c1f7995 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/summary-per-data/SummaryPerData.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/summary-per-data/SummaryPerData.tsx
@@ -1,6 +1,9 @@
import cx from 'classnames'
import React, { useCallback, useEffect, useState } from 'react'
+import { RiSwitchInput } from 'uiBase/inputs'
+import { RiTitle } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { DonutChart } from 'uiSrc/components/charts'
import { ChartData } from 'uiSrc/components/charts/donut-chart/DonutChart'
import { GROUP_TYPES_COLORS, GroupTypesColors } from 'uiSrc/constants'
@@ -16,9 +19,6 @@ import {
} from 'uiSrc/utils'
import { getPercentage, numberWithSpaces } from 'uiSrc/utils/numbers'
-import { SwitchInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import {
DatabaseAnalysis,
SimpleTypeSummary,
@@ -171,11 +171,11 @@ const SummaryPerData = ({
data-testid="summary-per-data"
>
-
+
SUMMARY PER DATA TYPE
-
+
{extrapolation !== DEFAULT_EXTRAPOLATION && (
-
- Memory
+ Memory
-
Keys
+ Keys
(
-
-
+
+
)
diff --git a/redisinsight/ui/src/pages/database-analysis/components/top-keys/Table.tsx b/redisinsight/ui/src/pages/database-analysis/components/top-keys/Table.tsx
index 57597deeb7..4c5dfb2b36 100644
--- a/redisinsight/ui/src/pages/database-analysis/components/top-keys/Table.tsx
+++ b/redisinsight/ui/src/pages/database-analysis/components/top-keys/Table.tsx
@@ -1,10 +1,11 @@
-import { isNil } from 'lodash'
import React from 'react'
+import { isNil } from 'lodash'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
-import { ColorText } from 'uiSrc/components/base/text'
-import { GroupBadge, RiTooltip } from 'uiSrc/components'
+import { RiColorText } from 'uiBase/text'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
+import { GroupBadge } from 'uiSrc/components'
import { Pages } from 'uiSrc/constants'
import {
SCAN_COUNT_DEFAULT,
@@ -38,8 +39,8 @@ import {
} from 'uiSrc/utils'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
import { TableTextBtn } from 'uiSrc/pages/database-analysis/components/base/TableTextBtn'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
import { Key } from 'apiSrc/modules/database-analysis/models/key'
+import { RiTooltip } from 'uiBase/tooltip'
export interface Props {
data: Key[]
@@ -142,20 +143,20 @@ const TopKeysTable = ({
}) => {
if (isNil(value)) {
return (
-
-
-
+
)
}
if (value === -1) {
return (
-
+
No limit
-
+
)
}
@@ -173,9 +174,9 @@ const TopKeysTable = ({
>
}
>
-
+
{truncateNumberToFirstUnit(value)}
-
+
)
@@ -193,13 +194,13 @@ const TopKeysTable = ({
}) => {
if (isNil(value)) {
return (
-
-
-
+
)
}
const [number, size] = formatBytes(value, 3, true)
@@ -219,12 +220,12 @@ const TopKeysTable = ({
}
data-testid="usedMemory-tooltip"
>
-
{number} {size}
-
+
)
},
@@ -241,13 +242,13 @@ const TopKeysTable = ({
}) => {
if (isNil(value)) {
return (
-
-
-
+
)
}
@@ -259,12 +260,12 @@ const TopKeysTable = ({
}
data-testid="usedMemory-tooltip"
>
-
{numberWithSpaces(value)}
-
+
)
},
@@ -273,7 +274,7 @@ const TopKeysTable = ({
return (
-
@@ -30,12 +30,16 @@ const TopKeys = ({ data, loading }: Props) => {
return (
-
+
{topKeysLength.length < MAX_TOP_KEYS &&
topKeysMemory?.length < MAX_TOP_KEYS
? 'TOP KEYS'
: `TOP ${MAX_TOP_KEYS} KEYS`}
-
+
{
{tableView === TableView.MEMORY && (
-
{
/>
)}
{tableView === TableView.KEYS && (
-
-
+
{formatNumber} {size}
-
+
-
+
{extrapolate(
type.keys,
{ extrapolation, apply: isExtrapolated },
(val: number) => numberWithSpaces(Math.round(val)),
)}
-
+
)
@@ -215,12 +215,12 @@ const NameSpacesTable = ({
content={`${formatValueBytes} B`}
data-testid="usedMemory-tooltip"
>
-
{formatValue} {size}
-
+
)
},
@@ -236,13 +236,13 @@ const NameSpacesTable = ({
},
}) => (
-
+
{extrapolate(
value,
{ extrapolation, apply: isExtrapolated },
(val: number) => numberWithSpaces(Math.round(val)),
)}
-
+
),
},
@@ -250,13 +250,13 @@ const NameSpacesTable = ({
id: 'expand',
header: () => null,
size: 40,
- cell: ({ row }) => ,
+ cell: ({ row }) => ,
},
]
return (
-
{
return (
-
+
TOP NAMESPACES
-
+
-
No namespaces to display
+
No namespaces to display
{'Configure the delimiter in '}
-
Tree View
-
+
{' to customize the namespaces displayed.'}
@@ -92,9 +92,9 @@ const TopNamespace = (props: Props) => {
return (
-
+
TOP NAMESPACES
-
+
{
by Number of Keys
{extrapolation !== DEFAULT_EXTRAPOLATION && (
- {
{tableView === TableView.MEMORY && (
-
{
/>
)}
{tableView === TableView.KEYS && (
- {
return (
-
-
+
+
{
)}
{!isInstanceExists && !loading && !loadingChanging ? (
-
+
-
+
) : (
{
/>
)}
-
-
+
+
)
diff --git a/redisinsight/ui/src/pages/home/components/add-database-screen/AddDatabaseScreen.tsx b/redisinsight/ui/src/pages/home/components/add-database-screen/AddDatabaseScreen.tsx
index 8c17dfacb2..c96d3d120a 100644
--- a/redisinsight/ui/src/pages/home/components/add-database-screen/AddDatabaseScreen.tsx
+++ b/redisinsight/ui/src/pages/home/components/add-database-screen/AddDatabaseScreen.tsx
@@ -3,6 +3,10 @@ import { useFormik } from 'formik'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router'
import { toNumber } from 'lodash'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiEmptyButton, RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
import { Nullable, parseRedisUrl } from 'uiSrc/utils'
import { AddDbType, DEFAULT_TIMEOUT } from 'uiSrc/pages/home/constants'
@@ -13,20 +17,12 @@ import {
testInstanceStandaloneAction,
} from 'uiSrc/slices/instances/instances'
import { Pages } from 'uiSrc/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- EmptyButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
import ConnectivityOptions from './components/connectivity-options'
import ConnectionUrl from './components/connection-url'
import { Values } from './constants'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
onSelectOption: (type: AddDbType, db: Nullable>) => void
@@ -105,23 +101,23 @@ const AddDatabaseScreen = (props: Props) => {
return (
-
-
+
+
-
-
+
+
-
-
+
+
{ConnectionUrlError} : null}
>
- {
data-testid="btn-test-connection"
>
Test Connection
-
+
-
-
-
-
-
+
+
+
+ handleProceedForm(AddDbType.manual)}
data-testid="btn-connection-settings"
>
Connection Settings
-
-
-
+
+
+
{ConnectionUrlError} : null}
>
- {
data-testid="btn-submit"
>
Add Database
-
+
-
-
-
-
+
+
+
+
-
+
Or
-
+
(
-
Connection URL
@@ -42,7 +42,7 @@ const ConnectionUrl = ({ value, onChange }: Props) => (
}
>
- (
style={{ height: 88 }}
data-testid="connection-url"
/>
-
+
)
export default ConnectionUrl
diff --git a/redisinsight/ui/src/pages/home/components/add-database-screen/components/connectivity-options/ConnectivityOptions.tsx b/redisinsight/ui/src/pages/home/components/add-database-screen/components/connectivity-options/ConnectivityOptions.tsx
index e7ad4c6b54..898fa32a33 100644
--- a/redisinsight/ui/src/pages/home/components/add-database-screen/components/connectivity-options/ConnectivityOptions.tsx
+++ b/redisinsight/ui/src/pages/home/components/add-database-screen/components/connectivity-options/ConnectivityOptions.tsx
@@ -2,6 +2,11 @@ import React from 'react'
import cx from 'classnames'
import styled from 'styled-components'
+import { RiCol, RiFlexItem, RiGrid } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiTitle } from 'uiBase/text'
+import { RiBadge, RiLink } from 'uiBase/display'
import { AddDbType } from 'uiSrc/pages/home/constants'
import { FeatureFlagComponent, OAuthSsoHandlerDialog } from 'uiSrc/components'
import { getUtmExternalLink } from 'uiSrc/utils/links'
@@ -12,13 +17,6 @@ import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import CloudIcon from 'uiSrc/assets/img/oauth/cloud_centered.svg?react'
import RocketIcon from 'uiSrc/assets/img/oauth/rocket.svg?react'
-import { Col, FlexItem, Grid } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
-
-import { Link } from 'uiSrc/components/base/link/Link'
import { CONNECTIVITY_OPTIONS } from '../../constants'
import styles from './styles.module.scss'
@@ -28,7 +26,7 @@ export interface Props {
onClose?: () => void
}
-const NewCloudLink = styled(Link)`
+const NewCloudLink = styled(RiLink)`
min-width: 160px;
display: flex;
align-items: center;
@@ -71,25 +69,25 @@ const ConnectivityOptions = (props: Props) => {
return (
<>
-
+
Get started with Redis Cloud account
-
-
-
-
-
+
+
+
+ onClickOption(AddDbType.cloud)}
data-testid="discover-cloud-btn"
>
-
+
Add databases
-
-
-
+
+
+
-
+
{(ssoCloudHandlerClick, isSSOEnabled) => (
{
target="_blank"
>
-
+
New database
-
+
)}
-
+
-
-
+
+
-
+
-
+
More connectivity options
-
-
-
+
+
+
{CONNECTIVITY_OPTIONS.map(({ id, type, title, icon }) => (
-
-
+ onClickOption(type)}
@@ -137,10 +135,10 @@ const ConnectivityOptions = (props: Props) => {
>
{icon?.({ className: styles.btnIcon })}
{title}
-
-
+
+
))}
-
+
>
)
diff --git a/redisinsight/ui/src/pages/home/components/add-database-screen/constants.tsx b/redisinsight/ui/src/pages/home/components/add-database-screen/constants.tsx
index 9d78cd56c5..44cdd027fc 100644
--- a/redisinsight/ui/src/pages/home/components/add-database-screen/constants.tsx
+++ b/redisinsight/ui/src/pages/home/components/add-database-screen/constants.tsx
@@ -1,9 +1,9 @@
import React from 'react'
+import { RiIcon } from 'uiBase/icons'
import { AddDbType } from 'uiSrc/pages/home/constants'
import ShieldIcon from 'uiSrc/assets/img/shield.svg?react'
import RedisSoftwareIcon from 'uiSrc/assets/img/redis-software.svg?react'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
export interface Values {
connectionURL: string
diff --git a/redisinsight/ui/src/pages/home/components/cloud-connection/CloudConnectionFormWrapper.tsx b/redisinsight/ui/src/pages/home/components/cloud-connection/CloudConnectionFormWrapper.tsx
index 7b1f12cc1d..9898fb5324 100644
--- a/redisinsight/ui/src/pages/home/components/cloud-connection/CloudConnectionFormWrapper.tsx
+++ b/redisinsight/ui/src/pages/home/components/cloud-connection/CloudConnectionFormWrapper.tsx
@@ -2,6 +2,7 @@ import React, { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
+import { RiTitle } from 'uiBase/text'
import { Pages } from 'uiSrc/constants'
import {
cloudSelector,
@@ -12,7 +13,6 @@ import { resetErrors } from 'uiSrc/slices/app/notifications'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
-import { Title } from 'uiSrc/components/base/text/Title'
import CloudConnectionForm from './cloud-connection-form'
export interface Props {
@@ -33,7 +33,7 @@ const CloudConnectionFormWrapper = ({ onClose }: Props) => {
const { setModalHeader } = useModalHeader()
useEffect(() => {
- setModalHeader(Discover Cloud databases , true)
+ setModalHeader(Discover Cloud databases , true)
return () => {
setModalHeader(null)
diff --git a/redisinsight/ui/src/pages/home/components/cloud-connection/cloud-connection-form/CloudConnectionForm.tsx b/redisinsight/ui/src/pages/home/components/cloud-connection/cloud-connection-form/CloudConnectionForm.tsx
index 2a0c173ff1..1dd55b8fb9 100644
--- a/redisinsight/ui/src/pages/home/components/cloud-connection/cloud-connection-form/CloudConnectionForm.tsx
+++ b/redisinsight/ui/src/pages/home/components/cloud-connection/cloud-connection-form/CloudConnectionForm.tsx
@@ -4,6 +4,18 @@ import { FormikErrors, useFormik } from 'formik'
import { isEmpty } from 'lodash'
import { useSelector } from 'react-redux'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiWindowEvent } from 'uiBase/utils'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { InfoIcon } from 'uiBase/icons'
+import {
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ RiRadioGroup,
+} from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiTextInput } from 'uiBase/inputs'
import * as keys from 'uiSrc/constants/keys'
import { validateField } from 'uiSrc/utils/validations'
import validationErrors from 'uiSrc/constants/validationErrors'
@@ -14,18 +26,6 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { OAuthAutodiscovery } from 'uiSrc/components/oauth/oauth-sso'
import { MessageCloudApiKeys } from 'uiSrc/pages/home/components/form/Messages'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { WindowEvent } from 'uiSrc/components/base/utils/WindowEvent'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Text } from 'uiSrc/components/base/text'
-import { RiRadioGroup } from 'uiSrc/components/base/forms/radio-group/RadioGroup'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { ICloudConnectionSubmit } from '../CloudConnectionFormWrapper'
import styles from '../styles.module.scss'
@@ -120,14 +120,14 @@ const CloudConnectionForm = (props: Props) => {
}
const CancelButton = ({ onClick }: { onClick: () => void }) => (
-
Cancel
-
+
)
const SubmitButton = ({ onClick, submitIsDisabled }: ISubmitButton) => (
@@ -147,7 +147,7 @@ const CloudConnectionForm = (props: Props) => {
) : null
}
>
- {
data-testid="btn-submit"
>
Submit
-
+
)
@@ -183,13 +183,13 @@ const CloudConnectionForm = (props: Props) => {
const CloudApiForm = (
-
-
+
+
-
-
-
-
+
+
+ {
placeholder={fieldDisplayNames.accessKey}
value={formik.values.accessKey}
autoComplete="off"
- onChange={value => {
- formik.setFieldValue(
- 'accessKey',
- validateField(value.trim()),
- )
+ onChange={(value) => {
+ formik.setFieldValue('accessKey', validateField(value.trim()))
}}
/>
-
-
-
-
-
-
-
+
+
+
+
+
+ {
placeholder={fieldDisplayNames.secretKey}
value={formik.values.secretKey}
autoComplete="off"
- onChange={value => {
- formik.setFieldValue(
- 'secretKey',
- validateField(value.trim()),
- )
+ onChange={(value) => {
+ formik.setFieldValue('secretKey', validateField(value.trim()))
}}
/>
-
-
-
+
+
+
@@ -236,13 +230,13 @@ const CloudConnectionForm = (props: Props) => {
return (
-
-
-
+
+
+
Connect with:
-
-
-
+
+
+
{
onChange={(id) => setType(id as CloudConnectionOptions)}
data-testid="cloud-options"
/>
-
-
-
+
+
+
{type === CloudConnectionOptions.Account && (
{
const { loading, credentials } = useSelector(clusterSelector)
useEffect(() => {
- setModalHeader(Redis Software , true)
+ setModalHeader(Redis Software , true)
return () => {
setModalHeader(null)
diff --git a/redisinsight/ui/src/pages/home/components/cluster-connection/cluster-connection-form/ClusterConnectionForm.tsx b/redisinsight/ui/src/pages/home/components/cluster-connection/cluster-connection-form/ClusterConnectionForm.tsx
index 80c9f8315c..760eb0f145 100644
--- a/redisinsight/ui/src/pages/home/components/cluster-connection/cluster-connection-form/ClusterConnectionForm.tsx
+++ b/redisinsight/ui/src/pages/home/components/cluster-connection/cluster-connection-form/ClusterConnectionForm.tsx
@@ -3,6 +3,12 @@ import ReactDOM from 'react-dom'
import { isEmpty } from 'lodash'
import { FormikErrors, useFormik } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiWindowEvent } from 'uiBase/utils'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { InfoIcon, RiIcon } from 'uiBase/icons'
+import { RiNumericInput, RiPasswordInput, RiTextInput } from 'uiBase/inputs'
+import { RiTooltip } from 'uiBase/display'
import * as keys from 'uiSrc/constants/keys'
import { MAX_PORT_NUMBER, validateField } from 'uiSrc/utils/validations'
import { handlePasteHostName } from 'uiSrc/utils'
@@ -10,17 +16,6 @@ import validationErrors from 'uiSrc/constants/validationErrors'
import { ICredentialsRedisCluster } from 'uiSrc/slices/interfaces'
import { MessageEnterpriceSoftware } from 'uiSrc/pages/home/components/form/Messages'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { WindowEvent } from 'uiSrc/components/base/utils/WindowEvent'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { NumericInput, PasswordInput, TextInput } from 'uiSrc/components/base/inputs'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
export interface Props {
host: string
@@ -157,14 +152,14 @@ const ClusterConnectionForm = (props: Props) => {
)
const CancelButton = ({ onClick }: { onClick: () => void }) => (
-
Cancel
-
+
)
const SubmitButton = ({ onClick, submitIsDisabled }: ISubmitButton) => (
@@ -184,7 +179,7 @@ const ClusterConnectionForm = (props: Props) => {
) : null
}
>
- {
data-testid="btn-submit"
>
Submit
-
+
)
@@ -221,39 +216,36 @@ const ClusterConnectionForm = (props: Props) => {
-
-
-
-
+
+
+ }
>
- {
- formik.setFieldValue(
- 'host',
- validateField(value.trim()),
- )
+ onChange={(value) => {
+ formik.setFieldValue('host', validateField(value.trim()))
}}
onPaste={(event: React.ClipboardEvent) =>
handlePasteHostName(onHostNamePaste, event)
}
/>
-
-
+
+
-
-
+
- {
value={Number(formik.values.port)}
onChange={(value) => formik.setFieldValue('port', value)}
/>
-
-
-
+
+
+
-
-
-
-
+
+
+ {
value={formik.values.username}
onChange={formik.handleChange}
/>
-
-
+
+
-
-
-
+
+ {
onChange={formik.handleChange}
autoComplete="new-password"
/>
-
-
-
+
+
+
diff --git a/redisinsight/ui/src/pages/home/components/database-alias/DatabaseAlias.tsx b/redisinsight/ui/src/pages/home/components/database-alias/DatabaseAlias.tsx
index 81a9e34109..6e503bf706 100644
--- a/redisinsight/ui/src/pages/home/components/database-alias/DatabaseAlias.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-alias/DatabaseAlias.tsx
@@ -8,7 +8,12 @@ import {
ArrowLeftIcon,
CopyIcon,
DoubleChevronRightIcon,
-} from 'uiSrc/components/base/icons'
+ RiIcon,
+} from 'uiBase/icons'
+import { RiFlexItem, RiGrid, RiRow } from 'uiBase/layout'
+import { RiIconButton, RiPrimaryButton, RiFormField } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiTextInput } from 'uiBase/inputs'
import { BuildType } from 'uiSrc/constants/env'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { getDbIndex, Nullable } from 'uiSrc/utils'
@@ -28,14 +33,8 @@ import {
resetRdiContext,
setAppContextInitialState,
} from 'uiSrc/slices/app/context'
-import { FlexItem, Grid, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton, PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
alias: string
@@ -145,22 +144,22 @@ const DatabaseAlias = (props: Props) => {
return (
<>
-
+
{isCloneMode && (
-
-
+
-
+
)}
-
-
+
+
{isRediStack && (
-
+
{
data-testid="redis-stack-icon"
/>
-
+
)}
- {
}}
>
{!isCloneMode && (isEditing || isLoading) ? (
-
-
+
+
{
isDisabled={!value}
declineOnUnmount={false}
>
-
@@ -216,7 +215,7 @@ const DatabaseAlias = (props: Props) => {
)
}
>
- {
value={value}
maxLength={500}
loading={isLoading}
- onChange={value => onChange(value)}
+ onChange={(value) => onChange(value)}
autoComplete="off"
data-testid="alias-input"
/>
-
+
{value}
-
-
+
+
) : (
- {
className={cx(styles.aliasEditIcon)}
/>
)}
-
+
)}
-
-
-
-
+
+
+
+
{!isCloneMode && (
-
-
-
+
+ {
onClick={handleOpen}
>
Open
-
-
+
+
{server?.buildType !== BuildType.RedisStack && (
-
-
+ {
onClick={handleClone}
>
Clone
-
-
+
+
)}
-
+
)}
>
)
diff --git a/redisinsight/ui/src/pages/home/components/database-list-component/DatabasesListWrapper.tsx b/redisinsight/ui/src/pages/home/components/database-list-component/DatabasesListWrapper.tsx
index 7c7daa4ca0..f0e34c9728 100644
--- a/redisinsight/ui/src/pages/home/components/database-list-component/DatabasesListWrapper.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-list-component/DatabasesListWrapper.tsx
@@ -2,6 +2,7 @@ import {
Criteria,
EuiTableFieldDataColumnType,
PropertySort,
+
} from '@elastic/eui'
import cx from 'classnames'
import { saveAs } from 'file-saver'
@@ -17,15 +18,18 @@ import React, {
import { useDispatch, useSelector } from 'react-redux'
import { useHistory, useLocation } from 'react-router-dom'
import AutoSizer from 'react-virtualized-auto-sizer'
-import { Text, ColorText } from 'uiSrc/components/base/text'
+import { RiText, RiColorText } from 'uiBase/text'
import {
MoreactionsIcon,
EditIcon,
TagIcon,
CopyIcon,
RiIcon,
-} from 'uiSrc/components/base/icons'
+} from 'uiBase/icons'
+import { RiPopover, RiTooltip } from 'uiBase/index'
+import { RiEmptyButton, RiIconButton } from 'uiBase/forms'
+import { RiLink } from 'uiBase/display'
import DatabaseListModules from 'uiSrc/components/database-list-modules/DatabaseListModules'
import ItemList from 'uiSrc/components/item-list'
import {
@@ -79,16 +83,13 @@ import { CREATE_CLOUD_DB_ID, HELP_LINKS } from 'uiSrc/pages/home/constants'
import { Tag } from 'uiSrc/slices/interfaces/tag'
import { FeatureFlagComponent } from 'uiSrc/components'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { EmptyButton, IconButton } from 'uiSrc/components/base/forms/buttons'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RIResizeObserver } from 'uiSrc/components/base/utils'
import DbStatus from '../db-status'
import { TagsCell } from '../tags-cell/TagsCell'
import { TagsCellHeader } from '../tags-cell/TagsCellHeader'
import styles from './styles.module.scss'
+import { RIResizeObserver } from 'uiBase/utils'
export interface Props {
instances: Instance[]
@@ -350,7 +351,7 @@ const DatabasesListWrapper = (props: Props) => {
})
const controlsButton = (instanceId: string) => (
- {
render: function InstanceCell(name: string = '', instance: Instance) {
if (isCreateCloudDb(instance.id)) {
return (
-
+
{instance.name}
-
+
)
}
@@ -407,7 +408,7 @@ const DatabasesListWrapper = (props: Props) => {
className={styles.tooltipColumnName}
content={`${formatLongName(name)} ${getDbIndex(db)}`}
>
-
@@ -417,15 +418,15 @@ const DatabasesListWrapper = (props: Props) => {
handleCheckConnectToInstance(e, instance)
}
>
-
{cellContent}
-
- {` ${getDbIndex(db)}`}
-
+
+ {` ${getDbIndex(db)}`}
+
)
@@ -449,13 +450,13 @@ const DatabasesListWrapper = (props: Props) => {
const text = `${name}:${port}`
return (
-
{text}
+
{text}
- {
className={styles.tooltipLogo}
data-testid="tooltip-redis-stack-icon"
/>
-
Includes
-
+
>
) : undefined
}
@@ -585,7 +586,7 @@ const DatabasesListWrapper = (props: Props) => {
<>
{databaseManagementFeature?.flag && (
- {
)}
{instance.cloudDetails && (
-
-
+
)}
@@ -618,7 +619,7 @@ const DatabasesListWrapper = (props: Props) => {
>
- {
data-testid={`edit-instance-${instance.id}`}
>
Edit database
-
+
{
}
const AddInstanceBtn = () => (
-
+ Add Redis database
-
+
)
const CreateBtn = ({ content }: { content: ContentCreateRedis }) => {
@@ -170,7 +165,7 @@ const DatabaseListHeader = ({ onAddInstance }: Props) => {
const columnCheckboxes = Array.from(COLUMN_FIELD_NAME_MAP.entries()).map(
([field, name]) => (
- {
return (
-
-
+
-
+
{!loading && !isEmpty(data) && (
-
-
+
+
{promoData && (
-
+
-
+
)}
-
-
+
+
)}
{instances.length > 0 && (
-
-
-
+
+
+
{
closePopover={() => setColumnsConfigShown(false)}
data-testid="columns-config-popover"
button={
- {
aria-label="columns"
>
Columns
-
+
}
>
{
{columnCheckboxes}
-
-
+
+
-
-
-
+
+
+
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx
index 8d3e3df06b..561a449d8f 100644
--- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx
@@ -4,6 +4,7 @@ import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
import { updateInstanceAction } from 'uiSrc/slices/instances/instances'
import { Instance } from 'uiSrc/slices/interfaces'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import { ManageTagsModal, ManageTagsModalProps } from './ManageTagsModal'
jest.mock('react-redux', () => ({
@@ -38,22 +39,10 @@ const mockInstance: Partial = {
provider: 'RE_CLOUD',
}
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
describe('ManageTagsModal', () => {
diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.tsx
index 278bd69ec3..af48aad701 100644
--- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.tsx
@@ -1,22 +1,16 @@
/* eslint-disable react/no-array-index-key */
import React, { useCallback, useMemo, useState } from 'react'
import { useDispatch } from 'react-redux'
-import { PlusIcon } from 'uiSrc/components/base/icons'
+import { PlusIcon, RiIcon } from 'uiBase/icons'
+import { RiEmptyButton, RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiTitle, RiText } from 'uiBase/text'
import { ConnectionProvider, Instance } from 'uiSrc/slices/interfaces'
import { FormDialog } from 'uiSrc/components'
import { updateInstanceAction } from 'uiSrc/slices/instances/instances'
import { addMessageNotification } from 'uiSrc/slices/app/notifications'
import successMessages from 'uiSrc/components/notifications/success-messages'
-import {
- EmptyButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { VALID_TAG_KEY_REGEX, VALID_TAG_VALUE_REGEX } from './constants'
import { TagInputField } from './TagInputField'
import { getInvalidTagErrors } from './utils'
@@ -107,11 +101,11 @@ export const ManageTagsModal = ({
className={styles.manageTagsModal}
header={
-
Manage tags for {instance.name}
-
-
+ Manage tags for {instance.name}
+
+
Tags are key-value pairs that let you categorize your databases.
-
+
}
footer={
@@ -123,23 +117,23 @@ export const ManageTagsModal = ({
color="attention600"
size="m"
/>
-
+
Tag changes in Redis Insight apply locally and are not synced
with Redis {isCloudDb ? 'Cloud' : 'Software'}.
-
+
)}
-
+
Close
-
-
+
Save tags
-
+
>
}
@@ -187,8 +181,8 @@ export const ManageTagsModal = ({
})}
-
-
+
Add additional tag
-
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.tsx
index d7f27527dd..6263a51d3d 100644
--- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.tsx
@@ -1,8 +1,8 @@
import React, { useState } from 'react'
-import { RiTooltip } from 'uiSrc/components'
-import { TextInput } from 'uiSrc/components/base/inputs'
+import { RiTextInput } from 'uiBase/inputs'
import { TagSuggestions } from './TagSuggestions'
+import { RiTooltip } from 'uiBase/display'
type TagInputFieldProps = {
value: string
@@ -30,7 +30,7 @@ export const TagInputField = ({
-
{(list) => (
<>
-
+
Suggestions
-
+
{list}
>
)}
diff --git a/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.spec.tsx b/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.spec.tsx
index 15835e68fe..0e161542e4 100644
--- a/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.spec.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.spec.tsx
@@ -2,26 +2,15 @@ import React from 'react'
import { instance, mock } from 'ts-mockito'
import { render, screen, fireEvent } from 'uiSrc/utils/test-utils'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import DatabasePanelDialog, { Props } from './DatabasePanelDialog'
const mockedProps = mock()
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
describe('DatabasePanelDialog', () => {
diff --git a/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.tsx b/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.tsx
index a195ab7e84..cb4608db5a 100644
--- a/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.tsx
+++ b/redisinsight/ui/src/pages/home/components/database-panel-dialog/DatabasePanelDialog.tsx
@@ -1,6 +1,10 @@
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiTitle } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { ArrowLeftIcon } from 'uiBase/icons'
import { Nullable } from 'uiSrc/utils'
import { UrlHandlingActions } from 'uiSrc/slices/interfaces/urlHandling'
import { Instance } from 'uiSrc/slices/interfaces'
@@ -30,11 +34,7 @@ import CloudConnectionFormWrapper from 'uiSrc/pages/home/components/cloud-connec
import ImportDatabase from 'uiSrc/pages/home/components/import-database'
import { FormDialog } from 'uiSrc/components'
import { ModalHeaderProvider } from 'uiSrc/contexts/ModalTitleProvider'
-import { Title } from 'uiSrc/components/base/text/Title'
import ClusterConnectionFormWrapper from 'uiSrc/pages/home/components/cluster-connection'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { ArrowLeftIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
export interface Props {
@@ -165,17 +165,17 @@ const DatabasePanelDialog = (props: Props) => {
) => {
const header =
withBack && content ? (
-
-
-
+
+
-
- {content}
-
+
+ {content}
+
) : (
content
)
@@ -187,7 +187,7 @@ const DatabasePanelDialog = (props: Props) => {
Add Database}
+ header={modalHeader ?? Add Database }
footer={}
>
-
Build your app with Redis Cloud
-
+
Build your app with Redis Cloud
+
Free trial Cloud DBs auto-delete after 15 days of inactivity.
-
+
But not to worry, you can always re-create it to test your ideas.
Includes native support for JSON, Query Engine and more.
@@ -18,14 +18,14 @@ export const CHECK_CLOUD_DATABASE = (
export const WARNING_WITH_CAPABILITY = (capability: string) => (
<>
-
Build your app with {capability}
-
+
Build your app with {capability}
+
Hey, remember your interest in {capability}?
Use your free trial Redis Cloud DB to try it.
-
+
Note : Free trial Cloud DBs auto-delete after 15 days of inactivity.
@@ -33,14 +33,14 @@ export const WARNING_WITH_CAPABILITY = (capability: string) => (
)
export const WARNING_WITHOUT_CAPABILITY = (
<>
-
Your free trial Redis Cloud DB is waiting.
-
+
Your free trial Redis Cloud DB is waiting.
+
Test ideas and build prototypes.
Includes native support for JSON, Query Engine and more.
-
+
Note : Free trial Cloud DBs auto-delete after 15 days of inactivity.
diff --git a/redisinsight/ui/src/pages/home/components/empty-message/EmptyMessage.tsx b/redisinsight/ui/src/pages/home/components/empty-message/EmptyMessage.tsx
index f160caf4af..08898b14c9 100644
--- a/redisinsight/ui/src/pages/home/components/empty-message/EmptyMessage.tsx
+++ b/redisinsight/ui/src/pages/home/components/empty-message/EmptyMessage.tsx
@@ -1,5 +1,8 @@
import React from 'react'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiLink, RiImage } from 'uiBase/display'
import CakeIcon from 'uiSrc/assets/img/databases/cake.svg'
import { OAuthSsoHandlerDialog } from 'uiSrc/components'
@@ -7,10 +10,6 @@ import { OAuthSocialAction, OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { EXTERNAL_LINKS, UTM_CAMPAINGS } from 'uiSrc/constants/links'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiImage } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
export interface Props {
@@ -23,8 +22,10 @@ const EmptyMessage = ({ onAddInstanceClick }: Props) => (
data-testid="empty-database-instance-list"
>
-
No databases yet, let's add one!
-
+ No databases yet, let's add one!
+
+ {
sendEventTelemetry({
@@ -38,10 +39,10 @@ const EmptyMessage = ({ onAddInstanceClick }: Props) => (
data-testid="empty-rdi-instance-button"
>
+ Add Redis database
-
+
{(ssoCloudHandlerClick) => (
- (
}}
>
Create a free trial Cloud database
-
+
)}
diff --git a/redisinsight/ui/src/pages/home/components/form/DatabaseForm.tsx b/redisinsight/ui/src/pages/home/components/form/DatabaseForm.tsx
index c3bbb93c1c..7ae85e4f45 100644
--- a/redisinsight/ui/src/pages/home/components/form/DatabaseForm.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/DatabaseForm.tsx
@@ -2,6 +2,10 @@ import React from 'react'
import { useSelector } from 'react-redux'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
+import { RiNumericInput, RiPasswordInput, RiTextInput } from 'uiBase/inputs'
+import { RiIcon } from 'uiBase/icons'
import { BuildType } from 'uiSrc/constants/env'
import { SECURITY_FIELD } from 'uiSrc/constants'
import { appInfoSelector } from 'uiSrc/slices/app/info'
@@ -14,10 +18,6 @@ import {
} from 'uiSrc/utils'
import { RiTooltip } from 'uiSrc/components'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { NumericInput, PasswordInput, TextInput } from 'uiSrc/components/base/inputs'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
interface IShowFields {
alias: boolean
@@ -88,10 +88,10 @@ const DatabaseForm = (props: Props) => {
return (
<>
{showFields.alias && (
-
-
-
-
+
+
+ {
onChange={formik.handleChange}
disabled={isFieldDisabled('alias')}
/>
-
-
-
+
+
+
)}
{(showFields.host || isShowPort) && (
-
+
{showFields.host && (
-
- }
- >
-
+ }>
+ {
maxLength={200}
placeholder="Enter Hostname / IP address / Connection URL"
value={formik.values.host ?? ''}
- onChange={value => {
- formik.setFieldValue(
- 'host',
- validateField(value.trim()),
- )
+ onChange={(value) => {
+ formik.setFieldValue('host', validateField(value.trim()))
}}
onPaste={(event: React.ClipboardEvent) =>
handlePasteHostName(onHostNamePaste, event)
@@ -136,16 +130,16 @@ const DatabaseForm = (props: Props) => {
onFocus={selectOnFocus}
disabled={isFieldDisabled('host')}
/>
-
-
+
+
)}
{isShowPort && (
-
-
+
- {
onFocus={selectOnFocus}
disabled={isFieldDisabled('port')}
/>
-
-
+
+
)}
-
+
)}
-
-
-
-
+
+
+ {
onChange={formik.handleChange}
disabled={isFieldDisabled('username')}
/>
-
-
+
+
-
-
-
+
+ {
autoComplete="new-password"
disabled={isFieldDisabled('password')}
/>
-
-
-
+
+
+
{showFields.timeout && (
-
-
-
-
+
+
+ {
onFocus={selectOnFocus}
disabled={isFieldDisabled('timeout')}
/>
-
-
-
-
+
+
+
+
)}
>
)
diff --git a/redisinsight/ui/src/pages/home/components/form/DbCompressor.tsx b/redisinsight/ui/src/pages/home/components/form/DbCompressor.tsx
index 1062fe8b06..a60682abac 100644
--- a/redisinsight/ui/src/pages/home/components/form/DbCompressor.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/DbCompressor.tsx
@@ -1,15 +1,13 @@
import React, { ChangeEvent } from 'react'
import { FormikProps } from 'formik'
-import { KeyValueCompressor } from 'uiSrc/constants'
-import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiCheckbox, RiFormField, RiSelect } from 'uiBase/forms'
+import { useGenerateId } from 'uiBase/utils'
import { NONE } from 'uiSrc/pages/home/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
+import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
+import { KeyValueCompressor } from 'uiSrc/constants'
export interface Props {
formik: FormikProps
@@ -63,10 +61,10 @@ const DbCompressor = (props: Props) => {
return (
<>
-
-
-
-
+
+
+ {
onChange={handleChangeDbCompressorCheckbox}
data-testid="showCompressor"
/>
-
-
-
+
+
+
{formik.values.showCompressor && (
<>
-
-
-
-
+
+
+
+
{
}}
data-testid="select-compressor"
/>
-
-
-
-
+
+
+
+
>
)}
>
diff --git a/redisinsight/ui/src/pages/home/components/form/DbIndex.tsx b/redisinsight/ui/src/pages/home/components/form/DbIndex.tsx
index 6f577dcf41..9bd65ed4a5 100644
--- a/redisinsight/ui/src/pages/home/components/form/DbIndex.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/DbIndex.tsx
@@ -1,13 +1,12 @@
import React, { ChangeEvent } from 'react'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiCheckbox, RiFormField } from 'uiBase/forms'
+import { RiNumericInput } from 'uiBase/inputs'
+import { useGenerateId } from 'uiBase/utils'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { NumericInput } from 'uiSrc/components/base/inputs'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
import styles from '../styles.module.scss'
export interface Props {
@@ -32,10 +31,10 @@ const DbIndex = (props: Props) => {
return (
<>
-
-
-
-
+
+
+ {
onChange={handleChangeDbIndexCheckbox}
data-testid="showDb"
/>
-
-
-
+
+
+
{formik.values.showDb && (
<>
-
-
-
-
-
+
+
+
+ {
value={Number(formik.values.db)}
onChange={(value) => formik.setFieldValue('db', value)}
/>
-
-
-
-
+
+
+
+
>
)}
>
diff --git a/redisinsight/ui/src/pages/home/components/form/DbInfo.tsx b/redisinsight/ui/src/pages/home/components/form/DbInfo.tsx
index 295962a666..c49d2ff881 100644
--- a/redisinsight/ui/src/pages/home/components/form/DbInfo.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/DbInfo.tsx
@@ -3,17 +3,14 @@ import { useSelector } from 'react-redux'
import { capitalize } from 'lodash'
import cx from 'classnames'
-import { ColorText, Text } from 'uiSrc/components/base/text'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiListGroup, RiListItem } from 'uiBase/layout'
+import { RiIcon } from 'uiBase/icons'
import { DatabaseListModules, RiTooltip } from 'uiSrc/components'
import { BuildType } from 'uiSrc/constants/env'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import { Nullable } from 'uiSrc/utils'
-import {
- Group as ListGroup,
- Item as ListGroupItem,
-} from 'uiSrc/components/base/layout/list'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import { Endpoint } from 'apiSrc/common/models'
import { AdditionalRedisModule } from 'apiSrc/modules/database/models/additional.redis.module'
@@ -53,9 +50,9 @@ const DbInfo = (props: Props) => {
{nodes?.map(({ host: eHost, port: ePort }) => (
-
+
{eHost}:{ePort};
-
+
))}
@@ -71,100 +68,100 @@ const DbInfo = (props: Props) => {
)
return (
-
+
{!isFromCloud && (
-
+
Connection Type:
-
{capitalize(connectionType)}
-
-
+
+
}
/>
)}
{nameFromProvider && (
-
+
Database Name from Provider:
-
+
{nameFromProvider}
-
-
+
+
}
/>
)}
-
{!!nodes?.length && }
-
+
Host:
-
{host}
-
-
+
+
>
}
/>
{(server?.buildType === BuildType.RedisStack || isFromCloud) && (
-
+
Port:
-
{port}
-
-
+
+
}
/>
)}
{!!db && (
-
+
Database Index:
-
+
{db}
-
-
+
+
}
/>
)}
{!!modules?.length && (
-
+
Capabilities:
-
-
-
+
+
}
/>
)}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/ForceStandalone.tsx b/redisinsight/ui/src/pages/home/components/form/ForceStandalone.tsx
index 371673d206..4c9846c814 100644
--- a/redisinsight/ui/src/pages/home/components/form/ForceStandalone.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/ForceStandalone.tsx
@@ -1,13 +1,12 @@
import React, { ChangeEvent } from 'react'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField, RiCheckbox } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { useGenerateId } from 'uiBase/utils'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
formik: FormikProps
@@ -47,10 +46,10 @@ const ForceStandalone = (props: Props) => {
const id = useGenerateId('', ' over forceStandalone')
return (
-
-
-
-
+
+
+ }
@@ -58,9 +57,9 @@ const ForceStandalone = (props: Props) => {
onChange={handleChangeForceStandaloneCheckbox}
data-testid="forceStandalone"
/>
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/KeyFormatSelector.tsx b/redisinsight/ui/src/pages/home/components/form/KeyFormatSelector.tsx
index 30bccc100e..ef179eb9c3 100644
--- a/redisinsight/ui/src/pages/home/components/form/KeyFormatSelector.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/KeyFormatSelector.tsx
@@ -1,11 +1,10 @@
import React from 'react'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField, RiSelect } from 'uiBase/forms'
import { KeyValueFormat } from 'uiSrc/constants'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
export interface Props {
formik: FormikProps
@@ -26,9 +25,9 @@ const KeyFormatSelector = (props: Props) => {
]
return (
-
-
-
+
+
+
{
}}
data-testid="select-key-name-format"
/>
-
-
-
-
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/Messages.tsx b/redisinsight/ui/src/pages/home/components/form/Messages.tsx
index 8a3cd00f62..4f5668f20c 100644
--- a/redisinsight/ui/src/pages/home/components/form/Messages.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/Messages.tsx
@@ -1,14 +1,14 @@
import React from 'react'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
import { APPLICATION_NAME } from 'uiSrc/constants'
-import { Text } from 'uiSrc/components/base/text'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import { ExternalLink } from 'uiSrc/components'
import styles from '../styles.module.scss'
const MessageCloudApiKeys = () => (
- (
>
documentation.
-
+
)
const MessageStandalone = () => (
- (
>
Learn more here.
-
+
)
const MessageSentinel = () => (
- (
>
Learn more here.
-
+
)
const MessageEnterpriceSoftware = () => (
- (
>
Learn more here.
-
+
)
export {
diff --git a/redisinsight/ui/src/pages/home/components/form/SSHDetails.tsx b/redisinsight/ui/src/pages/home/components/form/SSHDetails.tsx
index 3c75278920..173f3619c0 100644
--- a/redisinsight/ui/src/pages/home/components/form/SSHDetails.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/SSHDetails.tsx
@@ -1,24 +1,21 @@
import React from 'react'
import { FormikProps } from 'formik'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField, RiCheckbox, RiRadioGroup } from 'uiBase/forms'
+import {
+ RiNumericInput,
+ RiPasswordInput,
+ RiTextArea,
+ RiTextInput,
+} from 'uiBase/inputs'
+import { useGenerateId } from 'uiBase/utils'
import { MAX_PORT_NUMBER, selectOnFocus, validateField } from 'uiSrc/utils'
import { SECURITY_FIELD } from 'uiSrc/constants'
import { SshPassType } from 'uiSrc/pages/home/constants'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import {
- NumericInput,
- PasswordInput,
- TextArea,
- TextInput,
-} from 'uiSrc/components/base/inputs'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { RiRadioGroup } from 'uiSrc/components/base/forms/radio-group/RadioGroup'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
-
export interface Props {
flexGroupClassName?: string
flexItemClassName?: string
@@ -45,13 +42,13 @@ const SSHDetails = (props: Props) => {
const id = useGenerateId('', ' ssh')
return (
-
-
+
-
-
+ {
onChange={formik.handleChange}
data-testid="use-ssh"
/>
-
-
+
+
{formik.values.ssh && (
-
-
-
-
-
+
+
+
+ {
maxLength={200}
placeholder="Enter SSH Host"
value={formik.values.sshHost ?? ''}
- onChange={value => {
- formik.setFieldValue(
- 'sshHost',
- validateField(value.trim()),
- )
+ onChange={(value) => {
+ formik.setFieldValue('sshHost', validateField(value.trim()))
}}
/>
-
-
-
-
+
+
+
- {
onChange={(value) => formik.setFieldValue('sshPort', value)}
onFocus={selectOnFocus}
/>
-
-
-
-
-
-
-
+
+
+
+
+
+ {
maxLength={200}
placeholder="Enter SSH Username"
value={formik.values.sshUsername ?? ''}
- onChange={value => {
+ onChange={(value) => {
formik.setFieldValue(
'sshUsername',
validateField(value.trim()),
)
}}
/>
-
-
-
-
-
+
+
+
+
+
{
onChange={(id) => formik.setFieldValue('sshPassType', id)}
data-testid="ssh-pass-type"
/>
-
-
+
+
{formik.values.sshPassType === SshPassType.Password && (
-
-
-
-
+
+
+ {
}}
autoComplete="new-password"
/>
-
-
-
+
+
+
)}
{formik.values.sshPassType === SshPassType.PrivateKey && (
-
-
-
-
-
+
+
+
+ {
}
}}
/>
-
-
-
-
-
-
-
+
+
+
+
+
+ {
}}
autoComplete="new-password"
/>
-
-
-
-
+
+
+
+
)}
-
+
)}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx b/redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx
index e5cd5e06b6..5a9b1783ae 100644
--- a/redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx
@@ -1,8 +1,19 @@
import React, { ChangeEvent, useState } from 'react'
import cx from 'classnames'
import { FormikProps } from 'formik'
-
import { useDispatch } from 'react-redux'
+
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiCheckbox,
+ RiFormField,
+ RiSelect,
+ SelectValueRender,
+ RiSelectOption,
+} from 'uiBase/forms'
+import { RiTextArea, RiTextInput } from 'uiBase/inputs'
+import { useGenerateId } from 'uiBase/utils'
import {
Nullable,
truncateText,
@@ -20,17 +31,6 @@ import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { deleteCaCertificateAction } from 'uiSrc/slices/instances/caCerts'
import { deleteClientCertAction } from 'uiSrc/slices/instances/clientCerts'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextArea, TextInput } from 'uiSrc/components/base/inputs'
-import {
- RiSelect,
- SelectValueRender,
- RiSelectOption,
-} from 'uiSrc/components/base/forms/select/RiSelect'
-import { useGenerateId } from 'uiSrc/components/base/utils/hooks/generate-id'
import styles from '../styles.module.scss'
const suffix = '_tls_details'
@@ -185,9 +185,9 @@ const TlsDetails = (props: Props) => {
const isTlsAuthId = useGenerateId('', ' is_tls_client_auth_required')
return (
<>
-
-
-
+
+ {
onChange={formik.handleChange}
data-testid="tls"
/>
-
-
+
+
{formik.values.tls && (
<>
-
-
-
-
+
+
+ {
}}
data-testid="sni"
/>
-
-
+
+
{formik.values.sni && (
<>
-
-
-
-
-
+
+
+
+
+ onChange={(value) =>
formik.setFieldValue(
'servername',
validateField(value.trim()),
@@ -239,18 +239,18 @@ const TlsDetails = (props: Props) => {
}
data-testid="sni-servername"
/>
-
-
-
+
+
+
>
)}
-
-
-
+
+
- {
onChange={formik.handleChange}
data-testid="verify-tls-cert"
/>
-
-
+
+
>
)}
{formik.values.tls && (
-
-
-
-
+
+
+ {
}}
data-testid="select-ca-cert"
/>
-
-
+
+
{formik.values.tls &&
formik.values.selectedCaCertName === ADD_NEW_CA_CERT && (
-
-
-
+
+
+ onChange={(value) =>
formik.setFieldValue(
'newCaCertName',
validateCertName(value),
@@ -307,17 +307,17 @@ const TlsDetails = (props: Props) => {
}
data-testid="qa-ca-cert"
/>
-
-
+
+
)}
-
+
{formik.values.tls &&
formik.values.selectedCaCertName === ADD_NEW_CA_CERT && (
-
-
-
-
+
+
+ {
placeholder="Enter CA Certificate"
data-testid="new-ca-cert"
/>
-
-
-
+
+
+
)}
)}
{formik.values.tls && (
-
-
-
+
+ {
}
data-testid="tls-required-checkbox"
/>
-
-
+
+
)}
{formik.values.tls && formik.values.tlsClientAuthRequired && (
-
-
-
+
+
+
{
}}
data-testid="select-cert"
/>
-
-
+
+
{formik.values.tls &&
formik.values.tlsClientAuthRequired &&
formik.values.selectedTlsClientCertId === 'ADD_NEW' && (
-
-
-
+
+
+ onChange={(value) =>
formik.setFieldValue(
'newTlsCertPairName', // same as the name prop passed a few lines above
validateCertName(value),
@@ -387,19 +387,19 @@ const TlsDetails = (props: Props) => {
}
data-testid="new-tsl-cert-pair-name"
/>
-
-
+
+
)}
-
+
{formik.values.tls &&
formik.values.tlsClientAuthRequired &&
formik.values.selectedTlsClientCertId === 'ADD_NEW' && (
<>
-
-
-
-
+
+
+ {
placeholder="Enter Client Certificate"
data-testid="new-tls-client-cert"
/>
-
-
-
+
+
+
-
-
-
-
+
+
+ {
onChangeCapture={formik.handleChange}
data-testid="new-tls-client-cert-key"
/>
-
-
-
+
+
+
>
)}
diff --git a/redisinsight/ui/src/pages/home/components/form/sentinel/DbInfoSentinel.tsx b/redisinsight/ui/src/pages/home/components/form/sentinel/DbInfoSentinel.tsx
index 1d24ae8c2b..69841e0a6e 100644
--- a/redisinsight/ui/src/pages/home/components/form/sentinel/DbInfoSentinel.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/sentinel/DbInfoSentinel.tsx
@@ -1,13 +1,10 @@
import React from 'react'
import { capitalize } from 'lodash'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiListGroup, RiListItem } from 'uiBase/layout'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import { Nullable } from 'uiSrc/utils'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import {
- Group as ListGroup,
- Item as ListGroupItem,
-} from 'uiSrc/components/base/layout/list'
import { SentinelMaster } from 'apiSrc/modules/redis-sentinel/models/sentinel-master'
import SentinelHostPort from './SentinelHostPort'
@@ -24,46 +21,46 @@ export interface Props {
const DbInfoSentinel = (props: Props) => {
const { connectionType, nameFromProvider, sentinelMaster, host, port } = props
return (
-
-
+
+
Connection Type:
-
+
{capitalize(connectionType)}
-
-
+
+
}
/>
{sentinelMaster?.name && (
-
+
Primary Group Name:
-
+
{sentinelMaster?.name}
-
-
+
+
}
/>
)}
{nameFromProvider && (
-
+
Database Name from Provider:
-
+
{nameFromProvider}
-
-
+
+
}
/>
)}
{host && port && }
-
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/sentinel/PrimaryGroupSentinel.tsx b/redisinsight/ui/src/pages/home/components/form/sentinel/PrimaryGroupSentinel.tsx
index 237a2b89f1..1200bba1b5 100644
--- a/redisinsight/ui/src/pages/home/components/form/sentinel/PrimaryGroupSentinel.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/sentinel/PrimaryGroupSentinel.tsx
@@ -1,10 +1,10 @@
import React from 'react'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
+import { RiTextInput } from 'uiBase/inputs'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { TextInput } from 'uiSrc/components/base/inputs'
export interface Props {
flexGroupClassName?: string
@@ -16,10 +16,10 @@ const PrimaryGroupSentinel = (props: Props) => {
const { flexGroupClassName = '', flexItemClassName = '', formik } = props
return (
<>
-
-
-
-
+
+
+ {
maxLength={500}
onChange={formik.handleChange}
/>
-
-
-
-
-
-
-
+
+
+
+
+
+ {
onChange={formik.handleChange}
disabled
/>
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelHostPort.tsx b/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelHostPort.tsx
index 436fc5b086..8347238ab4 100644
--- a/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelHostPort.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelHostPort.tsx
@@ -1,9 +1,9 @@
import React from 'react'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon } from 'uiBase/icons'
import { RiTooltip } from 'uiSrc/components'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
import styles from '../../styles.module.scss'
export interface Props {
@@ -19,16 +19,16 @@ const SentinelHostPort = (props: Props) => {
}
return (
-
+
Sentinel Host & Port:
- {`${host}:${port}`}
+ {`${host}:${port}`}
- {
/>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelMasterDatabase.tsx b/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelMasterDatabase.tsx
index 43cdb63df0..24d7000081 100644
--- a/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelMasterDatabase.tsx
+++ b/redisinsight/ui/src/pages/home/components/form/sentinel/SentinelMasterDatabase.tsx
@@ -1,13 +1,13 @@
import React from 'react'
import { FormikProps } from 'formik'
-import { Nullable } from 'uiSrc/utils'
-import { SECURITY_FIELD } from 'uiSrc/constants'
+import { RiColorText, RiText } from 'uiBase/text'
+import { RiPasswordInput, RiTextInput } from 'uiBase/inputs'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiFormField } from 'uiBase/forms'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { PasswordInput, TextInput } from 'uiSrc/components/base/inputs'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
+import { SECURITY_FIELD } from 'uiSrc/constants'
+import { Nullable } from 'uiSrc/utils'
import styles from '../../styles.module.scss'
export interface Props {
@@ -29,31 +29,33 @@ const SentinelMasterDatabase = (props: Props) => {
return (
<>
{!!db && !isCloneMode && (
-
+
Database Index:
- {db}
+ {db}
-
+
)}
-
-
-
-
+
+
+ formik.setFieldValue('sentinelMasterUsername', value)}
+ onChange={(value) =>
+ formik.setFieldValue('sentinelMasterUsername', value)
+ }
data-testid="sentinel-mater-username"
/>
-
-
+
+
-
-
-
+
+ {
}}
autoComplete="new-password"
/>
-
-
-
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/home/components/import-database/ImportDatabase.tsx b/redisinsight/ui/src/pages/home/components/import-database/ImportDatabase.tsx
index e8adfb4862..de71aea2b8 100644
--- a/redisinsight/ui/src/pages/home/components/import-database/ImportDatabase.tsx
+++ b/redisinsight/ui/src/pages/home/components/import-database/ImportDatabase.tsx
@@ -1,27 +1,22 @@
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import ReactDOM from 'react-dom'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { InfoIcon, RiIcon } from 'uiBase/icons'
+import { RiTitle, RiColorText, RiText } from 'uiBase/text'
+import { RiLoader } from 'uiBase/display'
+import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
+import { RiTooltip, UploadWarning, RiFilePicker } from 'uiSrc/components'
+import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
+import { Nullable } from 'uiSrc/utils'
import {
fetchInstancesAction,
importInstancesSelector,
resetImportInstances,
uploadInstancesFile,
} from 'uiSrc/slices/instances/instances'
-import { Nullable } from 'uiSrc/utils'
-import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { RiTooltip, UploadWarning, RiFilePicker } from 'uiSrc/components'
-import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { Loader } from 'uiSrc/components/base/display'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import ResultsLog from './components/ResultsLog'
import styles from './styles.module.scss'
@@ -47,7 +42,7 @@ const ImportDatabase = (props: Props) => {
useEffect(() => {
setDomReady(true)
- setModalHeader(Import from file , true)
+ setModalHeader(Import from file , true)
return () => {
setModalHeader(null)
@@ -102,14 +97,14 @@ const ImportDatabase = (props: Props) => {
if (error) {
return ReactDOM.createPortal(
,
footerEl,
)
@@ -118,14 +113,14 @@ const ImportDatabase = (props: Props) => {
if (data) {
return ReactDOM.createPortal(
,
footerEl,
)
@@ -133,20 +128,20 @@ const ImportDatabase = (props: Props) => {
return ReactDOM.createPortal(
-
Cancel
-
+
- {
data-testid="btn-submit"
>
Submit
-
+
,
footerEl,
@@ -168,16 +163,16 @@ const ImportDatabase = (props: Props) => {
return (
<>
-
-
+
+
{isShowForm && (
<>
-
+
Use a JSON file to import your database connections. Ensure
that you only use files from trusted sources to prevent the
risk of automatically executing malicious code.
-
-
+
+
{
aria-label="Select or drag and drop file"
/>
{isInvalid && (
-
{`File should not exceed ${MAX_MB_FILE} MB`}
-
+
)}
>
)}
@@ -205,34 +200,34 @@ const ImportDatabase = (props: Props) => {
className={styles.loading}
data-testid="file-loading-indicator"
>
-
-
+
+
Uploading...
-
+
)}
{error && (
-
+
Failed to add database connections
-
- {error}
+
+ {error}
)}
-
+
{isShowForm && (
-
+
-
+
)}
-
+
{data && (
-
-
+
+
-
-
+
+
)}
diff --git a/redisinsight/ui/src/pages/home/components/import-database/components/ResultsLog/ResultsLog.tsx b/redisinsight/ui/src/pages/home/components/import-database/components/ResultsLog/ResultsLog.tsx
index 58f7c83440..a9de4e1072 100644
--- a/redisinsight/ui/src/pages/home/components/import-database/components/ResultsLog/ResultsLog.tsx
+++ b/redisinsight/ui/src/pages/home/components/import-database/components/ResultsLog/ResultsLog.tsx
@@ -1,11 +1,11 @@
import cx from 'classnames'
import React, { useState } from 'react'
+import { RiCollapsibleNavGroup } from 'uiBase/display'
+import { RiCol } from 'uiBase/layout'
import { ImportDatabasesData } from 'uiSrc/slices/interfaces'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { Nullable } from 'uiSrc/utils'
-import { RICollapsibleNavGroup } from 'uiSrc/components/base/display'
-import { Col } from 'uiSrc/components/base/layout/flex'
import TableResult from '../TableResult'
import styles from './styles.module.scss'
@@ -55,8 +55,8 @@ const ResultsLog = ({ data }: Props) => {
openedNav === name ? 'open' : 'closed'
return (
-
-
+ {
data-testid={`success-results-${getNavGroupState(ResultsStatus.Success)}`}
>
-
-
+ {
data-testid={`partial-results-${getNavGroupState(ResultsStatus.Partial)}`}
>
-
-
+ {
data-testid={`failed-results-${getNavGroupState(ResultsStatus.Failed)}`}
>
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/import-database/components/TableResult/TableResult.tsx b/redisinsight/ui/src/pages/home/components/import-database/components/TableResult/TableResult.tsx
index 75cdb013d0..a91c28f258 100644
--- a/redisinsight/ui/src/pages/home/components/import-database/components/TableResult/TableResult.tsx
+++ b/redisinsight/ui/src/pages/home/components/import-database/components/TableResult/TableResult.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
import { ErrorImportResult } from 'uiSrc/slices/interfaces'
@@ -76,7 +76,7 @@ const TableResult = (props: Props) => {
return (
)
}
diff --git a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionForm.tsx b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionForm.tsx
index 9a3e42fb12..9fbb1dce1e 100644
--- a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionForm.tsx
+++ b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionForm.tsx
@@ -5,6 +5,11 @@ import ReactDOM from 'react-dom'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiFlexItem, RiRow, RiTabs as TabsComponent } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { ArrowLeftIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
+import { RiTitle } from 'uiBase/text'
import * as keys from 'uiSrc/constants/keys'
import { resetInstanceUpdateAction } from 'uiSrc/slices/instances/instances'
import { ConnectionType } from 'uiSrc/slices/interfaces'
@@ -23,12 +28,6 @@ import { appInfoSelector } from 'uiSrc/slices/app/info'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { ArrowLeftIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import TabsComponent from 'uiSrc/components/base/layout/tabs'
-import { Title } from 'uiSrc/components/base/text/Title'
import { MANUAL_FORM_TABS, ManualFormTab } from './constants'
import CloneConnection from './components/CloneConnection'
import FooterActions from './components/FooterActions'
@@ -157,29 +156,29 @@ const ManualConnectionForm = (props: Props) => {
useEffect(() => {
if (isCloneMode) {
setModalHeader(
-
-
-
+
+
-
-
- Clone Database
-
-
,
+
+
+ Clone Database
+
+ ,
)
return
}
if (isEditMode) {
- setModalHeader(Edit Database )
+ setModalHeader(Edit Database )
return
}
- setModalHeader(Connection Settings , true)
+ setModalHeader(Connection Settings , true)
}, [isEditMode, isCloneMode])
useEffect(() => {
@@ -247,7 +246,7 @@ const ManualConnectionForm = (props: Props) => {
{!isEditMode && !isFromCloud && (
<>
-
+
{
nodes={nodes}
isFromCloud={isFromCloud}
/>
-
+
>
)}
-
+
{
host={host}
port={port}
/>
-
+
>
)}
-
+
{
return (
<>
-
-
-
+
+ {
onClick={handleClickClone}
>
Clone Connection
-
-
-
-
+
+
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/components/FooterActions.tsx b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/components/FooterActions.tsx
index f48ce470f5..e2fcab4027 100644
--- a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/components/FooterActions.tsx
+++ b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/components/FooterActions.tsx
@@ -1,17 +1,13 @@
import React from 'react'
import { FormikErrors } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiEmptyButton, RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { InfoIcon } from 'uiBase/icons'
import validationErrors from 'uiSrc/constants/validationErrors'
import { getSubmitButtonContent } from 'uiSrc/pages/home/utils'
import { DbConnectionInfo, ISubmitButton } from 'uiSrc/pages/home/interfaces'
import { SubmitBtnText } from 'uiSrc/pages/home/constants'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- EmptyButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
submitIsDisable: () => boolean
@@ -49,7 +45,7 @@ const FooterActions = (props: Props) => {
}
content={getSubmitButtonContent(errors, submitIsDisabled)}
>
- {
data-testid="btn-submit"
>
{text}
-
+
)
return (
-
-
+
+
{
}
content={getSubmitButtonContent(errors, submitIsDisable())}
>
- {
data-testid="btn-test-connection"
>
Test Connection
-
+
-
+
-
-
+
+
{onClose && (
- {
style={{ marginRight: 12 }}
>
Cancel
-
+
)}
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/constants.ts b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/constants.ts
index 1ea34fdb29..2f1931a53e 100644
--- a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/constants.ts
+++ b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/constants.ts
@@ -1,4 +1,4 @@
-import { TabInfo } from 'uiSrc/components/base/layout/tabs'
+import { TabInfo } from 'uiBase/layout'
export enum ManualFormTab {
General = 'general',
diff --git a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/forms/EditSentinelConnection.tsx b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/forms/EditSentinelConnection.tsx
index 5f2f9d0422..f8dc0eb427 100644
--- a/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/forms/EditSentinelConnection.tsx
+++ b/redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/forms/EditSentinelConnection.tsx
@@ -1,5 +1,10 @@
import React from 'react'
import { FormikProps } from 'formik'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiFormField } from 'uiBase/forms'
+import { RiTitle } from 'uiBase/text'
+import { RiTextInput } from 'uiBase/inputs'
import {
PrimaryGroupSentinel,
SentinelMasterDatabase,
@@ -12,11 +17,6 @@ import {
TlsDetails,
} from 'uiSrc/pages/home/components/form'
import { DbConnectionInfo } from 'uiSrc/pages/home/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { TextInput } from 'uiSrc/components/base/inputs'
import DecompressionAndFormatters from './DecompressionAndFormatters'
import { ManualFormTab } from '../constants'
@@ -52,8 +52,8 @@ const EditSentinelConnection = (props: Props) => {
variant="fullWidth"
className="form__divider"
/>
- Database
-
+ Database
+
{
variant="fullWidth"
className="form__divider"
/>
- Sentinel
-
+ Sentinel
+
{
const GeneralFormEditMode = (
<>
-
-
-
-
+
+
+ {
maxLength={500}
onChange={formik.handleChange}
/>
-
-
-
-
+
+
+
+
- Database
-
+ Database
+
{
variant="fullWidth"
className="form__divider"
/>
- Sentinel
-
+ Sentinel
+
{
}, [value, selectedTags])
return (
- setValue(value.toLowerCase())}
value={value}
diff --git a/redisinsight/ui/src/pages/home/components/sentinel-connection/SentinelConnectionWrapper.tsx b/redisinsight/ui/src/pages/home/components/sentinel-connection/SentinelConnectionWrapper.tsx
index 5dea66d980..ba5e70c1f1 100644
--- a/redisinsight/ui/src/pages/home/components/sentinel-connection/SentinelConnectionWrapper.tsx
+++ b/redisinsight/ui/src/pages/home/components/sentinel-connection/SentinelConnectionWrapper.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router'
+import { RiTitle } from 'uiBase/text'
import {
fetchMastersSentinelAction,
sentinelSelector,
@@ -24,7 +25,6 @@ import {
import { ADD_NEW, NO_CA_CERT } from 'uiSrc/pages/home/constants'
import { InstanceType } from 'uiSrc/slices/interfaces'
import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
-import { Title } from 'uiSrc/components/base/text/Title'
import SentinelConnectionForm from './sentinel-connection-form'
export interface Props {
@@ -61,7 +61,7 @@ const SentinelConnectionWrapper = (props: Props) => {
dispatch(fetchCaCerts())
dispatch(fetchClientCerts())
- setModalHeader(Redis Sentinel , true)
+ setModalHeader(Redis Sentinel , true)
return () => {
setModalHeader(null)
diff --git a/redisinsight/ui/src/pages/home/components/sentinel-connection/sentinel-connection-form/SentinelConnectionForm.tsx b/redisinsight/ui/src/pages/home/components/sentinel-connection/sentinel-connection-form/SentinelConnectionForm.tsx
index 5a7ac7c641..93b0e7e13b 100644
--- a/redisinsight/ui/src/pages/home/components/sentinel-connection/sentinel-connection-form/SentinelConnectionForm.tsx
+++ b/redisinsight/ui/src/pages/home/components/sentinel-connection/sentinel-connection-form/SentinelConnectionForm.tsx
@@ -3,6 +3,9 @@ import { isEmpty, pick } from 'lodash'
import React, { useRef, useState } from 'react'
import ReactDOM from 'react-dom'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { InfoIcon } from 'uiBase/icons'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
import * as keys from 'uiSrc/constants/keys'
import validationErrors from 'uiSrc/constants/validationErrors'
import { fieldDisplayNames } from 'uiSrc/pages/home/constants'
@@ -13,13 +16,7 @@ import {
MessageSentinel,
TlsDetails,
} from 'uiSrc/pages/home/components/form'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
loading: boolean
@@ -91,7 +88,7 @@ const SentinelConnectionForm = (props: Props) => {
}
content={getSubmitButtonContent(errors, submitIsDisabled)}
>
- {
style={{ marginLeft: 12 }}
>
Discover Database
-
+
)
@@ -113,14 +110,14 @@ const SentinelConnectionForm = (props: Props) => {
return ReactDOM.createPortal(
{onClose && (
-
Cancel
-
+
)}
{
}}
onHostNamePaste={onHostNamePaste}
/>
-
+
{
{/* stop propagation to prevent sorting by column header */}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
e.stopPropagation()}>
-
-
+ {
+ onChange={(value) => {
setTagSearch(value)
}}
/>
-
-
+
+
{Object.keys(groupedTags).map((key) => (
-
{
/>
{groupedTags[key].map((value) => (
-
{
@@ -29,23 +28,23 @@ const NotFoundErrorPage = () => {
return (
-
-
-
-
+
+
+
+
-
-
-
+
+
+
Whoops!
This Page Is an Empty Set
-
-
+
+
{
We searched every shard,
But couldn't find the page you're after.
-
Databases page
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/redisinsight/ui/src/pages/pub-sub/PubSubPage.tsx b/redisinsight/ui/src/pages/pub-sub/PubSubPage.tsx
index b7100c8826..09d37ba662 100644
--- a/redisinsight/ui/src/pages/pub-sub/PubSubPage.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/PubSubPage.tsx
@@ -1,7 +1,8 @@
import React, { useEffect, useState } from 'react'
+import styled from 'styled-components'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
-import styled from 'styled-components'
+import { RiTitle } from 'uiBase/text'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import {
sendEventTelemetry,
@@ -14,7 +15,6 @@ import { formatLongName, getDbIndex, setTitle } from 'uiSrc/utils'
import { OnboardingTour } from 'uiSrc/components'
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
import { incrementOnboardStepAction } from 'uiSrc/slices/app/features'
-import { Title } from 'uiSrc/components/base/text/Title'
import { OnboardingSteps } from 'uiSrc/constants/onboarding'
import {
MessagesListWrapper,
@@ -90,9 +90,9 @@ const PubSubPage = () => {
-
+
Pub/Sub
-
+
diff --git a/redisinsight/ui/src/pages/pub-sub/components/messages-list/EmptyMessagesList/EmptyMessagesList.tsx b/redisinsight/ui/src/pages/pub-sub/components/messages-list/EmptyMessagesList/EmptyMessagesList.tsx
index e164e9c1d2..feda146ad6 100644
--- a/redisinsight/ui/src/pages/pub-sub/components/messages-list/EmptyMessagesList/EmptyMessagesList.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/components/messages-list/EmptyMessagesList/EmptyMessagesList.tsx
@@ -1,12 +1,11 @@
import React from 'react'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import { ConnectionType } from 'uiSrc/slices/interfaces'
-import { Text } from 'uiSrc/components/base/text'
-
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
-import { Row } from 'uiSrc/components/base/layout/flex'
+import { RiRow } from 'uiBase/layout'
export interface Props {
connectionType?: ConnectionType
@@ -23,28 +22,28 @@ const EmptyMessagesList = ({
[styles.contentCluster]: connectionType === ConnectionType.Cluster,
})}
>
-
No messages to display
-
+ No messages to display
+
Subscribe to the Channel to see all the messages published to your
database
-
-
+
+
-
+
Running in production may decrease performance and memory available
-
-
+
+
{connectionType === ConnectionType.Cluster && isSpublishNotSupported && (
<>
-
{'Messages published with '}
SPUBLISH
{' will not appear in this channel'}
-
+
>
)}
diff --git a/redisinsight/ui/src/pages/pub-sub/components/messages-list/MessagesList/MessagesList.tsx b/redisinsight/ui/src/pages/pub-sub/components/messages-list/MessagesList/MessagesList.tsx
index f6564992d7..193c7e46e2 100644
--- a/redisinsight/ui/src/pages/pub-sub/components/messages-list/MessagesList/MessagesList.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/components/messages-list/MessagesList/MessagesList.tsx
@@ -6,13 +6,14 @@ import {
} from 'react-window'
import { useParams } from 'react-router-dom'
+import { ChevronDownIcon } from 'uiBase/icons'
+import { RiIconButton } from 'uiBase/forms'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FormatedDate, RiTooltip } from 'uiSrc/components'
-import { ChevronDownIcon } from 'uiSrc/components/base/icons'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
+import { FormatedDate } from 'uiSrc/components'
import { IMessage } from 'apiSrc/modules/pub-sub/interfaces/message.interface'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/tooltip'
export interface Props {
items: IMessage[]
@@ -166,7 +167,7 @@ const MessagesList = (props: Props) => {
{Row}
{showAnchor && (
- {
return (
-
-
-
-
-
+
+
+
- setChannel(value)
- }
+ onChange={(value) => setChannel(value)}
autoComplete="off"
data-testid="field-channel-name"
/>
-
-
-
-
+
+
+
+
<>
- {
id="message"
placeholder="Enter Message"
value={message}
- onChange={value =>
- setMessage(value)
- }
+ onChange={(value) => setMessage(value)}
autoComplete="off"
data-testid="field-message"
/>
@@ -124,7 +113,7 @@ const PublishMessage = () => {
data-testid="affected-clients-badge"
>
{connectionType !== ConnectionType.Cluster && (
-
+
{
{affectedClients}
-
+
)}
>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Publish
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/SubscriptionPanel.tsx b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/SubscriptionPanel.tsx
index 0dab4bfe29..4a22fe2ced 100644
--- a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/SubscriptionPanel.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/SubscriptionPanel.tsx
@@ -2,6 +2,17 @@ import cx from 'classnames'
import React, { useContext, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import {
+ UserIcon,
+ IndicatorExcludedIcon,
+ DeleteIcon,
+ AllIconsType,
+ RiIcon,
+} from 'uiBase/icons'
+import { Button, RiIconButton, RiFormField } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiTextInput } from 'uiBase/inputs'
import { Theme } from 'uiSrc/constants'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import {
@@ -12,21 +23,10 @@ import {
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { DEFAULT_SEARCH_MATCH } from 'uiSrc/constants/api'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- UserIcon,
- IndicatorExcludedIcon,
- DeleteIcon,
-} from 'uiSrc/components/base/icons'
-import { Button, IconButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
-import { AllIconsType, RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { TextInput } from 'uiSrc/components/base/inputs'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
import PatternsInfo from './components/patternsInfo'
import ClickableAppendInfo from './components/clickable-append-info'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const SubscriptionPanel = () => {
const { messages, isSubscribed, subscriptions, loading, count } =
@@ -72,53 +72,59 @@ const SubscriptionPanel = () => {
const displayMessages = count !== 0 || isSubscribed
return (
-
-
-
-
+
+
+
+
-
-
-
+
+
+
You are {!isSubscribed && 'not'} subscribed
-
-
+
+
{isSubscribed && (
-
+
-
+
)}
{displayMessages && (
-
-
+
+
Messages: {count}
-
-
+
+
)}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ }>
+ setChannels(value)}
+ onChange={(value) => setChannels(value)}
onBlur={onFocusOut}
placeholder="Enter Pattern"
aria-label="channel names for filtering"
data-testid="channels-input"
/>
-
-
-
+
+
+
{
>
Subscribe
-
+
{!!messages.length && (
-
+
-
-
+
)}
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/clickable-append-info/ClickableAppendInfo.tsx b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/clickable-append-info/ClickableAppendInfo.tsx
index 1df265c7bd..88978c8daf 100644
--- a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/clickable-append-info/ClickableAppendInfo.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/clickable-append-info/ClickableAppendInfo.tsx
@@ -1,14 +1,13 @@
import React, { useState } from 'react'
-import { getUtmExternalLink } from 'uiSrc/utils/links'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiLink, RiPopover } from 'uiBase/display'
import {
EXTERNAL_LINKS,
UTM_CAMPAINGS,
UTM_MEDIUMS,
} from 'uiSrc/constants/links'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiPopover } from 'uiSrc/components/base'
+import { getUtmExternalLink } from 'uiSrc/utils/links'
import styles from './styles.module.scss'
const ClickableAppendInfo = () => {
@@ -39,13 +38,12 @@ const ClickableAppendInfo = () => {
panelPaddingSize="s"
data-testid="pub-sub-examples"
>
-
+
Subscribe to one or more channels or patterns by entering them,
separated by spaces.
Supported glob-style patterns are described
- {
})}
>
here.
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/patternsInfo/PatternsInfo.tsx b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/patternsInfo/PatternsInfo.tsx
index b9ac92becd..fe29c14d47 100644
--- a/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/patternsInfo/PatternsInfo.tsx
+++ b/redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/patternsInfo/PatternsInfo.tsx
@@ -1,9 +1,9 @@
import React from 'react'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
+import { RiTooltip } from 'uiBase/display'
import { DEFAULT_SEARCH_MATCH } from 'uiSrc/constants/api'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface PatternsInfoProps {
@@ -18,9 +18,9 @@ const PatternsInfo = ({ channels }: PatternsInfoProps) => {
return (
-
+
Patterns: {getChannelsCount()}{' '}
-
+
{
const confirmBtn = React.cloneElement(submitBtn, { onClick: handleConfirm })
return (
-
+
{
panelClassName={styles.panelPopover}
button={popoverButton}
>
-
-
+
+
-
-
- {formatLongName(title, 58, 0, '...')}
-
-
-
+
+
+ {formatLongName(title, 58, 0, '...')}
+
+
+
{body}
-
-
- {!!appendAction && appendAction}
- {confirmBtn}
-
+
+
+ {!!appendAction && appendAction}
+ {confirmBtn}
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/home/RdiPage.spec.tsx b/redisinsight/ui/src/pages/rdi/home/RdiPage.spec.tsx
index a030b14cb0..d3a989e347 100644
--- a/redisinsight/ui/src/pages/rdi/home/RdiPage.spec.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/RdiPage.spec.tsx
@@ -23,6 +23,7 @@ import {
} from 'uiSrc/utils/test-utils'
import { apiService } from 'uiSrc/services'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import RdiPage from './RdiPage'
jest.mock('uiSrc/slices/rdi/instances', () => ({
@@ -53,22 +54,10 @@ jest.mock('uiSrc/telemetry', () => ({
sendEventTelemetry: jest.fn(),
}))
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
let storeMock: typeof mockedStore
diff --git a/redisinsight/ui/src/pages/rdi/home/RdiPage.tsx b/redisinsight/ui/src/pages/rdi/home/RdiPage.tsx
index d6939860de..e064b661f1 100644
--- a/redisinsight/ui/src/pages/rdi/home/RdiPage.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/RdiPage.tsx
@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
+import { RiPage, RiPageBody } from 'uiBase/layout'
+import { RIResizeObserver } from 'uiBase/utils'
import { RdiInstance } from 'uiSrc/slices/interfaces'
import {
createInstanceAction,
@@ -17,9 +19,6 @@ import {
} from 'uiSrc/telemetry'
import HomePageTemplate from 'uiSrc/templates/home-page-template'
import { setTitle } from 'uiSrc/utils'
-import { Page, PageBody } from 'uiSrc/components/base/layout/page'
-import { RIResizeObserver } from 'uiSrc/components/base/utils'
-import { Card } from 'uiSrc/components/base/layout'
import { Rdi as RdiInstanceResponse } from 'apiSrc/modules/rdi/models/rdi'
import EmptyMessage from './empty-message/EmptyMessage'
import ConnectionForm from './connection-form/ConnectionFormWrapper'
@@ -148,8 +147,8 @@ const RdiPage = () => {
return (
-
-
+
+
{
editInstance={editInstance}
isLoading={loading || loadingChanging}
/>
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionForm.tsx b/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionForm.tsx
index 21aadd8abe..9244f8ed8d 100644
--- a/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionForm.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionForm.tsx
@@ -12,25 +12,19 @@ import cx from 'classnames'
import { isNull } from 'lodash'
import ReactDOM from 'react-dom'
+import { RiFlexItem, RiRow, RiSpacer } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { InfoIcon, RiIcon } from 'uiBase/icons'
+import { RiPasswordInput, RiTextInput } from 'uiBase/inputs'
+import { RiTitle } from 'uiBase/text'
import { SECURITY_FIELD } from 'uiSrc/constants'
-import { RiTooltip, RiTooltipProps } from 'uiSrc/components'
import { RdiInstance } from 'uiSrc/slices/interfaces'
import { getFormUpdates, Nullable } from 'uiSrc/utils'
import { useModalHeader } from 'uiSrc/contexts/ModalTitleProvider'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon } from 'uiSrc/components/base/icons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { PasswordInput, TextInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Spacer } from 'uiSrc/components/base/layout'
import ValidationTooltip from './components/ValidationTooltip'
import styles from './styles.module.scss'
+import { RiTooltip, RiTooltipProps } from 'uiBase/display'
export interface AppendInfoProps
extends Omit {
@@ -83,9 +77,9 @@ const ConnectionForm = (props: Props) => {
useEffect(() => {
setInitialFormValues(getInitialValues(editInstance))
setModalHeader(
-
+
{editInstance ? 'Edit endpoint' : 'Add RDI endpoint'}
- ,
+ ,
)
}, [editInstance])
@@ -121,22 +115,22 @@ const ConnectionForm = (props: Props) => {
if (!footerEl) return null
return ReactDOM.createPortal(
-
-
-
-
-
-
+
+
+
+
+
Cancel
-
-
-
+
+
+
- {
onClick={onSubmit}
>
{editInstance ? 'Apply Changes' : 'Add Endpoint'}
-
+
-
-
-
-
,
+
+
+
+ ,
footerEl,
)
}
@@ -168,68 +162,79 @@ const ConnectionForm = (props: Props) => {
-
+
{({ field }: { field: FieldInputProps }) => (
- field.onChange({ target: { name: field.name, value } })}
+ onChange={(value) =>
+ field.onChange({ target: { name: field.name, value } })
+ }
/>
)}
-
-
-
+
+
{({ field }: { field: FieldInputProps }) => (
- field.onChange({ target: { name: field.name, value } })}
+ onChange={(value) =>
+ field.onChange({ target: { name: field.name, value } })
+ }
/>
)}
-
-
-
-
-
-
+
+
+
+
+
{({ field }: { field: FieldInputProps }) => (
- field.onChange({ target: { name: field.name, value } })}
+ onChange={(value) =>
+ field.onChange({
+ target: { name: field.name, value },
+ })
+ }
/>
)}
-
-
-
-
+
+
+
@@ -243,7 +248,7 @@ const ConnectionForm = (props: Props) => {
form: FormikHelpers
meta: FieldMetaProps
}) => (
- {
/>
)}
-
-
-
-
+
+
+
+
()
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
describe('ConnectionFormWrapper', () => {
diff --git a/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionFormWrapper.tsx b/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionFormWrapper.tsx
index 1d58504bdc..1e8e5f5613 100644
--- a/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionFormWrapper.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/connection-form/ConnectionFormWrapper.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
+import { RiTitle } from 'uiBase/text'
import { FormDialog } from 'uiSrc/components'
-import { Title } from 'uiSrc/components/base/text/Title'
import { Nullable } from 'uiSrc/utils'
import { ModalHeaderProvider } from 'uiSrc/contexts/ModalTitleProvider'
import ConnectionForm, { Props as ConnectionFormProps } from './ConnectionForm'
@@ -20,7 +20,7 @@ const ConnectionFormWrapper = (props: Props) => {
Add endpoint}
+ header={modalHeader ?? Add endpoint }
footer={}
>
diff --git a/redisinsight/ui/src/pages/rdi/home/empty-message/EmptyMessage.tsx b/redisinsight/ui/src/pages/rdi/home/empty-message/EmptyMessage.tsx
index e9e5560254..c11b79bf37 100644
--- a/redisinsight/ui/src/pages/rdi/home/empty-message/EmptyMessage.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/empty-message/EmptyMessage.tsx
@@ -1,5 +1,11 @@
import React, { useContext } from 'react'
+import { RiText } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiIcon } from 'uiBase/icons'
+import { RiLink, RiImage } from 'uiBase/display'
import { EXTERNAL_LINKS, UTM_MEDIUMS } from 'uiSrc/constants/links'
import { getUtmExternalLink } from 'uiSrc/utils/links'
import EmptyListDarkIcon from 'uiSrc/assets/img/rdi/empty_list_dark.svg'
@@ -7,13 +13,6 @@ import EmptyListLightIcon from 'uiSrc/assets/img/rdi/empty_list_light.svg'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import { Theme } from 'uiSrc/constants'
-import { Text } from 'uiSrc/components/base/text'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiImage } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
const subTitleText =
@@ -30,27 +29,27 @@ const EmptyMessage = ({ onAddInstanceClick }: Props) => {
className={styles.noResultsContainer}
data-testid="empty-rdi-instance-list"
>
-
-
Redis Data Integration
+
+
Redis Data Integration
-
{subTitleText}
-
-
- {subTitleText}
+
+
+
+ Add RDI Endpoint
-
-
+
+
or
-
-
+ {
})}
>
RDI Quickstart
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/home/header/RdiHeader.tsx b/redisinsight/ui/src/pages/rdi/home/header/RdiHeader.tsx
index bcec86bc54..0c0549364a 100644
--- a/redisinsight/ui/src/pages/rdi/home/header/RdiHeader.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/header/RdiHeader.tsx
@@ -1,10 +1,10 @@
import React from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
import { instancesSelector } from 'uiSrc/slices/rdi/instances'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
import SearchRdiList from '../search/SearchRdiList'
export interface Props {
@@ -16,22 +16,22 @@ const RdiHeader = ({ onRdiInstanceClick }: Props) => {
return (
-
-
-
+
+
+ Endpoint
-
-
+
+
{instances.length > 0 && (
-
+
-
+
)}
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/home/instance-list/RdiInstancesListWrapper.tsx b/redisinsight/ui/src/pages/rdi/home/instance-list/RdiInstancesListWrapper.tsx
index fb8a2b9bcd..ee9d9ae388 100644
--- a/redisinsight/ui/src/pages/rdi/home/instance-list/RdiInstancesListWrapper.tsx
+++ b/redisinsight/ui/src/pages/rdi/home/instance-list/RdiInstancesListWrapper.tsx
@@ -8,6 +8,9 @@ import { useDispatch, useSelector } from 'react-redux'
import { useHistory, useLocation } from 'react-router-dom'
import cx from 'classnames'
+import { RiText } from 'uiBase/text'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon, EditIcon } from 'uiBase/icons'
import ItemList from 'uiSrc/components/item-list'
import { BrowserStorageItem, DEFAULT_SORT, Pages } from 'uiSrc/constants'
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
@@ -22,11 +25,8 @@ import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
import { Nullable, formatLongName, lastConnectionFormat } from 'uiSrc/utils'
import { setAppContextConnectedRdiInstanceId } from 'uiSrc/slices/app/context'
-import { Text } from 'uiSrc/components/base/text'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon, EditIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
width: number
@@ -159,12 +159,12 @@ const RdiInstancesListWrapper = ({
sortable: ({ name }) => name?.toLowerCase(),
width: '30%',
render: (_, { name, id }) => (
- handleCheckConnectToInstance(id)}
>
{name}
-
+
),
},
{
@@ -177,13 +177,13 @@ const RdiInstancesListWrapper = ({
sortable: ({ url }) => url?.toLowerCase(),
render: (name: string, { id }) => (
-
{name}
+
{name}
- (
<>
- {
}
return (
- {
}, [])
return (
-
-
+
+
-
-
+
+
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/download/Download.tsx b/redisinsight/ui/src/pages/rdi/instance/components/download/Download.tsx
index 55cff76115..4ad22fc880 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/download/Download.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/download/Download.tsx
@@ -4,11 +4,11 @@ import React from 'react'
import { useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
-import { SaveIcon } from 'uiSrc/components/base/icons'
+import { SaveIcon } from 'uiBase/icons'
+import { RiEmptyButton } from 'uiBase/forms'
import { rdiPipelineSelector } from 'uiSrc/slices/rdi/pipeline'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
import styles from './styles.module.scss'
interface Props {
@@ -44,7 +44,7 @@ const Download = ({ dataTestid, onClose }: Props) => {
}
return (
- {
data-testid={dataTestid || 'download-pipeline-btn'}
>
Save to file
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/RdiPipelineHeader.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/RdiPipelineHeader.tsx
index 2507431a82..a2a48ae026 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/RdiPipelineHeader.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/RdiPipelineHeader.tsx
@@ -3,11 +3,11 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import { get } from 'lodash'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
import {
getPipelineStatusAction,
rdiPipelineStatusSelector,
} from 'uiSrc/slices/rdi/pipeline'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import CurrentPipelineStatus from './components/current-pipeline-status'
import PipelineActions from './components/pipeline-actions'
@@ -50,23 +50,19 @@ const RdiPipelineHeader = () => {
: undefined
return (
-
-
+
+
-
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx
index 31a7b20ab4..4f7907b156 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx
@@ -3,27 +3,23 @@ import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiColorText, RiText, RiTitle } from 'uiBase/text'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiOutsideClickDetector } from 'uiBase/utils'
+import { RiPrimaryButton, RiCheckbox } from 'uiBase/forms'
+import { RiRocketIcon, RiIcon } from 'uiBase/icons'
+import { RiPopover, RiTooltip } from 'uiBase/display'
+import { rdiErrorMessages } from 'uiSrc/pages/rdi/constants'
+import { addErrorNotification } from 'uiSrc/slices/app/notifications'
+import { createAxiosError, pipelineToJson } from 'uiSrc/utils'
+import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
deployPipelineAction,
getPipelineStatusAction,
rdiPipelineSelector,
resetPipelineChecked,
} from 'uiSrc/slices/rdi/pipeline'
-import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-
-import { createAxiosError, pipelineToJson } from 'uiSrc/utils'
-import { addErrorNotification } from 'uiSrc/slices/app/notifications'
-import { rdiErrorMessages } from 'uiSrc/pages/rdi/constants'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiRocketIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -101,22 +97,17 @@ const DeployPipelineButton = ({ loading, disabled, onReset }: Props) => {
}
return (
-
+
{
data-testid="deploy-rdi-pipeline"
>
Deploy Pipeline
-
+
}
>
-
+
{isPipelineValid ? (
-
+
Are you sure you want to deploy the pipeline?
-
+
) : (
-
+
Your RDI pipeline contains errors. Are you sure you want to
continue?
-
+
)}
-
-
-
+
+
+
When deployed, this local configuration will overwrite any existing
pipeline.
-
-
-
+
+
+
After deployment, consider flushing the target Redis database and
resetting the pipeline to ensure that all data is reprocessed.
-
-
+
+
- {
/>
-
-
-
+
+ {
data-testid="deploy-confirm-btn"
>
Deploy
-
-
-
+
+
+
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/reset-pipeline-button/ResetPipelineButton.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/reset-pipeline-button/ResetPipelineButton.tsx
index 6d5cbe22ad..b3daa35c02 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/reset-pipeline-button/ResetPipelineButton.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/reset-pipeline-button/ResetPipelineButton.tsx
@@ -1,9 +1,10 @@
import React from 'react'
-import { RiResetIcon } from 'uiSrc/components/base/icons'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiResetIcon } from 'uiBase/icons'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiSpacer } from 'uiBase/layout'
+import { RiTooltip } from 'uiBase/display'
+
import styles from '../styles.module.scss'
export interface PipelineButtonProps {
@@ -25,7 +26,7 @@ const ResetPipelineButton = ({
The pipeline will take a new snapshot of the data and process it,
then continue tracking changes.
-
+
Before resetting the RDI pipeline, consider stopping the pipeline
and flushing the target Redis database.
@@ -35,7 +36,7 @@ const ResetPipelineButton = ({
}
anchorClassName={disabled || loading ? styles.disabled : styles.tooltip}
>
-
Reset Pipeline
-
+
)
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/start-pipeline-button/StartPipelineButton.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/start-pipeline-button/StartPipelineButton.tsx
index f5039dbb4c..b3befe00bf 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/start-pipeline-button/StartPipelineButton.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/start-pipeline-button/StartPipelineButton.tsx
@@ -1,10 +1,10 @@
import React from 'react'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { PlayFilledIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { PlayFilledIcon } from 'uiBase/icons'
import { PipelineButtonProps } from '../reset-pipeline-button/ResetPipelineButton'
import styles from '../styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const StartPipelineButton = ({
onClick,
@@ -15,7 +15,7 @@ const StartPipelineButton = ({
content="Start the pipeline to resume processing new data arrivals."
anchorClassName={disabled ? styles.disabled : styles.tooltip}
>
-
Start Pipeline
-
+
)
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/stop-pipeline-button/StopPipelineButton.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/stop-pipeline-button/StopPipelineButton.tsx
index b12c023a1e..7741d062d0 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/stop-pipeline-button/StopPipelineButton.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/stop-pipeline-button/StopPipelineButton.tsx
@@ -1,10 +1,10 @@
import React from 'react'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiStopIcon } from 'uiSrc/components/base/icons'
-import { RiTooltip } from 'uiSrc/components'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiStopIcon } from 'uiBase/icons'
import { PipelineButtonProps } from '../reset-pipeline-button/ResetPipelineButton'
import styles from '../styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
const StopPipelineButton = ({
onClick,
@@ -15,7 +15,7 @@ const StopPipelineButton = ({
content="Stop the pipeline to prevent processing of new data arrivals."
anchorClassName={disabled ? styles.disabled : undefined}
>
-
Stop Pipeline
-
+
)
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/current-pipeline-status/CurrentPipelineStatus.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/current-pipeline-status/CurrentPipelineStatus.tsx
index 015837eef7..956a734207 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/current-pipeline-status/CurrentPipelineStatus.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/current-pipeline-status/CurrentPipelineStatus.tsx
@@ -1,11 +1,9 @@
import React from 'react'
-import { PipelineState } from 'uiSrc/slices/interfaces'
+import { AllIconsType, RiIcon, IconProps } from 'uiBase/icons'
+import { RiTitle } from 'uiBase/text'
+import { RiLoader, RiTooltip } from 'uiBase/display'
import { formatLongName, Maybe } from 'uiSrc/utils'
-import { AllIconsType, RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { IconProps } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Loader } from 'uiSrc/components/base/display'
-import { RiTooltip } from 'uiSrc/components'
+import { PipelineState } from 'uiSrc/slices/interfaces'
import styles from './styles.module.scss'
export interface Props {
@@ -58,9 +56,9 @@ const CurrentPipelineStatus = ({
return (
-
Pipeline State:
+
Pipeline State:
{headerLoading ? (
-
+
) : (
{
+
When downloading a new pipeline from the server, it will overwrite the
existing one displayed in Redis Insight.
-
+
}
submitBtn={
-
+
Download from server
-
+
}
onConfirm={handleRefreshClick}
button={
- {
data-testid="upload-pipeline-btn"
>
Download from server
-
+
}
onButtonClick={handleRefreshWarning}
appendAction={ }
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/pipeline-actions/PipelineActions.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/pipeline-actions/PipelineActions.tsx
index b4cf73b8df..f5f08ca9e1 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/pipeline-actions/PipelineActions.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/pipeline-actions/PipelineActions.tsx
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
import {
getPipelineStatusAction,
rdiPipelineActionSelector,
@@ -22,7 +23,6 @@ import {
PipelineStatus,
} from 'uiSrc/slices/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import DeployPipelineButton from '../buttons/deploy-pipeline-button'
import ResetPipelineButton from '../buttons/reset-pipeline-button'
import RdiConfigFileActionMenu from '../rdi-config-file-action-menu'
@@ -149,15 +149,15 @@ const PipelineActions = ({ collectorStatus, pipelineStatus }: Props) => {
const disabled = deployLoading || actionLoading
return (
-
-
+
+
-
-
+
+
{collectorStatus === CollectorStatus.Ready ? (
{
loading={isLoadingBtn(PipelineAction.Start)}
/>
)}
-
-
+
+
-
-
+
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/instance/components/header/components/rdi-config-file-action-menu/RdiConfigFileActionMenu.tsx b/redisinsight/ui/src/pages/rdi/instance/components/header/components/rdi-config-file-action-menu/RdiConfigFileActionMenu.tsx
index 719e26e49f..7e43c9ddb5 100644
--- a/redisinsight/ui/src/pages/rdi/instance/components/header/components/rdi-config-file-action-menu/RdiConfigFileActionMenu.tsx
+++ b/redisinsight/ui/src/pages/rdi/instance/components/header/components/rdi-config-file-action-menu/RdiConfigFileActionMenu.tsx
@@ -1,11 +1,11 @@
import React, { useState } from 'react'
import cx from 'classnames'
-import UploadModal from 'uiSrc/pages/rdi/pipeline-management/components/upload-modal/UploadModal'
+import { RiCol, RiFlexItem } from 'uiBase/layout'
+import { RiEmptyButton, RiIconButton } from 'uiBase/forms'
+import { UploadIcon, MoreactionsIcon } from 'uiBase/icons'
+import { RiPopover } from 'uiBase/index'
import Download from 'uiSrc/pages/rdi/instance/components/download'
-import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
-import { EmptyButton, IconButton } from 'uiSrc/components/base/forms/buttons'
-import { UploadIcon, MoreactionsIcon } from 'uiSrc/components/base/icons'
-import { RiPopover } from 'uiSrc/components/base'
+import UploadModal from 'uiSrc/pages/rdi/pipeline-management/components/upload-modal/UploadModal'
import FetchPipelinePopover from '../fetch-pipeline-popover'
import styles from './styles.module.scss'
@@ -22,7 +22,7 @@ const RdiConfigFileActionMenu = () => {
}
const button = (
- {
panelPaddingSize="none"
anchorPosition="upRight"
>
-
-
+
+
-
-
+
+
- {
data-testid="upload-file-btn"
>
Upload from file
-
+
-
-
+
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.spec.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.spec.tsx
index 196923e3af..7eb6f68a4a 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.spec.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.spec.tsx
@@ -3,6 +3,7 @@ import { instance, mock } from 'ts-mockito'
import { cloneDeep } from 'lodash'
import { AxiosError } from 'axios'
+import { RiText } from 'uiBase/text'
import {
cleanup,
fireEvent,
@@ -10,7 +11,6 @@ import {
render,
screen,
} from 'uiSrc/utils/test-utils'
-import { Text } from 'uiSrc/components/base/text'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { dryRunJob, rdiDryRunJobSelector } from 'uiSrc/slices/rdi/dryRun'
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
@@ -185,10 +185,10 @@ describe('JobsPanel', () => {
data: {
message: (
<>
- JobName has an invalid structure.
-
+ JobName has an invalid structure.
+
end of the stream or a document separator is expected
-
+
>
),
},
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.tsx
index 08685fda08..02e8d6d625 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel/Panel.tsx
@@ -5,6 +5,21 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import { isArray, upperFirst } from 'lodash'
+import { RiText } from 'uiBase/text'
+import { RiFlexItem, RiRow, RiTabs, TabInfo } from 'uiBase/layout'
+import {
+ RiEmptyButton,
+ RiIconButton,
+ RiSelect,
+ RiSelectOption,
+ defaultValueRender,
+} from 'uiBase/forms'
+import {
+ PlayFilledIcon,
+ CancelSlimIcon,
+ ExtendIcon,
+ ShrinkIcon,
+} from 'uiBase/icons'
import * as keys from 'uiSrc/constants/keys'
import { PipelineJobsTabs } from 'uiSrc/slices/interfaces/rdi'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -19,23 +34,8 @@ import DryRunJobTransformations from 'uiSrc/pages/rdi/pipeline-management/compon
import { createAxiosError, formatLongName, yamlToJson } from 'uiSrc/utils'
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
-import { Text } from 'uiSrc/components/base/text'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { EmptyButton, IconButton } from 'uiSrc/components/base/forms/buttons'
-import {
- PlayFilledIcon,
- CancelSlimIcon,
- ExtendIcon,
- ShrinkIcon,
-} from 'uiSrc/components/base/icons'
-import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
-import { RiTooltip } from 'uiSrc/components'
-import {
- RiSelect,
- RiSelectOption,
- defaultValueRender,
-} from 'uiSrc/components/base/forms/select/RiSelect'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
export interface Props {
job: string
@@ -128,8 +128,8 @@ const DryRunJobPanel = (props: Props) => {
createAxiosError({
message: (
<>
- {`${upperFirst(name)} has an invalid structure.`}
- {msg}
+ {`${upperFirst(name)} has an invalid structure.`}
+ {msg}
>
),
}),
@@ -157,16 +157,16 @@ const DryRunJobPanel = (props: Props) => {
label: (
+
Displays the results of the transformations you defined. The data
is presented in JSON format.
No data is written to the target database.
-
+
}
data-testid="transformation-output-tooltip"
>
- Transformation output
+ Transformation output
),
content: null,
@@ -176,16 +176,16 @@ const DryRunJobPanel = (props: Props) => {
label: (
+
Displays the list of Redis commands that will be generated based
on your job details.
No data is written to the target database.
-
+
}
data-testid="job-output-tooltip"
>
- Job output
+ Job output
),
content: null,
@@ -204,16 +204,16 @@ const DryRunJobPanel = (props: Props) => {
>
-
Test transformation logic
+
Test transformation logic
-
- {
-
+
Add input data to test the transformation logic.
-
+
- Input
+ Input
{
wrapperClassName={styles.inputCode}
data-testid="input-value"
/>
-
-
+
+
- {
data-testid="dry-run-btn"
>
Dry run
-
+
-
-
+
+
{isSelectAvailable && (
{
data-testid="target-select"
/>
)}
- ({
title: '',
content: (
-
-
+
+
-
- {text}
-
+
+ {text}
+
),
})
@@ -67,8 +62,6 @@ const validateJobName = (
return undefined
}
-
-
const JobsTree = (props: IProps) => {
const { onSelectedTab, path, rdiInstanceId, changes = {} } = props
@@ -165,7 +158,7 @@ const JobsTree = (props: IProps) => {
validationErrors: string[] = [],
) => (
<>
- onSelectedTab(name)}
className={cx(styles.navItem, 'truncateText', { invalid: !isValid })}
@@ -188,8 +181,8 @@ const JobsTree = (props: IProps) => {
/>
)}
-
-
+
@@ -198,7 +191,7 @@ const JobsTree = (props: IProps) => {
position="top"
anchorClassName="flex-row"
>
- {
setCurrentJobName(name)
@@ -216,22 +209,22 @@ const JobsTree = (props: IProps) => {
+
Changes will not be applied until the pipeline is deployed.
-
+
}
submitBtn={
-
Delete
-
+
}
onConfirm={() => handleDeleteClick(name)}
button={
- {
}
/>
-
+
>
)
const jobNameEditor = (name: string, idx?: number) => (
- {
disableEmpty
styles={{
actionsContainer: {
- width: '64px'
- }
+ width: '64px',
+ },
}}
/>
-
+
)
const isJobValid = (jobName: string) =>
@@ -285,7 +278,7 @@ const JobsTree = (props: IProps) => {
const renderJobsList = (jobs: IRdiPipelineJob[]) =>
jobs.map(({ name }, idx) => (
- {
)}
-
-
+
+
-
+
{currentJobName === name
? jobNameEditor(name, idx)
- : jobName(name, isJobValid(name), getJobValidionErrors(name))}
-
-
+ : jobName(name, isJobValid(name))}
+
+
))
const folder = () => (
-
-
-
+
+
+
-
-
+
+
{'Jobs '}
{!loading && (
-
{jobs?.length ? `(${jobs?.length})` : ''}
-
+
)}
{loading && (
-
)}
-
-
-
+
+
+
)
return (
@@ -371,7 +364,7 @@ const JobsTree = (props: IProps) => {
position="top"
anchorClassName="flex-row"
>
- {
setAccordionState('open')
@@ -392,23 +385,23 @@ const JobsTree = (props: IProps) => {
>
{/* // TODO confirm with RDI team and put sort in separate component */}
{isNewJob && (
-
-
-
+
+
-
+
{jobNameEditor('')}
-
-
+
+
)}
{renderJobsList(jobs ?? [])}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/navigation/Navigation.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/navigation/Navigation.tsx
index 6801f4af10..5de601cf7f 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/navigation/Navigation.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/navigation/Navigation.tsx
@@ -3,8 +3,8 @@ import { useSelector } from 'react-redux'
import { useHistory, useLocation, useParams } from 'react-router-dom'
import cx from 'classnames'
-import { RiTooltip } from 'uiSrc/components'
-import { ColorText } from 'uiSrc/components/base/text'
+import { RiColorText } from 'uiBase/text'
+import { RiTooltip } from 'uiBase/display'
import { PageNames, Pages } from 'uiSrc/constants'
import JobsTree from 'uiSrc/pages/rdi/pipeline-management/components/jobs-tree'
import Tab from 'uiSrc/pages/rdi/pipeline-management/components/tab'
@@ -107,7 +107,7 @@ const Navigation = () => {
return (
- Pipeline Management
+ Pipeline Management
{!loading && renderTabs()}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.spec.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.spec.tsx
index a2c7b605a5..22801bf828 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.spec.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.spec.tsx
@@ -19,6 +19,7 @@ import {
} from 'uiSrc/slices/app/context'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { FileChangeType } from 'uiSrc/slices/interfaces'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import SourcePipelineDialog, {
PipelineSourceOptions,
} from './SourcePipelineModal'
@@ -48,22 +49,10 @@ jest.mock('uiSrc/slices/app/context', () => ({
appContextPipelineManagement: jest.fn(),
}))
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
let store: typeof mockedStore
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.tsx
index 48af28449a..1c300ab8b5 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/source-pipeline-dialog/SourcePipelineModal.tsx
@@ -3,6 +3,9 @@ import { keys } from '@elastic/eui'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiText } from 'uiBase/text'
+import { RiIcon, CancelIcon } from 'uiBase/icons'
+import { RiModal } from 'uiBase/display'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
fetchRdiPipeline,
@@ -14,12 +17,8 @@ import {
setPipelineDialogState,
} from 'uiSrc/slices/app/context'
import UploadModal from 'uiSrc/pages/rdi/pipeline-management/components/upload-modal/UploadModal'
-import { Text } from 'uiSrc/components/base/text'
import { FileChangeType } from 'uiSrc/slices/interfaces'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Modal } from 'uiSrc/components/base/display'
-import { CancelIcon } from 'uiSrc/components/base/icons'
import styles from './styles.module.scss'
export const EMPTY_PIPELINE = {
@@ -105,13 +104,13 @@ const SourcePipelineDialog = () => {
}
return (
-
-
-
-
+
+
+
+
Start with your pipeline
-
-
+
+
{
data-testid="server-source-pipeline-dialog"
>
- Download from server
+ Download from server
{
data-testid="file-source-pipeline-dialog"
>
- Upload from file
+ Upload from file
{
size="xl"
className={styles.icon}
/>
- Create new pipeline
+ Create new pipeline
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/tab/Tab.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/tab/Tab.tsx
index 975f2f8a70..ff36d9407a 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/tab/Tab.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/tab/Tab.tsx
@@ -1,11 +1,10 @@
import React from 'react'
import cx from 'classnames'
-import { Text } from 'uiSrc/components/base/text'
-import { Loader } from 'uiSrc/components/base/display'
-
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { RiTooltip } from 'uiSrc/components'
+import { RiText } from 'uiBase/text'
+import { RiLoader, RiTooltip } from 'uiBase/display'
import ValidationErrorsList from 'uiSrc/pages/rdi/pipeline-management/components/validation-errors-list/ValidationErrorsList'
+
+import { RiIcon } from 'uiBase/icons'
import styles from './styles.module.scss'
export interface IProps {
@@ -38,15 +37,17 @@ const Tab = (props: IProps) => {
className={cx(styles.wrapper, className, { [styles.active]: isSelected })}
data-testid={testID}
>
-
+
{title}
-
+
{fileName ? (
-
+
{fileName}
-
+
{!isValid && (
{
)}
{isLoading && (
-
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-button/TemplateButton.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-button/TemplateButton.tsx
index d50c467386..e8a7a942f7 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-button/TemplateButton.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-button/TemplateButton.tsx
@@ -2,17 +2,17 @@ import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiSecondaryButton } from 'uiBase/forms'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
fetchJobTemplate,
rdiPipelineStrategiesSelector,
} from 'uiSrc/slices/rdi/pipeline'
-import { RiTooltip } from 'uiSrc/components'
import { RdiPipelineTabs } from 'uiSrc/slices/interfaces'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
import { getTooltipContent } from '../template-form/TemplateForm'
import { INGEST_OPTION } from '../template-form/constants'
import styles from './styles.module.scss'
+import { RiTooltip } from 'uiBase/display'
export interface TemplateButtonProps {
value: string
@@ -51,7 +51,7 @@ const TemplateButton = ({ setFieldValue, value }: TemplateButtonProps) => {
position="bottom"
anchorClassName="flex-row"
>
- {
data-testid="template-btn"
>
Insert template
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-form/TemplateForm.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-form/TemplateForm.tsx
index c18ed83dbc..c35d195c91 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-form/TemplateForm.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-form/TemplateForm.tsx
@@ -3,6 +3,17 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ RiSelectOption,
+ RiSelect,
+ defaultValueRender,
+} from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiTooltip } from 'uiBase/display'
import {
fetchPipelineStrategies,
fetchJobTemplate,
@@ -11,19 +22,6 @@ import {
} from 'uiSrc/slices/rdi/pipeline'
import { RdiPipelineTabs } from 'uiSrc/slices/interfaces/rdi'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Text } from 'uiSrc/components/base/text'
-import { RiTooltip } from 'uiSrc/components'
-import {
- RiSelectOption,
- RiSelect,
- defaultValueRender,
-} from 'uiSrc/components/base/forms/select/RiSelect'
import { NO_TEMPLATE_VALUE, NO_OPTIONS, INGEST_OPTION } from './constants'
import styles from './styles.module.scss'
@@ -165,12 +163,12 @@ const TemplateForm = (props: Props) => {
return (
-
Select a template
-
+
Select a template
+
-
+
{pipelineTypeOptions?.length > 1 && (
-
+
<>
Pipeline type
{
data-testid="pipeline-type-select"
/>
>
-
+
)}
{source === RdiPipelineTabs.Config && (
-
+
<>
Database type
{
data-testid="db-type-select"
/>
>
-
+
)}
-
Cancel
-
+
- {
data-testid="template-apply-btn"
>
Apply
-
+
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-popover/TemplatePopover.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-popover/TemplatePopover.tsx
index b118fafac6..5b96b534ce 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-popover/TemplatePopover.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/template-popover/TemplatePopover.tsx
@@ -2,13 +2,13 @@ import React from 'react'
import { useDispatch } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiOutsideClickDetector } from 'uiBase/utils'
+import { RiSecondaryButton } from 'uiBase/forms'
+import { RiPopover } from 'uiBase/display'
import TemplateForm from 'uiSrc/pages/rdi/pipeline-management/components/template-form'
import { fetchPipelineStrategies } from 'uiSrc/slices/rdi/pipeline'
import { RdiPipelineTabs } from 'uiSrc/slices/interfaces'
-import { OutsideClickDetector } from 'uiSrc/components/base/utils'
-import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { RiPopover } from 'uiSrc/components/base'
import styles from './styles.module.scss'
export interface Props {
@@ -44,7 +44,7 @@ const TemplatePopover = (props: Props) => {
}
return (
-
+
{
closePopover={handleClose}
panelClassName={styles.popoverWrapper}
button={
- {
data-testid={`template-trigger-${source}`}
>
Insert template
-
+
}
>
{
value={value}
/>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-log/TestConnectionsLog.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-log/TestConnectionsLog.tsx
index eea4fb3c6b..71e356e1bc 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-log/TestConnectionsLog.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-log/TestConnectionsLog.tsx
@@ -1,7 +1,7 @@
import cx from 'classnames'
import React, { useState } from 'react'
-import { RICollapsibleNavGroup } from 'uiSrc/components/base/display'
+import { RiCollapsibleNavGroup } from 'uiBase/display'
import { TransformGroupResult } from 'uiSrc/slices/interfaces'
import TestConnectionsTable from 'uiSrc/pages/rdi/pipeline-management/components/test-connections-table'
@@ -67,7 +67,7 @@ const TestConnectionsLog = (props: Props) => {
const id = `${status}-connections-${getNavGroupState(status)}`
return (
-
{
id={id}
>
-
+
)
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-panel/TestConnectionsPanel.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-panel/TestConnectionsPanel.tsx
index 62683a82b0..ccb52ad4c7 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-panel/TestConnectionsPanel.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-panel/TestConnectionsPanel.tsx
@@ -1,14 +1,13 @@
import React from 'react'
import { useSelector } from 'react-redux'
-import TestConnectionsLog from 'uiSrc/pages/rdi/pipeline-management/components/test-connections-log'
+import { RiText } from 'uiBase/text'
+import { RiCol, RiFlexItem } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CancelSlimIcon } from 'uiBase/icons'
+import { RiLoader } from 'uiBase/display'
import { rdiTestConnectionsSelector } from 'uiSrc/slices/rdi/testConnections'
-
-import { Text } from 'uiSrc/components/base/text'
-import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CancelSlimIcon } from 'uiSrc/components/base/icons'
-import { Loader } from 'uiSrc/components/base/display'
+import TestConnectionsLog from 'uiSrc/pages/rdi/pipeline-management/components/test-connections-log'
import styles from './styles.module.scss'
interface TestConnectionPanelWrapperProps {
@@ -22,8 +21,8 @@ const TestConnectionPanelWrapper = ({
}: TestConnectionPanelWrapperProps) => (
-
Connection test results
-
Connection test results
+ {
if (loading) {
return (
-
-
- Loading results...
-
-
-
+
+ Loading results...
+
+
+
-
-
+
+
)
}
@@ -66,9 +65,9 @@ const TestConnectionsPanel = (props: Props) => {
if (!results) {
return (
-
+
No results found. Please try again.
-
+
)
}
@@ -76,21 +75,21 @@ const TestConnectionsPanel = (props: Props) => {
return (
-
Source connections
-
+
-
Target connections
-
+
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-table/TestConnectionsTable.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-table/TestConnectionsTable.tsx
index db1c765696..6e0a3d06e0 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-table/TestConnectionsTable.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/test-connections-table/TestConnectionsTable.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
import { IRdiConnectionResult } from 'uiSrc/slices/interfaces'
@@ -48,7 +48,7 @@ const TestConnectionsTable = (props: Props) => {
return (
-
({
@@ -80,22 +81,10 @@ beforeEach(() => {
jest.clearAllMocks()
})
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
describe('UploadModal', () => {
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.spec.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.spec.tsx
index 6e397e1eaf..615828fe6e 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.spec.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.spec.tsx
@@ -1,6 +1,7 @@
import React from 'react'
import { fireEvent, render, screen } from 'uiSrc/utils/test-utils'
+import { mockModal } from 'uiSrc/mocks/components/modal'
import UploadDialog, { Props } from './UploadDialog'
jest.mock('uiSrc/slices/rdi/pipeline', () => ({
@@ -28,22 +29,10 @@ jest.mock('uiSrc/telemetry', () => ({
sendEventTelemetry: jest.fn(),
}))
-jest.mock('uiSrc/components/base/display', () => {
- const actual = jest.requireActual('uiSrc/components/base/display')
-
- return {
- ...actual,
- Modal: {
- ...actual.Modal,
- Content: {
- ...actual.Modal.Content,
- Header: {
- ...actual.Modal.Content.Header,
- Title: jest.fn().mockReturnValue(null),
- },
- },
- },
- }
+jest.mock('uiBase/display', () => {
+ const actual = jest.requireActual('uiBase/display')
+
+ return mockModal(actual)
})
const mockedProps: Props = {
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.tsx
index 3c3f82a45f..2bf833dbd6 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/components/upload-modal/components/upload-dialog/UploadDialog.tsx
@@ -1,9 +1,9 @@
import React, { useState } from 'react'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
+import { RiIcon } from 'uiBase/icons'
import ImportFileModal from 'uiSrc/components/import-file-modal'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import styles from './styles.module.scss'
export interface Props {
@@ -55,9 +55,9 @@ const UploadDialog = ({
}
submitResults={
-
+
A new pipeline has been successfully uploaded.
-
+
}
loading={loading}
@@ -65,14 +65,14 @@ const UploadDialog = ({
warning={
showWarning ? (
-
+
{warningMessage}
-
+
) : null
}
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/pages/config/Config.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/pages/config/Config.tsx
index 56d5851b71..99a27897cd 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/pages/config/Config.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/pages/config/Config.tsx
@@ -4,6 +4,9 @@ import cx from 'classnames'
import { useParams } from 'react-router-dom'
import { get, throttle } from 'lodash'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiLink, RiLoader } from 'uiBase/display'
import {
sendPageViewTelemetry,
sendEventTelemetry,
@@ -32,11 +35,7 @@ import { appContextPipelineManagement } from 'uiSrc/slices/app/context'
import { createAxiosError, isEqualPipelineFile, yamlToJson } from 'uiSrc/utils'
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Loader } from 'uiSrc/components/base/display'
import styles from './styles.module.scss'
const Config = () => {
@@ -148,7 +147,7 @@ const Config = () => {
})}
>
- Target database configuration
+ Target database configuration
{
source={RdiPipelineTabs.Config}
/>
-
+
{'Provide '}
- {
})}
>
connection details
-
+
{
' for source and target databases and other collector configurations, such as tables and columns to track.'
}
-
+
{pipelineLoading ? (
-
+
) : (
{
/>
)}
-
{
data-testid="rdi-test-connection-btn"
>
Test Connection
-
+
{isPanelOpen && }
diff --git a/redisinsight/ui/src/pages/rdi/pipeline-management/pages/job/Job.tsx b/redisinsight/ui/src/pages/rdi/pipeline-management/pages/job/Job.tsx
index d7b2f613e4..8fe6fab004 100644
--- a/redisinsight/ui/src/pages/rdi/pipeline-management/pages/job/Job.tsx
+++ b/redisinsight/ui/src/pages/rdi/pipeline-management/pages/job/Job.tsx
@@ -1,9 +1,12 @@
import React, { useState, useEffect, useRef, useCallback } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { throttle } from 'lodash'
+import { get, throttle } from 'lodash'
import cx from 'classnames'
import { monaco as monacoEditor } from 'react-monaco-editor'
+import { RiPrimaryButton, RiSecondaryButton } from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiLink, RiLoader } from 'uiBase/display'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { EXTERNAL_LINKS, UTM_MEDIUMS } from 'uiSrc/constants/links'
import {
@@ -28,13 +31,6 @@ import { getUtmExternalLink } from 'uiSrc/utils/links'
import { KeyboardShortcut, RiTooltip } from 'uiSrc/components'
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { Loader } from 'uiSrc/components/base/display'
import TemplateButton from '../../components/template-button'
import styles from './styles.module.scss'
@@ -179,7 +175,7 @@ const Job = (props: Props) => {
<>
-
{name}
+
{name}
{
content={
KEYBOARD_SHORTCUTS?.rdi?.openDedicatedEditor && (
- {`${KEYBOARD_SHORTCUTS.rdi.openDedicatedEditor?.description}\u00A0\u00A0`}
+ {`${KEYBOARD_SHORTCUTS.rdi.openDedicatedEditor?.description}\u00A0\u00A0`}
{
}
data-testid="open-dedicated-editor-tooltip"
>
- setShouldOpenDedicatedEditor(true)}
data-testid="open-dedicated-editor-btn"
>
SQL and JMESPath Editor
-
+
{
/>
-
+
{'Create a job per source table to filter, transform, and '}
- {
})}
>
map data
-
+
{' to Redis.'}
-
+
{loading ? (
-
+
) : (
{
)}
-
{
data-testid="rdi-job-dry-run"
>
Dry Run
-
+
{isPanelOpen && (
diff --git a/redisinsight/ui/src/pages/rdi/statistics/StatisticsPage.tsx b/redisinsight/ui/src/pages/rdi/statistics/StatisticsPage.tsx
index 720e79b5d1..b10e1b6676 100644
--- a/redisinsight/ui/src/pages/rdi/statistics/StatisticsPage.tsx
+++ b/redisinsight/ui/src/pages/rdi/statistics/StatisticsPage.tsx
@@ -2,7 +2,8 @@ import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
+import { RiLoader } from 'uiBase/display'
import { connectedInstanceSelector } from 'uiSrc/slices/rdi/instances'
import { getPipelineStatusAction } from 'uiSrc/slices/rdi/pipeline'
import {
@@ -18,7 +19,6 @@ import {
import { formatLongName, Nullable, setTitle } from 'uiSrc/utils'
import { setLastPageContext } from 'uiSrc/slices/app/context'
import { PageNames } from 'uiSrc/constants'
-import { Loader } from 'uiSrc/components/base/display'
import { IRdiStatistics, RdiPipelineStatus } from 'uiSrc/slices/interfaces'
import Clients from './clients'
@@ -112,9 +112,9 @@ const StatisticsPage = () => {
// todo add interface
if (statisticsResults.status === 'failed') {
return (
-
+
Unexpected error in your RDI endpoint, please refresh the page
-
+
)
}
@@ -125,7 +125,7 @@ const StatisticsPage = () => {
{pageLoading && (
-
+
)}
{!shouldShowStatistics(statisticsResults) ? (
diff --git a/redisinsight/ui/src/pages/rdi/statistics/clients/Clients.tsx b/redisinsight/ui/src/pages/rdi/statistics/clients/Clients.tsx
index b048e85db8..96506c4b40 100644
--- a/redisinsight/ui/src/pages/rdi/statistics/clients/Clients.tsx
+++ b/redisinsight/ui/src/pages/rdi/statistics/clients/Clients.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
import { IClients } from 'uiSrc/slices/interfaces'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
import Accordion from '../components/accordion'
import Panel from '../components/panel'
@@ -87,7 +87,7 @@ const Clients = ({
onRefreshClicked={onRefreshClicked}
onChangeAutoRefresh={onChangeAutoRefresh}
>
-
- {
return (
-
+
-
-
No pipeline deployed yet
-
+
+ No pipeline deployed yet
+
Create your first pipeline to get started!
-
-
-
+
+ {
@@ -36,7 +39,7 @@ const Empty = ({ rdiInstanceId }: Props) => {
}}
>
Add Pipeline
-
+
)
diff --git a/redisinsight/ui/src/pages/rdi/statistics/processing-performance/ProcessingPerformance.tsx b/redisinsight/ui/src/pages/rdi/statistics/processing-performance/ProcessingPerformance.tsx
index 1dc3ea5d50..e25edbcad2 100644
--- a/redisinsight/ui/src/pages/rdi/statistics/processing-performance/ProcessingPerformance.tsx
+++ b/redisinsight/ui/src/pages/rdi/statistics/processing-performance/ProcessingPerformance.tsx
@@ -1,7 +1,7 @@
import React from 'react'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
import { IProcessingPerformance } from 'uiSrc/slices/interfaces'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import Accordion from '../components/accordion'
import Panel from '../components/panel'
import VerticalDivider from '../components/vertical-divider'
@@ -17,15 +17,15 @@ const InfoPanel = ({
value: number
suffix: string
}) => (
-
-
-
+
+
+
{label}
-
- {value}
- {suffix}
-
-
+
+
{value}
+
{suffix}
+
+
)
interface Props {
@@ -62,9 +62,9 @@ const ProcessingPerformance = ({
enableAutoRefreshDefault
>
<>
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
>
diff --git a/redisinsight/ui/src/pages/rdi/statistics/status/Status.tsx b/redisinsight/ui/src/pages/rdi/statistics/status/Status.tsx
index 8b17f83a45..4ca8e2940e 100644
--- a/redisinsight/ui/src/pages/rdi/statistics/status/Status.tsx
+++ b/redisinsight/ui/src/pages/rdi/statistics/status/Status.tsx
@@ -1,23 +1,23 @@
import React from 'react'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
import { IRdiPipelineStatus } from 'uiSrc/slices/interfaces'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import Panel from '../components/panel'
import VerticalDivider from '../components/vertical-divider'
import styles from './styles.module.scss'
const StatusItem = ({ label, value }: { label: string; value: string }) => (
-
-
-
+
+
+
{label}
-
-
+
+
{value}
-
-
-
+
+
+
)
interface Props {
@@ -26,13 +26,13 @@ interface Props {
const Status = ({ data }: Props) => (
-
+
-
+
)
diff --git a/redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.tsx b/redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.tsx
index 66881b9d12..f632e09e9f 100644
--- a/redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.tsx
+++ b/redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.tsx
@@ -1,15 +1,15 @@
import React from 'react'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
+import { RiIcon } from 'uiBase/icons'
import {
IConnections,
StatisticsConnectionStatus,
} from 'uiSrc/slices/interfaces'
import { formatLongName } from 'uiSrc/utils'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
-import { RiTooltip } from 'uiSrc/components'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import Accordion from '../components/accordion'
import Panel from '../components/panel'
+import { RiTooltip } from 'uiBase/display'
type ConnectionData = {
name: string
@@ -99,7 +99,7 @@ const TargetConnections = ({ data }: Props) => {
title="Target connections"
hideAutoRefresh
>
-
Cancel
-
+
}
>
-
+
Your changes have not been saved.
Do you want to proceed to
the list of databases?
-
+
-
Proceed
-
+
)
@@ -143,31 +141,31 @@ const RedisClusterDatabases = ({
return (
-
+
Auto-Discover Redis Enterprise Databases
-
-
-
+
+
+
{!!items.length && (
-
+
These are the {items.length > 1 ? 'databases ' : 'database '}
in your Redis Enterprise Cluster. Select the
{items.length > 1 ? ' databases ' : ' database '} that you want
to add.
-
+
)}
-
-
-
-
+
+
+
-
-
-
+
+
+
-
{!items.length && (
-
{message}
+
{message}
)}
-
-
+
-
Back to adding databases
-
-
+
+
- {validationErrors.NO_DBS_SELECTED}
-
+ {validationErrors.NO_DBS_SELECTED}
) : null
}
>
-
Add selected Databases
-
+
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesPage.tsx b/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesPage.tsx
index edbe1a00c9..8c54d4ab56 100644
--- a/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesPage.tsx
+++ b/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesPage.tsx
@@ -2,6 +2,10 @@ import React from 'react'
import { useHistory } from 'react-router-dom'
import { useDispatch, useSelector } from 'react-redux'
+import { RiFlexItem, RiRow, ColumnDefinition } from 'uiBase/layout'
+import { RiIconButton } from 'uiBase/forms'
+import { CopyIcon, RiIcon } from 'uiBase/icons'
+import { RiColorText, RiText } from 'uiBase/text'
import { Pages } from 'uiSrc/constants'
import {
addInstancesRedisCluster,
@@ -25,12 +29,6 @@ import {
RiTooltip,
} from 'uiSrc/components'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { IconButton } from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
-import { ColorText, Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { ColumnDefinition } from 'uiSrc/components/base/layout/table'
import RedisClusterDatabases from './RedisClusterDatabases'
import RedisClusterDatabasesResult from './RedisClusterDatabasesResult'
@@ -95,7 +93,7 @@ const RedisClusterDatabasesPage = () => {
className={styles.tooltipColumnName}
content={formatLongName(name)}
>
- {cellContent}
+ {cellContent}
)
@@ -121,13 +119,13 @@ const RedisClusterDatabasesPage = () => {
return (
!!dnsName && (
-
{text}
+
{text}
- {
return (
<>
{statusAdded === AddRedisDatabaseStatus.Success ? (
- {messageAdded}
+ {messageAdded}
) : (
-
-
+
+
-
+
-
-
+
Error
-
-
-
+
+
+
)}
>
diff --git a/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesResult.tsx b/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesResult.tsx
index b037fd209a..31da96d303 100644
--- a/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesResult.tsx
+++ b/redisinsight/ui/src/pages/redis-cluster/RedisClusterDatabasesResult.tsx
@@ -2,6 +2,10 @@ import React, { useState, useEffect } from 'react'
import cx from 'classnames'
import { useSelector } from 'react-redux'
+import { RiFlexItem, RiRow, RiTable, ColumnDefinition } from 'uiBase/layout'
+import { RiPrimaryButton, RiSecondaryButton, RiFormField } from 'uiBase/forms'
+import { RiSearchInput } from 'uiBase/inputs'
+import { RiTitle, RiText } from 'uiBase/text'
import {
AddRedisDatabaseStatus,
InstanceRedisCluster,
@@ -11,16 +15,6 @@ import { clusterSelector } from 'uiSrc/slices/instances/cluster'
import MessageBar from 'uiSrc/components/message-bar/MessageBar'
import { AutodiscoveryPageTemplate } from 'uiSrc/templates'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import {
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { SearchInput } from 'uiSrc/components/base/inputs'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
import styles from './styles.module.scss'
export interface Props {
@@ -66,7 +60,7 @@ const RedisClusterDatabasesResult = ({ columns, onBack, onView }: Props) => {
}
const SummaryText = () => (
-
+
Summary:
{countSuccessAdded ? (
@@ -77,40 +71,40 @@ const RedisClusterDatabasesResult = ({ columns, onBack, onView }: Props) => {
{countFailAdded ? (
Failed to add {countFailAdded} database(s).
) : null}
-
+
)
return (
-
+
Redis Enterprise
{countSuccessAdded + countFailAdded > 1
? ' Databases '
: ' Database '}
Added
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
+
-
{
]}
/>
{!items.length && (
- {message}
+ {message}
)}
-
-
-
+
+ onBack(false)}
className="btn-cancel btn-back"
data-testid="btn-back-to-adding"
>
Back to adding databases
-
-
+ onView(false)}
data-testid="btn-view-databases"
>
View Databases
-
-
-
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/redis-stack/components/edit-connection/EditConnection.tsx b/redisinsight/ui/src/pages/redis-stack/components/edit-connection/EditConnection.tsx
index 38c441edb0..d99d7c9cc8 100644
--- a/redisinsight/ui/src/pages/redis-stack/components/edit-connection/EditConnection.tsx
+++ b/redisinsight/ui/src/pages/redis-stack/components/edit-connection/EditConnection.tsx
@@ -2,6 +2,7 @@ import React, { useContext, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
+import { RiPage, RiPageBody, RiFlexItem } from 'uiBase/layout'
import {
getApiErrorMessage,
isStatusSuccessful,
@@ -23,8 +24,6 @@ import { sendEventTelemetry } from 'uiSrc/telemetry'
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import { contentSelector } from 'uiSrc/slices/content/create-redis-buttons'
import DatabasePanelDialog from 'uiSrc/pages/home/components/database-panel-dialog'
-import { Page, PageBody } from 'uiSrc/components/base/layout/page'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
import './styles.scss'
import styles from './styles.module.scss'
@@ -115,12 +114,12 @@ const EditConnection = () => {
<>
-
-
+
+
{createDbContent?.cloud && (
-
+
-
+
)}
@@ -132,8 +131,8 @@ const EditConnection = () => {
/>
-
-
+
+
>
)
}
diff --git a/redisinsight/ui/src/pages/settings/SettingsPage.tsx b/redisinsight/ui/src/pages/settings/SettingsPage.tsx
index 7765fd67b9..0a4a49ba60 100644
--- a/redisinsight/ui/src/pages/settings/SettingsPage.tsx
+++ b/redisinsight/ui/src/pages/settings/SettingsPage.tsx
@@ -3,6 +3,16 @@ import cx from 'classnames'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiPage,
+ RiPageBody,
+ RiPageContentBody,
+ RiPageHeader,
+ RiCol,
+} from 'uiBase/layout'
+import { RiCallOut, RiLoader, RiCollapsibleNavGroup } from 'uiBase/display'
+import { RiTitle, RiText } from 'uiBase/text'
import { setTitle } from 'uiSrc/utils'
import { FeatureFlags } from 'uiSrc/constants'
import { useDebouncedEffect } from 'uiSrc/services'
@@ -19,18 +29,6 @@ import {
} from 'uiSrc/slices/user/user-settings'
import Divider from 'uiSrc/components/divider/Divider'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- Page,
- PageBody,
- PageContentBody,
- PageHeader,
-} from 'uiSrc/components/base/layout/page'
-import { CallOut } from 'uiSrc/components/base/display/call-out/CallOut'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Loader, RICollapsibleNavGroup } from 'uiSrc/components/base/display'
-import { Col } from 'uiSrc/components/base/layout/flex'
import {
AdvancedSettings,
CloudSettings,
@@ -68,7 +66,7 @@ const SettingsPage = () => {
-
+
>
)
@@ -77,7 +75,7 @@ const SettingsPage = () => {
{loading && (
-
+
)}
@@ -88,7 +86,7 @@ const SettingsPage = () => {
{loading && (
-
+
)}
@@ -99,7 +97,7 @@ const SettingsPage = () => {
{loading && (
-
+
)}
@@ -110,31 +108,31 @@ const SettingsPage = () => {
{loading && (
-
+
)}
-
-
+
+
Advanced settings should only be changed if you understand their
impact.
-
-
+
+
)
return (
-
-
-
-
+
+
+
+
Settings
-
-
+
+
-
-
-
+
+ {
data-test-subj="accordion-appearance"
>
{Appearance()}
- {' '}
- {' '}
+ {
data-test-subj="accordion-privacy-settings"
>
{PrivacySettings()}
-
-
+ {
id="accordion-workbench-settings"
>
{WorkbenchSettingsGroup()}
-
+
- {
data-test-subj="accordion-cloud-settings"
>
{CloudSettingsGroup()}
-
+
- {
data-test-subj="accordion-advanced-settings"
>
{AdvancedSettingsGroup()}
-
-
-
-
-
+
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/settings/components/advanced-settings/AdvancedSettings.tsx b/redisinsight/ui/src/pages/settings/components/advanced-settings/AdvancedSettings.tsx
index 05a566ce39..27dacf0ee1 100644
--- a/redisinsight/ui/src/pages/settings/components/advanced-settings/AdvancedSettings.tsx
+++ b/redisinsight/ui/src/pages/settings/components/advanced-settings/AdvancedSettings.tsx
@@ -1,6 +1,7 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
import { validateCountNumber } from 'uiSrc/utils'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { SettingItem } from 'uiSrc/components'
@@ -8,7 +9,6 @@ import {
updateUserConfigSettingsAction,
userSettingsConfigSelector,
} from 'uiSrc/slices/user/user-settings'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
const AdvancedSettings = () => {
const { scanThreshold = '' } = useSelector(userSettingsConfigSelector) ?? {}
@@ -38,7 +38,7 @@ const AdvancedSettings = () => {
placeholder="10 000"
label="Keys to Scan:"
/>
-
+
>
)
}
diff --git a/redisinsight/ui/src/pages/settings/components/cloud-settings/CloudSettings.tsx b/redisinsight/ui/src/pages/settings/components/cloud-settings/CloudSettings.tsx
index 787392e685..01df74e4b5 100644
--- a/redisinsight/ui/src/pages/settings/components/cloud-settings/CloudSettings.tsx
+++ b/redisinsight/ui/src/pages/settings/components/cloud-settings/CloudSettings.tsx
@@ -1,23 +1,19 @@
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
+import { DeleteIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiDestructiveButton, RiPrimaryButton } from 'uiBase/forms'
+import { RiTitle, RiText } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
+import { RiPopover } from 'uiBase/index'
+import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import {
getCapiKeysAction,
oauthCapiKeysSelector,
removeAllCapiKeysAction,
} from 'uiSrc/slices/oauth/cloud'
-import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- DestructiveButton,
- PrimaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Link } from 'uiSrc/components/base/link/Link'
-import { RiPopover } from 'uiSrc/components/base'
import UserApiKeysTable from './components/user-api-keys-table'
import styles from './styles.module.scss'
@@ -52,28 +48,28 @@ const CloudSettings = () => {
return (
-
+
API user keys
-
-
-
-
-
+
+
+
+
+
The list of API user keys that are stored locally in Redis Insight.{' '}
API user keys grant programmatic access to Redis Cloud.
{'To delete API keys from Redis Cloud, '}
-
sign in to Redis Cloud
-
+
{' and delete them manually.'}
-
-
-
+
+
+
{
panelPaddingSize="l"
panelClassName={styles.deletePopover}
button={
-
Remove all API keys
-
+
}
>
-
+
All API user keys will be removed from Redis Insight.
{'To delete API keys from Redis Cloud, '}
-
sign in to Redis Cloud
-
+
{' and delete them manually.'}
-
-
+
+
- {
data-testid="delete-key-confirm-btn"
>
Remove all API keys
-
+
-
-
-
+
+
+
)
diff --git a/redisinsight/ui/src/pages/settings/components/cloud-settings/components/user-api-keys-table/UserApiKeysTable.tsx b/redisinsight/ui/src/pages/settings/components/cloud-settings/components/user-api-keys-table/UserApiKeysTable.tsx
index 6e0a3413c8..51feaac953 100644
--- a/redisinsight/ui/src/pages/settings/components/cloud-settings/components/user-api-keys-table/UserApiKeysTable.tsx
+++ b/redisinsight/ui/src/pages/settings/components/cloud-settings/components/user-api-keys-table/UserApiKeysTable.tsx
@@ -3,6 +3,12 @@ import { format } from 'date-fns'
import { useDispatch } from 'react-redux'
import { isNull } from 'lodash'
+import { RiText, RiTitle } from 'uiBase/text'
+import { RiEmptyButton, RiIconButton, RiPrimaryButton } from 'uiBase/forms'
+import { CopyIcon, RiIcon } from 'uiBase/icons'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiTable, ColumnDefinition } from 'uiBase/layout'
+import { RiLink } from 'uiBase/display'
import { formatLongName, Nullable } from 'uiSrc/utils'
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -13,19 +19,7 @@ import {
OAuthSocialSource,
} from 'uiSrc/slices/interfaces'
import { removeCapiKeyAction } from 'uiSrc/slices/oauth/cloud'
-import { Text } from 'uiSrc/components/base/text'
-import {
- EmptyButton,
- IconButton,
- PrimaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { CopyIcon } from 'uiSrc/components/base/icons'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
-import { Link } from 'uiSrc/components/base/link/Link'
import styles from './styles.module.scss'
export interface Props {
@@ -156,7 +150,7 @@ const UserApiKeysTable = ({ items, loading }: Props) => {
content="Copy API Key Name"
anchorClassName={styles.copyBtnAnchor}
>
-
handleCopy(name || '')}
@@ -174,14 +168,14 @@ const UserApiKeysTable = ({ items, loading }: Props) => {
text={
<>
{'To delete this API key from Redis Cloud, '}
-
sign in to Redis Cloud
-
+
{' and delete it manually.'}
>
}
@@ -206,25 +200,25 @@ const UserApiKeysTable = ({ items, loading }: Props) => {
return (
<>
-
+
+ className={styles.starsIcon}
+ type="StarsIcon"
+ color="attention300"
+ />
The ultimate Redis starting point
-
-
-
+
+
+
Cloud API keys will be created and stored when you connect to Redis
Cloud to create a free trial Cloud database or autodiscover your
Cloud database.
-
-
+
+
{(socialCloudHandlerClick) => (
- {
data-testid="autodiscover-btn"
>
Autodiscover
-
+
)}
{(ssoCloudHandlerClick) => (
-
ssoCloudHandlerClick(e, {
@@ -253,18 +247,18 @@ const UserApiKeysTable = ({ items, loading }: Props) => {
data-testid="create-cloud-db-btn"
>
Create Redis Cloud database
-
+
)}
-
+
>
)
}
return (
- {
return (
<>
- Date and Time Format
-
-
+ Date and Time Format
+
+
Specifies the date and time format to be used in Redis Insight:
-
-
+
+
setPreview(newPreview)} />
-
-
+
+
Specifies the time zone to be used in Redis Insight:
-
-
+
+
-
-
+
+
-
-
+
+
-
+
Preview:
-
-
+
+
{preview}
-
+
-
-
+
+
-
+
>
)
}
diff --git a/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/datetime-form/DatetimeForm.tsx b/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/datetime-form/DatetimeForm.tsx
index e2bd7410f3..4f1a89ede3 100644
--- a/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/datetime-form/DatetimeForm.tsx
+++ b/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/datetime-form/DatetimeForm.tsx
@@ -1,6 +1,15 @@
import React, { useMemo, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useFormik } from 'formik'
+import {
+ RiPrimaryButton,
+ RiRadioGroup,
+ defaultValueRender,
+ RiSelect,
+} from 'uiBase/forms'
+import { InfoIcon, CheckBoldIcon } from 'uiBase/icons'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiTextInput } from 'uiBase/inputs'
import { checkDateTimeFormat, formatTimestamp } from 'uiSrc/utils'
import {
DATETIME_FORMATTER_DEFAULT,
@@ -13,16 +22,7 @@ import {
userSettingsConfigSelector,
} from 'uiSrc/slices/user/user-settings'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { InfoIcon, CheckBoldIcon } from 'uiSrc/components/base/icons'
-import { RiRadioGroup } from 'uiSrc/components/base/forms/radio-group/RadioGroup'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { RiTooltip } from 'uiSrc/components'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
-import { TextInput } from 'uiSrc/components/base/inputs'
+import { RiTooltip } from 'uiBase/display'
interface InitialValuesType {
format: string
@@ -184,7 +184,7 @@ const DatetimeForm = ({ onFormatChange }: Props) => {
value={formik.values.selectedRadioOption}
onChange={(id) => onRadioOptionChange(id)}
/>
-
+
{formik.values.selectedRadioOption === DatetimeRadioOption.Common && (
{
)}
{formik.values.selectedRadioOption === DatetimeRadioOption.Custom && (
<>
-
-
+ {
onChange={(value) => onCustomFormatChange(value)}
data-testid="custom-datetime-input"
/>
-
+
{
showError ? error || 'This format is not supported' : null
}
>
- {
disabled={showError}
>
Save
-
+
>
)}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/timezone-form/TimezoneForm.tsx b/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/timezone-form/TimezoneForm.tsx
index dada069546..8cb77c9186 100644
--- a/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/timezone-form/TimezoneForm.tsx
+++ b/redisinsight/ui/src/pages/settings/components/general-settings/datetime-formatter/components/timezone-form/TimezoneForm.tsx
@@ -2,16 +2,13 @@ import React, { useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useFormik } from 'formik'
+import { defaultValueRender, RiSelect } from 'uiBase/forms'
import { TimezoneOption, timezoneOptions } from 'uiSrc/constants'
import {
updateUserConfigSettingsAction,
userSettingsConfigSelector,
} from 'uiSrc/slices/user/user-settings'
import { TelemetryEvent, sendEventTelemetry } from 'uiSrc/telemetry'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
interface InitialValuesType {
timezone: TimezoneOption
diff --git a/redisinsight/ui/src/pages/settings/components/theme-settings/ThemeSettings.tsx b/redisinsight/ui/src/pages/settings/components/theme-settings/ThemeSettings.tsx
index 01e757444a..ef60d3e0eb 100644
--- a/redisinsight/ui/src/pages/settings/components/theme-settings/ThemeSettings.tsx
+++ b/redisinsight/ui/src/pages/settings/components/theme-settings/ThemeSettings.tsx
@@ -1,6 +1,8 @@
import React, { useContext, useEffect, useRef, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { defaultValueRender, RiSelect, RiFormField } from 'uiBase/forms'
+import { RiTitle } from 'uiBase/text'
import {
updateUserConfigSettingsAction,
userSettingsSelector,
@@ -8,12 +10,6 @@ import {
import { ThemeContext } from 'uiSrc/contexts/themeContext'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { DEFAULT_THEME, THEMES } from 'uiSrc/constants'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { Title } from 'uiSrc/components/base/text'
const ThemeSettings = () => {
const dispatch = useDispatch()
@@ -50,9 +46,9 @@ const ThemeSettings = () => {
return (
- Color Theme
-
-
+ Color Theme
+
+
{
data-test-subj="select-theme"
data-testid="select-theme"
/>
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/settings/components/workbench-settings/WorkbenchSettings.tsx b/redisinsight/ui/src/pages/settings/components/workbench-settings/WorkbenchSettings.tsx
index 32d3582e46..90f9ad450a 100644
--- a/redisinsight/ui/src/pages/settings/components/workbench-settings/WorkbenchSettings.tsx
+++ b/redisinsight/ui/src/pages/settings/components/workbench-settings/WorkbenchSettings.tsx
@@ -1,6 +1,11 @@
import { toNumber } from 'lodash'
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiFormField } from 'uiBase/forms'
+import { RiSwitchInput } from 'uiBase/inputs'
+import { RiTitle } from 'uiBase/text'
+import { RiLink } from 'uiBase/display'
import { SettingItem } from 'uiSrc/components'
import { PIPELINE_COUNT_DEFAULT } from 'uiSrc/constants/api'
import {
@@ -11,11 +16,6 @@ import {
} from 'uiSrc/slices/user/user-settings'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { validateNumber } from 'uiSrc/utils'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import { SwitchInput } from 'uiSrc/components/base/inputs'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Link } from 'uiSrc/components/base/link/Link'
const WorkbenchSettings = () => {
const { cleanup } = useSelector(userSettingsWBSelector)
@@ -41,17 +41,17 @@ const WorkbenchSettings = () => {
return (
<>
- Editor Cleanup
-
-
- Editor Cleanup
+
+
+
-
-
+
+
{
summary={
<>
{'Sets the size of a command batch for the '}
-
pipeline
-
+
{' mode in Workbench. 0 or 1 pipelines every command.'}
>
}
diff --git a/redisinsight/ui/src/pages/slow-log/SlowLogPage.tsx b/redisinsight/ui/src/pages/slow-log/SlowLogPage.tsx
index b39621eb3a..c337f49a54 100644
--- a/redisinsight/ui/src/pages/slow-log/SlowLogPage.tsx
+++ b/redisinsight/ui/src/pages/slow-log/SlowLogPage.tsx
@@ -4,6 +4,9 @@ import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import { AutoSizer } from 'react-virtualized'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { defaultValueRender, RiSelect } from 'uiBase/forms'
import { DEFAULT_SLOWLOG_MAX_LEN, DurationUnits } from 'uiSrc/constants'
import { convertNumberByUnits } from 'uiSrc/pages/slow-log/utils'
import { appContextDbConfig } from 'uiSrc/slices/app/context'
@@ -32,12 +35,6 @@ import {
import { AnalyticsViewTab } from 'uiSrc/slices/interfaces/analytics'
import { FormatedDate } from 'uiSrc/components'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
import { SlowLog } from 'apiSrc/modules/slow-log/models'
import { Actions, EmptySlowLog, SlowLogTable } from './components'
@@ -145,14 +142,14 @@ const SlowLogPage = () => {
return (
-
-
+
+
-
+
-
+
{connectionType !== ConnectionType.Cluster && config && (
-
+
Execution time:{' '}
{numberWithSpaces(
convertNumberByUnits(slowlogLogSlowerThan, durationUnit),
@@ -162,29 +159,29 @@ const SlowLogPage = () => {
? DurationUnits.mSeconds
: DurationUnits.microSeconds}
, Max length: {numberWithSpaces(slowlogMaxLen)}
-
+
)}
-
-
+
+
{({ width }) => (
-
-
-
-
-
+
+
+
+
{connectionType === ConnectionType.Cluster
? 'Display per node:'
: 'Display up to:'}
-
-
-
+
+
+
{
className={styles.countSelect}
data-testid="count-select"
/>
-
+
{width > HIDE_TIMESTAMP_FROM_WIDTH && (
-
-
+ {
>
)}
)
-
-
+
+
)}
-
-
-
+
+
+
{
onClear={onClearSlowLogs}
onRefresh={getSlowLogs}
/>
-
-
+
+
)}
diff --git a/redisinsight/ui/src/pages/slow-log/components/Actions/Actions.tsx b/redisinsight/ui/src/pages/slow-log/components/Actions/Actions.tsx
index 1a27d903bc..ba4f2d4af7 100644
--- a/redisinsight/ui/src/pages/slow-log/components/Actions/Actions.tsx
+++ b/redisinsight/ui/src/pages/slow-log/components/Actions/Actions.tsx
@@ -2,23 +2,22 @@ import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import cx from 'classnames'
import { useParams } from 'react-router-dom'
+import { RiPopover, RiTooltip } from 'uiBase/display'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { EraserIcon, SettingsIcon, RiIcon } from 'uiBase/icons'
+import {
+ RiDestructiveButton,
+ RiIconButton,
+ RiSecondaryButton,
+} from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import { DurationUnits } from 'uiSrc/constants'
import { slowLogSelector } from 'uiSrc/slices/analytics/slowlog'
import { AutoRefresh } from 'uiSrc/components'
-import { RiPopover, RiTooltip } from 'uiSrc/components/base'
import { Nullable } from 'uiSrc/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { EraserIcon, SettingsIcon } from 'uiSrc/components/base/icons'
-import {
- DestructiveButton,
- IconButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
import SlowLogConfig from '../SlowLogConfig'
import styles from './styles.module.scss'
@@ -106,19 +105,19 @@ const Actions = (props: Props) => {
className={styles.warningIcon}
/>
-
+
Clear Slow Log?
-
+
Slow Log will be cleared for
{name}
NOTE: This is server configuration
-
-
+
+
- handleClearClick()}
@@ -126,15 +125,15 @@ const Actions = (props: Props) => {
data-testid="reset-confirm-btn"
>
Clear
-
+
)
return (
-
-
+
+
{
onChangeAutoRefreshRate={handleChangeAutoRefreshRate}
testid="slowlog"
/>
-
-
+
+
{
closePopover={() => {}}
panelClassName={cx('popover-without-top-tail', styles.configWrapper)}
button={
- {
data-testid="configure-btn"
>
Configure
-
+
}
>
{
onRefresh={onRefresh}
/>
-
+
{!isEmptySlowLog && (
-
+
{
content="Clear Slow Log"
anchorClassName={styles.icon}
>
- showClearPopover()}
@@ -198,9 +197,9 @@ const Actions = (props: Props) => {
>
{ToolTipContent}
-
+
)}
-
+
{
Slow Log is a list of slow operations for your Redis instance.
These can be used to troubleshoot performance issues.
-
+
Each entry in the list displays the command, duration and
timestamp. Any transaction that exceeds{' '}
slowlog-log-slower-than {durationUnit} are recorded up to a
@@ -225,8 +224,8 @@ const Actions = (props: Props) => {
data-testid="slow-log-tooltip-icon"
/>
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/slow-log/components/EmptySlowLog/EmptySlowLog.tsx b/redisinsight/ui/src/pages/slow-log/components/EmptySlowLog/EmptySlowLog.tsx
index 5b3818ca98..a192d79131 100644
--- a/redisinsight/ui/src/pages/slow-log/components/EmptySlowLog/EmptySlowLog.tsx
+++ b/redisinsight/ui/src/pages/slow-log/components/EmptySlowLog/EmptySlowLog.tsx
@@ -1,9 +1,8 @@
import React from 'react'
+import { RiTitle, RiText } from 'uiBase/text'
import { DurationUnits } from 'uiSrc/constants'
-import { Title } from 'uiSrc/components/base/text/Title'
import { convertNumberByUnits } from 'uiSrc/pages/slow-log/utils'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
-import { Text } from 'uiSrc/components/base/text'
import styles from '../styles.module.scss'
@@ -18,10 +17,10 @@ const EmptySlowLog = (props: Props) => {
return (
-
+
No Slow Logs found
-
-
+
+
Either no commands exceeding
{numberWithSpaces(
convertNumberByUnits(slowlogLogSlowerThan, durationUnit),
@@ -31,7 +30,7 @@ const EmptySlowLog = (props: Props) => {
? DurationUnits.mSeconds
: DurationUnits.microSeconds}
were found or Slow Log is disabled on the server.
-
+
)
diff --git a/redisinsight/ui/src/pages/slow-log/components/SlowLogConfig/SlowLogConfig.tsx b/redisinsight/ui/src/pages/slow-log/components/SlowLogConfig/SlowLogConfig.tsx
index abafa624e7..8a959f4998 100644
--- a/redisinsight/ui/src/pages/slow-log/components/SlowLogConfig/SlowLogConfig.tsx
+++ b/redisinsight/ui/src/pages/slow-log/components/SlowLogConfig/SlowLogConfig.tsx
@@ -3,6 +3,18 @@ import React, { useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import cx from 'classnames'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import {
+ RiEmptyButton,
+ RiPrimaryButton,
+ RiSecondaryButton,
+ RiFormField,
+ defaultValueRender,
+ RiSelect,
+} from 'uiBase/forms'
+import { RiText } from 'uiBase/text'
+import { RiCol, RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiTextInput } from 'uiBase/inputs'
import {
DEFAULT_SLOWLOG_DURATION_UNIT,
DEFAULT_SLOWLOG_MAX_LEN,
@@ -21,20 +33,6 @@ import {
import { errorValidateNegativeInteger, validateNumber } from 'uiSrc/utils'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
import { useConnectionType } from 'uiSrc/components/hooks/useConnectionType'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import {
- EmptyButton,
- PrimaryButton,
- SecondaryButton,
-} from 'uiSrc/components/base/forms/buttons'
-import { Text } from 'uiSrc/components/base/text'
-import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { FormField } from 'uiSrc/components/base/forms/FormField'
-import {
- defaultValueRender,
- RiSelect,
-} from 'uiSrc/components/base/forms/select/RiSelect'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { convertNumberByUnits } from '../../utils'
import styles from './styles.module.scss'
@@ -121,25 +119,25 @@ const SlowLogConfig = ({ closePopover, onRefresh }: Props) => {
const clusterContent = () => (
<>
-
+
Each node can have different Slow Log configuration in a clustered
database.
-
+
{'Use '}
CONFIG SET slowlog-log-slower-than
{' or '}
CONFIG SET slowlog-max-len
{' for a specific node in redis-cli to configure it.'}
-
+
-
-
+
Ok
-
+
>
)
@@ -167,7 +165,7 @@ const SlowLogConfig = ({ closePopover, onRefresh }: Props) => {
}
return (
- {
{connectionType !== ConnectionType.Cluster && (
<>
- {
}
>
-
- {
- setSlowerThan(
- validateNumber(value.trim(), -1, Infinity),
- )
+ onChange={(value) => {
+ setSlowerThan(validateNumber(value.trim(), -1, Infinity))
}}
placeholder={`${convertNumberByUnits(DEFAULT_SLOWLOG_SLOWER_THAN, durationUnit)}`}
autoComplete="off"
@@ -222,9 +218,9 @@ const SlowLogConfig = ({ closePopover, onRefresh }: Props) => {
onChange={onChangeUnit}
data-test-subj="select-default-unit"
/>
-
-
-
+
+ slowlog-max-len
}
@@ -239,13 +235,13 @@ const SlowLogConfig = ({ closePopover, onRefresh }: Props) => {
>
<>
- {
+ onChange={(value) => {
setMaxLen(validateNumber(value.trim()))
}}
autoComplete="off"
@@ -253,40 +249,40 @@ const SlowLogConfig = ({ closePopover, onRefresh }: Props) => {
/>
>
-
-
+
+
-
-
+
+
NOTE: This is server configuration
-
-
-
+
+
Default
-
-
+
Cancel
-
-
+
Save
-
-
-
+
+
+
>
)}
-
+
)
}
diff --git a/redisinsight/ui/src/pages/slow-log/components/SlowLogTable/SlowLogTable.tsx b/redisinsight/ui/src/pages/slow-log/components/SlowLogTable/SlowLogTable.tsx
index 22bda3f182..4379d1da29 100644
--- a/redisinsight/ui/src/pages/slow-log/components/SlowLogTable/SlowLogTable.tsx
+++ b/redisinsight/ui/src/pages/slow-log/components/SlowLogTable/SlowLogTable.tsx
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react'
import { useParams } from 'react-router-dom'
+import { RiText } from 'uiBase/text'
import { ITableColumn } from 'uiSrc/components/virtual-table/interfaces'
import VirtualTable from 'uiSrc/components/virtual-table/VirtualTable'
import {
@@ -12,10 +13,10 @@ import {
import { convertNumberByUnits } from 'uiSrc/pages/slow-log/utils'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { numberWithSpaces } from 'uiSrc/utils/numbers'
-import { Text } from 'uiSrc/components/base/text'
-import { FormatedDate, RiTooltip } from 'uiSrc/components'
+import { FormatedDate } from 'uiSrc/components'
import styles from '../styles.module.scss'
+import { RiTooltip } from 'uiBase/tooltip'
export const DATE_FORMAT = 'HH:mm:ss d LLL yyyy'
@@ -54,14 +55,14 @@ const SlowLogTable = (props: Props) => {
minWidth: 190,
isSortable: true,
render: (timestamp) => (
-
-
+
),
},
{
@@ -72,9 +73,9 @@ const SlowLogTable = (props: Props) => {
textAlignment: TableCellTextAlignment.Right,
alignment: TableCellAlignment.Right,
render: (duration) => (
-
+
{numberWithSpaces(convertNumberByUnits(duration, durationUnit))}
-
+
),
},
{
diff --git a/redisinsight/ui/src/pages/vector-search/components/QueryCard.tsx b/redisinsight/ui/src/pages/vector-search/components/QueryCard.tsx
index 6ebfc4e564..54118a3951 100644
--- a/redisinsight/ui/src/pages/vector-search/components/QueryCard.tsx
+++ b/redisinsight/ui/src/pages/vector-search/components/QueryCard.tsx
@@ -5,7 +5,6 @@ import { useParams } from 'react-router-dom'
import { isNull } from 'lodash'
import { KeyboardKeys as keys } from 'uiSrc/constants/keys'
-import { LoadingContent } from 'uiSrc/components/base/layout'
import {
DEFAULT_TEXT_VIEW_TYPE,
ProfileQueryType,
@@ -37,6 +36,7 @@ import QueryCardCliPlugin from 'uiSrc/components/query/query-card/QueryCardCliPl
import queryStyles from 'uiSrc/components/query/query-card/styles.module.scss'
import QueryCardHeader from 'uiSrc/components/query/query-card/QueryCardHeader'
import { collectQueryToggleFullScreenTelemetry } from '../telemetry'
+import { RiLoadingContent } from 'uiBase/layout'
export interface Props {
id: string
@@ -268,7 +268,7 @@ const QueryCard = (props: Props) => {
/>
) : (
-
diff --git a/redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.tsx b/redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.tsx
index 95f566b767..ffdc3963a0 100644
--- a/redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.tsx
+++ b/redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.tsx
@@ -8,9 +8,6 @@ import { Nullable } from 'uiSrc/utils'
import { CommandExecutionUI } from 'uiSrc/slices/interfaces'
import { RunQueryMode, ResultsMode } from 'uiSrc/slices/interfaces/workbench'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import { collectTelemetryQueryReRun } from 'uiSrc/pages/vector-search/telemetry'
import QueryCard from '../../QueryCard'
@@ -19,6 +16,9 @@ import {
StyledHeader,
StyledWrapper,
} from './CommandsView.styles'
+import { RiProgressBarLoader } from 'uiBase/display'
+import { RiEmptyButton } from 'uiBase/forms'
+import { DeleteIcon } from 'uiBase/icons'
export interface Props {
isResultsLoaded: boolean
@@ -85,11 +85,14 @@ const CommandsView = (props: Props) => {
return (
{!isResultsLoaded && (
-
+
)}
{!!items?.length && (
- onAllQueriesDelete?.()}
@@ -97,7 +100,7 @@ const CommandsView = (props: Props) => {
data-testid="clear-history-btn"
>
Clear Results
-
+
)}
diff --git a/redisinsight/ui/src/pages/vector-search/create-index/VectorSearchCreateIndex.tsx b/redisinsight/ui/src/pages/vector-search/create-index/VectorSearchCreateIndex.tsx
index 667259bde9..b7986d1cee 100644
--- a/redisinsight/ui/src/pages/vector-search/create-index/VectorSearchCreateIndex.tsx
+++ b/redisinsight/ui/src/pages/vector-search/create-index/VectorSearchCreateIndex.tsx
@@ -3,9 +3,7 @@ import { useHistory, useParams } from 'react-router-dom'
import { useDispatch } from 'react-redux'
import { Stepper } from '@redis-ui/components'
-import { Title } from 'uiSrc/components/base/text'
-import { Button, SecondaryButton } from 'uiSrc/components/base/forms/buttons'
-import { ChevronLeftIcon } from 'uiSrc/components/base/icons'
+import { ChevronLeftIcon } from 'uiBase/icons'
import { selectedBikesIndexFields, stepContents } from './steps'
import {
@@ -33,6 +31,8 @@ import {
} from 'uiSrc/slices/app/notifications'
import successMessages from 'uiSrc/components/notifications/success-messages'
import { parseCustomError } from 'uiSrc/utils'
+import { RiTitle } from 'uiBase/text'
+import { RiSecondaryButton, Button } from 'uiBase/forms'
const stepNextButtonTexts = [
'Proceed to adding data',
@@ -106,9 +106,9 @@ export const VectorSearchCreateIndex = ({
return (
-
+
New vector search
-
+
Select a database
Adding data
@@ -123,13 +123,13 @@ export const VectorSearchCreateIndex = ({
{showBackButton && (
-
Back
-
+
)}
diff --git a/redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.tsx b/redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.tsx
index a5a7a0418a..cea2f27187 100644
--- a/redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.tsx
+++ b/redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.tsx
@@ -1,8 +1,6 @@
import React from 'react'
-import { FlexItem } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
-import { RiRadioGroup } from 'uiSrc/components/base/forms/radio-group/RadioGroup'
+import { RiRadioGroup } from 'uiBase/forms'
import {
LargeSelectionBox,
@@ -11,13 +9,15 @@ import {
} from './styles'
import { indexDataContent, indexType, sampleDatasetOptions } from './config'
import { IStepComponent, SampleDataType, StepComponentProps } from '../types'
+import { RiFlexItem } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
export const AddDataStep: IStepComponent = ({
parameters,
setParameters,
}: StepComponentProps) => (
<>
-
+
{indexType.map((type) => (
))}
-
-
- Select sample dataset
+
+
+ Select sample dataset
-
-
- Data content
+
+
+ Data content
{indexDataContent.map((type) => (
))}
-
+
>
)
diff --git a/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.spec.tsx b/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.spec.tsx
index 4913601e6e..2ef4d8f4dd 100644
--- a/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.spec.tsx
+++ b/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.spec.tsx
@@ -20,10 +20,14 @@ jest.mock('uiSrc/telemetry', () => ({
// Workaround for @redis-ui/components Title component issue with react-children-utilities
// TypeError: react_utils.childrenToString is not a function
-jest.mock('uiSrc/components/base/layout/drawer', () => ({
- ...jest.requireActual('uiSrc/components/base/layout/drawer'),
- DrawerHeader: jest.fn().mockReturnValue(null),
-}))
+jest.mock('uiBase/layout', () => {
+ const actual = jest.requireActual('uiBase/layout')
+
+ return {
+ ...actual,
+ RiDrawerHeader: jest.fn().mockReturnValue(null),
+ }
+})
const mockSetParameters = jest.fn()
diff --git a/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.tsx b/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.tsx
index 19a699af51..007a5900bc 100644
--- a/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.tsx
+++ b/redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.tsx
@@ -1,25 +1,26 @@
import React, { useState } from 'react'
-import { FlexGroup, FlexItem } from 'uiSrc/components/base/layout/flex'
-import { Text } from 'uiSrc/components/base/text'
import CreateIndexStepWrapper, {
IndexStepTab,
} from 'uiSrc/components/new-index/create-index-step'
import { FieldBoxesGroup } from 'uiSrc/components/new-index/create-index-step/field-boxes-group/FieldBoxesGroup'
import { VectorSearchBox } from 'uiSrc/components/new-index/create-index-step/field-box/types'
import { generateFtCreateCommand } from 'uiSrc/utils/index/generateFtCreateCommand'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
import { VectorIndexTab } from 'uiSrc/components/new-index/create-index-step/CreateIndexStepWrapper'
import { BuildNewIndexTabTrigger } from 'uiSrc/components/new-index/create-index-step/build-new-index-tab/BuildNewIndexTabTrigger'
-import { TextInput } from 'uiSrc/components/base/inputs'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
-import { PlayFilledIcon } from 'uiSrc/components/base/icons'
+import { PlayFilledIcon } from 'uiBase/icons'
import { bikesIndexFieldsBoxes } from './config'
import { CreateIndexStepScreenWrapper, SearchInputWrapper } from './styles'
import { PreviewCommandDrawer } from './PreviewCommandDrawer'
import { IStepComponent, StepComponentProps } from '../types'
+import { RiTextInput } from 'uiBase/inputs'
+import { RiFlexItem, RiRow } from 'uiBase/layout'
+import { RiText } from 'uiBase/text'
+import { RiEmptyButton } from 'uiBase/forms'
+
// eslint-disable-next-line arrow-body-style, @typescript-eslint/no-unused-vars
const useIndexFieldsBoxes = (_indexName: string): VectorSearchBox[] => {
return bikesIndexFieldsBoxes
@@ -45,9 +46,9 @@ export const CreateIndexStep: IStepComponent = ({
content: (
<>
-
- Index name
-
+ Index name
+ setParameters({ indexName: value })}
data-testid="search-for-index"
/>
-
+
-
-
- Vector index
-
+
+
+ Vector index
+
Indexes tell Redis how to search your data. Creating an index
enables fast, accurate retrieval across your dataset.
-
-
+
+
-
-
+
Command preview
-
-
-
+
+
+
(
-
-
-
+
+
+
{commandContent}
-
-
+ onOpenChange(false)}
/>
-
+
)
diff --git a/redisinsight/ui/src/pages/vector-search/create-index/steps/config.ts b/redisinsight/ui/src/pages/vector-search/create-index/steps/config.ts
index 901ba18dcb..880fab4154 100644
--- a/redisinsight/ui/src/pages/vector-search/create-index/steps/config.ts
+++ b/redisinsight/ui/src/pages/vector-search/create-index/steps/config.ts
@@ -1,12 +1,7 @@
import { FieldTypes } from 'uiSrc/pages/browser/components/create-redisearch-index/constants'
import { VectorSearchBox } from 'uiSrc/components/new-index/create-index-step/field-box/types'
import { BoxSelectionOption } from 'uiSrc/components/new-index/selection-box/SelectionBox'
-import {
- BikeIcon,
- PopcornIcon,
- VectorSearchIcon,
- WandIcon,
-} from 'uiSrc/components/base/icons'
+import { BikeIcon, PopcornIcon, VectorSearchIcon, WandIcon } from 'uiBase/icons'
import { SearchIndexType, SampleDataType, SampleDataContent } from '../types'
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/DeleteConfirmationButton.tsx b/redisinsight/ui/src/pages/vector-search/manage-indexes/DeleteConfirmationButton.tsx
index 1911d9f34c..83d2a99b19 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/DeleteConfirmationButton.tsx
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/DeleteConfirmationButton.tsx
@@ -1,6 +1,8 @@
import React from 'react'
-import { RiPopover, RiPopoverProps } from 'uiSrc/components'
-import { Button, IconButton } from 'uiSrc/components/base/forms/buttons'
+import { RiPopover, RiPopoverProps } from 'uiBase/display'
+import { RiDestructiveButton, RiIconButton } from 'uiBase/forms'
+import { DeleteIcon, RiIcon } from 'uiBase/icons'
+
import {
ButtonWrapper,
IconAndTitleWrapper,
@@ -8,7 +10,6 @@ import {
PopoverContent,
Title,
} from './styles'
-import { DeleteIcon, RiIcon } from 'uiSrc/components/base/icons'
export type DeleteConfirmationButtonProps = Omit<
RiPopoverProps,
@@ -27,10 +28,10 @@ const DeleteConfirmationButton = ({
anchorPosition="downCenter"
{...rest}
button={
-
+ >
}
>
@@ -45,13 +46,12 @@ const DeleteConfirmationButton = ({
-
Delete
-
+
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/IndexAttributesList.tsx b/redisinsight/ui/src/pages/vector-search/manage-indexes/IndexAttributesList.tsx
index 9b0b2d4fcc..3c34ce8e0a 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/IndexAttributesList.tsx
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/IndexAttributesList.tsx
@@ -1,13 +1,13 @@
import React from 'react'
-import { ColumnDefinition, Table } from 'uiSrc/components/base/layout/table'
-import { RiIcon } from 'uiSrc/components/base/icons'
-import { Loader } from 'uiSrc/components/base/display'
+import { RiIcon } from 'uiBase/icons'
import { IndexInfoDto } from 'apiSrc/modules/browser/redisearch/dto'
import {
StyledIndexAttributesList,
StyledIndexAttributesTable,
StyledIndexSummaryInfo,
} from './IndexAttributesList.styles'
+import { ColumnDefinition, RiTable } from 'uiBase/layout'
+import { RiLoader } from 'uiBase/display'
export interface IndexInfoTableData {
identifier: string
@@ -67,7 +67,7 @@ export const IndexAttributesList = ({
const { num_docs, max_doc_id, num_records, num_terms } = indexInfo || {}
if (!indexInfo) {
- return
+ return
}
return (
@@ -76,7 +76,10 @@ export const IndexAttributesList = ({
as="div"
data-testid="index-attributes-list--table"
>
-
+
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.spec.tsx b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.spec.tsx
index 8febc3e241..63ca61e657 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.spec.tsx
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.spec.tsx
@@ -9,10 +9,14 @@ import { INSTANCE_ID_MOCK } from 'uiSrc/mocks/handlers/instances/instancesHandle
// Workaround for @redis-ui/components Title component issue with react-children-utilities
// TypeError: react_utils.childrenToString is not a function
-jest.mock('uiSrc/components/base/layout/drawer', () => ({
- ...jest.requireActual('uiSrc/components/base/layout/drawer'),
- DrawerHeader: jest.fn().mockReturnValue(null),
-}))
+jest.mock('uiBase/layout', () => {
+ const actual = jest.requireActual('uiBase/layout')
+
+ return {
+ ...actual,
+ RiDrawerHeader: jest.fn().mockReturnValue(null),
+ }
+})
// Mock the telemetry module, so we don't send actual telemetry data during tests
jest.mock('uiSrc/telemetry', () => ({
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.tsx b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.tsx
index b7490f6b19..85c60b43b3 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.tsx
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.tsx
@@ -1,11 +1,9 @@
import React from 'react'
import { DrawerProps } from '@redis-ui/components'
import { useParams } from 'react-router-dom'
-import {
- Drawer,
- DrawerBody,
- DrawerHeader,
-} from 'uiSrc/components/base/layout/drawer'
+
+import { RiDrawer, RiDrawerBody, RiDrawerHeader } from 'uiBase/layout'
+
import { ManageIndexesList } from './ManageIndexesList'
import {
collectManageIndexesDrawerClosedTelemetry,
@@ -34,7 +32,7 @@ export const ManageIndexesDrawer = ({
}
return (
-
-
-
+
+
-
-
+
+
)
}
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesList.styles.ts b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesList.styles.ts
index bb07604c17..a94f4117cb 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesList.styles.ts
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesList.styles.ts
@@ -1,7 +1,6 @@
import styled from 'styled-components'
-import { FlexGroup } from 'uiSrc/components/base/layout/flex'
+import { RiCol } from 'uiBase/layout'
-export const StyledManageIndexesListAction = styled(FlexGroup)`
- flex-direction: column;
+export const StyledManageIndexesListAction = styled(RiCol)`
gap: ${({ theme }) => theme.core.space.space150};
`
diff --git a/redisinsight/ui/src/pages/vector-search/manage-indexes/styles.ts b/redisinsight/ui/src/pages/vector-search/manage-indexes/styles.ts
index 4ee6799ac0..4b01f96e1d 100644
--- a/redisinsight/ui/src/pages/vector-search/manage-indexes/styles.ts
+++ b/redisinsight/ui/src/pages/vector-search/manage-indexes/styles.ts
@@ -1,11 +1,11 @@
import styled from 'styled-components'
-import { Text } from 'uiSrc/components/base/text'
+import { RiText } from 'uiBase/text'
export const PopoverContent = styled.div`
padding: ${({ theme }) => theme.core?.space.space200};
`
-export const Title = styled(Text)`
+export const Title = styled(RiText)`
margin-top: ${({ theme }) => theme.core?.space.space100};
margin-bottom: ${({ theme }) => theme.core?.space.space100};
font-weight: bold;
diff --git a/redisinsight/ui/src/pages/vector-search/query/HeaderActions.spec.tsx b/redisinsight/ui/src/pages/vector-search/query/HeaderActions.spec.tsx
index b45b75dff9..c02c316ceb 100644
--- a/redisinsight/ui/src/pages/vector-search/query/HeaderActions.spec.tsx
+++ b/redisinsight/ui/src/pages/vector-search/query/HeaderActions.spec.tsx
@@ -7,10 +7,14 @@ import { INSTANCE_ID_MOCK } from 'uiSrc/mocks/handlers/instances/instancesHandle
// Workaround for @redis-ui/components Title component issue with react-children-utilities
// TypeError: react_utils.childrenToString is not a function
-jest.mock('uiSrc/components/base/layout/drawer', () => ({
- ...jest.requireActual('uiSrc/components/base/layout/drawer'),
- DrawerHeader: jest.fn().mockReturnValue(null),
-}))
+jest.mock('uiBase/layout', () => {
+ const actual = jest.requireActual('uiBase/layout')
+
+ return {
+ ...actual,
+ RiDrawerHeader: jest.fn().mockReturnValue(null),
+ }
+})
// Mock the telemetry module, so we don't send actual telemetry data during tests
jest.mock('uiSrc/telemetry', () => ({
diff --git a/redisinsight/ui/src/components/base/layout/flex.module.scss b/redisinsight/ui/src/pages/vector-search/query/HeaderActions.styles.ts
similarity index 100%
rename from redisinsight/ui/src/components/base/layout/flex.module.scss
rename to redisinsight/ui/src/pages/vector-search/query/HeaderActions.styles.ts
diff --git a/redisinsight/ui/src/pages/vector-search/query/HeaderActions.tsx b/redisinsight/ui/src/pages/vector-search/query/HeaderActions.tsx
index d2f1162606..4e0ab04ce2 100644
--- a/redisinsight/ui/src/pages/vector-search/query/HeaderActions.tsx
+++ b/redisinsight/ui/src/pages/vector-search/query/HeaderActions.tsx
@@ -4,9 +4,8 @@ import { useParams } from 'react-router-dom'
import { ManageIndexesDrawer } from '../manage-indexes/ManageIndexesDrawer'
import { collectSavedQueriesPanelToggleTelemetry } from '../telemetry'
import { StartWizardButton } from './StartWizardButton'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout'
+import { RiEmptyButton } from 'uiBase/forms'
+import { RiRow, RiSpacer } from 'uiBase/layout'
export type HeaderActionsProps = {
isManageIndexesDrawerOpen: boolean
@@ -34,26 +33,26 @@ export const HeaderActions = ({
return (
<>
-
+
-
-
+
+
Saved queries
-
+
- setIsManageIndexesDrawerOpen(true)}>
+ setIsManageIndexesDrawerOpen(true)}>
Manage indexes
-
-
+
+
-
+
-
+
>
)
}
diff --git a/redisinsight/ui/src/pages/vector-search/query/StartWizardButton.tsx b/redisinsight/ui/src/pages/vector-search/query/StartWizardButton.tsx
index d787c8d172..d714812231 100644
--- a/redisinsight/ui/src/pages/vector-search/query/StartWizardButton.tsx
+++ b/redisinsight/ui/src/pages/vector-search/query/StartWizardButton.tsx
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react'
import { useHistory, useParams } from 'react-router-dom'
-import { CallOut } from 'uiSrc/components/base/display/call-out/CallOut'
import { Pages } from 'uiSrc/constants'
+import { RiCallOut } from 'uiBase/display'
export const StartWizardButton = () => {
const history = useHistory()
@@ -12,7 +12,7 @@ export const StartWizardButton = () => {
}, [history, instanceId])
return (
- {
}}
>
Power fast, real-time semantic AI search with vector search.
-
+
)
}
diff --git a/redisinsight/ui/src/pages/vector-search/query/VectorSearchQuery.tsx b/redisinsight/ui/src/pages/vector-search/query/VectorSearchQuery.tsx
index d608d1e89e..58043c7366 100644
--- a/redisinsight/ui/src/pages/vector-search/query/VectorSearchQuery.tsx
+++ b/redisinsight/ui/src/pages/vector-search/query/VectorSearchQuery.tsx
@@ -1,10 +1,5 @@
import React, { useState } from 'react'
-import {
- ResizableContainer,
- ResizablePanel,
- ResizablePanelHandle,
-} from 'uiSrc/components/base/layout'
import QueryWrapper from 'uiSrc/pages/workbench/components/query'
import { HIDE_FIELDS } from 'uiSrc/components/query/query-card/QueryCardHeader/QueryCardHeader'
import { StyledNoResultsWrapper } from './VectorSearchQuery.styles'
@@ -26,6 +21,11 @@ import {
ViewMode,
ViewModeContextProvider,
} from 'uiSrc/components/query/context/view-mode.context'
+import {
+ RiResizableContainer,
+ RiResizablePanelHandle,
+ RiResizablePanel,
+} from 'uiBase/layout'
const mockSavedIndexes: SavedIndex[] = [
{
@@ -128,15 +128,15 @@ export const VectorSearchQuery = ({
setIsSavedQueriesOpen={setIsSavedQueriesOpen}
/>
-
-
+
-
-
+
+
-
+
-
-
}
/>
-
-
-
+
+
+
{isSavedQueriesOpen && (
<>
-
-
-
+
>
)}
-
+
)
diff --git a/redisinsight/ui/src/pages/vector-search/saved-queries/SavedQueriesScreen.tsx b/redisinsight/ui/src/pages/vector-search/saved-queries/SavedQueriesScreen.tsx
index 901b7177be..39b520b05c 100644
--- a/redisinsight/ui/src/pages/vector-search/saved-queries/SavedQueriesScreen.tsx
+++ b/redisinsight/ui/src/pages/vector-search/saved-queries/SavedQueriesScreen.tsx
@@ -1,12 +1,11 @@
import React from 'react'
-import { Title, Text } from 'uiSrc/components/base/text'
-
-import { RiSelect } from 'uiSrc/components/base/forms/select/RiSelect'
-import { Button } from 'uiSrc/components/base/forms/buttons'
import { FieldTag } from 'uiSrc/components/new-index/create-index-step/field-box/FieldTag'
-import { PlayFilledIcon } from 'uiSrc/components/base/icons'
+import { RiText, RiTitle } from 'uiBase/text'
+import { RiSecondaryButton, RiSelect } from 'uiBase/forms'
+import { PlayFilledIcon } from 'uiBase/icons'
+
import {
RightAlignedWrapper,
TagsWrapper,
@@ -34,16 +33,19 @@ export const SavedQueriesScreen = ({
onIndexChange,
onQueryInsert,
}: SavedQueriesScreenProps) => (
-
+
-
+
Saved queries
-
+
- Index:
+ Index:
{selectedIndex?.queries.map((query) => (
- {query.label}
+ {query.label}
- onQueryInsert(query.value)}
data-testid="btn-insert-query"
>
Insert
-
+
))}
diff --git a/redisinsight/ui/src/pages/vector-search/styles.ts b/redisinsight/ui/src/pages/vector-search/styles.ts
index e20526d67f..dfdecb98c1 100644
--- a/redisinsight/ui/src/pages/vector-search/styles.ts
+++ b/redisinsight/ui/src/pages/vector-search/styles.ts
@@ -1,5 +1,5 @@
import styled, { css } from 'styled-components'
-import { FlexGroup, FlexItem } from 'uiSrc/components/base/layout/flex'
+import { RiFlexGroup, RiFlexItem } from 'uiBase/layout'
export const VectorSearchPageWrapper = styled.div`
background-color: ${({ theme }) =>
@@ -12,7 +12,7 @@ export const VectorSearchPageWrapper = styled.div`
width: 100%;
`
-export const VectorSearchScreenWrapper = styled(FlexGroup)`
+export const VectorSearchScreenWrapper = styled(RiFlexGroup)`
${({ theme }) => css`
background-color: ${theme.semantic?.color.background.neutral100};
border-radius: 8px;
@@ -25,7 +25,7 @@ export const VectorSearchScreenWrapper = styled(FlexGroup)`
overflow: auto;
`
-export const VectorSearchScreenHeader = styled(FlexItem)`
+export const VectorSearchScreenHeader = styled(RiFlexItem)`
padding: ${({ theme }) => theme.core?.space.space300};
justify-content: space-between;
border: 1px solid;
@@ -34,7 +34,7 @@ export const VectorSearchScreenHeader = styled(FlexItem)`
border-top-right-radius: 8px;
`
-export const VectorSearchScreenContent = styled(FlexItem)`
+export const VectorSearchScreenContent = styled(RiFlexItem)`
padding: ${({ theme }) => theme.core?.space.space300};
gap: ${({ theme }) => theme.core?.space.space550};
border: 1px solid;
@@ -42,7 +42,7 @@ export const VectorSearchScreenContent = styled(FlexItem)`
border-color: ${({ theme }) => theme.color?.dusk200};
`
-export const VectorSearchScreenFooter = styled(FlexItem)`
+export const VectorSearchScreenFooter = styled(RiFlexItem)`
padding: ${({ theme }) => theme.core?.space.space300};
border: 1px solid;
border-color: ${({ theme }) => theme.color?.dusk200};
diff --git a/redisinsight/ui/src/pages/workbench/components/query/QueryWrapper.tsx b/redisinsight/ui/src/pages/workbench/components/query/QueryWrapper.tsx
index 021050ca7c..d570f6ed45 100644
--- a/redisinsight/ui/src/pages/workbench/components/query/QueryWrapper.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/query/QueryWrapper.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useMemo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { LoadingContent } from 'uiSrc/components/base/layout'
+import { RiLoadingContent } from 'uiBase/layout'
import { appRedisCommandsSelector } from 'uiSrc/slices/app/redis-commands'
import { RunQueryMode, ResultsMode } from 'uiSrc/slices/interfaces/workbench'
import {
@@ -67,7 +67,7 @@ const QueryWrapper = (props: Props) => {
const Placeholder = (
)
diff --git a/redisinsight/ui/src/pages/workbench/components/wb-no-results-message/WbNoResultsMessage.tsx b/redisinsight/ui/src/pages/workbench/components/wb-no-results-message/WbNoResultsMessage.tsx
index 408860bac3..33ab72f689 100644
--- a/redisinsight/ui/src/pages/workbench/components/wb-no-results-message/WbNoResultsMessage.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/wb-no-results-message/WbNoResultsMessage.tsx
@@ -2,6 +2,11 @@ import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
+import { RiFlexItem, RiRow, RiCard } from 'uiBase/layout'
+import { RiSpacer } from 'uiBase/layout/spacer'
+import { RiPrimaryButton } from 'uiBase/forms'
+import { LightBulbIcon } from 'uiBase/icons'
+import { RiTitle, RiText } from 'uiBase/text'
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
import {
changeSelectedTab,
@@ -13,14 +18,6 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import BulbImg from 'uiSrc/assets/img/workbench/bulb.svg'
import ArrowToGuidesIcon from 'uiSrc/assets/img/workbench/arrow-to-guides.svg?react'
-import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
-import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
-import { LightBulbIcon } from 'uiSrc/components/base/icons'
-import { Title } from 'uiSrc/components/base/text/Title'
-import { Text } from 'uiSrc/components/base/text'
-import { Card } from 'uiSrc/components/base/layout'
-
import styles from './styles.module.scss'
const WbNoResultsMessage = () => {
@@ -45,57 +42,57 @@ const WbNoResultsMessage = () => {
return (
-
No results to display yet
-
-
+
+
This is our advanced CLI
-
-
+
+
for Redis commands.
-
-
+
+
-
+
-
-
+
+
-
-
-
+
+
Try Workbench with our interactive Tutorials to learn how Redis
can solve your use cases.
-
-
+
+
-
handleOpenInsights()}
className={styles.exploreBtn}
data-testid="no-results-explore-btn"
>
Explore
-
+
-
-
+
+
Or click the icon in the top right corner.
-
-
-
-
+
+
+
+
)
}
diff --git a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx
index 54c20b1a62..64c581f498 100644
--- a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx
@@ -1,6 +1,9 @@
import React from 'react'
import cx from 'classnames'
+import { RiEmptyButton } from 'uiBase/forms'
+import { DeleteIcon } from 'uiBase/icons'
+import { RiProgressBarLoader } from 'uiBase/display'
import { CodeButtonParams } from 'uiSrc/constants'
import { ProfileQueryType } from 'uiSrc/pages/workbench/constants'
import { generateProfileQueryForCommand } from 'uiSrc/pages/workbench/utils/profile'
@@ -9,9 +12,6 @@ import { QueryCard } from 'uiSrc/components/query'
import { CommandExecutionUI } from 'uiSrc/slices/interfaces'
import { RunQueryMode, ResultsMode } from 'uiSrc/slices/interfaces/workbench'
-import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
-import { DeleteIcon } from 'uiSrc/components/base/icons'
-import { ProgressBarLoader } from 'uiSrc/components/base/display'
import WbNoResultsMessage from '../../wb-no-results-message'
import styles from './styles.module.scss'
@@ -76,14 +76,14 @@ const WBResults = (props: Props) => {
return (
{!isResultsLoaded && (
-
)}
{!!items?.length && (
- {
data-testid="clear-history-btn"
>
Clear Results
-
+
)}
diff --git a/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx b/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
index 0c374bb889..3f82bd2e59 100644
--- a/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
@@ -4,6 +4,11 @@ import cx from 'classnames'
import { isEmpty } from 'lodash'
import { useParams } from 'react-router-dom'
+import {
+ RiResizableContainer,
+ RiResizablePanel,
+ RiResizablePanelHandle,
+} from 'uiBase/layout'
import {
Maybe,
Nullable,
@@ -23,11 +28,6 @@ import { userSettingsConfigSelector } from 'uiSrc/slices/user/user-settings'
import { PIPELINE_COUNT_DEFAULT } from 'uiSrc/constants/api'
import { CodeButtonParams } from 'uiSrc/constants'
-import {
- ResizableContainer,
- ResizablePanel,
- ResizablePanelHandle,
-} from 'uiSrc/components/base/layout'
import QueryWrapper from '../../query'
import WBResultsWrapper from '../../wb-results'
@@ -198,11 +198,11 @@ const WBView = (props: Props) => {
-
- {
onQueryChangeMode={onQueryChangeMode}
onChangeGroupMode={onChangeGroupMode}
/>
-
+
-
- {
onQueryDelete={onQueryDelete}
onAllQueriesDelete={onAllQueriesDelete}
/>
-
-
+
+
diff --git a/redisinsight/ui/src/pages/workbench/constants.ts b/redisinsight/ui/src/pages/workbench/constants.ts
index 883f2503b4..18a0b8aa4c 100644
--- a/redisinsight/ui/src/pages/workbench/constants.ts
+++ b/redisinsight/ui/src/pages/workbench/constants.ts
@@ -1,4 +1,4 @@
-import { AllIconsType } from 'uiSrc/components/base/icons/RiIcon'
+import { AllIconsType } from 'uiBase/icons'
export const WORKBENCH_HISTORY_WRAPPER_NAME = 'WORKBENCH'
export const WORKBENCH_HISTORY_MAX_LENGTH = 30
diff --git a/redisinsight/ui/src/services/tests/routing.spec.tsx b/redisinsight/ui/src/services/tests/routing.spec.tsx
index 9023958ef8..a7b8717928 100644
--- a/redisinsight/ui/src/services/tests/routing.spec.tsx
+++ b/redisinsight/ui/src/services/tests/routing.spec.tsx
@@ -1,5 +1,5 @@
import React from 'react'
-import { Link } from 'uiSrc/components/base/link/Link'
+import { RiLink } from 'uiBase/display'
import { Pages } from 'uiSrc/constants'
import { getRouterLinkProps } from 'uiSrc/services'
import { render, fireEvent, screen } from 'uiSrc/utils/test-utils'
@@ -9,12 +9,12 @@ describe('getRouterLinkProps', () => {
const mockOnClick = jest.fn()
render(
-
Text
- ,
+ ,
)
fireEvent.click(screen.getByTestId('link'))
diff --git a/redisinsight/ui/src/slices/tests/browser/rejson.spec.ts b/redisinsight/ui/src/slices/tests/browser/rejson.spec.ts
index 574c057129..e5646a757f 100644
--- a/redisinsight/ui/src/slices/tests/browser/rejson.spec.ts
+++ b/redisinsight/ui/src/slices/tests/browser/rejson.spec.ts
@@ -8,6 +8,8 @@ import {
mockStore,
} from 'uiSrc/utils/test-utils'
import successMessages from 'uiSrc/components/notifications/success-messages'
+import { EditorType } from 'uiSrc/slices/interfaces'
+import { stringToBuffer } from 'uiSrc/utils'
import { GetRejsonRlResponseDto } from 'apiSrc/modules/browser/rejson-rl/dto'
import reducer, {
initialState,
@@ -36,8 +38,6 @@ import {
addMessageNotification,
} from '../../app/notifications'
import { refreshKeyInfo } from '../../browser/keys'
-import { EditorType } from 'uiSrc/slices/interfaces'
-import { stringToBuffer } from 'uiSrc/utils'
jest.mock('uiSrc/services', () => ({
...jest.requireActual('uiSrc/services'),
diff --git a/redisinsight/ui/src/styles/base/_base.scss b/redisinsight/ui/src/styles/base/_base.scss
index 40c09632e8..e2706b7669 100644
--- a/redisinsight/ui/src/styles/base/_base.scss
+++ b/redisinsight/ui/src/styles/base/_base.scss
@@ -1,41 +1,6 @@
@use "../mixins/_eui";
$sideBarSize: 60px;
-:root {
- --base: 16px;
- //2px
- --size-xxs: calc(var(--base) * 0.125);
- //4px
- --size-xs: calc(var(--base) * 0.25);
- //8px
- --size-s: calc(var(--base) * 0.5);
- //12px
- --size-m: calc(var(--base) * 0.75);
- //16px
- --size-base: var(--base);
- //24px
- --size-l: calc(var(--base) * 1.5);
- //32px
- --size-xl: calc(var(--base) * 2);
- //40px
- --size-xxl: calc(var(--base) * 2.5);
- //48px
- --size-xxxl: calc(var(--base) * 3);
- //64px
- --size-xxxxl: calc(var(--base) * 4);
-
- // to 574px
- --bp-xs: 0;
- // to 767px
- --bp-s: 575px;
- // to 991px
- --bp-m: 768px;
- // to 1199px
- --bp-l: 992px;
- // above 1200px
- --bp-xl: 1200px;
-}
-
html {
letter-spacing: normal !important;
background-color: var(--euiPageBackgroundColor);
@@ -154,21 +119,11 @@ main.euiPageBody {
:root {
// todo: take from theme
--backgroundPrimaryHover: var(--euiPageBackgroundColor);
- --color-primary: #e8f1ff;
- --color-primary-text: #006bb4;
- --color-ghost-text: #fff;
- --color-text-text: #343741;
- --color-ghost: rgba(255, 255, 255, 0.1);
- --color-subdued: #e8f1ff;
--background-hover: rgba(23 80 186 / 0.04);
--background-primary-hover: rgba(23 80 186 / 0.04);
- --border-radius-small: 4px;
- --border-radius-medium: 6px;
--font-weight-m: 500;
--font-size-xs: 12px;
--font-size-s: 14px;
--font-size-m: 16px;
--font-size-l: 18px;
- --gap-s: var(--size-s);
- --gap-m: var(--size-m);
}
diff --git a/redisinsight/ui/src/templates/autodiscovery-page-template/AutodiscoveryPageTemplate.tsx b/redisinsight/ui/src/templates/autodiscovery-page-template/AutodiscoveryPageTemplate.tsx
index 5139a86647..6db60f543c 100644
--- a/redisinsight/ui/src/templates/autodiscovery-page-template/AutodiscoveryPageTemplate.tsx
+++ b/redisinsight/ui/src/templates/autodiscovery-page-template/AutodiscoveryPageTemplate.tsx
@@ -1,8 +1,8 @@
import React from 'react'
+import { RiPage, RiPageBody } from 'uiBase/layout'
import { PageHeader } from 'uiSrc/components'
import ExplorePanelTemplate from 'uiSrc/templates/explore-panel/ExplorePanelTemplate'
-import { Page, PageBody } from 'uiSrc/components/base/layout/page'
import styles from './styles.module.scss'
export interface Props {
@@ -16,11 +16,11 @@ const AutodiscoveryPageTemplate = (props: Props) => {
-
-
+
+
{children}
-
-
+
+
>
)
diff --git a/redisinsight/ui/src/templates/home-page-template/HomePageTemplate.tsx b/redisinsight/ui/src/templates/home-page-template/HomePageTemplate.tsx
index 594f177cbe..cc6703b2a5 100644
--- a/redisinsight/ui/src/templates/home-page-template/HomePageTemplate.tsx
+++ b/redisinsight/ui/src/templates/home-page-template/HomePageTemplate.tsx
@@ -1,6 +1,7 @@
import React from 'react'
import { useSelector } from 'react-redux'
+import { RiFlexGroup as Flex, RiFlexItem } from 'uiBase/layout'
import { ExplorePanelTemplate } from 'uiSrc/templates'
import HomeTabs from 'uiSrc/components/home-tabs'
import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
@@ -10,7 +11,6 @@ import { FeatureFlagComponent, OAuthUserProfile } from 'uiSrc/components'
import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
import { CopilotTrigger, InsightsTrigger } from 'uiSrc/components/triggers'
-import { Flex, FlexItem } from 'uiSrc/components/base/layout/flex'
import styles from './styles.module.scss'
export interface Props {
@@ -35,23 +35,23 @@ const HomePageTemplate = (props: Props) => {
{isAnyChatAvailable && (
-
+
-
+
)}
-
+
-
+
-
-
+
diff --git a/redisinsight/ui/src/templates/instance-page-template/InstancePageTemplate.tsx b/redisinsight/ui/src/templates/instance-page-template/InstancePageTemplate.tsx
index bc745b57be..72d4e6b987 100644
--- a/redisinsight/ui/src/templates/instance-page-template/InstancePageTemplate.tsx
+++ b/redisinsight/ui/src/templates/instance-page-template/InstancePageTemplate.tsx
@@ -1,6 +1,13 @@
import React, { useCallback, useEffect, useRef, useState } from 'react'
import { useSelector } from 'react-redux'
import { useTheme } from '@redis-ui/styles'
+import {
+ RiResizableContainer,
+ RiResizablePanel,
+ RiResizablePanelHandle,
+ RiSpacer,
+ ImperativePanelGroupHandle,
+} from 'uiBase/layout'
import InstanceHeader from 'uiSrc/components/instance-header'
import { ExplorePanelTemplate } from 'uiSrc/templates'
import BottomGroupComponents from 'uiSrc/components/bottom-group-components/BottomGroupComponents'
@@ -9,13 +16,6 @@ import { monitorSelector } from 'uiSrc/slices/cli/monitor'
import { localStorageService } from 'uiSrc/services'
import { BrowserStorageItem } from 'uiSrc/constants'
-import {
- ResizableContainer,
- ResizablePanel,
- ResizablePanelHandle,
- Spacer,
-} from 'uiSrc/components/base/layout'
-import { ImperativePanelGroupHandle } from 'uiSrc/components/base/layout/resize'
import { AppNavigation } from 'uiSrc/components'
import { AppNavigationActionsProvider } from 'uiSrc/contexts/AppNavigationActionsProvider'
import { Nullable } from 'uiSrc/utils'
@@ -103,13 +103,13 @@ const InstancePageTemplate = (props: Props) => {
<>
setActions(null)} />
-
-
+
- {
>
{children}
-
-
+
-
-
+ {
}}
>
-
-
+
+
>
)
}
diff --git a/redisinsight/ui/src/utils/errors.tsx b/redisinsight/ui/src/utils/errors.tsx
index 10564b0e89..0d0159bfb9 100644
--- a/redisinsight/ui/src/utils/errors.tsx
+++ b/redisinsight/ui/src/utils/errors.tsx
@@ -1,6 +1,7 @@
import { AxiosError } from 'axios'
import { capitalize, isEmpty, isString, isArray, set, isNumber } from 'lodash'
import React from 'react'
+import { RiSpacer } from 'uiBase/layout/spacer'
import { CustomErrorCodes } from 'uiSrc/constants'
import { DEFAULT_ERROR_MESSAGE } from 'uiSrc/utils'
import { CustomError } from 'uiSrc/slices/interfaces'
@@ -9,7 +10,6 @@ import {
UTM_CAMPAINGS,
UTM_MEDIUMS,
} from 'uiSrc/constants/links'
-import { Spacer } from 'uiSrc/components/base/layout/spacer'
import { getUtmExternalLink } from './links'
export const getRdiValidationMessage = (
@@ -75,9 +75,9 @@ export const parseCustomError = (
<>
Authorization server encountered a misconfiguration error and was
unable to complete your request.
-
+
Try again later.
-
+
If the issue persists,{' '}
Unknown authorization request.
-
+
If the issue persists,{' '}
An unexpected error occurred.
-
+
If the issue persists,{' '}
Your request resulted in an error.
-
+
Try again later.
-
+
If the issue persists,{' '}
Try restarting Redis Insight.
-
+
If the issue persists,{' '}
Resource requested could not be found.
-
+
Try again later.
-
+
If the issue persists,{' '}
Sign in again to continue working with Redis Cloud.
-
+
If the issue persists,{' '}
Your Redis Cloud authorization failed.
-
+
Remove the invalid API key from Redis Insight and try again.
-
+
Open the Settings page to manage Redis Cloud API keys.
>
)
@@ -230,7 +230,7 @@ export const parseCustomError = (
message = (
<>
You already have a free trial Redis Cloud database running.
-
+
Check out your
Your request resulted in an error.
-
+
Try again later.
-
+
If the issue persists,{' '}
Try restarting Redis Insight.
-
+
If the issue persists,{' '}
Resource requested could not be found.
-
+
Try again later.
-
+
If the issue persists,{' '}
Sign in again to continue working with Redis Cloud.
-
+
If the issue persists,{' '}
Sign in again to continue working with Redis Cloud.
-
+
If the issue persists,{' '}
Authorization server encountered a misconfiguration error and was
unable to complete your request.
-
+
Try again later.
-
+
If the issue persists,{' '}
Unknown authorization request.
-
+
If the issue persists,{' '}
An unexpected error occurred.
-
+
If the issue persists,{' '}
You already have a free trial Redis Cloud database running.
-
+
Check out your
Your Redis Cloud authorization failed.
-
+
Remove the invalid API key from Redis Insight and try again.
-
+
Open the Settings page to manage Redis Cloud API keys.
>
),
diff --git a/redisinsight/ui/vite.config.mjs b/redisinsight/ui/vite.config.mjs
index d88c864cc9..32f64e89ff 100644
--- a/redisinsight/ui/vite.config.mjs
+++ b/redisinsight/ui/vite.config.mjs
@@ -83,6 +83,7 @@ export default defineConfig({
'@redislabsdev/redis-ui-table': '@redis-ui/table',
uiSrc: fileURLToPath(new URL('./src', import.meta.url)),
apiSrc: fileURLToPath(new URL('../api/src', import.meta.url)),
+ uiBase: fileURLToPath(new URL('./src/components/base', import.meta.url)),
},
},
server: {
diff --git a/tsconfig.json b/tsconfig.json
index 2da11a5de0..5f5488bfe3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -31,7 +31,8 @@
"apiSrc/*": ["redisinsight/api/src/*"],
"src/*": ["redisinsight/api/src/*"],
"desktopSrc/*": ["redisinsight/desktop/src/*"],
- "tests/*": ["redisinsight/ui/__tests__/*"]
+ "tests/*": ["redisinsight/ui/__tests__/*"],
+ "uiBase/*": ["redisinsight/ui/src/components/base/*"]
}
},
"include": [