Skip to content

Commit

Permalink
Merge pull request #5089 from FlowFuse/5079-allow-dev-mode-device-in-…
Browse files Browse the repository at this point in the history
…pipeline

Allow a dev-mode device at Stage 0 to be triggered
  • Loading branch information
Steve-Mcl authored Feb 7, 2025
2 parents f39d095 + 0815eed commit 5776a61
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions frontend/src/components/pipelines/Stage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-if="stage" class="ff-pipeline-stage" data-el="ff-pipeline-stage" :class="{'ff-pipeline-stage--error': inDeveloperMode}">
<div v-if="stage" class="ff-pipeline-stage" data-el="ff-pipeline-stage" :class="{'ff-pipeline-stage--error': inDeveloperMode && stageIndex > 0}">
<div class="ff-pipeline-stage-banner">
<div class="ff-pipeline-stage-banner-name">
<label>{{ stage.name }}</label>
Expand Down Expand Up @@ -33,7 +33,7 @@
v-if="stage.stageType !== StageType.DEVICEGROUP"
v-ff-tooltip:right="'Run Pipeline Stage'"
data-action="stage-run"
:class="{'ff-disabled': !playEnabled || !pipeline?.id || deploying || inDeveloperMode}"
:class="{'ff-disabled': !playEnabled || !pipeline?.id || deploying }"
@click="runStage"
>
<PlayIcon
Expand Down Expand Up @@ -213,6 +213,9 @@ export default {
},
emits: ['stage-deleted', 'stage-deploy-starting', 'stage-deploy-started', 'stage-deploy-failed'],
computed: {
stageIndex () {
return this.pipeline.stages.indexOf(this.stage)
},
deploying () {
return this.stage.isDeploying
},
Expand Down Expand Up @@ -258,9 +261,9 @@ export default {
}
}
if (this.pipeline.stages.length > 0 && this.pipeline.stages.indexOf(this.stage) > 0) {
if (this.pipeline.stages.length > 0 && this.stageIndex > 0) {
route.query = {
sourceStage: this.pipeline.stages[this.pipeline.stages.indexOf(this.stage)].id
sourceStage: this.pipeline.stages[this.stageIndex].id
}
}
Expand Down

0 comments on commit 5776a61

Please sign in to comment.