Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions redisinsight/ui/src/components/base/layout/card/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Card } from '@redis-ui/components'
1 change: 1 addition & 0 deletions redisinsight/ui/src/components/base/layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import HorizontalRule from './horizontal-rule/HorizontalRule'
import LoadingContent from './loading-content/LoadingContent'

export { HorizontalRule, LoadingContent }
export * from './card'
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react'
import { EuiPanel } from '@elastic/eui'
import SuspenseLoader from 'uiSrc/components/main-router/components/SuspenseLoader'

import { Col, FlexItem } from 'uiSrc/components/base/layout/flex'
import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
import styles from './styles.module.scss'
import { Card } from 'uiSrc/components/base/layout'

export type ConnectivityErrorProps = {
onRetry?: () => void
Expand All @@ -17,8 +16,8 @@ const ConnectivityError = ({
error,
onRetry,
}: ConnectivityErrorProps) => (
<Col className={styles.connectivityError}>
<EuiPanel>
<Col>
<Card>
<Col style={{ minHeight: '100vh' }} centered>
{isLoading && <SuspenseLoader />}
<Col centered gap="xl">
Expand All @@ -30,7 +29,7 @@ const ConnectivityError = ({
)}
</Col>
</Col>
</EuiPanel>
</Card>
</Col>
)

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { EuiPanel } from '@elastic/eui'

import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
import { Card } from 'uiSrc/components/base/layout'
import CreateTutorialLink from '../CreateTutorialLink'

import styles from './styles.module.scss'
Expand All @@ -12,12 +12,7 @@ export interface Props {

const WelcomeMyTutorials = ({ handleOpenUpload }: Props) => (
<div className={styles.wrapper} data-testid="welcome-my-tutorials">
<EuiPanel
hasBorder={false}
hasShadow={false}
className={styles.panel}
paddingSize="s"
>
<Card className={styles.panel}>
<div className={styles.link}>
<CreateTutorialLink />
</div>
Expand All @@ -29,7 +24,7 @@ const WelcomeMyTutorials = ({ handleOpenUpload }: Props) => (
>
+ Upload <span className={styles.hideText}>tutorial</span>
</PrimaryButton>
</EuiPanel>
</Card>
</div>
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
padding: 16px 12px 0;

.panel {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row !important;

background-color: var(--euiColorLightestShade) !important;

padding: 8px 18px !important;
padding: 8px 18px;
}

.link {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import React, { useContext } from 'react'
import { useDispatch } from 'react-redux'
import { useHistory, useParams } from 'react-router-dom'
import {
EuiPanel,
EuiAccordion,
EuiToolTip,
EuiIcon,
} from '@elastic/eui'
import { EuiAccordion, EuiToolTip, EuiIcon } from '@elastic/eui'
import { isUndefined } from 'lodash'
import cx from 'classnames'

Expand Down Expand Up @@ -42,6 +37,7 @@ import {

import { openTutorialByPath } from 'uiSrc/slices/panels/sidePanels'
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
import { Card } from 'uiSrc/components/base/layout'
import {
IconButton,
SecondaryButton,
Expand Down Expand Up @@ -251,10 +247,11 @@ const Recommendation = ({
<FlexItem>
<EuiToolTip
title={`${hide ? 'Show' : 'Hide'} tip`}
content={`${hide
? 'This tip will be shown in the list.'
: 'This tip will be removed from the list and not displayed again.'
}`}
content={`${
hide
? 'This tip will be shown in the list.'
: 'This tip will be removed from the list and not displayed again.'
}`}
position="top"
display="inlineBlock"
anchorClassName="flex-row"
Expand Down Expand Up @@ -296,9 +293,9 @@ const Recommendation = ({
data-testid={`${name}-accordion`}
aria-label={`${name}-accordion`}
>
<EuiPanel className={styles.accordionContent} color="subdued">
<Card className={styles.accordionContent} color="subdued">
{recommendationContent()}
</EuiPanel>
</Card>
</EuiAccordion>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
useState,
} from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { EuiFieldText, EuiForm, EuiPanel } from '@elastic/eui'
import { EuiFieldText, EuiForm } from '@elastic/eui'
import { toNumber } from 'lodash'
import {
isVersionHigherOrEquals,
Expand Down Expand Up @@ -237,14 +237,8 @@ const AddKeyHash = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
color="transparent"
className="flexItemNoFullWidth"
hasShadow={false}
borderRadius="none"
style={{ border: 'none' }}
>
<Row justify="end">
<>
<Row justify="end" style={{ padding: 18 }}>
<FlexItem>
<SecondaryButton
onClick={() => onCancel(true)}
Expand All @@ -265,7 +259,7 @@ const AddKeyHash = (props: Props) => {
</PrimaryButton>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ChangeEvent, FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { EuiForm, EuiPanel, EuiSuperSelect, EuiFieldText } from '@elastic/eui'
import { EuiForm, EuiSuperSelect, EuiFieldText } from '@elastic/eui'

import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addListKey } from 'uiSrc/slices/browser/keys'
Expand Down Expand Up @@ -117,13 +117,8 @@ const AddKeyList = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
style={{ border: 'none' }}
color="transparent"
hasShadow={false}
borderRadius="none"
>
<Row justify="end">
<>
<Row justify="end" style={{ padding: 18 }}>
<FlexItem>
<SecondaryButton
onClick={() => onCancel(true)}
Expand All @@ -144,7 +139,7 @@ const AddKeyList = (props: Props) => {
</PrimaryButton>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useParams } from 'react-router-dom'
import { EuiForm, EuiPanel } from '@elastic/eui'
import { EuiForm } from '@elastic/eui'

import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addReJSONKey } from 'uiSrc/slices/browser/keys'
Expand Down Expand Up @@ -104,14 +104,8 @@ const AddKeyReJSON = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
color="transparent"
className="flexItemNoFullWidth"
hasShadow={false}
borderRadius="none"
style={{ border: 'none' }}
>
<Row justify="end">
<>
<Row justify="end" style={{ padding: 18 }}>
<FlexItem>
<div>
<SecondaryButton
Expand All @@ -136,7 +130,7 @@ const AddKeyReJSON = (props: Props) => {
</div>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import React, {
useState,
} from 'react'
import { useDispatch, useSelector } from 'react-redux'
import {
EuiFieldText,
EuiForm,
EuiPanel,
} from '@elastic/eui'
import { EuiFieldText, EuiForm } from '@elastic/eui'
import { Maybe, stringToBuffer } from 'uiSrc/utils'
import { addKeyStateSelector, addSetKey } from 'uiSrc/slices/browser/keys'

Expand Down Expand Up @@ -167,14 +163,8 @@ const AddKeySet = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
color="transparent"
className="flexItemNoFullWidth"
hasShadow={false}
borderRadius="none"
style={{ border: 'none' }}
>
<Row justify="end">
<>
<Row justify="end" style={{ padding: 18 }}>
<FlexItem>
<SecondaryButton
onClick={() => onCancel(true)}
Expand All @@ -195,7 +185,7 @@ const AddKeySet = (props: Props) => {
</PrimaryButton>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch } from 'react-redux'
import { EuiForm, EuiPanel } from '@elastic/eui'
import { EuiForm } from '@elastic/eui'
import { addStreamKey } from 'uiSrc/slices/browser/keys'
import {
entryIdRegex,
Expand Down Expand Up @@ -106,14 +106,8 @@ const AddKeyStream = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
color="transparent"
className="flexItemNoFullWidth"
hasShadow={false}
borderRadius="none"
style={{ border: 'none' }}
>
<Row justify="end" gap="m">
<>
<Row justify="end" gap="m" style={{ padding: 18 }}>
<FlexItem>
<div>
<SecondaryButton
Expand All @@ -137,7 +131,7 @@ const AddKeyStream = (props: Props) => {
</div>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FormEvent, useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'

import { EuiForm, EuiPanel } from '@elastic/eui'
import { EuiForm } from '@elastic/eui'
import { Maybe, stringToBuffer } from 'uiSrc/utils'

import { addKeyStateSelector, addStringKey } from 'uiSrc/slices/browser/keys'
Expand Down Expand Up @@ -70,13 +70,8 @@ const AddKeyString = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
style={{ border: 'none' }}
color="transparent"
hasShadow={false}
borderRadius="none"
>
<Row justify="end" gap="m">
<>
<Row justify="end" gap="m" style={{ padding: 18 }}>
<FlexItem>
<div>
<SecondaryButton
Expand All @@ -101,7 +96,7 @@ const AddKeyString = (props: Props) => {
</div>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, {
} from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { toNumber } from 'lodash'
import { EuiFieldText, EuiForm, EuiPanel } from '@elastic/eui'
import { EuiFieldText, EuiForm } from '@elastic/eui'
import { Maybe, stringToBuffer, validateScoreNumber } from 'uiSrc/utils'
import { isNaNConvertedString } from 'uiSrc/utils/numbers'
import { addKeyStateSelector, addZsetKey } from 'uiSrc/slices/browser/keys'
Expand Down Expand Up @@ -238,14 +238,8 @@ const AddKeyZset = (props: Props) => {
Submit
</PrimaryButton>
<AddKeyFooter>
<EuiPanel
className="flexItemNoFullWidth"
color="transparent"
hasShadow={false}
borderRadius="none"
style={{ border: 'none' }}
>
<Row justify="end">
<>
<Row justify="end" style={{ padding: 18 }}>
<FlexItem>
<div>
<SecondaryButton
Expand All @@ -270,7 +264,7 @@ const AddKeyZset = (props: Props) => {
</div>
</FlexItem>
</Row>
</EuiPanel>
</>
</AddKeyFooter>
</EuiForm>
)
Expand Down
Loading
Loading