diff --git a/astronomer_starship/src/component/DataTable.jsx b/astronomer_starship/src/component/DataTable.jsx index 4ea72af..76051ac 100644 --- a/astronomer_starship/src/component/DataTable.jsx +++ b/astronomer_starship/src/component/DataTable.jsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { - Table, Thead, Tbody, Tr, Th, Td, chakra, + Table, Thead, Tbody, Tr, Th, Td, chakra, TableContainer, } from '@chakra-ui/react'; import { TriangleDownIcon, TriangleUpIcon } from '@chakra-ui/icons'; import { @@ -21,58 +21,60 @@ export default function DataTable({ getCoreRowModel: getCoreRowModel(), onSortingChange: setSorting, getSortedRowModel: getSortedRowModel(), - state: { sorting }, + state: {sorting}, }); return ( - - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => { - // see https://tanstack.com/table/v8/docs/api/core/column-def#meta to type this correctly - const { meta } = header.column.columnDef; - return ( - + ); + })} + + ))} + + + {table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => { + // see https://tanstack.com/table/v8/docs/api/core/column-def#meta to type this correctly + const {meta} = cell.column.columnDef; + return ( + + ); + })} + + ))} + +
- {flexRender( - header.column.columnDef.header, - header.getContext(), - )} + + + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + // see https://tanstack.com/table/v8/docs/api/core/column-def#meta to type this correctly + const {meta} = header.column.columnDef; + return ( + - ); - })} - - ))} - - - {table.getRowModel().rows.map((row) => ( - - {row.getVisibleCells().map((cell) => { - // see https://tanstack.com/table/v8/docs/api/core/column-def#meta to type this correctly - const { meta } = cell.column.columnDef; - return ( - - ); - })} - - ))} - -
+ {flexRender( + header.column.columnDef.header, + header.getContext(), + )} - - {header.column.getIsSorted() ? ( - header.column.getIsSorted() === 'desc' ? ( - - ) : ( - - ) - ) : null} - -
- {flexRender(cell.column.columnDef.cell, cell.getContext())} -
+ + {header.column.getIsSorted() ? ( + header.column.getIsSorted() === 'desc' ? ( + + ) : ( + + ) + ) : null} + +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
+ ); } diff --git a/astronomer_starship/src/pages/EnvVarsPage.jsx b/astronomer_starship/src/pages/EnvVarsPage.jsx index d0ee444..c943106 100644 --- a/astronomer_starship/src/pages/EnvVarsPage.jsx +++ b/astronomer_starship/src/pages/EnvVarsPage.jsx @@ -14,6 +14,7 @@ import { fetchData, getAstroEnvVarRoute, getHoustonRoute, localRoute, proxyHeaders, proxyUrl, remoteRoute, } from '../util'; import constants from '../constants'; +import HiddenValue from "../component/HiddenValue.jsx"; const getDeploymentsQuery = `query deploymentVariables($deploymentUuid: Uuid!, $releaseName: String!) { deploymentVariables( @@ -156,6 +157,9 @@ EnvVarMigrateButton.defaultProps = { }; const columnHelper = createColumnHelper(); +const valueColumn = columnHelper.accessor('value', { + id: 'value', cell: (props) => , +}); function setEnvData(localData, remoteData) { return Object.entries(localData).map( @@ -190,7 +194,7 @@ export default function EnvVarsPage({ state, dispatch }) { // noinspection JSCheckFunctionSignatures const columns = [ columnHelper.accessor('key'), - columnHelper.accessor('value'), + valueColumn, columnHelper.display({ id: 'migrate', header: 'Migrate',