Skip to content

Commit

Permalink
✨ : change stack state when modifying it
Browse files Browse the repository at this point in the history
if a stack is running, and a variable value is modified, set its state
to 'TO_UPDATE'
  • Loading branch information
juwit committed Jun 10, 2019
1 parent 62591bd commit 471ce87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/resources/templates/stack.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

<template id="template">
<div>

<div class="row">
<div class="col-md-12">
<div class="white_shd full margin_bottom_30">
Expand Down Expand Up @@ -139,7 +140,7 @@ <h2>Module variables values</h2>
<div class="form-row align-items-end" v-for="(modVar,modVarIdx) in stack.module.variables">
<div class="form-group col-md-4" >
<label for="var-name">{{modVar.name}}: </label>
<input type="text" class="form-control" id="var-name" v-model="stack.variableValues[modVar.name]">
<input type="text" class="form-control" id="var-name" v-model="stack.variableValues[modVar.name]" @change="recomputeState">
<small id="emailHelp" class="form-text text-muted">{{modVar.description}}</small>
</div>
</div>
Expand Down Expand Up @@ -237,6 +238,13 @@ <h3><span><i class="fas fa-history"></i> Job history</span></h3>
settings
},
template: "#template",
methods: {
recomputeState: function(){
if(stack.state === "RUNNING"){
stack.state = "TO_UPDATE";
}
}
}
});

// highlight code !
Expand Down

0 comments on commit 471ce87

Please sign in to comment.