mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +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 {
|
interface IStrategyExecutionProps {
|
||||||
strategy: IFeatureStrategyPayload | CreateFeatureStrategySchema;
|
strategy: IFeatureStrategyPayload | CreateFeatureStrategySchema;
|
||||||
|
displayGroupId?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const StyledContainer = styled(Box, {
|
const StyledContainer = styled(Box, {
|
||||||
@ -77,6 +78,7 @@ const StyledValueSeparator = styled('span')(({ theme }) => ({
|
|||||||
|
|
||||||
export const StrategyExecution: FC<IStrategyExecutionProps> = ({
|
export const StrategyExecution: FC<IStrategyExecutionProps> = ({
|
||||||
strategy,
|
strategy,
|
||||||
|
displayGroupId = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { parameters, constraints = [] } = strategy;
|
const { parameters, constraints = [] } = strategy;
|
||||||
const stickiness = parameters?.stickiness;
|
const stickiness = parameters?.stickiness;
|
||||||
@ -133,6 +135,18 @@ export const StrategyExecution: FC<IStrategyExecutionProps> = ({
|
|||||||
is included.
|
is included.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
{displayGroupId && parameters.groupId && (
|
||||||
|
<Box
|
||||||
|
sx={(theme) => ({
|
||||||
|
ml: 1,
|
||||||
|
color: theme.palette.info.contrastText,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<Badge color='info'>
|
||||||
|
GroupId: {parameters.groupId}
|
||||||
|
</Badge>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
</StyledValueContainer>
|
</StyledValueContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ export const ReleasePlanMilestoneStrategy = ({
|
|||||||
<Icon />
|
<Icon />
|
||||||
{`${formatStrategyName(String(strategy.strategyName))}${strategy.title ? `: ${strategy.title}` : ''}`}
|
{`${formatStrategyName(String(strategy.strategyName))}${strategy.title ? `: ${strategy.title}` : ''}`}
|
||||||
</StyledHeader>
|
</StyledHeader>
|
||||||
<StrategyExecution strategy={strategy} />
|
<StrategyExecution strategy={strategy} displayGroupId />
|
||||||
{strategy.variants &&
|
{strategy.variants &&
|
||||||
strategy.variants.length > 0 &&
|
strategy.variants.length > 0 &&
|
||||||
(strategy.disabled ? (
|
(strategy.disabled ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user