diff --git a/catalog/app/components/Footer/Footer.tsx b/catalog/app/components/Footer/Footer.tsx
index c5252462d8f..918d099f29f 100644
--- a/catalog/app/components/Footer/Footer.tsx
+++ b/catalog/app/components/Footer/Footer.tsx
@@ -10,12 +10,9 @@ import * as style from 'constants/style'
import * as URLS from 'constants/urls'
import * as Notifications from 'containers/Notifications'
import * as CatalogSettings from 'utils/CatalogSettings'
-import * as GQL from 'utils/GraphQL'
import * as NamedRoutes from 'utils/NamedRoutes'
import copyToClipboard from 'utils/clipboard'
-import STACK_QUERY from 'utils/Stack.generated'
-
import bg from './bg.png'
import iconFacebook from './icon-facebook.svg'
import iconGithub from './icon-github.svg'
@@ -36,13 +33,12 @@ const useVersionStyles = M.makeStyles((t) => ({
}))
function Version() {
- const { stack } = GQL.useQueryS(STACK_QUERY)
const classes = useVersionStyles()
const { push } = Notifications.use()
const handleCopy = React.useCallback(() => {
- copyToClipboard(stack.version || '')
+ copyToClipboard(cfg.stackVersion || '')
push('Web catalog container hash has been copied to clipboard')
- }, [push, stack.version])
+ }, [push])
return (
- Version: {stack.version}
+ Version: {cfg.stackVersion}
)
}
diff --git a/catalog/app/components/Layout/Layout.tsx b/catalog/app/components/Layout/Layout.tsx
index 8335222c4ae..f9c3c4d2435 100644
--- a/catalog/app/components/Layout/Layout.tsx
+++ b/catalog/app/components/Layout/Layout.tsx
@@ -3,40 +3,10 @@ import { useRouteMatch } from 'react-router-dom'
import * as M from '@material-ui/core'
import Footer from 'components/Footer'
-import * as style from 'constants/style'
import * as Bookmarks from 'containers/Bookmarks'
import * as NavBar from 'containers/NavBar'
-import { createBoundary } from 'utils/ErrorBoundary'
import * as NamedRoutes from 'utils/NamedRoutes'
-const useComponentErrorStyles = M.makeStyles((t) => ({
- root: {
- background: t.palette.secondary.dark,
- position: 'relative',
- },
- container: {
- color: t.palette.error.light,
- padding: t.spacing(2),
- },
-}))
-
-function ComponentError() {
- const classes = useComponentErrorStyles()
- return (
-
-
- Failed to render component
-
-
- )
-}
-
-const ErrorBoundary = createBoundary(() => () => (
-
-
-
-))
-
const useRootStyles = M.makeStyles({
root: {
overflowX: 'hidden',
@@ -79,11 +49,11 @@ export function Layout({ bare = false, dark = false, children, pre }: LayoutProp
return (
- {bare ? : }
+ {bare ? : }
{!!pre && pre}
{!!children && {children}}
- {!!isHomepage && isHomepage.isExact && }
+ {isHomepage?.isExact && }
{bookmarks && }
diff --git a/catalog/app/model/graphql/schema.generated.ts b/catalog/app/model/graphql/schema.generated.ts
index 84552d94167..ba8ed87e3fd 100644
--- a/catalog/app/model/graphql/schema.generated.ts
+++ b/catalog/app/model/graphql/schema.generated.ts
@@ -4176,18 +4176,6 @@ export default {
},
],
},
- {
- name: 'stack',
- type: {
- kind: 'NON_NULL',
- ofType: {
- kind: 'OBJECT',
- name: 'Stack',
- ofType: null,
- },
- },
- args: [],
- },
{
name: 'subscription',
type: {
@@ -5027,25 +5015,6 @@ export default {
],
interfaces: [],
},
- {
- kind: 'OBJECT',
- name: 'Stack',
- fields: [
- {
- name: 'version',
- type: {
- kind: 'NON_NULL',
- ofType: {
- kind: 'SCALAR',
- name: 'String',
- ofType: null,
- },
- },
- args: [],
- },
- ],
- interfaces: [],
- },
{
kind: 'OBJECT',
name: 'Status',
diff --git a/catalog/app/model/graphql/types.generated.ts b/catalog/app/model/graphql/types.generated.ts
index d39b9640f38..8ad7b159639 100644
--- a/catalog/app/model/graphql/types.generated.ts
+++ b/catalog/app/model/graphql/types.generated.ts
@@ -863,7 +863,6 @@ export interface Query {
readonly searchPackages: PackagesSearchResult
readonly searchMoreObjects: ObjectsSearchMoreResult
readonly searchMorePackages: PackagesSearchMoreResult
- readonly stack: Stack
readonly subscription: SubscriptionState
readonly admin: AdminQueries
readonly policies: ReadonlyArray
@@ -1079,11 +1078,6 @@ export interface SsoConfigConflict {
readonly _: Maybe
}
-export interface Stack {
- readonly __typename: 'Stack'
- readonly version: Scalars['String']
-}
-
export interface Status {
readonly __typename: 'Status'
readonly canaries: ReadonlyArray
diff --git a/catalog/app/utils/Config.ts b/catalog/app/utils/Config.ts
index 977015fe6a7..a9acb7c0907 100644
--- a/catalog/app/utils/Config.ts
+++ b/catalog/app/utils/Config.ts
@@ -47,6 +47,7 @@ export interface ConfigJson {
qurator?: boolean
build_version?: string // not sure where this comes from
+ stackVersion?: string // FIXME: Make required
}
const ajv = new Ajv({ allErrors: true, removeAdditional: true })
diff --git a/catalog/app/utils/Stack.generated.ts b/catalog/app/utils/Stack.generated.ts
deleted file mode 100644
index 63b47793d90..00000000000
--- a/catalog/app/utils/Stack.generated.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/* eslint-disable @typescript-eslint/naming-convention */
-import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'
-import * as Types from '../model/graphql/types.generated'
-
-export type utils_StackQueryVariables = Types.Exact<{ [key: string]: never }>
-
-export type utils_StackQuery = { readonly __typename: 'Query' } & {
- readonly stack: { readonly __typename: 'Stack' } & Pick
-}
-
-export const utils_StackDocument = {
- kind: 'Document',
- definitions: [
- {
- kind: 'OperationDefinition',
- operation: 'query',
- name: { kind: 'Name', value: 'utils_Stack' },
- selectionSet: {
- kind: 'SelectionSet',
- selections: [
- {
- kind: 'Field',
- name: { kind: 'Name', value: 'stack' },
- selectionSet: {
- kind: 'SelectionSet',
- selections: [{ kind: 'Field', name: { kind: 'Name', value: 'version' } }],
- },
- },
- ],
- },
- },
- ],
-} as unknown as DocumentNode
-
-export { utils_StackDocument as default }
diff --git a/catalog/app/utils/Stack.graphql b/catalog/app/utils/Stack.graphql
deleted file mode 100644
index 4e88c241093..00000000000
--- a/catalog/app/utils/Stack.graphql
+++ /dev/null
@@ -1,5 +0,0 @@
-query {
- stack {
- version
- }
-}
diff --git a/catalog/config-schema.json b/catalog/config-schema.json
index 33a9476a46f..333fb9c8006 100644
--- a/catalog/config-schema.json
+++ b/catalog/config-schema.json
@@ -96,6 +96,10 @@
"qurator": {
"type": "boolean",
"description": "Enable Qurator AI Assistant (powered by Amazon Bedrock)"
+ },
+ "stack_version": {
+ "type": "string",
+ "description": "Stack release version, uses semver"
}
},
"required": [
diff --git a/shared/graphql/schema.graphql b/shared/graphql/schema.graphql
index 2b42bb1a5d6..0bb997e7809 100644
--- a/shared/graphql/schema.graphql
+++ b/shared/graphql/schema.graphql
@@ -532,10 +532,6 @@ type Me {
union SwitchRoleResult = Me | InvalidInput | OperationError
-type Stack {
- version: String!
-}
-
type Query {
me: Me
@@ -558,7 +554,6 @@ type Query {
): PackagesSearchResult!
searchMoreObjects(after: String!, size: Int = 30): ObjectsSearchMoreResult!
searchMorePackages(after: String!, size: Int = 30): PackagesSearchMoreResult!
- stack: Stack!
subscription: SubscriptionState!
admin: AdminQueries! @admin