mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: adjust env switch a bit
This commit is contained in:
parent
e9a63197cf
commit
95221e7b6b
@ -100,18 +100,13 @@ const FeatureViewEnvironment: FC<IFeatureViewEnvironmentProps> = ({
|
|||||||
<div className={iconContainerClasses}>
|
<div className={iconContainerClasses}>
|
||||||
<Cloud className={iconClasses} />
|
<Cloud className={iconClasses} />
|
||||||
</div>
|
</div>
|
||||||
<p className={styles.environmentBadgeParagraph}>{env.type}</p>
|
<Tooltip title={`${env.name} is an environment of type "${env.type}".`}>
|
||||||
|
<p className={styles.environmentBadgeParagraph}>{env.name}</p>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<div className={styles.headerInfo}>
|
<div className={styles.headerInfo}>
|
||||||
<Tooltip title={env.name}>
|
|
||||||
<p data-loading className={styles.environmentTitle}>
|
|
||||||
{env.name}
|
|
||||||
</p>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
<div className={styles.environmentStatus} data-loading>
|
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={env?.strategies?.length > 0}
|
condition={env?.strategies?.length > 0}
|
||||||
show={
|
show={
|
||||||
@ -122,13 +117,16 @@ const FeatureViewEnvironment: FC<IFeatureViewEnvironmentProps> = ({
|
|||||||
onChange={toggleEnvironment}
|
onChange={toggleEnvironment}
|
||||||
/>{' '}
|
/>{' '}
|
||||||
<span className={styles.toggleText}>
|
<span className={styles.toggleText}>
|
||||||
The feature toggle is{' '}
|
{env.name}{' environment is '}
|
||||||
{env.enabled ? 'enabled' : 'disabled'} in{' '}
|
<strong>{env.enabled ? 'enabled' : 'disabled'}</strong>
|
||||||
{env.name}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
} />
|
||||||
elseShow={
|
</div>
|
||||||
|
<div className={styles.environmentStatus} data-loading>
|
||||||
|
<ConditionallyRender
|
||||||
|
condition={env?.strategies?.length === 0}
|
||||||
|
show={
|
||||||
<>
|
<>
|
||||||
<p className={styles.toggleText}>
|
<p className={styles.toggleText}>
|
||||||
No strategies configured for environment.
|
No strategies configured for environment.
|
||||||
@ -140,8 +138,7 @@ const FeatureViewEnvironment: FC<IFeatureViewEnvironmentProps> = ({
|
|||||||
Configure strategies for {env.name}
|
Configure strategies for {env.name}
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
}
|
} />
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ export interface IFeatureToggle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IFeatureEnvironment {
|
export interface IFeatureEnvironment {
|
||||||
|
type: string;
|
||||||
name: string;
|
name: string;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
strategies: IFeatureStrategy[];
|
strategies: IFeatureStrategy[];
|
||||||
|
Loading…
Reference in New Issue
Block a user