Skip to content

Commit

Permalink
Created base for devices view.
Browse files Browse the repository at this point in the history
  • Loading branch information
kallaspriit committed Aug 4, 2016
1 parent 86a0d67 commit 3008653
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"eol-last": "off",
"no-console": "off",
"no-underscore-dangle": "off",
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
"react/prefer-stateless-function": "off"
},
"globals": {
"document": true
Expand Down
2 changes: 1 addition & 1 deletion config/cumulocity-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
tenant: 'telia',
host: 'cumulocity.com',
protocol: 'https',
tenant: 'telia',
username: 'priit.kallas@telia.ee',
password: 'purgisupp',
};
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"density": 4.0
}
],
"start_url": "/device",
"start_url": "/devices",
"display": "standalone",
"orientation": "portrait"
}
4 changes: 3 additions & 1 deletion routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import React from 'react';
import { Route, IndexRedirect } from 'react-router';

import RootView from './views/RootView';
import DevicesView from './views/DevicesView';
import DeviceView from './views/DeviceView';
import UserView from './views/UserView';

export default [
<Route path="/" component={RootView}>
<Route path="devices" component={DevicesView} />
<Route path="device" component={DeviceView} />
<Route path="user" component={UserView} />
<IndexRedirect to="device" />
<IndexRedirect to="devices" />
</Route>,
];
27 changes: 27 additions & 0 deletions views/DevicesView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';

import Card from 'material-ui/Card/Card';
import CardText from 'material-ui/Card/CardText';

import HeaderComponent from './components/HeaderComponent';

class DevicesView extends Component {
render() {
return (
<div className="devices-view">
<HeaderComponent title="Devices" />
<Card className="main-contents">
<CardText>
...
</CardText>
</Card>
</div>
);
}
}

export default connect(
state => ({}),
{}
)(DevicesView);
27 changes: 27 additions & 0 deletions views/EmptyView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';

import Card from 'material-ui/Card/Card';
import CardText from 'material-ui/Card/CardText';

import HeaderComponent from './components/HeaderComponent';

class EmptyView extends Component {
render() {
return (
<div className="empty-view">
<HeaderComponent title="Empty" />
<Card className="main-contents">
<CardText>
...
</CardText>
</Card>
</div>
);
}
}

export default connect(
state => ({}),
{}
)(EmptyView);
1 change: 1 addition & 0 deletions views/components/DrawerMenuComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class DrawerMenuComponent extends Component {
docked={false}
disableSwipeToOpen={false}
>
<MenuItem onTouchTap={this.handleOpen('devices')}>Devices</MenuItem>
<MenuItem onTouchTap={this.handleOpen('device')}>Device</MenuItem>
<MenuItem onTouchTap={this.handleOpen('user')}>User</MenuItem>
</Drawer>
Expand Down

0 comments on commit 3008653

Please sign in to comment.