diff --git a/frontend/src/component/application/application-list-component.js b/frontend/src/component/application/application-list-component.js index 037837d5ca..f808eef0f8 100644 --- a/frontend/src/component/application/application-list-component.js +++ b/frontend/src/component/application/application-list-component.js @@ -1,8 +1,23 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { ProgressBar, Card } from 'react-mdl'; +import { ProgressBar, Card, CardTitle, CardText, Icon, Grid, Cell } from 'react-mdl'; import { AppsLinkList, styles as commonStyles } from '../common'; +const Empty = () => ( + + +
+
+ Oh snap, it does not seem like you have connected any applications. To connect your application to Unleash + you will require a Client SDK. +
+
+ You can read more about the available Client SDKs in the{' '} + documentation. +
+
+); + class ClientStrategies extends Component { static propTypes = { applications: PropTypes.array, @@ -20,8 +35,8 @@ class ClientStrategies extends Component { return ; } return ( - - + + {applications.length > 0 ? : } ); } diff --git a/frontend/src/component/feature/list-component.jsx b/frontend/src/component/feature/list-component.jsx index 1777538229..27dca7d6f4 100644 --- a/frontend/src/component/feature/list-component.jsx +++ b/frontend/src/component/feature/list-component.jsx @@ -110,18 +110,22 @@ export default class FeatureListComponent extends React.Component {
- {features.map((feature, i) => ( - - ))} + {features.length > 0 ? ( + features.map((feature, i) => ( + + )) + ) : ( +

Empty list of feature toggles

+ )}
diff --git a/frontend/src/component/strategies/list-component.jsx b/frontend/src/component/strategies/list-component.jsx index 61bfd6c57f..0b2c186999 100644 --- a/frontend/src/component/strategies/list-component.jsx +++ b/frontend/src/component/strategies/list-component.jsx @@ -2,8 +2,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; -import { List, ListItem, ListItemContent, IconButton, Grid, Cell } from 'react-mdl'; -import { HeaderTitle } from '../common'; +import { List, ListItem, ListItemContent, IconButton, Grid, Cell, Card } from 'react-mdl'; +import { HeaderTitle, styles as commonStyles } from '../common'; import { CREATE_STRATEGY, DELETE_STRATEGY } from '../../permissions'; class StrategiesListComponent extends Component { @@ -23,45 +23,43 @@ class StrategiesListComponent extends Component { const { strategies, removeStrategy, hasPermission } = this.props; return ( - - - this.props.history.push('/strategies/create')} - title="Add new strategy" - /> - ) : ( - '' - ) - } - /> - - {strategies.length > 0 ? ( - strategies.map((strategy, i) => ( - - - - {strategy.name} - - - {strategy.editable === false || !hasPermission(DELETE_STRATEGY) ? ( - '' - ) : ( - removeStrategy(strategy)} /> - )} - - )) + + this.props.history.push('/strategies/create')} + title="Add new strategy" + /> ) : ( - No entries - )} - - - + '' + ) + } + /> + + {strategies.length > 0 ? ( + strategies.map((strategy, i) => ( + + + + {strategy.name} + + + {strategy.editable === false || !hasPermission(DELETE_STRATEGY) ? ( + '' + ) : ( + removeStrategy(strategy)} /> + )} + + )) + ) : ( + No entries + )} + + ); } }