Commit 299a20e2 authored by elebourgeois's avatar elebourgeois
Browse files

need redirect to servermodel when i click on modèle in serverPage

parent e65442e3
......@@ -118,7 +118,9 @@ class ServerDetail extends React.Component {
<ListItemText primary="Zone géographique" secondary="--" />
</ListItem>
<ListItem divider >
<ListItemText primary="Modèle" secondary={servermodel && servermodel.model.servermodelname} />
<Button component={Link} to={`/servermodels/${server.servermodelid}`}>
<ListItemText primary="Modèle" secondary={servermodel && `${servermodel.model.servermodelname} ${servermodel.model.subreleasename}`} />
</Button>
</ListItem>
</List>
</GridListTile>
......@@ -207,7 +209,7 @@ function mapStateToProps({ apps, servers, servermodels }, { match }) {
let servermodel;
if (server) {
servermodel = selectServermodelById(
servermodels.describeById,
servermodels.byId,
server.servermodelid
);
}
......
......@@ -117,7 +117,7 @@ class ServersPage extends React.Component {
server.servermodelid
);
if (servermodel) return Promise.resolve();
return dispatch(servermodelActions.describe(server.servermodelid));
return dispatch(servermodelActions.list(server.servermodelid));
});
}
......
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