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:
smainz
2022-12-01 21:41:36 +01:00
committed by GitHub
parent 5d1ec770c9
commit cfb288201f
5 changed files with 168 additions and 1 deletions

View File

@@ -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,