mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-23 01:16:27 +02:00
Merge branch 'main' into task/Add_strategy_information_to_playground_results
This commit is contained in:
commit
cdaf7299be
@ -22,5 +22,6 @@ jobs:
|
|||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref }}
|
||||||
release_name: ${{ github.ref }}
|
release_name: ${{ github.ref }}
|
||||||
body: ${{ steps.github_release.outputs.changelog }}
|
body: ${{ steps.github_release.outputs.changelog }}
|
||||||
|
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unleash-frontend",
|
"name": "unleash-frontend",
|
||||||
"description": "unleash your features",
|
"description": "unleash your features",
|
||||||
"version": "4.14.0-beta.6",
|
"version": "4.14.1",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"unleash",
|
"unleash",
|
||||||
"feature toggle",
|
"feature toggle",
|
||||||
|
@ -132,13 +132,7 @@ export const Group: VFC = () => {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
Cell: ({ row: { original: rowUser } }: any) => (
|
Cell: ({ row: { original: rowUser } }: any) => (
|
||||||
<ActionCell>
|
<ActionCell>
|
||||||
<Tooltip
|
<Tooltip title="Edit user" arrow describeChild>
|
||||||
title="Edit user"
|
|
||||||
arrow
|
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
|
||||||
enterDelay={1000}
|
|
||||||
>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSelectedUser(rowUser);
|
setSelectedUser(rowUser);
|
||||||
@ -151,9 +145,7 @@ export const Group: VFC = () => {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
title="Remove user from group"
|
title="Remove user from group"
|
||||||
arrow
|
arrow
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
describeChild
|
||||||
enterDelay={1000}
|
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -24,6 +24,10 @@ const StyledInput = styled(Input)(({ theme }) => ({
|
|||||||
marginBottom: theme.spacing(2),
|
marginBottom: theme.spacing(2),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const StyledGroupFormUsersTableWrapper = styled('div')(({ theme }) => ({
|
||||||
|
marginBottom: theme.spacing(6),
|
||||||
|
}));
|
||||||
|
|
||||||
const StyledButtonContainer = styled('div')(() => ({
|
const StyledButtonContainer = styled('div')(() => ({
|
||||||
marginTop: 'auto',
|
marginTop: 'auto',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -101,10 +105,12 @@ export const GroupForm: FC<IGroupForm> = ({
|
|||||||
users={users}
|
users={users}
|
||||||
setUsers={setUsers}
|
setUsers={setUsers}
|
||||||
/>
|
/>
|
||||||
|
<StyledGroupFormUsersTableWrapper>
|
||||||
<GroupFormUsersTable
|
<GroupFormUsersTable
|
||||||
users={users}
|
users={users}
|
||||||
setUsers={setUsers}
|
setUsers={setUsers}
|
||||||
/>
|
/>
|
||||||
|
</StyledGroupFormUsersTableWrapper>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -83,9 +83,7 @@ export const GroupFormUsersTable: VFC<IGroupFormUsersTableProps> = ({
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
title="Remove user from group"
|
title="Remove user from group"
|
||||||
arrow
|
arrow
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
describeChild
|
||||||
enterDelay={1000}
|
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
|
@ -102,11 +102,9 @@ export const GroupCard = ({ group }: IGroupCardProps) => {
|
|||||||
))}
|
))}
|
||||||
elseShow={
|
elseShow={
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title="This project is not used in any project"
|
title="This group is not used in any project"
|
||||||
arrow
|
arrow
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
describeChild
|
||||||
enterDelay={1000}
|
|
||||||
>
|
>
|
||||||
<Badge>Not used</Badge>
|
<Badge>Not used</Badge>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
@ -52,13 +52,7 @@ export const GroupCardActions: FC<IGroupCardActions> = ({
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip title="Group actions" arrow describeChild>
|
||||||
title="Group actions"
|
|
||||||
arrow
|
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
|
||||||
enterDelay={1000}
|
|
||||||
>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
id={id}
|
id={id}
|
||||||
aria-controls={open ? menuId : undefined}
|
aria-controls={open ? menuId : undefined}
|
||||||
|
@ -5,12 +5,14 @@ interface IPercentageCircleProps {
|
|||||||
percentage: number;
|
percentage: number;
|
||||||
secondaryPieColor?: string;
|
secondaryPieColor?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
hideNumber?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PercentageCircle = ({
|
const PercentageCircle = ({
|
||||||
styles,
|
styles,
|
||||||
percentage,
|
percentage,
|
||||||
secondaryPieColor,
|
secondaryPieColor,
|
||||||
|
hideNumber,
|
||||||
...rest
|
...rest
|
||||||
}: IPercentageCircleProps) => {
|
}: IPercentageCircleProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@ -35,9 +37,10 @@ const PercentageCircle = ({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
fontSize: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
100%
|
{hideNumber ? null : '100%'}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import { FeatureStrategyMenu } from '../FeatureStrategyMenu/FeatureStrategyMenu'
|
|||||||
import { PresetCard } from './PresetCard/PresetCard';
|
import { PresetCard } from './PresetCard/PresetCard';
|
||||||
import { useStyles } from './FeatureStrategyEmpty.styles';
|
import { useStyles } from './FeatureStrategyEmpty.styles';
|
||||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||||
|
import { useFeatureImmutable } from 'hooks/api/getters/useFeature/useFeatureImmutable';
|
||||||
import { getFeatureStrategyIcon } from 'utils/strategyNames';
|
import { getFeatureStrategyIcon } from 'utils/strategyNames';
|
||||||
|
|
||||||
interface IFeatureStrategyEmptyProps {
|
interface IFeatureStrategyEmptyProps {
|
||||||
@ -25,9 +26,15 @@ export const FeatureStrategyEmpty = ({
|
|||||||
const { addStrategyToFeature } = useFeatureStrategyApi();
|
const { addStrategyToFeature } = useFeatureStrategyApi();
|
||||||
const { setToastData, setToastApiError } = useToast();
|
const { setToastData, setToastApiError } = useToast();
|
||||||
const { refetchFeature } = useFeature(projectId, featureId);
|
const { refetchFeature } = useFeature(projectId, featureId);
|
||||||
|
const { refetchFeature: refetchFeatureImmutable } = useFeatureImmutable(
|
||||||
|
projectId,
|
||||||
|
featureId
|
||||||
|
);
|
||||||
|
|
||||||
const onAfterAddStrategy = () => {
|
const onAfterAddStrategy = () => {
|
||||||
refetchFeature();
|
refetchFeature();
|
||||||
|
refetchFeatureImmutable();
|
||||||
|
|
||||||
setToastData({
|
setToastData({
|
||||||
title: 'Strategy created',
|
title: 'Strategy created',
|
||||||
text: 'Successfully created strategy',
|
text: 'Successfully created strategy',
|
||||||
@ -96,6 +103,8 @@ export const FeatureStrategyEmpty = ({
|
|||||||
title="Standard strategy"
|
title="Standard strategy"
|
||||||
Icon={getFeatureStrategyIcon('default')}
|
Icon={getFeatureStrategyIcon('default')}
|
||||||
onClick={onAddSimpleStrategy}
|
onClick={onAddSimpleStrategy}
|
||||||
|
projectId={projectId}
|
||||||
|
environmentId={environmentId}
|
||||||
>
|
>
|
||||||
The standard strategy is strictly on/off for your entire
|
The standard strategy is strictly on/off for your entire
|
||||||
userbase.
|
userbase.
|
||||||
@ -104,6 +113,8 @@ export const FeatureStrategyEmpty = ({
|
|||||||
title="Gradual rollout"
|
title="Gradual rollout"
|
||||||
Icon={getFeatureStrategyIcon('flexibleRollout')}
|
Icon={getFeatureStrategyIcon('flexibleRollout')}
|
||||||
onClick={onAddGradualRolloutStrategy}
|
onClick={onAddGradualRolloutStrategy}
|
||||||
|
projectId={projectId}
|
||||||
|
environmentId={environmentId}
|
||||||
>
|
>
|
||||||
Roll out to a percentage of your userbase.
|
Roll out to a percentage of your userbase.
|
||||||
</PresetCard>
|
</PresetCard>
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
import { ElementType, FC } from 'react';
|
import { ElementType, FC } from 'react';
|
||||||
import { Button, Card, CardContent, styled, Typography } from '@mui/material';
|
import { Card, CardContent, Typography, styled, Box } from '@mui/material';
|
||||||
|
import PermissionButton from 'component/common/PermissionButton/PermissionButton';
|
||||||
|
import { CREATE_FEATURE_STRATEGY } from 'component/providers/AccessProvider/permissions';
|
||||||
|
|
||||||
interface IPresetCardProps {
|
interface IPresetCardProps {
|
||||||
title: string;
|
title: string;
|
||||||
|
projectId: string;
|
||||||
|
environmentId: string;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
Icon: ElementType;
|
Icon: ElementType;
|
||||||
}
|
}
|
||||||
@ -17,6 +21,8 @@ export const PresetCard: FC<IPresetCardProps> = ({
|
|||||||
title,
|
title,
|
||||||
children,
|
children,
|
||||||
Icon,
|
Icon,
|
||||||
|
projectId,
|
||||||
|
environmentId,
|
||||||
onClick,
|
onClick,
|
||||||
}) => (
|
}) => (
|
||||||
<StyledCard variant="outlined">
|
<StyledCard variant="outlined">
|
||||||
@ -34,14 +40,18 @@ export const PresetCard: FC<IPresetCardProps> = ({
|
|||||||
{children}
|
{children}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Button
|
<Box sx={{ ml: 'auto', mt: 'auto', pt: 1 }}>
|
||||||
|
<PermissionButton
|
||||||
|
permission={CREATE_FEATURE_STRATEGY}
|
||||||
|
projectId={projectId}
|
||||||
|
environmentId={environmentId}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="small"
|
size="small"
|
||||||
sx={{ ml: 'auto', mt: 'auto' }}
|
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
Use template
|
Use template
|
||||||
</Button>
|
</PermissionButton>
|
||||||
|
</Box>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</StyledCard>
|
</StyledCard>
|
||||||
);
|
);
|
||||||
|
@ -50,6 +50,7 @@ export const StrategyExecution = ({ strategy }: IStrategyExecutionProps) => {
|
|||||||
sx={{ display: 'flex', alignItems: 'center' }}
|
sx={{ display: 'flex', alignItems: 'center' }}
|
||||||
>
|
>
|
||||||
<PercentageCircle
|
<PercentageCircle
|
||||||
|
hideNumber
|
||||||
percentage={parseParameterNumber(
|
percentage={parseParameterNumber(
|
||||||
parameters[key]
|
parameters[key]
|
||||||
)}
|
)}
|
||||||
|
@ -59,13 +59,7 @@ export const ActionsCell: VFC<IActionsCellProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className={classes.cell}>
|
<Box className={classes.cell}>
|
||||||
<Tooltip
|
<Tooltip title="Feature toggle actions" arrow describeChild>
|
||||||
title="Feature toggle actions"
|
|
||||||
arrow
|
|
||||||
placement="bottom-end"
|
|
||||||
describeChild
|
|
||||||
enterDelay={1000}
|
|
||||||
>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
id={id}
|
id={id}
|
||||||
aria-controls={open ? menuId : undefined}
|
aria-controls={open ? menuId : undefined}
|
||||||
|
@ -23,6 +23,7 @@ import { sortTypes } from 'utils/sortTypes';
|
|||||||
|
|
||||||
const StyledPageContent = styled(PageContent)(({ theme }) => ({
|
const StyledPageContent = styled(PageContent)(({ theme }) => ({
|
||||||
height: '100vh',
|
height: '100vh',
|
||||||
|
overflow: 'auto',
|
||||||
padding: theme.spacing(7.5, 6),
|
padding: theme.spacing(7.5, 6),
|
||||||
'& .header': {
|
'& .header': {
|
||||||
padding: theme.spacing(0, 0, 2, 0),
|
padding: theme.spacing(0, 0, 2, 0),
|
||||||
|
Loading…
Reference in New Issue
Block a user