1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

feat: execution plan diff table (#4065)

This commit is contained in:
Mateusz Kwasniewski 2023-06-22 13:46:29 +02:00 committed by GitHub
parent 44771a5f67
commit f0fe2368e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View File

@ -33,13 +33,9 @@ import {
AdvancedPlaygroundRequestSchema,
AdvancedPlaygroundFeatureSchema,
AdvancedPlaygroundFeatureSchemaEnvironments,
AdvancedPlaygroundEnvironmentFeatureSchema,
} from 'openapi';
import { capitalizeFirst } from 'utils/capitalizeFirst';
import {
AdvancedPlaygroundEnvironmentDiffCell,
IAdvancedPlaygroundEnvironmentCellProps,
} from './AdvancedPlaygroundEnvironmentCell/AdvancedPlaygroundEnvironmentDiffCell';
import { AdvancedPlaygroundEnvironmentDiffCell } from './AdvancedPlaygroundEnvironmentCell/AdvancedPlaygroundEnvironmentDiffCell';
const defaultSort: SortingRule<string> = { id: 'name' };
const { value, setValue } = createLocalStorage(

View File

@ -13,6 +13,7 @@ import { Box } from '@mui/material';
import { FeatureStatusCell } from '../PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell';
import { HighlightCell } from '../../../common/Table/cells/HighlightCell/HighlightCell';
import { capitalizeFirst } from 'utils/capitalizeFirst';
import { FeatureResultInfoPopoverCell } from '../PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell';
interface IPlaygroundEnvironmentTableProps {
features: AdvancedPlaygroundFeatureSchemaEnvironments;
@ -54,10 +55,21 @@ export const PlaygroundEnvironmentDiffTable = ({
? 'unknown'
: 'false',
Cell: ({ row }: { row: { original: RowType } }) => {
return <FeatureStatusCell feature={row.original[environment]} />;
return (
<Box sx={{ display: 'flex' }}>
<FeatureStatusCell feature={row.original[environment]} />
<FeatureResultInfoPopoverCell
feature={row.original[environment]}
input={{
environment: row.original[environment].environment,
context: row.original[environment].context,
}}
/>
</Box>
);
},
sortType: 'playgroundResultState',
maxWidth: 120,
maxWidth: 140,
}));
const COLUMNS = useMemo(() => {

View File

@ -10,7 +10,7 @@ interface IFeatureStatusCellProps {
const StyledCellBox = styled(Box)(({ theme }) => ({
display: 'flex',
alignItems: 'center',
padding: theme.spacing(1, 2),
padding: theme.spacing(1, 0, 1, 2),
}));
const StyledChipWrapper = styled(Box)(() => ({