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
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import cx from 'classnames'
import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiToolTip } from '@elastic/eui'

import { Pages } from 'uiSrc/constants'
import { BuildType } from 'uiSrc/constants/env'
import { ConnectionType } from 'uiSrc/slices/interfaces'
import { connectedInstanceOverviewSelector, connectedInstanceSelector } from 'uiSrc/slices/instances'
import { appInfoSelector } from 'uiSrc/slices/app/info'
import ShortInstanceInfo from 'uiSrc/components/instance-header/components/ShortInstanceInfo'
import DatabaseOverviewWrapper from 'uiSrc/components/database-overview/DatabaseOverviewWrapper'

Expand All @@ -22,6 +24,7 @@ const InstanceHeader = () => {
db = 0
} = useSelector(connectedInstanceSelector)
const { version } = useSelector(connectedInstanceOverviewSelector)
const { server } = useSelector(appInfoSelector)
const history = useHistory()
const [windowDimensions, setWindowDimensions] = useState(0)

Expand Down Expand Up @@ -49,14 +52,14 @@ const InstanceHeader = () => {
<div>
<EuiToolTip
position="bottom"
content="My Redis databases"
content={server?.buildType === BuildType.RedisStack ? 'Edit database' : 'My Redis databases'}
>
<EuiButtonIcon
display="empty"
size="s"
iconSize="l"
iconType="sortLeft"
aria-label="My Redis databases"
aria-label={server?.buildType === BuildType.RedisStack ? 'Edit database' : 'My Redis databases'}
data-testid="my-redis-db-icon"
onClick={goHome}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PageNames, Pages, IRoute } from 'uiSrc/constants'
import {
BrowserPage, InstancePage, SettingsPage,
BrowserPage, InstancePage,
} from 'uiSrc/pages'
import WorkbenchPage from 'uiSrc/pages/workbench'
import EditConnection from 'uiSrc/pages/redisStack/components/edit-connection'
Expand Down Expand Up @@ -28,10 +28,6 @@ const ROUTES: IRoute[] = [
component: EditConnection,
},
...COMMON_ROUTES,
{
path: Pages.settings,
component: SettingsPage,
},
{
path: '/:instanceId',
protected: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const NavigationMenu = ({ buildType }: IProps) => {
<EuiPageSideBar aria-label="Main navigation" className={cx(styles.navigation, 'eui-yScroll')}>
<div className={styles.container}>
<EuiToolTip
content={buildType === BuildType.RedisStack ? 'Redis Stack' : 'My Redis databases'}
content={buildType === BuildType.RedisStack ? 'Edit database' : 'My Redis databases'}
position="right"
>
<span className={styles.iconLogo}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const EditConnection = () => {
}
}, [])

const onClose = () => history.goBack()

const getInstanceInfo = async () => {
try {
setState(DEFAULT_STATE)
Expand All @@ -68,7 +70,7 @@ const EditConnection = () => {
const onInstanceChanged = () => {
if (server?.fixedDatabaseId) {
dispatch(setConnectedInstanceId(server.fixedDatabaseId))
history.push(Pages.browser(server?.fixedDatabaseId))
history.goBack()
}
}

Expand All @@ -78,6 +80,7 @@ const EditConnection = () => {

const CreateCloudBtn = ({ content }: { content: ContentCreateRedis }) => {
const { title, description, styles, links } = content

// @ts-ignore
const linkStyles = styles ? styles[theme] : {}
return (
Expand Down Expand Up @@ -123,6 +126,7 @@ const EditConnection = () => {
onDbAdded={() => {}}
onDbEdited={onInstanceChanged}
onAliasEdited={onAliasChanged}
onClose={onClose}
/>
</div>
<div id="footerDatabaseForm" />
Expand Down