Commit ec793de0 authored by Matthieu Lamalle's avatar Matthieu Lamalle
Browse files

Merge branch 'action_server_peered' into 'develop'

enabled actions if server peered

See merge request !11
parents ae2c0566 4973b8a7
......@@ -14,7 +14,7 @@ class ApplyConf extends React.Component {
return {
label: 'Appliquer la configuration',
icon: 'FlashOn',
category: 'configuration'
category: 'actions'
};
}
......
......@@ -16,7 +16,7 @@ class DeployConf extends React.Component {
return {
label: 'Déploiement de la configuration',
icon: 'CloudUpload',
category: 'configuration'
category: 'actions'
};
}
......
......@@ -18,11 +18,14 @@ class ServerApps extends React.Component {
}
renderApps() {
const { availableApps, onAppClick } = this.props;
const { availableApps, onAppClick, peered} = this.props;
const categories = this.groupByCategory(availableApps);
return Object.keys(categories).map(categoryName => {
const apps = categories[categoryName];
const nodes = apps.map(app => {
console.log(peered)
console.log(app.category)
if ((peered === undefined || Object.keys(peered).length === 0) && app.category === 'actions'){return}
return (
<ListItem key={`app-${app.name}`}
button
......
......@@ -148,6 +148,7 @@ class ServerDetail extends React.Component {
</Typography>
<ServerApps server={server}
availableApps={availableApps}
peered={server.serverenvironment}
onAppClick={this.onAppClick} />
</GridListTile>
<GridListTile cols={2}>
......
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