1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

show ICstatus props in JSONview #265

This commit is contained in:
Sonja Happ 2021-01-26 17:28:03 +01:00
parent 98e9e86757
commit 935bf3894f

View file

@ -16,18 +16,9 @@ class ICDialog extends React.Component {
this.state = {
confirmCommand: false,
command: '',
icStatus: {}
};
}
static getDerivedStateFromProps(props, state){
if(typeof props.icStatus !== 'undefined'){
return {icStatus: props.icStatus}
} else {
return {}
}
}
onClose(canceled) {
this.props.onClose();
}
@ -58,9 +49,6 @@ class ICDialog extends React.Component {
render() {
let icStatus = this.state.icStatus;
delete icStatus['icID'];
let graphURL = ""
if (this.props.ic.apiurl !== ""){
graphURL = this.props.ic.apiurl + "/graph.svg"
@ -83,7 +71,7 @@ class ICDialog extends React.Component {
<h5>Status:</h5>
<ReactJson
src={icStatus}
src={this.props.icStatus}
name={false}
displayDataTypes={false}
displayObjectSize={false}