|
190 | 190 | <el-button
|
191 | 191 | type="primary"
|
192 | 192 | @click="postBackfill()"
|
193 |
| - :disabled="checkBackfill()" |
| 193 | + :disabled="checkBackfill" |
194 | 194 | >
|
195 | 195 | {{ $t("execute backfill") }}
|
196 | 196 | </el-button>
|
|
293 | 293 | },
|
294 | 294 | cleanBackfill() {
|
295 | 295 | return {...this.backfill, labels: this.backfill.labels.filter(label => label.key && label.value)}
|
296 |
| - } |
297 |
| - }, |
298 |
| - methods: { |
299 |
| - userCan(action) { |
300 |
| - return this.user.isAllowed(permission.EXECUTION, action ? action : action.READ, this.flow.namespace); |
301 |
| - }, |
302 |
| - loadData() { |
303 |
| - if(!this.triggersWithType.length) return; |
304 |
| -
|
305 |
| - this.$store |
306 |
| - .dispatch("trigger/find", {namespace: this.flow.namespace, flowId: this.flow.id, size: this.triggersWithType.length}) |
307 |
| - .then(triggers => this.triggers = triggers.results); |
308 |
| - }, |
309 |
| - setBackfillModal(trigger, bool) { |
310 |
| - this.isBackfillOpen = bool |
311 |
| - this.selectedTrigger = trigger |
312 | 296 | },
|
313 | 297 | checkBackfill() {
|
314 | 298 | if (!this.backfill.start) {
|
|
319 | 303 | }
|
320 | 304 | if (this.flow.inputs) {
|
321 | 305 | const requiredInputs = this.flow.inputs.map(input => input.required !== false ? input.id : null).filter(i => i !== null)
|
| 306 | +
|
322 | 307 | if (requiredInputs.length > 0) {
|
323 | 308 | if (!this.backfill.inputs) {
|
324 | 309 | return true
|
325 | 310 | }
|
326 |
| - const fillInputs = Object.keys(this.backfill.inputs).filter(i => this.backfill.inputs[i]) |
| 311 | + const fillInputs = Object.keys(this.backfill.inputs).filter(i => this.backfill.inputs[i] !== null && this.backfill.inputs[i] !== undefined); |
327 | 312 | if (requiredInputs.sort().join(",") !== fillInputs.sort().join(",")) {
|
328 | 313 | return true
|
329 | 314 | }
|
|
338 | 323 | }
|
339 | 324 | return false
|
340 | 325 | },
|
| 326 | + }, |
| 327 | + methods: { |
| 328 | + userCan(action) { |
| 329 | + return this.user.isAllowed(permission.EXECUTION, action ? action : action.READ, this.flow.namespace); |
| 330 | + }, |
| 331 | + loadData() { |
| 332 | + if(!this.triggersWithType.length) return; |
| 333 | +
|
| 334 | + this.$store |
| 335 | + .dispatch("trigger/find", {namespace: this.flow.namespace, flowId: this.flow.id, size: this.triggersWithType.length}) |
| 336 | + .then(triggers => this.triggers = triggers.results); |
| 337 | + }, |
| 338 | + setBackfillModal(trigger, bool) { |
| 339 | + this.isBackfillOpen = bool |
| 340 | + this.selectedTrigger = trigger |
| 341 | + }, |
341 | 342 | postBackfill() {
|
342 | 343 | this.$store.dispatch("trigger/update", {
|
343 | 344 | ...this.selectedTrigger,
|
|
0 commit comments