Skip to content

Commit

Permalink
Fix refresh bug
Browse files Browse the repository at this point in the history
  • Loading branch information
f9n committed Jan 22, 2019
1 parent 6694fd4 commit d5c966c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cesi/ui/src/common/helpers/Processes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ class ProcessLog extends React.Component {
}
}

const Process = ({ node, process, refreshNodes }) => {
const Process = ({ node, process, refresh }) => {
const handleProcess = action => {
const nodeName = node.general.name;
const processUniqueName = `${process.group}:${process.name}`;
api.processes.process[action](nodeName, processUniqueName).then(data => {
console.log(data);
refreshNodes();
refresh();
});
};

Expand Down Expand Up @@ -119,7 +119,7 @@ class Processes extends React.Component {
const nodeName = this.props.node.general.name;
api.nodes.allProcesses[action](nodeName).then(() => {
console.log("Updating nodes for single node action.");
this.props.refreshNodes();
this.props.refresh();
});
};

Expand Down Expand Up @@ -168,7 +168,7 @@ class Processes extends React.Component {
key={`${node.name}:${process.name}`}
node={node}
process={process}
refreshNodes={this.props.refreshNodes}
refresh={this.props.refresh}
/>
))}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion cesi/ui/src/scenes/nodes/NodesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class NodesPage extends Component {
<Processes
key={node.general.name}
node={node}
refreshNodes={refreshNodes}
refresh={refreshNodes}
/>
))}
</Col>
Expand Down

0 comments on commit d5c966c

Please sign in to comment.