diff --git a/src/screens/Configuration/ConfigurationCard/ConfigurationCard.tsx b/src/screens/Configuration/ConfigurationCard/ConfigurationCard.tsx
index b1bb77ad..a3dd781d 100644
--- a/src/screens/Configuration/ConfigurationCard/ConfigurationCard.tsx
+++ b/src/screens/Configuration/ConfigurationCard/ConfigurationCard.tsx
@@ -3,6 +3,7 @@ import React from 'react'
import { gql, useQuery } from '@apollo/client'
import { KeyValueListCard } from 'src/components/Cards/KeyValueListCard'
+import {isNil} from "lodash";
export const CONFIG__ITEMS_FIELDS = gql`
fragment Config_ItemsFields on ConfigItem {
@@ -44,11 +45,11 @@ export const ConfigurationCard = () => {
return (
)
}
diff --git a/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx b/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
index bb23057d..228f9d9b 100644
--- a/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
+++ b/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
@@ -7,6 +7,14 @@ import CardHeader from '@material-ui/core/CardHeader'
import TableCell from '@material-ui/core/TableCell'
import TableRow from '@material-ui/core/TableRow'
import Grid from '@material-ui/core/Grid'
+import ExpansionPanel from '@material-ui/core/ExpansionPanel'
+import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
+import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'
+
+import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
+import { prism } from 'react-syntax-highlighter/dist/esm/styles/prism'
+import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
+import Typography from '@material-ui/core/Typography'
export const CONFIG_V2_QUERY = gql`
query FetchConfigV2 {
@@ -24,25 +32,46 @@ export const ConfigurationV2Card = () => {
fetchPolicy: 'cache-and-network',
})
+ if (data?.configv2.effective == 'N/A') {
+ return (
+ <>
+
+
+
+
+
+
+ >
+ )
+ }
+
return (
<>
-
-
-
-
+
+
+
+
+
>
)
@@ -54,6 +83,7 @@ interface Props {
showHead?: boolean
title?: string
error?: string
+ expanded?: boolean
}
const SpanRow: React.FC = ({ children }) => (
@@ -68,7 +98,7 @@ const FetchingRow = () => ...
const ErrorRow: React.FC = ({ children }) => {children}
-const TOMLCard = ({ loading, toml, error = '', title }: Props) => {
+const TOMLPanel = ({ loading, toml, error = '', title, expanded }: Props) => {
if (error) {
return {error}
}
@@ -77,14 +107,24 @@ const TOMLCard = ({ loading, toml, error = '', title }: Props) => {
return
}
- let styles = {marginLeft: '1em'};
+ if (!title) {
+ title = 'TOML'
+ }
+
+ const styles = { display: 'block' }
return (
-
- {title && }
-
- {toml}
-
-
+
+
+ }>
+ {title}
+
+
+
+ {toml}
+
+
+
+
)
}
diff --git a/src/screens/Configuration/ConfigurationView.test.tsx b/src/screens/Configuration/ConfigurationView.test.tsx
index 2cc555e6..ee15da94 100644
--- a/src/screens/Configuration/ConfigurationView.test.tsx
+++ b/src/screens/Configuration/ConfigurationView.test.tsx
@@ -18,7 +18,7 @@ describe('ConfigurationView', () => {
,
)
- expect(await findByText('ENV Configuration (legacy)')).toBeInTheDocument()
+ expect(await findByText('ENV Configuration')).toBeInTheDocument()
expect(await findByText('Node')).toBeInTheDocument()
expect(await findByText('Job Runs')).toBeInTheDocument()
expect(await findByText('Logging')).toBeInTheDocument()