mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
fmt
This commit is contained in:
parent
562ad10c06
commit
2895516dda
@ -78,8 +78,7 @@ export const ConstraintAccordionViewHeaderInfo = ({
|
|||||||
constraint.contextName
|
constraint.contextName
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
? theme.palette.neutral
|
? theme.palette.neutral.dark
|
||||||
.dark
|
|
||||||
: theme.palette.error.main
|
: theme.palette.error.main
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
@ -34,14 +34,12 @@ export const FeatureResultInfoPopoverCell = ({
|
|||||||
name: feature?.name as any,
|
name: feature?.name as any,
|
||||||
projectId: 'default',
|
projectId: 'default',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
|
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
const dummyPlaygroundFeatureFalse: PlaygroundFeatureSchema = {
|
const dummyPlaygroundFeatureFalse: PlaygroundFeatureSchema = {
|
||||||
name: feature?.name as any,
|
name: feature?.name as any,
|
||||||
projectId: 'default',
|
projectId: 'default',
|
||||||
isEnabled: false,
|
isEnabled: false,
|
||||||
|
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
const strategies: PlaygroundFeatureStrategyResult[] = [
|
const strategies: PlaygroundFeatureStrategyResult[] = [
|
||||||
@ -57,11 +55,7 @@ export const FeatureResultInfoPopoverCell = ({
|
|||||||
operator: 'IN',
|
operator: 'IN',
|
||||||
caseInsensitive: false,
|
caseInsensitive: false,
|
||||||
inverted: false,
|
inverted: false,
|
||||||
values: [
|
values: ['MyApp', 'MyOtherApp', 'Unleash'],
|
||||||
'MyApp',
|
|
||||||
'MyOtherApp',
|
|
||||||
'Unleash',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
segments: [
|
segments: [
|
||||||
@ -108,7 +102,11 @@ export const FeatureResultInfoPopoverCell = ({
|
|||||||
classes={{ paper: styles.popoverPaper }}
|
classes={{ paper: styles.popoverPaper }}
|
||||||
>
|
>
|
||||||
<PlaygroundResultFeatureDetails
|
<PlaygroundResultFeatureDetails
|
||||||
feature={feature.isEnabled ? dummyPlaygroundFeatureTrue : dummyPlaygroundFeatureFalse}
|
feature={
|
||||||
|
feature.isEnabled
|
||||||
|
? dummyPlaygroundFeatureTrue
|
||||||
|
: dummyPlaygroundFeatureFalse
|
||||||
|
}
|
||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
/>
|
/>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
|
@ -47,7 +47,11 @@ export const PlaygroundResultConstraintExecution = ({
|
|||||||
/>
|
/>
|
||||||
<ConstraintAccordionView
|
<ConstraintAccordionView
|
||||||
constraint={constraint}
|
constraint={constraint}
|
||||||
playgroundContext={Boolean(constraint.result) ? contextTrue : contextFalse}
|
playgroundContext={
|
||||||
|
Boolean(constraint.result)
|
||||||
|
? contextTrue
|
||||||
|
: contextFalse
|
||||||
|
}
|
||||||
maxLength={80}
|
maxLength={80}
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: 'transparent!important',
|
backgroundColor: 'transparent!important',
|
||||||
|
@ -24,7 +24,6 @@ export const useStyles = makeStyles()(theme => ({
|
|||||||
padding: '4px',
|
padding: '4px',
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
textAlign: 'right'
|
textAlign: 'right',
|
||||||
|
},
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model';
|
import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model';
|
||||||
import {IconButton, Typography, useTheme} from '@mui/material';
|
import { IconButton, Typography, useTheme } from '@mui/material';
|
||||||
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
|
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
|
||||||
import { useStyles } from './PlaygroundResultFeatureDetails.styles';
|
import { useStyles } from './PlaygroundResultFeatureDetails.styles';
|
||||||
import {CloseOutlined} from "@mui/icons-material";
|
import { CloseOutlined } from '@mui/icons-material';
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
interface PlaygroundFeatureResultDetailsProps {
|
interface PlaygroundFeatureResultDetailsProps {
|
||||||
feature: PlaygroundFeatureSchema;
|
feature: PlaygroundFeatureSchema;
|
||||||
onClose: () => void
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
export const PlaygroundResultFeatureDetails = ({
|
export const PlaygroundResultFeatureDetails = ({
|
||||||
feature,
|
feature,
|
||||||
@ -21,7 +21,9 @@ export const PlaygroundResultFeatureDetails = ({
|
|||||||
const reason = feature.isEnabled
|
const reason = feature.isEnabled
|
||||||
? 'at least one strategy is True'
|
? 'at least one strategy is True'
|
||||||
: 'all strategies are False';
|
: 'all strategies are False';
|
||||||
const color = feature.isEnabled ? theme.palette.success.main : theme.palette.error.main;
|
const color = feature.isEnabled
|
||||||
|
? theme.palette.success.main
|
||||||
|
: theme.palette.error.main;
|
||||||
|
|
||||||
const onCloseClick =
|
const onCloseClick =
|
||||||
onClose &&
|
onClose &&
|
||||||
@ -29,6 +31,7 @@ export const PlaygroundResultFeatureDetails = ({
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
onClose();
|
onClose();
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.titleRowWrapper}>
|
<div className={styles.titleRowWrapper}>
|
||||||
@ -40,7 +43,7 @@ export const PlaygroundResultFeatureDetails = ({
|
|||||||
<PlaygroundResultChip enabled={feature.isEnabled} />
|
<PlaygroundResultChip enabled={feature.isEnabled} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<IconButton onClick={() => onClose()} className={styles.icon}>
|
<IconButton onClick={onCloseClick} className={styles.icon}>
|
||||||
<CloseOutlined />
|
<CloseOutlined />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
|
@ -264,7 +264,6 @@ export interface PlaygroundFeatureStrategySegmentResult {
|
|||||||
result: boolean;
|
result: boolean;
|
||||||
constraints?: PlaygroundFeatureStrategyConstraintResult[];
|
constraints?: PlaygroundFeatureStrategyConstraintResult[];
|
||||||
}
|
}
|
||||||
6;
|
|
||||||
|
|
||||||
export interface PlaygroundFeatureStrategyResult {
|
export interface PlaygroundFeatureStrategyResult {
|
||||||
id: string;
|
id: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user