mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
add notFound support to client application view
This commit is contained in:
parent
cb66a2d482
commit
83a71902e9
@ -7,6 +7,7 @@ import {
|
|||||||
List, ListItem, ListItemContent,
|
List, ListItem, ListItemContent,
|
||||||
Textfield, Icon, ProgressBar,
|
Textfield, Icon, ProgressBar,
|
||||||
Tabs, Tab,
|
Tabs, Tab,
|
||||||
|
Switch,
|
||||||
} from 'react-mdl';
|
} from 'react-mdl';
|
||||||
import { HeaderTitle, ExternalIconLink } from '../common';
|
import { HeaderTitle, ExternalIconLink } from '../common';
|
||||||
|
|
||||||
@ -67,9 +68,18 @@ class ClientApplications extends PureComponent {
|
|||||||
<h6> Toggles</h6>
|
<h6> Toggles</h6>
|
||||||
<hr />
|
<hr />
|
||||||
<List>
|
<List>
|
||||||
{seenToggles.map((name, i) =>
|
{seenToggles.map(({ name, description, enabled, notFound }, i) =>
|
||||||
<ListItem key={i}>
|
notFound ?
|
||||||
<ListItemContent icon="check box">
|
<ListItem twoLine key={i}>
|
||||||
|
<ListItemContent icon={'report'} subtitle={'Missing, want to create?'}>
|
||||||
|
<Link to={`/features/create?name=${name}`}>
|
||||||
|
{name}
|
||||||
|
</Link>
|
||||||
|
</ListItemContent>
|
||||||
|
</ListItem> :
|
||||||
|
<ListItem twoLine key={i}>
|
||||||
|
<ListItemContent icon={<span><Switch disabled checked={!!enabled} /></span>} subtitle={description}>
|
||||||
|
|
||||||
<Link to={`/features/edit/${name}`}>
|
<Link to={`/features/edit/${name}`}>
|
||||||
{name}
|
{name}
|
||||||
</Link>
|
</Link>
|
||||||
@ -81,9 +91,17 @@ class ClientApplications extends PureComponent {
|
|||||||
<h6>Implemented strategies</h6>
|
<h6>Implemented strategies</h6>
|
||||||
<hr />
|
<hr />
|
||||||
<List>
|
<List>
|
||||||
{strategies.map((name, i) => (
|
{strategies.map(({ name, description, notFound }, i) => (
|
||||||
<ListItem key={`${name}-${i}`}>
|
notFound ?
|
||||||
<ListItemContent icon="toc">
|
<ListItem twoLine key={`${name}-${i}`}>
|
||||||
|
<ListItemContent icon={'report'} subtitle={'Missing, want to create?'}>
|
||||||
|
<Link to={`/strategies/create?name=${name}`}>
|
||||||
|
{name}
|
||||||
|
</Link>
|
||||||
|
</ListItemContent>
|
||||||
|
</ListItem> :
|
||||||
|
<ListItem twoLine key={`${name}-${i}`}>
|
||||||
|
<ListItemContent icon={'toc'} subtitle={description}>
|
||||||
<Link to={`/strategies/view/${name}`}>
|
<Link to={`/strategies/view/${name}`}>
|
||||||
{name}
|
{name}
|
||||||
</Link>
|
</Link>
|
||||||
|
Loading…
Reference in New Issue
Block a user