improve empty services msg

This commit is contained in:
Sérgio Ramos 2017-01-03 11:45:18 +00:00
parent f9cf402621
commit 542247f72f
2 changed files with 44 additions and 10 deletions

View File

@ -1,10 +1,16 @@
{ {
"your-dashboard": "Your Dashboard", "your-dashboard": "Your dashboard",
"settings": "Settings", "settings": "Settings",
"projects": "Projects", "projects": "Projects",
"people": "People", "people": "People",
"no-personal-projects": "You don't have any personal projects at the moment.", "services": "Services",
"create-new": "Create new", "instances": "Instances",
"manifest": "Project manifest",
"create-new": "Create a new",
"add-services": "Add services",
"no-services": "You dont have any services. You can either add them by editing a manifest file or by connecting your repo on GitHub or BitBucket.",
"edit-project-manifest": "Edit project manifest",
"or-bring-in-from": "or bring in from",
"your-settings": "Your settings", "your-settings": "Your settings",
"agg-cpu-usage": "Aggregated CPU usage", "agg-cpu-usage": "Aggregated CPU usage",
"agg-cpu-usage-desc-sm": "CPU usages accross all of the CPU cores", "agg-cpu-usage-desc-sm": "CPU usages accross all of the CPU cores",

View File

@ -3,6 +3,7 @@ const ReactIntl = require('react-intl');
const ReactRedux = require('react-redux'); const ReactRedux = require('react-redux');
const ReactRouter = require('react-router'); const ReactRouter = require('react-router');
const Button = require('@ui/components/button');
const Column = require('@ui/components/column'); const Column = require('@ui/components/column');
const PropTypes = require('@root/prop-types'); const PropTypes = require('@root/prop-types');
const Row = require('@ui/components/row'); const Row = require('@ui/components/row');
@ -26,19 +27,46 @@ const {
Link Link
} = ReactRouter; } = ReactRouter;
const EmptyServices = () => (
<div>
<Row name='empty-services'>
<Column md={6} xs={12}>
<h3>
<FormattedMessage id='add-services' />
</h3>
<p>
<FormattedMessage id='no-services' />
</p>
</Column>
</Row>
<Row>
<Button>
<FormattedMessage id='edit-project-manifest' />
</Button>
</Row>
<Row>
<p>
<FormattedMessage id='or-bring-in-from' />
</p>
</Row>
<Row>
<Column>
<Button secondary>GitHub</Button>
</Column>
<Column>
<Button secondary>BitBucket</Button>
</Column>
</Row>
</div>
);
const Services = ({ const Services = ({
org = {}, org = {},
project = {}, project = {},
services = [] services = []
}) => { }) => {
const empty = services.length ? null : ( const empty = services.length ? null : (
<Row> <EmptyServices />
<Column xs={12}>
<p name='empty'>
<FormattedMessage id='no-personal-projects' />
</p>
</Column>
</Row>
); );
const serviceList = (services) => { const serviceList = (services) => {