mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
feat: conditionally show groupId in StrategyExecution under rollout (#9101)
This commit is contained in:
parent
3a50750a33
commit
c98d0e71a3
@ -21,6 +21,7 @@ import { BuiltInStrategies } from 'utils/strategyNames';
|
||||
|
||||
interface IStrategyExecutionProps {
|
||||
strategy: IFeatureStrategyPayload | CreateFeatureStrategySchema;
|
||||
displayGroupId?: boolean;
|
||||
}
|
||||
|
||||
const StyledContainer = styled(Box, {
|
||||
@ -77,6 +78,7 @@ const StyledValueSeparator = styled('span')(({ theme }) => ({
|
||||
|
||||
export const StrategyExecution: FC<IStrategyExecutionProps> = ({
|
||||
strategy,
|
||||
displayGroupId = false,
|
||||
}) => {
|
||||
const { parameters, constraints = [] } = strategy;
|
||||
const stickiness = parameters?.stickiness;
|
||||
@ -133,6 +135,18 @@ export const StrategyExecution: FC<IStrategyExecutionProps> = ({
|
||||
is included.
|
||||
</span>
|
||||
</div>
|
||||
{displayGroupId && parameters.groupId && (
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
ml: 1,
|
||||
color: theme.palette.info.contrastText,
|
||||
})}
|
||||
>
|
||||
<Badge color='info'>
|
||||
GroupId: {parameters.groupId}
|
||||
</Badge>
|
||||
</Box>
|
||||
)}
|
||||
</StyledValueContainer>
|
||||
);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ export const ReleasePlanMilestoneStrategy = ({
|
||||
<Icon />
|
||||
{`${formatStrategyName(String(strategy.strategyName))}${strategy.title ? `: ${strategy.title}` : ''}`}
|
||||
</StyledHeader>
|
||||
<StrategyExecution strategy={strategy} />
|
||||
<StrategyExecution strategy={strategy} displayGroupId />
|
||||
{strategy.variants &&
|
||||
strategy.variants.length > 0 &&
|
||||
(strategy.disabled ? (
|
||||
|
Loading…
Reference in New Issue
Block a user