diff --git a/src/browser/modules/DBMSInfo/DatabaseSelector.tsx b/src/browser/modules/DBMSInfo/DatabaseSelector.tsx
index efca20010fa..9939c4d1a65 100644
--- a/src/browser/modules/DBMSInfo/DatabaseSelector.tsx
+++ b/src/browser/modules/DBMSInfo/DatabaseSelector.tsx
@@ -37,7 +37,6 @@ const Select = styled.select`
const EMPTY_OPTION = 'Select db to use'
const HOUSE_EMOJI = '\u{1F3E0}'
-const HOUR_GLASS_EMOJI = '\u{231B}'
const NBSP_CHAR = '\u{00A0}'
type DatabaseSelectorProps = {
@@ -92,19 +91,28 @@ export const DatabaseSelector = ({
)}
- {databasesAndAliases.map(dbOrAlias => (
-
- ))}
+ {databasesAndAliases.map(dbOrAlias => {
+ /* When deduplicating the list of databases and aliases on clusters
+ we prefer to find ones that are "online". If our deduplicated
+ db is not online, it means none of the databases on the cluster with
+ that name is online, so we should disable it in the list and show
+ one of the statuses as a simplification (even though they could
+ technically be different)
+ */
+ const dbNotOnline = dbOrAlias.status !== 'online'
+
+ return (
+
+ )
+ })}
diff --git a/src/browser/modules/Sidebar/GuideDrawer.tsx b/src/browser/modules/Sidebar/GuideDrawer.tsx
index 265198d8c8c..ae3b9727e7b 100644
--- a/src/browser/modules/Sidebar/GuideDrawer.tsx
+++ b/src/browser/modules/Sidebar/GuideDrawer.tsx
@@ -27,7 +27,6 @@ import GuideCarousel from '../GuideCarousel/GuideCarousel'
import GuidePicker from './GuidePicker'
import {
BackIconContainer,
- GuideTitle,
StyledDrawerSeparator,
StyledGuideDrawer,
StyledGuideDrawerHeader
diff --git a/src/browser/modules/Stream/ErrorFrame.tsx b/src/browser/modules/Stream/ErrorFrame.tsx
index d6308cd74b1..0e4bc4a7331 100644
--- a/src/browser/modules/Stream/ErrorFrame.tsx
+++ b/src/browser/modules/Stream/ErrorFrame.tsx
@@ -31,7 +31,11 @@ import {
StyledHelpFrame,
StyledPreformattedArea
} from './styled'
-import { UnknownCommandError, createErrorObject } from 'services/exceptions'
+import {
+ DatabaseUnavailableErrorType,
+ UnknownCommandError,
+ createErrorObject
+} from 'services/exceptions'
export const ErrorView = ({ frame }: any) => {
if (!frame) return null
@@ -69,6 +73,12 @@ export const ErrorView = ({ frame }: any) => {
Use to list available commands.
>
) : null}
+ {errorCode === DatabaseUnavailableErrorType ? (
+ <>
+ Run or{' '}
+ for more information.
+ >
+ ) : null}
)
}
diff --git a/src/browser/modules/Stream/auto-exec-button.tsx b/src/browser/modules/Stream/auto-exec-button.tsx
index 67a83f097b6..fc666803712 100644
--- a/src/browser/modules/Stream/auto-exec-button.tsx
+++ b/src/browser/modules/Stream/auto-exec-button.tsx
@@ -43,17 +43,21 @@ export function AutoExecButtonComponent({
bus,
cmd,
displayText,
+ isCypher = false,
...rest
}: any) {
const onClick = useCallback(() => {
- const action = executeCommand(`:${cmd}`, { source: commandSources.button })
+ const action = executeCommand(isCypher ? cmd : `:${cmd}`, {
+ source: commandSources.button
+ })
bus.send(action.type, action)
}, [cmd])
return (
- {displayText ?? `:${cmd}`}
+ {' '}
+ {displayText ?? (isCypher ? cmd : `:${cmd}`)}
)
}
diff --git a/src/shared/services/exceptions.ts b/src/shared/services/exceptions.ts
index 6236c91c854..5bed2b326d6 100644
--- a/src/shared/services/exceptions.ts
+++ b/src/shared/services/exceptions.ts
@@ -129,6 +129,7 @@ export function DatabaseNotFoundError({
}
}
+export const DatabaseUnavailableErrorType = 'DatabaseUnavailableError'
export function DatabaseUnavailableError({
dbName,
dbMeta
@@ -136,10 +137,9 @@ export function DatabaseUnavailableError({
dbName: string
dbMeta: { status: string }
}): BrowserError {
- const type = 'DatabaseUnavailableError'
return {
- type,
- code: type,
+ type: DatabaseUnavailableErrorType,
+ code: DatabaseUnavailableErrorType,
message: `Database "${dbName}" is unavailable, its status is "${dbMeta.status}".`
}
}