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:
parent
44771a5f67
commit
f0fe2368e1
@ -33,13 +33,9 @@ import {
|
|||||||
AdvancedPlaygroundRequestSchema,
|
AdvancedPlaygroundRequestSchema,
|
||||||
AdvancedPlaygroundFeatureSchema,
|
AdvancedPlaygroundFeatureSchema,
|
||||||
AdvancedPlaygroundFeatureSchemaEnvironments,
|
AdvancedPlaygroundFeatureSchemaEnvironments,
|
||||||
AdvancedPlaygroundEnvironmentFeatureSchema,
|
|
||||||
} from 'openapi';
|
} from 'openapi';
|
||||||
import { capitalizeFirst } from 'utils/capitalizeFirst';
|
import { capitalizeFirst } from 'utils/capitalizeFirst';
|
||||||
import {
|
import { AdvancedPlaygroundEnvironmentDiffCell } from './AdvancedPlaygroundEnvironmentCell/AdvancedPlaygroundEnvironmentDiffCell';
|
||||||
AdvancedPlaygroundEnvironmentDiffCell,
|
|
||||||
IAdvancedPlaygroundEnvironmentCellProps,
|
|
||||||
} from './AdvancedPlaygroundEnvironmentCell/AdvancedPlaygroundEnvironmentDiffCell';
|
|
||||||
|
|
||||||
const defaultSort: SortingRule<string> = { id: 'name' };
|
const defaultSort: SortingRule<string> = { id: 'name' };
|
||||||
const { value, setValue } = createLocalStorage(
|
const { value, setValue } = createLocalStorage(
|
||||||
|
@ -13,6 +13,7 @@ import { Box } from '@mui/material';
|
|||||||
import { FeatureStatusCell } from '../PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell';
|
import { FeatureStatusCell } from '../PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell';
|
||||||
import { HighlightCell } from '../../../common/Table/cells/HighlightCell/HighlightCell';
|
import { HighlightCell } from '../../../common/Table/cells/HighlightCell/HighlightCell';
|
||||||
import { capitalizeFirst } from 'utils/capitalizeFirst';
|
import { capitalizeFirst } from 'utils/capitalizeFirst';
|
||||||
|
import { FeatureResultInfoPopoverCell } from '../PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell';
|
||||||
|
|
||||||
interface IPlaygroundEnvironmentTableProps {
|
interface IPlaygroundEnvironmentTableProps {
|
||||||
features: AdvancedPlaygroundFeatureSchemaEnvironments;
|
features: AdvancedPlaygroundFeatureSchemaEnvironments;
|
||||||
@ -54,10 +55,21 @@ export const PlaygroundEnvironmentDiffTable = ({
|
|||||||
? 'unknown'
|
? 'unknown'
|
||||||
: 'false',
|
: 'false',
|
||||||
Cell: ({ row }: { row: { original: RowType } }) => {
|
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',
|
sortType: 'playgroundResultState',
|
||||||
maxWidth: 120,
|
maxWidth: 140,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const COLUMNS = useMemo(() => {
|
const COLUMNS = useMemo(() => {
|
||||||
|
@ -10,7 +10,7 @@ interface IFeatureStatusCellProps {
|
|||||||
const StyledCellBox = styled(Box)(({ theme }) => ({
|
const StyledCellBox = styled(Box)(({ theme }) => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
padding: theme.spacing(1, 2),
|
padding: theme.spacing(1, 0, 1, 2),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledChipWrapper = styled(Box)(() => ({
|
const StyledChipWrapper = styled(Box)(() => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user