mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
WIP: IC page customization for VILLASnode #303
This commit is contained in:
parent
7935e8ff6a
commit
ea0ec52902
2 changed files with 27 additions and 2 deletions
21
src/ic/ic.js
21
src/ic/ic.js
|
@ -222,6 +222,27 @@ class InfrastructureComponent extends React.Component {
|
|||
collapsed={0}
|
||||
/> : <div>No valid JSON raw data available.</div>}
|
||||
|
||||
<b>Raw Config</b>
|
||||
{this.isJSON(this.state.ic.statusupdateraw["config"]) ?
|
||||
<ReactJson
|
||||
src={this.state.ic.statusupdateraw["config"]}
|
||||
name={false}
|
||||
displayDataTypes={false}
|
||||
displayObjectSize={false}
|
||||
enableClipboard={false}
|
||||
collapsed={0}
|
||||
/> : <div>No valid config JSON raw data available.</div>}
|
||||
<b>Raw Statistics</b>
|
||||
{this.isJSON(this.state.ic.statusupdateraw["statistics"]) ?
|
||||
<ReactJson
|
||||
src={this.state.ic.statusupdateraw["statistics"]}
|
||||
name={false}
|
||||
displayDataTypes={false}
|
||||
displayObjectSize={false}
|
||||
enableClipboard={false}
|
||||
collapsed={0}
|
||||
/> : <div>No valid statistics JSON raw data available.</div>}
|
||||
|
||||
{this.state.ic.type === "villas-node" ?
|
||||
<>
|
||||
<div className='section-buttons-group-right'>
|
||||
|
|
|
@ -102,7 +102,11 @@ class IcsDataManager extends RestDataManager {
|
|||
}
|
||||
|
||||
getStatus(url,token,ic){
|
||||
RestAPI.get(url + "/status", null).then(response => {
|
||||
let requestURL = url;
|
||||
if(ic.type === "villas-node"){
|
||||
requestURL += "/status";
|
||||
}
|
||||
RestAPI.get(requestURL, null).then(response => {
|
||||
AppDispatcher.dispatch({
|
||||
type: 'ics/status-received',
|
||||
data: response,
|
||||
|
@ -147,7 +151,7 @@ class IcsDataManager extends RestDataManager {
|
|||
let ws_api = ic.websocketurl.split("/")
|
||||
let ws_name = ws_api[ws_api.length-1] // name is the last element in the websocket url
|
||||
|
||||
RestAPI.get(url + "/node/" +ws_name + "/stats", null).then(response => {
|
||||
RestAPI.get(url + "/node/" + ws_name + "/stats", null).then(response => {
|
||||
AppDispatcher.dispatch({
|
||||
type: 'ics/statistics-received',
|
||||
data: response,
|
||||
|
|
Loading…
Add table
Reference in a new issue