mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-13 01:35:16 +00:00
Add button to trigger deployments (#1415)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Anbraten <anton@ju60.de> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
@@ -31,6 +31,17 @@
|
||||
:is-loading="isRestartingPipeline"
|
||||
@click="restartPipeline"
|
||||
/>
|
||||
<Button
|
||||
v-if="pipeline.status === 'success'"
|
||||
class="flex-shrink-0"
|
||||
:text="$t('repo.pipeline.actions.deploy')"
|
||||
@click="showDeployPipelinePopup = true"
|
||||
/>
|
||||
<DeployPipelinePopup
|
||||
:pipeline-number="pipelineId"
|
||||
:open="showDeployPipelinePopup"
|
||||
@close="showDeployPipelinePopup = false"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -66,7 +77,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { Tooltip } from 'floating-vue';
|
||||
import { computed, defineComponent, inject, onBeforeUnmount, onMounted, provide, Ref, toRef, watch } from 'vue';
|
||||
import { computed, defineComponent, inject, onBeforeUnmount, onMounted, provide, Ref, ref, toRef, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
@@ -135,6 +146,8 @@ export default defineComponent({
|
||||
|
||||
const { message } = usePipeline(pipeline);
|
||||
|
||||
const showDeployPipelinePopup = ref(false);
|
||||
|
||||
async function loadPipeline(): Promise<void> {
|
||||
if (!repo) {
|
||||
throw new Error('Unexpected: Repo is undefined');
|
||||
@@ -216,6 +229,7 @@ export default defineComponent({
|
||||
message,
|
||||
isCancelingPipeline,
|
||||
isRestartingPipeline,
|
||||
showDeployPipelinePopup,
|
||||
activeTab,
|
||||
since,
|
||||
duration,
|
||||
|
||||
Reference in New Issue
Block a user