Skip to content

Commit

Permalink
Merge pull request #2321 from CDJellen/master
Browse files Browse the repository at this point in the history
Possible fix to Issue #2315 (affects `templates/abilities.html`)
  • Loading branch information
wbooth authored Nov 3, 2021
2 parents 3ba436e + 49452dc commit b816e9c
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 118 deletions.
35 changes: 28 additions & 7 deletions templates/abilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,21 +290,40 @@ <h2>Abilities</h2>
<label class="label">timeout</label>
</div>
<div class="field-body">
<div class="field ">
<div class="field">
<div class="control">
<input class="input is-small" type="number" x-model="executor.timeout">
</div>
</div>
</div>
</div>
<template x-for="(cleanup, index) of executor.cleanup">
<div class="field is-horizontal">
<div class="field-label is-small">
<label class="label" x-text="index === 0 ? 'cleanup': ' '"></label>
</div>
<div class="field-body">
<div class="field has-addons">
<div class="control is-expanded">
<input class="input is-small code" x-model="executor.cleanup[index]"></input>
</div>
<div class="control">
<a class="button is-small has-tooltip-bottom has-tooltip-arrow" data-tooltip="Remove cleanup command" @click="executor.cleanup.splice(index, 1)">
<span class="icon is-small"><i class="fas fa-minus-square"></i></span>
</a>
</div>
</div>
</div>
</div>
</template>
<div class="field is-horizontal">
<div class="field-label is-small">
<div class="field-label is-small" x-show="!executor.cleanup.length">
<label class="label">cleanup</label>
</div>
<div class="field-body">
<div class="field ">
<div class="control">
<input class="input is-small code" x-model="executor.cleanup">
<div class="field">
<div class="control has-text-right">
<button class="button is-small is-primary" @click.stop="executor.cleanup.push('')">+ Add Cleanup Command</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -468,7 +487,8 @@ <h2>Abilities</h2>
singleton: true,
buckets: [],
requirements: [],
access: {}
access: {},
cleanup: []
};

this.addExecutorToAbility('before');
Expand Down Expand Up @@ -515,7 +535,8 @@ <h2>Abilities</h2>
const template = {
payloads: [],
platform: 'linux',
name: 'sh'
name: 'sh',
cleanup: []
};

if (bOrA === 'after') {
Expand Down
Loading

0 comments on commit b816e9c

Please sign in to comment.