Commit e65442e3 authored by elebourgeois's avatar elebourgeois
Browse files

Merge branch 'feature/fixWarning' into develop

parents 592461f3 a64de1fd
......@@ -11,7 +11,7 @@ export function convertJIDToDate(jid) {
const date = new Date();
date.setUTCFullYear(d.year);
date.setUTCMonth(d.month);
date.setUTCMonth(d.month - 1);
date.setUTCDate(d.day);
date.setUTCHours(d.hours);
date.setUTCMinutes(d.minutes);
......@@ -19,4 +19,4 @@ export function convertJIDToDate(jid) {
return date;
}
\ No newline at end of file
}
......@@ -7,7 +7,7 @@ it('should convert a JID to a Date', () => {
const date = convertJIDToDate(jid);
expect(date.getUTCFullYear()).toBe(2018);
expect(date.getUTCMonth()).toBe(4);
expect(date.getUTCMonth()).toBe(3);
expect(date.getUTCDate()).toBe(25);
expect(date.getUTCHours()).toBe(11);
expect(date.getUTCMinutes()).toBe(13);
......
......@@ -76,7 +76,12 @@ class ServerModelDetail extends React.Component {
showServices = (servermodel) => {
const service = servermodel.services.map(el =>
<ListItem key={el.id} divider><ListItemText secondary={el.name}/></ListItem>
<ListItem key={el.id} divider>
<ListItemText
primary={el.name}
secondary={el.description}
/>
</ListItem>
);
return service;
};
......
......@@ -58,7 +58,6 @@ class ServerModelsList extends React.Component {
render() {
const { classes, servermodels } = this.props;
return (
<List className={classes.root}
ref={el => this.listElement = el}>
......@@ -69,7 +68,7 @@ class ServerModelsList extends React.Component {
infiniteLoadBeginEdgeOffset={this.state.listHeight-64}
elementHeight={64}>
{servermodels.map((servermodel) =>
<ServerModelsListItem key={servermodel.servermodelid} servermodels={servermodel} />
<ServerModelsListItem key={servermodel.model.servermodelid} servermodels={servermodel} />
)}
</Infinite>
</List>
......
......@@ -14,6 +14,7 @@ import {
} from '../../components';
import SearchBar from 'material-ui-search-bar';
import {
Search as SearchIcon,
Close as CloseIcon,
......@@ -68,9 +69,9 @@ class ServersIndex extends React.Component {
setTimeout(() => window.dispatchEvent(new Event('resize')), 200);
};
/*handleFilterChange = filter => {
// this.props.onFilterChange(filter);
};*/
// handleFilterChange = filter => {
// this.props.onFilterChange(filter);
// };
handleTabChange = (e, activeTab) => {
this.props.dispatch(uiActions.changeServersIndexTab(activeTab));
......@@ -148,7 +149,7 @@ class ServersIndex extends React.Component {
ServersIndex.propTypes = {
classes: PropTypes.object.isRequired,
theme: PropTypes.object.isRequired,
onFilterChange: PropTypes.func.isRequired,
// onFilterChange: PropTypes.func.isRequired,
selectedServer: PropTypes.string
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment