mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
allow ICs to be re-created in case VILLAScontroller lost its state (got restarted)
This commit is contained in:
parent
1f6fda1c2e
commit
5870d6b1e0
2 changed files with 11 additions and 3 deletions
|
@ -73,10 +73,17 @@ class ICAction extends React.Component {
|
|||
* see: https://villas.fein-aachen.org/doc/controller-protocol.html
|
||||
*/
|
||||
|
||||
if (newAction.action === "delete") {
|
||||
if (newAction.action == "create" || newAction.action === "delete") {
|
||||
// prepare parameters for delete incl. correct IC id
|
||||
newAction["parameters"] = {};
|
||||
newAction.parameters["uuid"] = ic.uuid;
|
||||
|
||||
if (newAction.action == "delete") {
|
||||
newAction.parameters["uuid"] = ic.uuid;
|
||||
}
|
||||
else if (newAction.action == "create") {
|
||||
newAction.parameters = ic.statusupdateraw.properties;
|
||||
}
|
||||
|
||||
// get the ID of the manager IC
|
||||
let managerIC = null;
|
||||
for (let i of this.props.ics) {
|
||||
|
|
|
@ -514,7 +514,8 @@ class InfrastructureComponents extends Component {
|
|||
{id: '-1', title: 'Action', data: {action: 'none'}},
|
||||
{id: '0', title: 'Reset', data: {action: 'reset'}},
|
||||
{id: '1', title: 'Shutdown', data: {action: 'shutdown'}},
|
||||
{id: '2', title: 'Delete', data: {action: 'delete'}}
|
||||
{id: '2', title: 'Delete', data: {action: 'delete'}},
|
||||
{id: '3', title: 'Recreate', data: {action: 'create'}},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue