Skip to content

Commit 8319f1c

Browse files
authored
Add control to automatically update indicators from DFIQ (#175)
1 parent 8a70ff8 commit 8319f1c

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/components/EditDFIQObject.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
<v-card-title>{{ localObject.name }}</v-card-title>
44
<v-card-subtitle>Editing DFIQ {{ localObject.type }}</v-card-subtitle>
55
<v-card-text>
6+
<v-checkbox-btn
7+
v-if="localObject.type === 'approach'"
8+
label="Automatically create new indicators from Approach"
9+
density="compact"
10+
hide-details
11+
color="primary"
12+
class="mb-5"
13+
v-model="updateApproachIndicators"
14+
></v-checkbox-btn>
615
<v-textarea class="yeti-code" label="DFIQ Yaml" auto-grow v-model="localObject.dfiq_yaml"></v-textarea>
716
<div v-if="yamlValidationError === 'valid'">
817
<v-alert type="success">YAML is valid!</v-alert>
@@ -75,7 +84,8 @@ export default {
7584
dfiq: "dfiq"
7685
},
7786
validatingYaml: false,
78-
yamlValidationError: ""
87+
yamlValidationError: "",
88+
updateApproachIndicators: true
7989
};
8090
},
8191
mounted() {},
@@ -100,9 +110,14 @@ export default {
100110
saveObject() {
101111
let patchRequest = {
102112
dfiq_type: this.localObject.type,
103-
dfiq_yaml: this.localObject.dfiq_yaml
113+
dfiq_yaml: this.localObject.dfiq_yaml,
114+
update_indicators: false
104115
};
105116
117+
if (this.localObject.type === "approach") {
118+
patchRequest.update_indicators = this.updateApproachIndicators;
119+
}
120+
106121
axios
107122
.patch(`/api/v2/dfiq/${this.localObject.id}`, patchRequest)
108123
.then(response => {

0 commit comments

Comments
 (0)