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

receive config of VILLASnode based on apihost parameter of IC

This commit is contained in:
Sonja Happ 2020-07-01 13:10:46 +02:00
parent b8a4544710
commit c00c16ddb5
2 changed files with 2 additions and 10 deletions

View file

@ -394,23 +394,16 @@ class Scenario extends React.Component {
signalsAutoConf(index){
let componentConfig = this.state.configs[index];
console.log("Signal AutoConf for CC: ", componentConfig);
// determine host of infrastructure component
let ic = this.state.ics.filter(ic => ic.id === componentConfig.icID)
console.log("Signal AutoConf for IC: ", ic);
let ic = this.state.ics.find(ic => ic.id === componentConfig.icID)
let request = {};
request["id"] = this.uuidv4();
request["action"] = "config"
// TODO add parameter for API host in data model of infrastructure component
let api = 'https://villas.k8s.eonerc.rwth-aachen.de/ws/api/v1'
AppDispatcher.dispatch({
type: 'signals/start-autoconfig',
data: request,
url: api
url: ic.apihost
});
}

View file

@ -42,7 +42,6 @@ class SignalsDataManager extends RestDataManager{
// data contains the request data: { action, id, (request)}
// See documentation of VILLASnode API: https://villas.fein-aachen.org/doc/node-dev-api-node.html
console.log("startAutoConfig: POST to ", url, ": ", data);
RestAPI.post(url, data).then(response => {
AppDispatcher.dispatch({
type: 'signals/autoconfig-loaded',